Default New Firmware?

Hey guys I want to update my firmware so I can be fully compatible with Android revolution hd Roms and the new viperone ROM. Can I flash a firmware through TWRP and if I can does it matter what m8 I have? (Cid num, s-on or off, stock ROM?)
Sent from my HTC One_M8 using XDA Free mobile app