I have checked 4 files from different cameras (iOS, 2xNikon and Canon)
In all the cases, the 00 0X values are stored in offset 0x36 from the start of the file (the pos +0x36 holds the 00 and +0x37 holds the 0X). In iOS and Nikon it is 00 0X and Canon uses 0X 00. Also noted all other values are big-endian or the hell is called (bytes swaped)
So iOS and Nikon are
01 12 00 03 00 00 00 01 00 0X
and Canon
12 01 03 00 01 00 00 00 0X 00
bastards...
If it safe to do a Rotation=byte(start+0x36)+byte(start+0x37)?
Checked jpeg files saved by photoshop and there was not exif orientation information, so you will have to look for 01 12 00 03 00 00 00 01, if fails, 12 01 03 00 01 00 00 00, and if fail again, ignore rotation.