Skip to content

Instantly share code, notes, and snippets.

@namazso
Created December 15, 2021 07:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save namazso/125534d4e0710fc69c91fd50f6b95fcd to your computer and use it in GitHub Desktop.
Save namazso/125534d4e0710fc69c91fd50f6b95fcd to your computer and use it in GitHub Desktop.
get/set RFLAGS with perfect unwinding
.code
getflags PROC FRAME
pushfq
.pushreg rax
.endprolog
.beginepilog
pop rax
ret
getflags ENDP
setflags PROC FRAME
push rcx
.pushreg rcx
.endprolog
.beginepilog
popfq
ret
setflags ENDP
END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment