Fixed issue with reading wrong register for extended cpu flags.
Updated the memory protected by mprotect to only have to permissions needed. Instead of being read, write, executable all the time.