Create a PC Memory Editor (Trainer , Hack Tool)
Hey everyone! Today I will be teaching you on how to make a PC Memory Editor...
First you will need to research the game (process) that you want to modify and obtain offsets from it..
I have already done my research in MW2 :
Now let´s head to the actual coding...
NOTE : THIS WAS COPY AND PASTED FROM MY BLOG!!!!
So let´s start...
First add some includes...
Now just add the usual namespace :P
Now add your main function
Alright now let´s make a cout...
Now let´s create a FindWindow function (WINDOW NAME NOT PROCESS NAME!!)!
Now we need to create some basic if code to determinate if the Window is opened or not...
Great!
Now you need to add a DWORD , a Function that gets the process ID and writes it to the DWORD and a
Handle function...
Now populate it with options!
I will just be doing XP here...
Now let´s make the options if code and the actual write memory code 
Ok 
Now let´s make a cout that ask us how much XP do we want to write..
Alright now you need to convert the XP to a byte....
by doing this :
Now finally we are going to write process memory!!
Basicly we are doing if code so we dont get a nasty error when something goes wrong..
Also il explain the WriteProcessMemory syntax... :
WriteProcessMemory(ToThisProcessID, (LPVOID)ToThisOffset, &XP , WithTheseBytes, NULL))...
Now just add the "looping" main(); and a return 0; code
...
You have just made a memory editor!!!
Final source : [C++] #include <iostream> #include <windows.h> using namespace std; int main() - Pastebin.com (If this goes against the "no outside links" rule il delete this link)
Video version :
Original (Blog) Version : MPGH doesnt allow out side links.... sorry
The final tool can be found here : http://www.mpgh.net/forum/191-call-d...tats-tool.html
First you will need to research the game (process) that you want to modify and obtain offsets from it..
I have already done my research in MW2 :
Code:
//Research by : MW2TopTenWORLD //Research for MW2 Steam version 1.2.208 XP : 0x01B2C89C Score : 0x01B2C8AC Wins : 0x01B2C8E4 Losses : 0x01B2C8E8 Ties : 0x01B2C8EC Win Streak : 0x01B2C8F0 Kills : 0x01B2C8B0 Headshots : 0x01B2C8C4 Assists : 0x01B2C8B0 Killstreak : 0x01B2C8B4 Deaths : 0x01B2C8B8 Prestige : 0x01B2C8A4
NOTE : THIS WAS COPY AND PASTED FROM MY BLOG!!!!
So let´s start...
First add some includes...
Code:
#include <iostream> #include <windows.h>
Code:
using namespace std;
Code:
int main()
{
}
Code:
cout << "Make sure Modern Warfare 2 is Opened before opening the tool! << endl;
system("Pause");
Code:
LPCWSTR Fuck = L"Modern Warfare 2"; HWND hwnd = FindWindow(0, Fuck);
Code:
if (hwnd == 0)
{
cout << "The game has not been found... please open it before opening the tool next time..." << endl;
system("Pause");
}
else
{
cout << "Modern Warfare 2 has been found... Enjoy the tool!" << endl;
}
Now you need to add a DWORD , a Function that gets the process ID and writes it to the DWORD and a
Handle function...
Code:
DWORD process_ID; GetWindowThreadProcessId(hwnd, &process_ID); HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, process_ID);
I will just be doing XP here...
Code:
cout << "Type 1 for XP" << endl; cout << "Type : "; int Option; cin >> Option;

Code:
if (Option > 1)
{
cout << "There is no option higher than 1..." << endl;
system("Pause");
}
if (Option == 1)
{
...
}

Now let´s make a cout that ask us how much XP do we want to write..
Code:
cout << "What do you want to set your XP as?" << endl; cout << "Type : "; int XP; cin >> XP;
by doing this :
Code:
DWORD newdatasize = sizeof(XP);
Code:
if (WriteProcessMemory(hProcess, (LPVOID)0x01B2C89C, &XP, newdatasize, NULL))
{
cout << "The XP has been written sucessfully!!" << endl;
system("Pause");
}
else
{
cout << "There was an error writing the XP..." << endl;
system("Pause");
}
Also il explain the WriteProcessMemory syntax... :
WriteProcessMemory(ToThisProcessID, (LPVOID)ToThisOffset, &XP , WithTheseBytes, NULL))...
Now just add the "looping" main(); and a return 0; code
...You have just made a memory editor!!!
Final source : [C++] #include <iostream> #include <windows.h> using namespace std; int main() - Pastebin.com (If this goes against the "no outside links" rule il delete this link)
Video version :
Original (Blog) Version : MPGH doesnt allow out side links.... sorry
The final tool can be found here : http://www.mpgh.net/forum/191-call-d...tats-tool.html

