Advertisement
captmicro

Untitled

Jun 17th, 2010
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.20 KB | None | 0 0
  1. #include "main.h"
  2.  
  3. DWORD WINAPI hackThread(LPVOID lpParam)
  4. {
  5.     HACKSTATUS *status;
  6.     status = (HACKSTATUS*)lpParam;
  7.  
  8.     if (status->window == NULL) return 50;
  9.  
  10.     HANDLE proc;
  11.     DWORD procId;
  12.  
  13.     GetWindowThreadProcessId(status->window, &procId);
  14.    
  15.     proc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, procId);
  16.     if (proc == NULL) return 51;
  17.  
  18.     HMODULE engineBase = getRemoteModule(proc, L"engine.dll");
  19.     if (engineBase > 0) { CloseHandle(proc); return 60+(DWORD)engineBase; }
  20.     HMODULE clientBase = getRemoteModule(proc, L"client.dll");
  21.     if (clientBase > 0) { CloseHandle(proc); return 70+(DWORD)clientBase; }
  22.  
  23.     FLOAT speedhack = 0;
  24.     FLOAT speedhack_max = 5;
  25.  
  26.     BYTE bTemp[4] = {0, 0, 0, 0};
  27.     FLOAT fTemp;
  28.     DWORD dwTemp;
  29.  
  30.     while (!GetAsyncKeyState(VK_END))
  31.     {
  32.         ReadProcessMemory(proc, (LPVOID)(ABS_OFFSET_HOSTTIMESCALE), (LPVOID)&fTemp, sizeof(FLOAT), NULL);
  33.         status->host_timescale = fTemp;
  34.         ReadProcessMemory(proc, (LPVOID)(ABS_OFFSET_SVCHEATS), (LPVOID)&dwTemp, sizeof(DWORD), NULL);
  35.         status->sv_cheats = dwTemp;
  36.         ReadProcessMemory(proc, (LPVOID)(ABS_OFFSET_RDRAWOTHERMODELS), (LPVOID)&dwTemp, sizeof(DWORD), NULL);
  37.         status->r_drawothermodels = dwTemp;
  38.  
  39.         if (lpParam != NULL) lpParam = (LPVOID)status;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement