

#include <windows.h>
#include <iostream>
using namespace std;
int main()
{
// This will find you the proper adress in the memory
LONG pointer = 0x0020C020;
LONG offset = 14; // 14
LONG address;
if(pointer)
{
// If pointer is exists, calculate the proper adress and use that
address = (pointer + offset);
}
else
{
// If pointer is empty then use this adress
address = 0x005DA534;
}
cout << "The pointer points to the addres ";
cout << address;
cin.get();
//value to send to game
int newvalue = 99;
// Handles
/*
HWND hwnd = FindWindow(NULL, "Solitaire"); //what window to find
HANDLE phandle;
DWORD pid;
if (hwnd != 0)
{
//just a option
cout << "Game is running. Press enter to hack it.";
//name of program window
SetWindowText(NULL,"Far Cry 2 Hack");
GetWindowThreadProcessId(hwnd, &pid);
phandle = OpenProcess(PROCESS_ALL_ACCESS, 0, pid);
cin.get();
}
else
{
//shows if game is not running
cout << "Open the game";
cin.get();
return 0;
}
if (phandle != 0)
{
WriteProcessMemory(phandle, (LPVOID)address, (LPVOID) &newvalue, 4, 0);
//says done if it worked
cout << "Done";
cin.get();
}
else
{
//if it didn't work it says failed
cout << "Failed";
cin.get();
}
*/
}

ReadProcessMemory(phandle, (LPVOID)pointer, &value, 4, 0); //says done if it worked cout << "Done: "; cout << value; cin.get();
ReadProcessMemory(phandle, (LPVOID)0x5DA520, &value, 4, 0); ReadProcessMemory(phandle, (LPVOID)(value+14), &value, 4, 0);
#include <windows.h>
#include <iostream>
using namespace std;
int main()
{
int value;
//value to send to game
int newvalue = 99;
// Handles
HWND hwnd = FindWindow(NULL, "Solitaire"); //what window to find
HANDLE phandle;
DWORD pid;
if (hwnd != 0)
{
//just a option
cout << "Game is running. Press enter to hack it.";
//name of program window
SetWindowText(NULL,"Solitaire Hack");
GetWindowThreadProcessId(hwnd, &pid);
phandle = OpenProcess(PROCESS_ALL_ACCESS, 0, pid);
cin.get();
}
else
{
//shows if game is not running
cout << "Open the game";
cin.get();
return 0;
}
if (phandle != 0)
{
ReadProcessMemory(phandle, (LPVOID)0x5DA520, &value, 4, 0);
ReadProcessMemory(phandle, (LPVOID)(value+14), &value, 4, 0);
WriteProcessMemory(phandle, (LPVOID)value, (LPVOID) &newvalue, 4, 0);
//says done if it worked
cout << "Done ";
cout << value;
cin.get();
}
else
{
//if it didn't work it says failed
cout << "Failed";
cin.get();
}
}
ReadProcessMemory(phandle, (LPVOID)(value+14), &value, 4, 0); WriteProcessMemory(phandle, (LPVOID)value, (LPVOID) &newvalue, 4, 0);
WriteProcessMemory(phandle, (LPVOID)(value+14), (LPVOID) &newvalue, 4, 0);
#include <windows.h>
#include <iostream>
using namespace std;
int main()
{
LONG address;
int value;
//value to send to game
int newvalue = 99;
// Handles
HWND hwnd = FindWindow(NULL, "Solitaire"); //what window to find
HANDLE phandle;
DWORD pid;
if (hwnd != 0)
{
//just a option
cout << "Game is running. Press enter to hack it.";
//name of program window
SetWindowText(NULL,"Solitaire Hack");
GetWindowThreadProcessId(hwnd, &pid);
phandle = OpenProcess(PROCESS_ALL_ACCESS, 0, pid);
cin.get();
}
else
{
//shows if game is not running
cout << "Open the game";
cin.get();
return 0;
}
if (phandle != 0)
{
ReadProcessMemory(phandle, (LPVOID)0x5DA520, &value, 4, 0);
WriteProcessMemory(phandle, (LPVOID)(value+14), (LPVOID) &newvalue, 4, 0);
//says done if it worked
cout << "Done ";
cout << (value+14);
cin.get();
}
else
{
//if it didn't work it says failed
cout << "Failed";
cin.get();
}
}
The value of the pointer needed to find this adress is probably 005DA520 [r11+14] scan for pointer address: 0020C020 < pointer + offset = adress needed to change (in ce) value : 005DA520 scan for pointer address: 005DA520 value : FFF57BA8
unsigned long ReadPointer(unsigned long ulBase, int iOffset)
{
__try
{
return *(unsigned long*)(*(unsigned long*)ulBase + iOffset); }
__except (EXCEPTION_EXECUTE_HANDLER) { return 0; }
}
int ReadNegativePointer(int ulBase, int iOffset)
{
__try { return *(int*)(*(int*)ulBase + iOffset); }
__except (EXCEPTION_EXECUTE_HANDLER) { return 0; }
}
bool WritePointer(unsigned long ulBase, int iOffset, int iValue)
{
__try { *(int*)(*(unsigned long*)ulBase + iOffset) = iValue; return true; }
__except (EXCEPTION_EXECUTE_HANDLER) { return false; }
}