The making of profit, directly or indirectly, by the county treasurer out of any money in the county treasury belonging to the county, the custody of which the treasurer is charged with, by loaning or depositing or otherwise using or depositing the same in any manner, or the removal by the county treasurer or by his or her consent of such money or a part thereof out of the vault of the treasurer's department or any legal depository of the same, except for the payment of warrants legally drawn or for the purpose of depositing the same in the banks, capital stock financial institutions, or qualifying mutual financial institutions selected as depositories under sections 77-2312 to 77-2324, shall be deemed a Class IV felony, and the county treasurer shall also be liable under and upon his or her official bond for all profits realized from such unlawful using of such funds.