BOOL __declspec(dllexport) WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID _Reserved)
{
switch(dwReason)
{
case DLL_PROCESS_ATTACH:
{
HMODULE ws2_32 = API_GetModuleHandle(S_WS2_32),
kernel32 = API_GetModuleHandle(S_KERNEL32);
DWORD _GetProcAddress = (DWORD)API_GetProcAddress(kernel32, S_GETPROCADDRESS);
_ReadProcessMemory = (DWORD)API_GetProcAddress(kernel32, S_READPROCMEMORY);
_WriteProcessMemory = (DWORD)API_GetProcAddress(kernel32, S_WRITEPROCMEMORY);
applyHooks();
}
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
break;
}
return true;
}