What exactly does a comptroller do?
control the money.
sort of like a treasurer?
Sorta, but they are not the same. Here in South Carolina we have both a Comptroller General and a State Treasurer as constitutional offices. The Treasurer basically gets to sign the checks and the Comptroller makes certain that the treasurer was supposed to. However, they have quite a bit more power in South Carolina than in most states. They are two of the five members of our Budget and Control Board (along with the Governor and the chairs of the House and Senate budget commitees). Bureaucratically, the B&CB acts like the GSA at the federal level except that it has the obligation to cut spending mid fiscal year if revenues aren't meeting projections and the power to decide where those cuts are going to come from. Needless to say, the General Assembly usually does its best to avoid having the B&CB to wield that budget axe, since it only has control over two of the five votes. It's one of the few unique features of my state's political system I wish were widely copied because it works.