Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Syf/Float's External BlackOps Zombies hack.
- // All addresses found with Cheat Engine & my own knowledge.
- #include <iostream>
- #include "MemoryManager.h"
- #include <thread>
- // Defining and declaring variables in the global scope
- struct OffsetsStruct {
- DWORD Ammo_Primary = 0x1808F00;
- DWORD Ammo_Secondary = 0x1808F10;
- DWORD Ammo_Grenades = 0x01C08F08;
- DWORD Ammo_Primary_DualWield = 0x1808F20;
- DWORD Ammo_MonkeyBombs = 0x01C08F18;
- DWORD Player_Health = 0x01A7987C;
- DWORD Player_RapidFire1 = 0x01C08B7C;
- DWORD Player_RapidFire2 = 0x01C08B84;
- DWORD Scoreboard_Points = 0x180A6C8;
- DWORD Scoreboard_Kills = 0x01C0A6CC;
- DWORD Scoreboard_Headshots = 0x1C0A6EC;
- // Functions
- DWORD HealthFunction = 0x3DADD0;
- DWORD AmmoFunction = 0x297A10;
- DWORD RapidfireFunction = 0x3669EC;
- DWORD RapidfireFunction2 = 0x367149;
- int _Player_Health;
- // Declaring functions that are later in the program
- bool InvincibilityToggle = false;
- bool InfiniteAmmoToggle = false;
- bool RapidFireToggle = false;
- DWORD modBaseAddr;
- };
- BYTE HealthFunctionOriginal[] = { 0x89, 0x85, 0x84, 0x01, 0x00, 0x00 }; // BlackOps.exe+3DADD0 - 89 85 84010000 - mov [ebp+00000184],eax
- BYTE AmmoFunctionOriginal[] = { 0x89, 0x50, 0x04 }; // BlackOps.exe+297A10 - 89 50 04 - mov [eax+04],edx
- BYTE RapidfireFunctionOriginal[] = { 0x89, 0x10 };
- BYTE RapidfireFunction2Original[] = { 0x89, 0x48, 0x44 }; // BlackOps.exe + 367149 - 89 48 44 - mov[eax + 44], ecx
- MemoryManager Memory; // Telling us to use "Memory" to reference when we want to edit the variables
- OffsetsStruct Offsets;
- void Invincibility() {
- BYTE fNop[] = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 };
- //WriteProcessMemory(hWnd, (BYTE*)0x3669EC, &btLdrLoadDll, sizeof(btLdrLoadDll), NULL);
- if (GetAsyncKeyState(VK_NUMPAD0)) {
- Offsets.InvincibilityToggle = !Offsets.InvincibilityToggle;
- if (!Offsets.InvincibilityToggle) {
- WriteProcessMemory(Memory.hProcess, (LPVOID)(Offsets.modBaseAddr + Offsets.HealthFunction), &fNop, sizeof(fNop), NULL);
- }
- else if (Offsets.InvincibilityToggle) {
- WriteProcessMemory(Memory.hProcess, (LPVOID)(Offsets.modBaseAddr + Offsets.HealthFunction), &HealthFunctionOriginal, sizeof(HealthFunctionOriginal), NULL);
- }
- }
- }
- void InfiniteAmmo() {
- BYTE fNop[] = { 0x90, 0x90, 0x90 };
- //WriteProcessMemory(hWnd, (BYTE*)0x3669EC, &btLdrLoadDll, sizeof(btLdrLoadDll), NULL);
- if (GetAsyncKeyState(VK_NUMPAD1)) {
- if (!Offsets.InfiniteAmmoToggle) {
- WriteProcessMemory(Memory.hProcess, (LPVOID)(Offsets.modBaseAddr + Offsets.AmmoFunction), &fNop, sizeof(fNop), NULL);
- Offsets.InfiniteAmmoToggle = true;
- }
- else if (Offsets.InvincibilityToggle) {
- WriteProcessMemory(Memory.hProcess, (LPVOID)(Offsets.modBaseAddr + Offsets.AmmoFunction), &AmmoFunctionOriginal, sizeof(AmmoFunctionOriginal), NULL);
- Offsets.InfiniteAmmoToggle = false;
- }
- }
- }
- void Rapidfire() {
- BYTE fNop[] = { 0x90, 0x90 };
- BYTE fNop2[] = { 0x90, 0x90, 0x90 };
- //WriteProcessMemory(hWnd, (BYTE*)0x3669EC, &btLdrLoadDll, sizeof(btLdrLoadDll), NULL);
- if (GetAsyncKeyState(VK_NUMPAD2)) {
- if (!Offsets.RapidFireToggle) {
- WriteProcessMemory(Memory.hProcess, (LPVOID)(Offsets.modBaseAddr + Offsets.RapidfireFunction), &fNop, sizeof(fNop), NULL);
- //WriteProcessMemory(Memory.hProcess, (LPVOID)(Offsets.modBaseAddr + Offsets.RapidfireFunction2), &fNop, sizeof(fNop2), NULL);
- Offsets.RapidFireToggle = true;
- }
- else if (Offsets.RapidFireToggle) {
- WriteProcessMemory(Memory.hProcess, (LPVOID)(Offsets.modBaseAddr + Offsets.RapidfireFunction), &RapidfireFunctionOriginal, sizeof(RapidfireFunctionOriginal), NULL);
- //WriteProcessMemory(Memory.hProcess, (LPVOID)(Offsets.modBaseAddr + Offsets.RapidfireFunction2), &RapidfireFunction2Original, sizeof(RapidfireFunction2Original), NULL);
- Offsets.RapidFireToggle = false;
- }
- }
- }
- void userOptions();
- void fixVars() {
- BYTE fixInvincibility;
- ReadProcessMemory(Memory.hProcess, (LPVOID)(Offsets.modBaseAddr + Offsets.HealthFunction), &fixInvincibility, sizeof(BYTE), NULL);
- if (fixInvincibility == 0x90)
- Offsets.InvincibilityToggle = true;
- else
- Offsets.InvincibilityToggle = false;
- BYTE fixInfiniteAmmo;
- ReadProcessMemory(Memory.hProcess, (LPVOID)(Offsets.modBaseAddr + Offsets.InfiniteAmmoToggle), &fixInfiniteAmmo, sizeof(BYTE), NULL);
- if (fixInvincibility == 0x90)
- Offsets.InfiniteAmmoToggle = true;
- else
- Offsets.InfiniteAmmoToggle = false;
- BYTE fixRapidfire;
- ReadProcessMemory(Memory.hProcess, (LPVOID)(Offsets.modBaseAddr + Offsets.RapidfireFunction), &fixRapidfire, sizeof(BYTE), NULL);
- if (fixInvincibility == 0x90)
- Offsets.RapidFireToggle = true;
- else
- Offsets.RapidFireToggle = false;
- userOptions();
- std::cout << "\nFixed vars." << std::endl;
- }
- void userOptions() {
- system("cls");
- std::cout << "SyFloat's Black Ops Zombies hack" << std::endl;
- std::cout << "INSERT to re-attach\nHOME to Scoreboard cheat\nEND to fix vars" << std::endl;
- std::cout << "DELETE to quit program" << std::endl;
- std::cout << "NUMPAD0 to toggle invincibility - " << Offsets.InvincibilityToggle << std::endl;
- std::cout << "NUMPAD1 to toggle infinite ammo - " << Offsets.InfiniteAmmoToggle << std::endl;
- std::cout << "NUMPAD2 to toggle rapid fire - " << Offsets.RapidFireToggle << std::endl;
- }
- int main()
- {
- // Memory.WriteMemory<BYTE>(Memory.GetModuleBaseAddress("BlackOps.exe") + 0x3669EC, 0x90); // This writes 0x90 (nop) to BlackOps.exe+Rapidfire
- Memory.AttachProcess("BlackOps.exe");
- Offsets.modBaseAddr = Memory.GetModuleBaseAddress("BlackOps.exe");
- userOptions();
- while(!GetAsyncKeyState(VK_DELETE)) {
- if (GetAsyncKeyState(VK_INSERT)) {
- Memory.AttachProcess("BlackOps.exe");
- Offsets.modBaseAddr = Memory.GetModuleBaseAddress("BlackOps.exe");
- userOptions();
- }
- if (GetAsyncKeyState(VK_HOME)) {
- Memory.WriteMemory<int>(Offsets.modBaseAddr + Offsets.Scoreboard_Points, 777777);
- }
- if (GetAsyncKeyState(VK_END))
- fixVars();
- if (GetAsyncKeyState(VK_NUMPAD0)) {
- Invincibility();
- userOptions();
- }
- if (GetAsyncKeyState(VK_NUMPAD1)) {
- InfiniteAmmo();
- userOptions();
- }
- if (GetAsyncKeyState(VK_NUMPAD2)) {
- Rapidfire();
- userOptions();
- }
- Sleep(150);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement