Whenever any person has been compelled to pay to any prosecuting attorney, clerk of the court, or sheriff, under mere color of judicial proceedings in attachment or garnishment at the suit of the state, the amount of any forfeited recognizance, such person so paying shall, from the date of such payment, be subrogated as against the recognizors in such recognizance, to all the rights of the state under such recognizance, and shall have a cause of action against such recognizors for the amount so paid, as if such recognizance and all the rights of the state under the same had been assigned by the state to the person or persons so paying, at the date of such payment.
IC 35-33-8.5-10