Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <Windows.h>
- using namespace std;
- int main()
- {
- HWND hwnd = FindWindowA(NULL, "Plants vs. Zombies");
- cout << "Sun Hack Loading...";
- DWORD pId;
- GetWindowThreadProcessId(hwnd, &pId);
- HANDLE hProcess = OpenProcess(PROCESS_VM_OPERATION | PROCESS_VM_WRITE | PROCESS_VM_READ, 0, pId);
- DWORD newAdress = 0x0B4A7558;
- const unsigned int newValue = 9999;
- WriteProcessMemory(hProcess, reinterpret_cast<LPVOID>(0x0B4A7558), &newValue, sizeof(newValue), 0);
- CloseHandle(hProcess);
- cin.get();
- return 0;
- }
Add Comment
Please, Sign In to add comment