A $5 million hack that has baffled investigators in Brazil was thwarted with assistance from local OTC trading desks.