The trustee shall apply the proceeds of the sale as follows:
(1) To the expense of sale, including a reasonable charge by the trustee and by his or her attorney: PROVIDED, That the aggregate of the charges by the trustee and his or her attorney, for their services in the sale, shall not exceed the amount which would, by the superior court of the county in which the trustee's sale occurred, have been deemed a reasonable attorney fee, had the trust deed been foreclosed as a mortgage in a noncontested action in that court;
(2) To the obligation secured by the deed of trust; and
(3) The surplus, if any, less the clerk's filing fee, shall be deposited, together with written notice of the amount of the surplus, a copy of the notice of trustee's sale, and an affidavit of mailing as provided in this subsection, with the clerk of the superior court of the county in which the sale took place. The trustee shall mail copies of the notice of the surplus, the notice of trustee's sale, and the affidavit of mailing to each party to whom the notice of trustee's sale was sent pursuant to RCW 61.24.040
(1). The clerk shall index such funds under the name of the grantor as set out in the recorded notice. Upon compliance with this subsection, the trustee shall be discharged from all further responsibilities for the surplus. Interests in, or liens or claims of liens against the property eliminated by sale under this section shall attach to the surplus in the order of priority that it had attached to the property, as determined by the court. A party seeking disbursement of the surplus funds shall file a motion requesting disbursement in the superior court for the county in which the surplus funds are deposited. Notice of the motion shall be personally served upon, or mailed in the manner specified in RCW 61.24.040
(1)(b), to all parties to whom the trustee mailed notice of the surplus, and any other party who has entered an appearance in the proceeding, not less than twenty days prior to the hearing of the motion. The clerk shall not disburse such surplus except upon order of the superior court of such county.