#include<stdio.h> #include<Windows.h> __declspec(naked) DWORD getKernel32() { __asm { mov eax,fs:[30h] mov eax,[eax+0ch] mov eax,[eax+14h] mov eax,[eax] mov eax,[eax] mov eax,[eax+10h] ret } } int main() { HMODULE hModule = (HMODULE)getKernel32(); printf("0x%08X\n", hModule); printf("0x%08X\n", LoadLibraryA("kernel32.dll")); }