Last active
January 31, 2024 09:57
-
-
Save okumura/7173625 to your computer and use it in GitHub Desktop.
Get PEB for Windows.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LPVOID mw32GetPeb() { | |
#if defined(_WIN64) | |
UINT64 uiPeb = __readgsqword(0x60); | |
return (LPVOID) (UINT_PTR) uiPeb; | |
#else | |
UINT32 uiPeb = __readfsdword(0x30); | |
return (LPVOID) (UINT_PTR) uiPeb; | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment