Well, after trying to flash the stock ROM and getting the "encrypted device" message, I booted into recovery. Strangely the Cyanogenmod recovery started. A factory reset got rid of the "encrypted device" message, but now the phone boots into Cyanogenmod.
To make things worse, Trebuchet...