Section 161B. Any alien insurer now or hereafter licensed to do business in the commonwealth which owns beneficially, directly or indirectly, all of the outstanding capital stock of a domestic insurer may, with the prior written approval of the commissioner and subject to the final approval of the commissioner, domesticate its United States branch, if its principal office in the United States is located in the commonwealth, by entering into an agreement in writing with said domestic insurer providing for the acquisition by said domestic insurer of the business and assets of said United States branch and the assumption by said domestic insurer of all the liabilities of said United States branch for no consideration other than the assumption of such liabilities, except that the agreement may further provide for additional consideration payable by the issuance by the acquiring domestic insurer of shares of its capital stock. For the purposes of this section and sections one hundred and sixty-one C to one hundred and sixty-one E, inclusive, shares of capital stock of the acquiring domestic insurer or voting trust certificates representing said shares, which are held among the trusteed assets of the United States branch of the alien insurer or which are held in a trust created by the alien insurer and of which the alien insurer is a beneficiary, shall be deemed to be shares held beneficially, but indirectly, by an alien insurer. The acquisition of the assets and the assumption of liabilities of the United States branch by the domestic insurer shall be effected by filing with the commissioner an instrument of transfer and assumption which shall be in form satisfactory to the commissioner and shall be executed by the alien insurer and the domestic insurer. A domestic insurer may either be licensed to engage in the insurance business in the commonwealth prior to entering into such domestication agreement, or may, if the commissioner so approves, be licensed effective with the consummation of the domestication agreement. Nothing in this section or in sections one hundred and sixty-one C to one hundred and sixty-one E, inclusive, shall be construed to authorize any insurance company to do any kind of insurance business not authorized by its charter or to authorize any foreign or alien insurance company to do any kind of insurance business in the commonwealth not authorized by its license or certificate of authority to do business in the commonwealth.