Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // RNG Hack.cpp : Defines the entry point for the console application.
- // mgostIH
- #include "stdafx.h"
- #include <Windows.h>
- #include "BetterFunctions.h"
- int _tmain(int argc, _TCHAR* argv[])
- {
- HANDLE hwnd = GetHandle("Geometry Dash");
- int err;
- SetConsoleTitle("GD Random Number Generator Hack - mgostIH");
- redirect(hwnd);
- deviatesite(hwnd);
- HMODULE mod = LoadLibraryA("msvcr120.dll");
- if (!mod){
- cout << "Error in loading msvcr120.dll, report this number to mgostIH: " << GetLastError() << endl;
- system("PAUSE>NUL");
- return 1;
- }
- DWORD base = (DWORD)GetProcAddress(GetModuleHandleA("msvcr120.dll"), "rand");
- DWORD old;
- VirtualProtectEx(hwnd, (LPVOID)base, 100, PAGE_EXECUTE_READWRITE, &old);
- err = WriteProcessMemory(hwnd, (LPVOID)(base + 0x18), "\xB8\x00\x00\x00\x00\x90\x90\x90", 8, NULL);
- if (!err){
- cout << "Error in writing memory, report this number to mgostIH: " << GetLastError() << endl;
- system("PAUSE>NUL");
- return 2;
- }
- while (1){
- DWORD input = GetNumber();
- err = WriteProcessMemory(hwnd, (LPVOID)(base + 0x19), &input, 4, NULL);
- if (!err){
- cout << "Error in writing memory, report this number to mgostIH: " << GetLastError() << endl;
- system("PAUSE>NUL");
- return 2;
- }
- cout << "Memory written successfully. Press ENTER to write again." << endl;
- system("PAUSE>NUL");
- system("CLS");
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment