///////////////////////////////////////////////////////////////////
//Memory Hack Source by Plexi/Tate/Tatez (All the Same Person //
//This was made for ActionHacks, *************, and ********* //
//Remove those other two sites, if it's not allowed //
//It doesn't have links, so idk if its allowed or not :S //
///////////////////////////////////////////////////////////////////
//Give this code to EVERYONE YOU WANT! Idc. //
//Just don't claim it as "The Hack You Made With No Help At All" //
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
//Smaller Credits: Roverturbo of UC, learn_more of uc //
//Also big credits to MyZT, who also contributed //
//Contributed to this nooby little code //
///////////////////////////////////////////////////////////////////
// //
// Refactored by unic0rn, lawl. //
// //
///////////////////////////////////////////////////////////////////
#include <windows.h>
#include <iostream>
#define SubMachine 0x08DE9A28
#define MachineGun 0x08DE9A30
#define Pistol 0x08DE9A20
#define Health 0x08DE99E4
using namespace std;
int main()
{
while(true)
{
//Find Window
char szTitle[256] = { 0 };
Ge***assNameA(GetForegroundWindow(), szTitle, 255);
HWND ACHACK = FindWindow("SDL_App", "AssaultCube"); // determines 'ACHACK' as the desired window to modify
if(ACHACK == 0)
{
//Couldn't find it!
cout << "Looking for SDL_APP" << " Assault Cube //" << "Current App Type: " << szTitle << endl;
Sleep(6000);
}
else
{
//Window found, breakout and start modifying!
break;
}
} //Close inifinite While loop
//Window found, and Handle is trying to be acquired.
DWORD ID;
GetWindowThreadProcessId(ACHACK, &ID);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, ID);
if(!hProcess)
{
cout << "Could not obtain handle to process.";
}
else
{
//Values that will be written to memory addresses.
int pistAmmo = 10000;
int healthAmt = 10000;
int subAmmo = 10000;
int mgAmmo = 10000;
//Actual Editing of Each Addie
if(WriteProcessMemory(hProcess, (LPVOID)Pistol, &pistAmmo, (DWORD)sizeof(pistAmmo), NULL)) //CHANGES Pistol ammo to 10000.
{
Sleep(50);
}
if(WriteProcessMemory(hProcess, (LPVOID)Health, &healthAmt, (DWORD)sizeof(healthAmt), NULL)) //CHANGES Health value to 10000.
{
Sleep(50);
}
if(WriteProcessMemory(hProcess, (LPVOID)SubMachine, &subAmmo, (DWORD)sizeof(subAmmo), NULL)) //CHANGES SubMachine gun ammo to 10000.
{
Sleep(50);
}
if(WriteProcessMemory(hProcess, (LPVOID)MachineGun, &mgAmmo, (DWORD)sizeof(mgAmmo), NULL)) //CHANGES MG Ammo to 10000.
{
Sleep(50);
}
}
} //Close Main