#include <windows.h>
DWORD FindAddress()
{
HMODULE hClient = GetModuleHandleA("ac_client.exe");
DWORD basePointer = (DWORD)hClient + 0x00109B74;
DWORD ammoAddress = basePointer + 0x150;
return ammoAddress;
}
void hackFunction(DWORD Address)
{
DWORD* pAddress = (DWORD*)Address;
*pAddress = 1337;
}
DWORD WINAPI HackThread(LPVOID unused)
{
DWORD targetAddress = NULL;
targetAddress = FindAddress();
BOOL hackEnabled = false;
for (;;)
{
if (GetAsyncKeyState(VK_F1))
{
if (hackEnabled == true)
{
hackEnabled = false;
}
else { hackEnabled = true; }
Sleep(50);
}
if (hackEnabled == true)
{
hackFunction(targetAddress);
}
}
}
BOOL WINAPI DllMain(HINSTANCE mod, DWORD Attached, LPVOID res)
{
switch (Attached)
{
case DLL_PROCESS_ATTACH:
MessageBoxA(0, "Loaded!", "Info", 0);
CreateThread(0, 0, &HackThread, 0, 0, 0);
break;
case DLL_PROCESS_DETACH:
MessageBoxA(0, "Not Loaded", "Info", 0);
break;
}
return TRUE;
}
