vxug-WinAPI-Tricks/GetPEB.c
2021-02-20 20:37:15 -06:00

21 lines
279 B
C

#include <windows.h>
#include "PEB.h"
PPEB GetPeb(VOID)
{
#if defined(_WIN64)
return (PPEB)__readgsqword(0x60);
#elif define(_WIN32)
return (PPEB)__readfsdword(0x30);
#endif
}
INT main(VOID)
{
PPEB Peb;
Peb = (PPEB)GetPeb();
return ERROR_SUCCESS;
}