A pattern of greed and corruption. That's what authorities say about an investigation that ended with the arrest of 12 jail guards and 17 others.