Cash, checks or securities deposited hereunder shall not be subject to garnishment or attachment. No assignment thereof shall be valid unless it be in writing, signed by the depositor, before 2 witnesses, acknowledged before an officer having authority to take the acknowledgment of deeds, and specifically stating the desired disposition of the whole of the deposit. An assignment made before the order of the court directing the disposition of such cash, check or security shall be contingent upon the discharge of the same and shall not be valid or effective unless and until it is filed with the court having jurisdiction to discharge the bond or bail. No assignment made after the order of the court discharging such bail or bond shall be valid unless it is indorsed upon or attached to the certified copy of the discharge order presented to the treasurer, clerk or officer having custody of the cash, check or security. In case 1 or more assignments be filed with the court before the order discharging the bail or bond, the court shall, in the order, determine the persons to whom such cash shall be paid or securities delivered.
MCL 765.16