Guest User

Untitled

a guest
Dec 13th, 2013
966
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <windows.h>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     system("color 0A");
  9.     cout << "Make sure Modern Warfare 2 is opened before pressing ENTER..." << endl;
  10.     system("Pause");
  11.     LPCWSTR Fuck = L"Modern Warfare 2";
  12.     HWND hwnd = FindWindow(0, Fuck);
  13.     if (hwnd == 0)
  14.     {
  15.         cout << "The game has not been found... please open it before opening the tool next time..." << endl;
  16.         system("Pause");
  17.     }
  18.     else
  19.     {
  20.         DWORD process_ID;
  21.         GetWindowThreadProcessId(hwnd, &process_ID);
  22.         HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, process_ID);
  23.         cout << "Modern Warfare 2 has been found... Enjoy the tool!" << endl;
  24.         system("Pause");
  25.         cout << "Type 1 for XP" << endl;
  26.         cout << "Type : ";
  27.         int Option;
  28.         cin >> Option;
  29.         if (Option > 1)
  30.         {
  31.             cout << "There is no option higher than 1..." << endl;
  32.             system("Pause");
  33.         }
  34.         if (Option == 1)
  35.         {
  36.             cout << "What do you want to set your XP as?" << endl;
  37.             cout << "Type : ";
  38.             int XP;
  39.             cin >> XP;
  40.             DWORD newdatasize = sizeof(XP);
  41.             if (WriteProcessMemory(hProcess, (LPVOID)0x01B2C89C, &XP, newdatasize, NULL))
  42.             {
  43.                 cout << "The XP has been written sucessfully!!" << endl;
  44.                 system("Pause");
  45.             }
  46.             else
  47.             {
  48.                 cout << "There was an error writing the XP..." << endl;
  49.                 system("Pause");
  50.             }
  51.  
  52.         }
  53.     }
  54.     main();
  55.     return 0;
  56. }
Advertisement
Add Comment
Please, Sign In to add comment