viewing paste Unknown #17499 | C

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
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;
}
Viewed 608 times, submitted by milk.