In any action or proceeding to dissolve a corporation, the court, at any time before judgment, or within three years after judgment, of dissolution, may appoint a receiver to take charge of its estate and effects and to collect the debts and property due and belonging to it, with, in addition to the powers set forth in chapter 576, power to prosecute and defend actions in its name or otherwise, to appoint agents, and do all other acts necessary to the final settlement of the unfinished business of the corporation which it might do if in being. The power of such receiver shall continue so long as the court deems necessary for such purposes. The receiver shall pay all debts due from the corporation, if the funds in hand are sufficient therefor; and, if not, the assets of the corporation or the proceeds resulting from a sale, lease, transfer, or other disposition shall be applied in the order of priority set forth in section 576.51. After payment of the expenses of the receivership and claims of creditors duly proved, the remaining assets, if any, shall be distributed to the shareholders in accordance with section 302A.551, subdivision 4. Every receiver appointed under the provisions of this section shall give bond as required by section 576.27 in such amount as the court shall require, with sureties approved by it.