Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "main.h"
- DWORD WINAPI hackThread(LPVOID lpParam)
- {
- HACKSTATUS *status;
- status = (HACKSTATUS*)lpParam;
- if (status->window == NULL) return 50;
- HANDLE proc;
- DWORD procId;
- GetWindowThreadProcessId(status->window, &procId);
- proc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, procId);
- if (proc == NULL) return 51;
- HMODULE engineBase = getRemoteModule(proc, L"engine.dll");
- if (engineBase > 0) { CloseHandle(proc); return 60+(DWORD)engineBase; }
- HMODULE clientBase = getRemoteModule(proc, L"client.dll");
- if (clientBase > 0) { CloseHandle(proc); return 70+(DWORD)clientBase; }
- FLOAT speedhack = 0;
- FLOAT speedhack_max = 5;
- BYTE bTemp[4] = {0, 0, 0, 0};
- FLOAT fTemp;
- DWORD dwTemp;
- while (!GetAsyncKeyState(VK_END))
- {
- ReadProcessMemory(proc, (LPVOID)(ABS_OFFSET_HOSTTIMESCALE), (LPVOID)&fTemp, sizeof(FLOAT), NULL);
- status->host_timescale = fTemp;
- ReadProcessMemory(proc, (LPVOID)(ABS_OFFSET_SVCHEATS), (LPVOID)&dwTemp, sizeof(DWORD), NULL);
- status->sv_cheats = dwTemp;
- ReadProcessMemory(proc, (LPVOID)(ABS_OFFSET_RDRAWOTHERMODELS), (LPVOID)&dwTemp, sizeof(DWORD), NULL);
- status->r_drawothermodels = dwTemp;
- if (lpParam != NULL) lpParam = (LPVOID)status;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement