ntoskrnl.exe: Add a helper function for accessing registers.