Any national bank, federal savings association, federally chartered trust company, or out-of-state trust company authorized under the Interstate Trust Company Office Act or otherwise doing business in this state, which has surrendered its right to exercise such fiduciary powers in this state may have its pledged securities released to it upon furnishing to the Department of Banking and Finance a certificate by its primary financial institution regulator that such financial institution is no longer authorized to exercise such powers and has been relieved, in accordance with the laws of this state, of all duties and obligations as assignee, receiver, or trustee, either by appointment of court or under will, and for depository of money in court. Any out-of-state entity acting in a fiduciary capacity in this state which has surrendered its right to exercise such fiduciary powers in this state may have its pledged securities released to it upon furnishing to the department such proof as the department may require to show that such out-of-state entity is no longer acting as a fiduciary in this state.