Assault Cube Hack Source

WoodenFloorBoard

New Member
Messages
16
Points
3
Hi! Since i'm trying to learn C++, I thought what would be a better way to learn than to make a hack. So I've decided to release the source to one of my first hacks created in C++! I hopy you enjoy! ♥

Code:
#include <Windows.h>
#include <iostream>

  //Write Bytes :P
void WriteB(void* Address, void* ptr, int Size)
{
   DWORD old_protect;
   VirtualProtect(Address, Size, PAGE_EXECUTE_READWRITE, &old_protect);
   memcpy(Address, ptr, Size);
   VirtualProtect(Address, Size, old_protect, &old_protect);
}

struct Player
{
public:
   DWORD baseAddress = 0x50F4F4;
   DWORD healthAddy = 0xF8;
   DWORD armourAddy = 0xFC;
   DWORD rifleAddy = 0x150;
   DWORD pistolAddy = 0x13C;
   DWORD grenadeAddy = 0x158;
}MyPlayer;

DWORD DoThese()
{
   for (;; Sleep(150))
   {
     DWORD myBase = *(DWORD*)MyPlayer.baseAddress;

     if (myBase)
     {
       *(DWORD*)(myBase + MyPlayer.rifleAddy) = 999999;
       *(DWORD*)(myBase + MyPlayer.pistolAddy) = 999999;
       *(DWORD*)(myBase + MyPlayer.grenadeAddy) = 999999;
       *(DWORD*)(myBase + MyPlayer.healthAddy) = 999999;
       *(DWORD*)(myBase + MyPlayer.armourAddy) = 999999;
     }
   }
   WriteB((void*)0x00409FB3, (PBYTE)("\x39\xC0\x90\x90\x90\x90"), 6); //Radar Hack :P
}

BOOL WINAPI DllMain(HINSTANCE hModule, DWORD fdwReason, LPVOID lpReserved)
{
   switch (fdwReason)
   {
   case DLL_PROCESS_ATTACH:
     CreateThread(0, 0, (LPTHREAD_START_ROUTINE)DoThese, 0, 0, 0);
     MessageBoxA(NULL, "Hey There!", "You're Attached!", MB_OK);
   }
   return TRUE;
}
 
  • Like
Reactions: P!X

Top