Code:
// Credits HackerFail and Fleep
#include "address.h"
class cPlayerInfo
{
public:
char _0x0000[4];
float PosX; //0x0004
float PosZ; //0x0008
float PosY; //0x000C
float SuperVelocidade1; //0x0010
float SuperVelocidade2; //0x0014
float SuperPulo; //0x0018
char _0x001C[24];
float Teletransportar1; //0x0034
float Teletransportar2; //0x0038
float PuloVirtual; //0x003C
float Yaw; //0x0040
float Pitch; //0x0044
char _0x0048[176];
__int32 Vida; //0x00F8
__int32 Colete; //0x00FC
char _0x0100[4];
__int32 ArmaID; //0x0104
char _0x0108[12];
__int32 MunicaoPistolaSecundaria; //0x0114
__int32 MunicaoCarbinaSecundaria; //0x0118
__int32 MunicaoSecundariaEscopeta; //0x011C
__int32 MunicaoSecundaria; //0x0120
char _0x0124[24];
__int32 MunicaoPistola; //0x013C
__int32 MunicaoCarbine; //0x0140
__int32 MunicaoEscopeta; //0x0144
__int32 MunicaoMetralhadora; //0x0148
char _0x014C[12];
__int32 GranadaMunicao; //0x0158
char _0x015C[740];
};//Size=0x0440
class cPlayerTable
{
public:
cPlayerInfo *player[32]; //0x0000
char _0x0004[124];
};//Size=0x0080
Code:
// Credits HackerFail and Fleep
#include <windows.h>
#include <stdio.h>
#include <vector>
DWORD AC_CLIENT = (DWORD)GetModuleHandleA("ac_client.exe");
#define UnlimitedAmmo 0x4637E9 // FF 0E
#define SuperRapidFire 0x4637E4 // 89 0A
#define InfiniteNade 0x463378 // FF 08
#define PlayerInfo 0x50F4F4
#define TraceLine 0x48A1D0
#define NoReload 0x461E20 // 01 10
#define NoRecoil 0x463786 // 50 8D 4C 24 1C 51 8B CE FF D2; address norecoil = SuperRapidFire + 0x5E
Code:
// Credits HackerFail and Fleep
#include "class.h"
VOID KeyAdd( int &var, int Key )
{
if (GetAsyncKeyState(Key)&1) var =! var;
}
void WriteMemory(void *address, void *bytes, int byteSize)
{
DWORD NewProtection;
VirtualProtect(address, byteSize, PAGE_EXECUTE_READWRITE, &NewProtection);
memcpy(address, bytes, byteSize);
VirtualProtect(address, byteSize, NewProtection, &NewProtection);
}
void ReadMemory(void *address, int bytes, size_t byteSize)
{
DWORD NewProtection;
VirtualProtect(address, byteSize, PAGE_EXECUTE_READWRITE, &NewProtection);
memset(address, bytes, byteSize);
VirtualProtect(address, byteSize, NewProtection, &NewProtection);
}
Code:
// Credits HackerFail and Fleep
int superjump, flyhack, UnlimitedHealth, UnlimitedWaistcoat, speedhacker, norecoil, ammo, rapidfire, nades, reload;
Code:
// Credits HackerFail and Fleep
#include "funcs.h"
#include "variables.h"
cPlayerTable* pPlayerTable = *(cPlayerTable**)(PlayerInfo);
cPlayerInfo * pPlayer = *(cPlayerInfo**)(PlayerInfo);
VOID Funcs()
{
KeyAdd(superjump, VK_NUMPAD1);
KeyAdd(flyhack, VK_NUMPAD2);
KeyAdd(speedhacker, VK_NUMPAD3);
KeyAdd(norecoil, VK_NUMPAD4);
KeyAdd(UnlimitedHealth, VK_NUMPAD5);
KeyAdd(ammo, VK_NUMPAD6);
KeyAdd(rapidfire, VK_NUMPAD7);
KeyAdd(nades, VK_NUMPAD8);
KeyAdd(reload, VK_NUMPAD9);
if ( UnlimitedHealth )
{
pPlayer->Vida = 9999;
}
if ( UnlimitedWaistcoat )
{
pPlayer->Colete = 9999;
}
if ( superjump )
{
if(GetAsyncKeyState(VK_SPACE)<0)
{
pPlayer->SuperPulo = 10.0f;
}
}
if ( flyhack )
{
pPlayer->SuperPulo = 10.0f;
}
if ( speedhacker ) // semi
{
if (GetAsyncKeyState(0x57)&1)
{
pPlayer->SuperVelocidade2 = 3.0f;
}
}
if ( norecoil )
{
ReadMemory((void*)NoRecoil,0x90,10);
} else {
WriteMemory((void*)NoRecoil,(void*)"\x50\x8D\x4C\x24\x1C\x51\x8B\xCE\xFF\xD2",10);
}
if ( ammo )
{
ReadMemory((void*)UnlimitedAmmo,0x90,2);
} else {
WriteMemory((void*)UnlimitedAmmo,(void*)"\xFF\x0E",2);
}
if ( rapidfire )
{
ReadMemory((void*)SuperRapidFire,0x90,2);
} else {
WriteMemory((void*)SuperRapidFire,(void*)"\x89\x0A",2);
}
if ( nades )
{
ReadMemory((void*)InfiniteNade,0x90,2);
} else {
WriteMemory((void*)InfiniteNade,(void*)"\xFF\x08",2);
}
if ( reload )
{
ReadMemory((void*)NoReload,0x90,2);
} else {
WriteMemory((void*)NoReload,(void*)"\x01\x10",2);
}
}
DWORD WINAPI MyHook(LPVOID lpArgs)
{
while(true)
{
do{
__asm CALL [Funcs];
} while (!AC_CLIENT);
}
return 0;
}
BOOL WINAPI DllMain( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
if( dwReason == DLL_PROCESS_ATTACH )
{
DisableThreadLibraryCalls( hDll );
//MessageBox( 0, "Simple Hook", "AssaultCube", 0 );
CreateThread( 0, 0, &MyHook, 0, 0, 0 );
}
return TRUE;
}