The Evil Within

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

HalfWayToHell333

Jr.Coder
Silenced
Full Member
Nobleman
Jun 23, 2014
80
783
3
Hi there ,
this is not realy a Trainer , but some Source to NOP the Ammo dec function wich is static for the PAL Version of The Evil Within 64 Bit.
Happy shooting.

C++:
#include <Windows.h>
#include <iostream>
#include <TlHelp32.h>

//compile as 64 Bit!
BYTE* dwGetModuleBaseAddress(const DWORD, const char *);//!!!!! dont cast BYTE* do DWORD in 64Bit !!!!!!!

void main(){

	using namespace std;

	HWND hwnd = FindWindowA(0, "The Evil Within");
	if (hwnd){
		DWORD id;
		GetWindowThreadProcessId(hwnd, &id);

		HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, false, id);
		if (hProc){


			const std::string ImageName = "evilwithin.exe";

			BYTE* baseAddy = dwGetModuleBaseAddress(id, ImageName.c_str());

			if (baseAddy != nullptr){

				//cout << "base        at : " << hex << (DWORD) baseAddy << endl;

				BYTE* pToNope = baseAddy + 0x0761AAB;// dec Ammo func + 2 Bytes to NOP

				//cout << "dec func    at : " << hex << (DWORD) pToNope << endl;

				const int bytesToWrite = 3;

				//const int bytesToRead = bytesToWrite+1;
				//BYTE val[bytesToRead] = {0};

				int bytesDone = 0;
				
				BOOL gotcha = 0;
				BYTE nopeEm = 0x90;

				for (int i = 0; i < bytesToWrite; i++){//nopeEm
					gotcha = WriteProcessMemory(hProc, (LPVOID)(pToNope+i), (LPVOID) &nopeEm, 1,NULL);
					}
					if (gotcha){
					   	cout << "have fun" << endl;
					}
					else cout << "screwed" << endl;
			}
			
			else cout << "nope : "<<ImageName.c_str() <<" not found!"<< endl;
			CloseHandle(hProc);
		}
	}
	else cout << "nope Window not found" << endl;
	cout << "enter to quit" << endl;
	cin.get();
}

BYTE* dwGetModuleBaseAddress(const DWORD dwProcessIdentifier, const char *lpszModuleName){
	const HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwProcessIdentifier);

	BYTE* dwModuleBaseAddress = nullptr;

	if (hSnapshot != INVALID_HANDLE_VALUE)
	{
		MODULEENTRY32 ModuleEntry32 = { 0 };

		ModuleEntry32.dwSize = sizeof(ModuleEntry32);
		if (Module32First(hSnapshot, &ModuleEntry32))

		{
			do
			{
				if (strcmp(ModuleEntry32.szModule, lpszModuleName) == 0)
				{
					dwModuleBaseAddress = ModuleEntry32.modBaseAddr;
					break;
				}

			} while (Module32Next(hSnapshot, &ModuleEntry32));
		}
		CloseHandle(hSnapshot);
	}
	return dwModuleBaseAddress;
}
 
Last edited:
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods