Phyt0n

C++ DllMain

Jan 27th, 2018
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.33 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <stdio.h>
  3. #include <Windows.h>
  4.  
  5.  
  6. DWORD *ingame = (DWORD*)0xBASEPOINTER;  // Ingame Pointer
  7.  
  8. void Health()
  9. {
  10.     if (*ingame)
  11.     {
  12.         if (GetAsyncKeyState(VK_NUMPAD5))  //Wait for Button
  13.         {
  14.             DWORD *hp = (DWORD*)0xMainPointer; //MainPointer
  15.             DWORD *hp2 = (DWORD*)((*hp) + 0xOFFSET); // Offset
  16.             *(int*)hp2 = (int)800;  // Int, Cha, Double, Flout
  17.         }
  18.     }
  19. }
  20.  
  21. void Kevlar()
  22. {
  23.     if (GetAsyncKeyState(VK_NUMPAD2))
  24.     {
  25.         DWORD *kev = (DWORD*)0x509B74;
  26.         DWORD *kev2 = (DWORD*)((*kev) + 0xFC);
  27.         *(int*)kev2 = (int)200;
  28.     }
  29. }
  30.  
  31. void Nade()
  32. {
  33.     if (GetAsyncKeyState(VK_NUMPAD0))
  34.     {
  35.         DWORD *nade = (DWORD*)0x509B74;
  36.         DWORD *nade2 = (DWORD*)((*nade) + 0x158);
  37.         *(int*)nade2 = (int)20;
  38.     }
  39. }
  40.  
  41. void HThread()
  42. {
  43.     for (;;)
  44.     {
  45.         Nade();
  46.         Kevlar();
  47.         Health();
  48.         Sleep(21); //prevent for overloading the cpu
  49.     }
  50. }
  51.  
  52. BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpReserved)
  53. {
  54.     if (dwReason == DLL_PROCESS_ATTACH)
  55.     {
  56.         CreateThread(0, 0, (LPTHREAD_START_ROUTINE)HThread, 0, 0, 0); //create the hackthread
  57.         MessageBoxA(0, "Integrate Successful!!", "Successful", 0);    //create the Successful Message
  58.     }
  59.     return TRUE;
  60. }
Advertisement
Add Comment
Please, Sign In to add comment