Insurance companies organized and doing business by virtue of the laws of this state may sell, assign, transfer, and convey, either with or without warranty, or either with or without recourse upon it, as it may prefer, any real estate, personal property, bond, note, mortgage, deed of trust, deed to secure debt, or other form of property or securities in which it may have invested its money or its assets or on which it may have made loans as allowed by law and may also buy and sell any realty that may be necessary for the protection of any loan such insurance company may lawfully make.