1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
|
// Windows form1.cpp : main project file.
#include "stdafx.h"
#include "Form1.h"
#include <iostream>
#include <Windows.h>
#include <string>
#include <ctime>
#include "resource.h"
DWORD FindDmaAddy(int PointerLevel, HANDLE hProcHandle, DWORD Offsets[], DWORD BaseAddress);
void WriteToMemory(HANDLE hProcHandle);
std::string GameName = "assault cube";
LPSTR LGameWindow = "assault cube";
std::string GameStatus;
int MaxAmmo = 8; //The ammo you will change to
bool IsGameAvail;
bool UpdateOnNextRun;
bool AmmoStatus;
LONG AR343 = 0x40100ED8;//ar ammo 343 guilty
LONG AR3431 = 0x4007D888;//ar ammo 343 guilty p1
LONG M343 = 0x4010138C;//M ammo 343 guilty
LONG M3431 = 0x4007DD3C;//M ammo 343 guilty p1
LONG SG343 = 0x400FE614;//sg ammo 343 guilty
LONG SG3431 = 0x4007C324;//SG AMMO 343 P1
bool GrenadeStatus;
LONG G343 = 0x40100ED8;//Grenades 343 p1
using namespace Windowsform1;
[STAThreadAttribute]
int main(array<System::String ^> ^args)
{
// Enabling Windows XP visual effects before any controls are created
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
// Create the main window and run it
Application::Run(gcnew Form1());
HWND hGameWindow = NULL;
int timeSinceLastUpdate = clock();
int GameAvailTMR = clock();
int onePressTMR = clock();
DWORD dwProcID = NULL;
HANDLE hProcHandle = NULL;
UpdateOnNextRun = true;
std::string sAmmoStatus = "OFF";
std::string sGrenadeStatus = "OFF";
while(!GetAsyncKeyState(VK_F3))
{
if(clock() - GameAvailTMR > 100)
{
GameAvailTMR = clock();
IsGameAvail = false;
hGameWindow = FindWindow(NULL, LGameWindow);
if(hGameWindow)
{
GetWindowThreadProcessId(hGameWindow, &dwProcID);
if(dwProcID != 0)
{
hProcHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwProcID);
if(hProcHandle == INVALID_HANDLE_VALUE || hProcHandle == NULL)
{
GameStatus = "Failed to open process for valid handle";
}
else
{
GameStatus = "HALO: Combat Evolved Ready to Hack";
IsGameAvail = true;
}
}
else
{
GameStatus = "Failed to get process ID";
}
}
else
{
GameStatus = "HALO NOT OPEN";
}
if(UpdateOnNextRun || clock() - timeSinceLastUpdate > 5000)
{
this->label1->Text = GameStatus;
UpdateOnNextRun = false;
timeSinceLastUpdate = clock();
}
if(IsGameAvail)
{
WriteToMemory(hProcHandle);
}
}
if(clock() - onePressTMR > 400)
{
if(IsGameAvail)
{
//ammo
if(GetAsyncKeyState(VK_F1))
{
onePressTMR = clock();
AmmoStatus = !AmmoStatus;
UpdateOnNextRun = true;
if(AmmoStatus)sAmmoStatus = "ON";
else sAmmoStatus = "OFF";
}
else if(GetAsyncKeyState(VK_F2))
{
onePressTMR = clock();
GrenadeStatus = !GrenadeStatus;
UpdateOnNextRun = true;
if(GrenadeStatus)sGrenadeStatus = "ON";
else sGrenadeStatus = "OFF";
}
}
}
}
return ERROR_SUCCESS;
}
DWORD FindDmaAddy(int PointerLevel, HANDLE hProcHandle, DWORD Offsets[], DWORD BaseAddress)
{
DWORD pointer = BaseAddress;
DWORD pTemp;
DWORD pointerAddr;
for(int c = 0; c < PointerLevel; c++)
{
if(c == 0)
{
ReadProcessMemory(hProcHandle, (LPCVOID)pointer, &pTemp, sizeof(pTemp), NULL);
}
pointerAddr = pTemp + Offsets[c];
ReadProcessMemory(hProcHandle, (LPCVOID)pointerAddr, &pTemp, sizeof(pTemp), NULL);
}
return pointerAddr;
}
void WriteToMemory(HANDLE hProcHandle)
{
if(AmmoStatus)
{
}
if(GrenadeStatus)
{
}
}
|