➡️ "Fixed" POLYMEME

Posts 1–13 of 13 · Page 1 of 1
➡️ "Fixed" POLYMEME
I fixed and commented the most error's and code's, please read the full comments...

Things you should consider:
-> Implementing correct POLYLOADER functions
-> Making a thread for RADAR and other for GLOWESP
-> Your visible check method is wrong, your method get's even if a player is spotted by a teammate. You should be using bSpottedMask.
-> Better var names...
-> fflag is a BYTE not a INT, consider changing and using this if (Local.GetFlag() & (1 << 0)) { to work better
-> At data(); you should add a WEAPONID, so at autopistol you can check if the player is holding a PISTOL and set the GetAsyncKeyState to "1"
-> Consider making a deactivation function for noflash ... 0.0f = 0 Alpha/NoFlashed & 255.0f = 255 Alpha/FULLFlashed
-> Implement POLYLOADER functions on PROCMEM.h and PROCMEM.cpp


 
Source.cpp
Code:
/* - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* - - - - - CODE FIXED BY PhY'z / Adri308 - - - - - - */
/* - - - - - - - - PolyMeme vSomething - - - - - - - - */
/* - - - - - - - - - DATE: 1109/2015 - - - - - - - - - */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* - - DO NOT REMOVE THIS! ELSE AT LEAST INCLUDE - - - */
/* - - - - CREDITS TO PhY'z && WasserEsser - - - - - - */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* - - - - www.***********.com / www.MPGH.net  - - - - */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - */

/* HEADERS */
#include "ProcMem.h"
#include "offsets.h"

/* INCLUDE */
#include <Windows.h>
#include <TlHelp32.h>
#include <iostream>
using namespace std;

/* DEFINE FLAG'S */
#define Pressed 0x8000
#define FL_ON_GROUND 257

/* DEFINE MEMORY MANAGER */
ProcMem Meme;

/* PRE-CALL FUNCTION'S */
void start();
void data();
void keys();
void radar();
void ESPRadar();
void bhop();
void noflash();
void autopistol();

/* ACTIVATION BOOL */
bool eON = false, aON = false, bON = false, fON = false, rON = false;

/* START CONSOLE */
void main()
{
	/* CONSIDERATIONS */
	cout << "\"Made\" by HitByParkedCar -> FIXED BY PhY'z" << endl;

	/* FIND CSGO */
	while (!Meme.Process("csgo.exe")) {
		Sleep(500);
	}
	
	/* ATTACH CLIENT & RENAME CONSOLE */
	Client = Meme.Module("client.dll");

	TargetWindow = FindWindow(NULL, "Counter-Strike: Global Offensive");
	SetConsoleTitle("PolyMeme");
	start();
	
	/* INFINITY LOOP BOOL */
	while (true)
	{
		data();
		keys();
		if (bON)
			bhop();
		if (eON || rON)
			ESPRadar();
		if (aON)
			autopistol();
		if (fON)
			noflash();
		Sleep(5);
	}
}

/* SYSTEM START SAYING */
void start()
{
	system("cls"); /* CLEAR CONSOLE -> WRONG WAY TO BE MADE! */
	cout << "---------------------------------" << endl;
	cout << "----------- PolyMeme ------------" << endl;
	cout << "---------------------------------" << endl;
	cout << "" << endl;
	cout << "F1 ESP: " << eON << endl;
	cout << "F2 Team ESP: " << TeamESP << endl;
	cout << "F3 Enemy ESP: " << EnemyESP << endl;
	cout << "F4 Autopistol: " << aON << endl;
	cout << "F6 Bunnyhop: " << bON << endl;
	cout << "F8 Radar: " << rON << endl;
	cout << "Insert NoFlash: " << fON << endl;
}

/* --------------- */
/*     HOTKEYS     */
/* --------------- */
void keys()
{
	[swap_blocks]
	[block]
	if (GetAsyncKeyState(VK_F2) & Pressed) /* GET IF KEY: f2 IS PRESSED */
	{
		TeamESP = !TeamESP;
		start();
	}
	[/ block]
	[block]
	if (GetAsyncKeyState(VK_F6) & Pressed) /* GET IF KEY: f6 IS PRESSED */
	{
		bON = !bON;
		start();
	}
	[/ block]
	[block]

	if (GetAsyncKeyState(VK_F8) & Pressed) /* GET IF KEY: f8 IS PRESSED */
	{
		rON = !rON;
		start();
	}
	[/ block]
	[block]

	if (GetAsyncKeyState(VK_F3) & Pressed) /* GET IF KEY: f3 IS PRESSED */
	{
		EnemyESP = !EnemyESP;
		start();
	}
	[/ block]
	[block]

	if (GetAsyncKeyState(VK_F4) & Pressed) /* GET IF KEY: f4 IS PRESSED */
	{
		aON = !aON;
		start();
	}
	[/ block]
	[block]

	if (GetAsyncKeyState(VK_F1) & Pressed) /* GET IF KEY: f1 IS PRESSED */
	{
		eON = !eON;
		start();
	}
	[/ block]
	[block]
	if (GetAsyncKeyState(VK_INSERT) & Pressed) /* GET IF KEY: INS IS PRESSED */
	{
		fON = !fON;
		start();
	}
	[/ block]
	[/ swap_blocks]
}

/* --------------- */
/*   LOCAL DATA    */
/* --------------- */
void data()
{
	LocalBase = Meme.Read<DWORD>(Client + LocalPlayer); /* CLIENT LOCAL BASE */
	[swap_lines]
	GlowPointer = Meme.Read<DWORD>(Client + m_dwGlowObject); /* POINTER TO LOCAL PLAYER GLOW VIEW */
	FlashMaxAlpha = Meme.Read<float>(LocalBase + flashMaxAlpha); /* GET IF FLASHED */
	MyTeam = Meme.Read<int>(LocalBase + m_iTeamNum); /* GET LOCAL TEAM */
	[/ swap_lines]
}

/* --------------- */
/*    GLOW/RADAR   */
/* --------------- */

struct GlowStruct
{	
	float r;    /* RED                  */ /* MAXIMUM 1.0f | MINIMUM 0.0f */
	float g;    /* GREEN                */ /* MAXIMUM 1.0f | MINIMUM 0.0f */
	float b;    /* BLUE                 */ /* MAXIMUM 1.0f | MINIMUM 0.0f */
	float a;    /* THICKNESS            */ /* MAXIMUM 1.0f | MINIMUM 0.0f */
	bool rwo;   /* RenderWhenOccluded   */
	bool rwuo;  /* RenderWhenUnoccluded */
};

void DrawGlow(int GlowIndex, GlowStruct Color)
{
	Meme.Write<float>((GlowPointer + ((GlowIndex * 0x34) + 0x4)), Color.r);     /* SET FLOAT VALUE FOR RED       */
	Meme.Write<float>((GlowPointer + ((GlowIndex * 0x34) + 0x8)), Color.g);     /* SET FLOAT VALUE FOR GREEN     */
	Meme.Write<float>((GlowPointer + ((GlowIndex * 0x34) + 0xC)), Color.b);     /* SET FLOAT VALUE FOR BLUE      */
	Meme.Write<float>((GlowPointer + ((GlowIndex * 0x34) + 0x10)), Color.a);    /* SET FLOAT VALUE FOR THICKNESS */
	Meme.Write<bool>((GlowPointer + ((GlowIndex * 0x34) + 0x24)), Color.rwo);
	Meme.Write<bool>((GlowPointer + ((GlowIndex * 0x34) + 0x25)), Color.rwuo);
}


GlowStruct GetTeamColor();   /* DEFINE WHICH IS TEAM COLOR  */
GlowStruct GetEnemyColor();  /* DEFINE WHICH IS ENEMY COLOR */

/* SPOTTED */
[swap_lines]
GlowStruct CBluee = { 0.f, 0.f, 0.4f, 1.f, true, false };
GlowStruct CRedd = { 0.4f, 0.f, 0.f, 1.f, true, false };
GlowStruct CYelloww = { 0.4f, 0.4f, 0.f, 1.f, true, false };
GlowStruct COrangee = { 1.f, 0.46f, 0.f, 1.f, true, false };
GlowStruct CGreenn = { 0.f, 0.4f, 0.f, 1.f, true, false };
[/swap_lines]

/* NOT SPOTTED */
[swap_lines]
GlowStruct CGreen = { 0.f, 0.4f, 0.f, 0.7f, true, false };
GlowStruct CYellow = { 0.4f, 0.4f, 0.f, 0.7f, true, false };
GlowStruct CRed = { 0.4f, 0.f, 0.f, 0.7f, true, false };
GlowStruct CBlue = { 0.f, 0.f, 0.4f, 0.7f, true, false };
GlowStruct COrange = { 1.f, 0.46f, 0.f, 0.7f, true, false };
[/swap_lines]

/* START RADAR/GLOW THREAD */
void ESPRadar()
{
	for (int g = 0; g < 63; g++) /* LOOP START */
	{
		currentplayer = Meme.Read<DWORD>(Client + EntityList + ((g - 1) * 16)); /* READ ENTITY DATA FROM LOOP */
		currentplayerdormant = Meme.Read<bool>(currentplayer + isDormant); /* CHECK IF IS DORMANT */
		HealthBasedESP = Meme.Read<int>(currentplayer + 0xFC); /* READ ENTITY HP */

		/* WRONG WAY TO DO IT, IF A TEAMMATE SPOT A ENEMY IT WILL DISPLAY AS SPOTTED, YOU SHOULD YOU BSPOTTED MASK! */
		spotted = Meme.Read<bool>(currentplayer + m_bSpotted); /* READ BSPOTTED */

		/* RADAR */
		if (rON)
			if (!spotted && !currentplayerdormant)
				Meme.Write<int>(currentplayer + m_bSpotted, 1); /* WRITE SPOTTED IF NOT SPOTTED/DORMANT */

		/* ESP */
		if (eON)
			if (!currentplayerdormant) /* IF NOT DORMANT */
			{
				currentplayerglowindex = Meme.Read<int>(currentplayer + m_iGlowIndex); /* READ ENTITY GLOW INDEX */
				currentplayerteam = Meme.Read<int>(currentplayer + m_iTeamNum); /* READ ENTITY TEAM */

				/* DISPLAY TEAM */
				if (currentplayerteam == MyTeam)
					DrawGlow(currentplayerglowindex, CBlue);

				/* ENEMY TEAM */
				if (currentplayerteam != MyTeam)
					if (EnemyESP && HealthBasedESP <= 100 && HealthBasedESP > 75) /* LESS OR EQUAL 100 OR MORE THAN 75 */
					{
						if (!spotted)
							DrawGlow(currentplayerglowindex, CGreen);
						if (spotted)
							DrawGlow(currentplayerglowindex, CGreenn);
					}
					else if (EnemyESP && HealthBasedESP <= 75 && HealthBasedESP > 50) /* LESS OR EQUAL 75 OR MORE THAN 50 */
					{
						if (!spotted)
							DrawGlow(currentplayerglowindex, CYellow);
						if (spotted)
							DrawGlow(currentplayerglowindex, CYelloww);
					}
					else if (EnemyESP && HealthBasedESP <= 50 && HealthBasedESP > 25) /* LESS OR EQUAL 50 OR MORE THAN 25 */
					{
						if (!spotted)
							DrawGlow(currentplayerglowindex, COrange);
						if (spotted)
							DrawGlow(currentplayerglowindex, COrangee);
					}
					else if (EnemyESP && HealthBasedESP <= 25 && HealthBasedESP > 0) /* LESS OR EQUAL 25 OR MORE THAN 0 */
					{
						if (!spotted)
							DrawGlow(currentplayerglowindex, CRed);
						if (spotted)
							DrawGlow(currentplayerglowindex, CRedd);
					}
			}
	}
}

/* --------------- */
/*   AUTOPISTOL    */
/* --------------- */
/* HERE YOU SHOULD CONSIDERING ADD TO VOID DATA(); A WEAPON CHECK AND CHECK IF THIS WEAPON IS A PISTOL INSIDE AUTOPISTOL THREAD */
void autopistol()
{
	if (GetAsyncKeyState(VK_MENU) & Pressed) /* GET IF KEY: ALT IS PRESSED */
	{	
		Meme.Write<int>(Client + attack, 1); /* +ATTACK */
		Sleep(5);
		Meme.Write<int>(Client + attack, 0); /* -ATTACK */
		Sleep(1);
	}
}

/* --------------- */
/*     NOFLASH     */
/* --------------- */
/* YOU SHOULD CONSIDERING CHECKING IF THE BOOL IS ON/OFF TO MAKE A ON/OFF NOFLASH   */
/* 0.0f IS THE ALPHA, SO 0 = NO ALPHA, 255 = MAXIMUM ALPHA, 0 WHEN ON, 255 WHEN OFF */
void noflash()
{
	if (FlashMaxAlpha > 0.1f) /* CHECK IF FLASHED */
		Meme.Write<float>(LocalBase + flashMaxAlpha, 0.f); /* WRITE TO REMOVE FLASH ALPHA */

}

/* --------------- */
/*       BHOP      */
/* --------------- */
/* WHAT YOU DID WAS fflag = 257, THE CODE WAS READING LIKE THIS:  if (fflag = 257) {} THAT MEANS if i set the 257 to fflag sucessful continue */
void bhop()
{
	fflag = Meme.Read<int>(LocalBase + m_fFlags); /* READ THE FLAG */ /* FFLAG IS A BYTE NOT A INT */
	if (fflag == FL_ON_GROUND) /* USE THE DEFINE YOU MADE */
		if (GetAsyncKeyState(VK_SPACE) & Pressed) /* USE THE DEFINE YOU MADE */
		{
			Meme.Write<int>(Client + jumpoffset, 1); /* +JUMP */
			Sleep(20); /* 20ms TO DON'T BUG */
			Meme.Write<int>(Client + jumpoffset, 0); /* -JUMP */
		}
}

 
offsets.h
Code:
/* - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* - - - - - CODE FIXED BY PhY'z / Adri308 - - - - - - */
/* - - - - - - - - PolyMeme vSomething - - - - - - - - */
/* - - - - - - - - - DATE: 1109/2015 - - - - - - - - - */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* - - DO NOT REMOVE THIS! ELSE AT LEAST INCLUDE - - - */
/* - - - - CREDITS TO PhY'z && WasserEsser - - - - - - */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* - - - - www.***********.com / www.MPGH.net  - - - - */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - */

/* OFFSETS */
const DWORD m_angEyeAngles = 0x00008C98;
const DWORD m_dwGlowObject = 0x04B528D4;
const DWORD m_dwViewAngles = 0x00004CE0;
const DWORD flashDuration = 0x00008698;
const DWORD m_EntityLoopDistance = 0x10;
const DWORD m_iGlowIndex = 0x000086B0;
const DWORD isDormant = 0xE9;
const DWORD LocalPlayer = 0x00A9948C;
const DWORD m_iTeamNum = 0x000000F0;
const DWORD m_bSpotted = 0x00000935;
const DWORD m_dwLocalPlayerIndex = 0x00000160;
const DWORD m_fFlags = 0x00000100;
const DWORD attack2 = 0x02EAD94C;
const DWORD m_vecPunch = 0x000013E8;
const DWORD jumpoffset = 0x04AD0374;
const DWORD m_dwViewMatrix = 0x04A310A4;
const DWORD RadarBase = 0x04A7079C;
const DWORD ScoreBoardBase = 0x04A5BC3C;
const DWORD m_iCrossHairID = 0x00008CF4;
const DWORD m_iHealth = 0x000000FC;
const DWORD attack = 0x02EADA78;
const DWORD EntityList = 0x04A3BB64;
const DWORD m_dwClientState = 0x005D3224;
const DWORD flashMaxAlpha = 0x00008694;
const DWORD m_vecViewOffset = 0x00000104;

/* VARIABLES */
HWND TargetWindow;

DWORD Client;
DWORD LocalBase;
DWORD GlowPointer;
DWORD currentplayer;

bool TeamESP = false;
bool EnemyESP = false;
bool spotted;
bool currentplayerdormant;

float flashduration;
float FlashMaxAlpha;

int MyTeam;
int glowcolour = 1;
int teamglowcolour = 1;
int fflag; /* FFLAG IS A BYTE NOT A INT */
int jump;
int currentplayerteam;
int currentplayerglowindex;
int LocalPlayerTeam;
int HealthBasedESP;

 
ProcMem.cpp
Code:
#include "ProcMem.h"

using namespace std;

#pragma region Misc Functions

ProcMem::ProcMem() {
	//Constructor For Class, Do Not Remove!
}

ProcMem::~ProcMem() {
	//De-Constructor
	//Clean Up! (Close Handle - Not Needed Anymore)
	CloseHandle(hProcess);
}

/* This Function Returns The Length Of External Char Arrays, SizeOf(Array) Fails For External Arrays. */
int ProcMem::chSizeOfArray(char *chArray) {

	//Loop Through *chArray To Get Amount Of Bytes
	for (int iLength = 1; iLength < MAX_PATH; iLength++)
		if (chArray[iLength] == '*')
			return iLength;

	cout << "\nLENGTH: Failed To Read Length Of Array\n";
	return 0;
}

/* This Function Returns The Length Of External Int Arrays, SizeOf(Array) Fails For External Arrays. */
int ProcMem::iSizeOfArray(int *iArray) {

	//Loop Through *chArray To Get Amount Of Bytes
	for (int iLength = 1; iLength < MAX_PATH; iLength++)
		if (iArray[iLength] == '*')
			return iLength;

	cout << "\nLENGTH: Failed To Read Length Of Array\n";
	return 0;
}

/* This Function Finds The Specified Value Inside Of Arrays And Returns A Boolean Value,
/* Used For Triggerbot To Find The Current Crosshair Entity i_NearEntity Inside The Enemy Array. */
bool ProcMem::iFind(int *iAry, int iVal) {

	for (int i = 0; i < 64; i++)
		if (iVal == iAry[i] && iVal != 0)
			return true;

	return false;
}

#pragma endregion

#pragma region Memory Functions

/* This Function Will Return A Handle To The Process So We Can Write & Read Memeory From The Process. */
void ProcMem::Process(char* ProcessName) {

	//Variables
	HANDLE hPID = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL); //Snapshot To View All Active Processes
	PROCESSENTRY32 ProcEntry;
	ProcEntry.dwSize = sizeof(ProcEntry); //Declare Structure Size And Populate It

										  //Loop Through All Running Processes To Find Process
	do
		if (!strcmp(ProcEntry.szExeFile, ProcessName))
		{
			//Store Process ID
			dwPID = ProcEntry.th32ProcessID;
			CloseHandle(hPID);

			//Give Our Handle All Access Rights 
			hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwPID);
			return;
		}
	while (Process32Next(hPID, &ProcEntry));

	cout << "You haven't even started the game yet lol";
	system("pause");
	exit(0);
}

/* This Function Will Write Specified Bytes To The Address, And Can Also Be Reverted Back To Normal
/* Just Call It Again As It Works On A Boolean. */
void ProcMem::Patch(DWORD dwAddress, char *Patch_Bts, char *Default_Bts) {

	//Variables
	int iSize = chSizeOfArray(Default_Bts);

	//Loop Through Addresses Writing Bytes
	if (!bPOn)
		for (int i = 0; i < iSize; i++)
			Write<BYTE>(dwAddress + i, Patch_Bts[i]);
	else
		for (int i = 0; i < iSize; i++)
			Write<BYTE>(dwAddress + i, Default_Bts[i]);

	bPOn = !bPOn;
}

/* This Function Is Similiar To Cheat Engine's Code Injection Function, It's Able To Create JMP's
/* To A Codecave And Write New Memory. Untested CALL Command */
void ProcMem::Inject(DWORD dwAddress, char *Inj_Bts, char *Def_Bts, BOOL Type) {

	//Variables
	int i_ISize = chSizeOfArray(Inj_Bts);
	int i_DSize = chSizeOfArray(Def_Bts);

	if (!bIOn)
	{
		//NOP All Bytes In The Array Past The 5th Byte	
		if (i_DSize > 5)
			for (int i = 6; i < i_DSize; i++)
				Write<BYTE>(dwAddress + i, 0x90);
		else { cout << "\nINJECTION: Default Bytes Must Be More Than 5\n"; return; }

		//Create Codecave
		dwCaveAddress = (DWORD)VirtualAllocEx(hProcess, NULL, i_ISize + 5, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);

		//Calculate Jmp/Return Distances In Bytes To Write
		DWORD dwRetJmp = (dwAddress + i_DSize) - dwCaveAddress - 5; //(NextInstruction - CaveAddress - 5) - is correct equation.
		DWORD dwBaseJmp = dwCaveAddress - dwAddress - 5; //Base Jmp

														 //Loop Through Each Address Writing Inj_Bts Inside The Codecave
		for (int i = 0; i <= i_ISize; i++)
			Write<BYTE>(dwCaveAddress + i, Inj_Bts[i]);

		//Write The Return Distance In Bytes (E9 = Jmp | E8 = Call) To The Original Address
		Write<BYTE>(dwCaveAddress + i_ISize, Type ? 0xE9 : 0xE8);
		Write<DWORD>(dwCaveAddress + i_ISize + 1, dwRetJmp);

		//Write The Jump From The Original Address To The Codecave
		Write<BYTE>(dwAddress, Type ? 0xE9 : 0xE8);
		Write<DWORD>(dwAddress + 1, dwBaseJmp);

	}
	else {
		//Restore Original Bytes
		for (int i = 0; i < i_DSize; i++)
			Write<BYTE>(dwAddress + i, Def_Bts[i]);

		//Clean Up! (DeAllocate CodeCave)
		VirtualFreeEx(hProcess, (LPVOID)dwCaveAddress, i_ISize + 5, MEM_DECOMMIT);
	}
	bIOn = !bIOn;
}

/* Basic Byte Scanner, Will Return The Start Address Of The Specififed Byte Pattern.
/* To-Do: Re-Write Using Memory_Page Functions To Grab Blocks Of Memory And Scan
/* It Inside This Console, Maybe Study Multi-Threading For Faster Scanning. */
DWORD ProcMem::AOB_Scan(DWORD dwAddress, DWORD dwEnd, char *Bytes) {

	//VARIABLES
	int iBytesToRead = 0, iTmp = 0;
	int length = chSizeOfArray(Bytes);
	bool bTmp = false;

	//Check If The Start Of The Array Has Wildcards, So We Can Change The Count
	if (Bytes[0] == '?')
	{
		for (; iBytesToRead < MAX_PATH; iBytesToRead++)
			if (Bytes[iBytesToRead] != '?')
			{
				iTmp = (iBytesToRead + 1);
				break;
			}
	}

	//Increase Start Address Till It Reaches The End Address While Reading Bytes
	for (; dwAddress < dwEnd; dwAddress++)
	{
		if (iBytesToRead == length)
			return dwAddress - iBytesToRead;

		if (Read<BYTE>(dwAddress) == Bytes[iBytesToRead] || (bTmp && Bytes[iBytesToRead] == '?'))
		{
			iBytesToRead++;
			bTmp = true;
		}
		else
		{
			iBytesToRead = iTmp;
			bTmp = false;
		}
	}

	cout << "\nAOB_SCAN: Failed To Find Byte Pattern\n";
	return 0;
}

/* Returns The Base Address Of The Specified Module Inside The Target Process
/* e.g.[ Module("client.dll"); ]. */
DWORD ProcMem::Module(LPSTR ModuleName) {

	//Variables
	HANDLE hModule = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwPID); //Take A Module Snapshot Of The Process (Grab All Loaded Modules)
	MODULEENTRY32 mEntry; //Declare Module Entry Structure
	mEntry.dwSize = sizeof(mEntry); //Declare Structure Size And Populate It With Loaded Modules

									//Scan For Module By Name
	do
		if (!strcmp(mEntry.szModule, ModuleName))
		{
			CloseHandle(hModule);
			return (DWORD)mEntry.modBaseAddr;
		}
	while (Module32Next(hModule, &mEntry));

	cout << "\nCouldn't find client.dll, retrying...\n";
	return 0;
}

#pragma endregion

 
ProcMem.h
Code:
#pragma once
#define WIN32_LEAN_AND_MEAN //Excludes Headers We Wont Use (Increase Compile Time)

#include <windows.h> //Standard Windows Functions/Data Types
#include <iostream> //Constains Input/Output Functions (cin/cout etc..)
#include <TlHelp32.h> //Contains Read/Write Functions
#include <string> //Support For Strings
#include <sstream> //Supports Data Conversion

class ProcMem {
protected:

	//STORAGE
	HANDLE hProcess;
	DWORD dwPID, dwProtection, dwCaveAddress;

	//MISC
	BOOL bPOn, bIOn, bProt;

public:

	//MISC FUNCTIONS
	ProcMem();
	~ProcMem();
	int chSizeOfArray(char *chArray); //Return Size Of External Char Array
	int iSizeOfArray(int *iArray); //Return Size Of External Int Array
	bool iFind(int *iAry, int iVal); //Return Boolean Value To Find A Value Inside An Int Array

#pragma region TEMPLATE MEMORY FUNCTIONS

									 //REMOVE READ/WRITE PROTECTION
	template <class cData>
	void Protection(DWORD dwAddress)
	{
		if (!bProt)
			VirtualProtectEx(hProcess, (LPVOID)dwAddress, sizeof(cData), PAGE_EXECUTE_READWRITE, &dwProtection); //Remove Read/Write Protection By Giving It New Permissions
		else
			VirtualProtectEx(hProcess, (LPVOID)dwAddress, sizeof(cData), dwProtection, &dwProtection); //Restore The Old Permissions After You Have Red The dwAddress

		bProt = !bProt;
	}

	//READ MEMORY 
	template <class cData>
	cData Read(DWORD dwAddress)
	{
		cData cRead; //Generic Variable To Store Data
		ReadProcessMemory(hProcess, (LPVOID)dwAddress, &cRead, sizeof(cData), NULL); //Win API - Reads Data At Specified Location 
		return cRead; //Returns Value At Specified dwAddress
	}

	//READ MEMORY - Pointer
	template <class cData>
	cData Read(DWORD dwAddress, char *Offset, BOOL Type)
	{
		//Variables
		int iSize = iSizeOfArray(Offset) - 1; //Size Of *Array Of Offsets 
		dwAddress = Read<DWORD>(dwAddress); //HEX VAL

											//Loop Through Each Offset & Store Hex Value (Address)
		for (int i = 0; i < iSize; i++)
			dwAddress = Read<DWORD>(dwAddress + Offset[i]);

		if (!Type)
			return dwAddress + Offset[iSize]; //FALSE - Return Address
		else
			return Read<cData>(dwAddress + Offset[iSize]); //TRUE - Return Value
	}

	//WRITE MEMORY
	template <class cData>
	void Write(DWORD dwAddress, cData Value)
	{
		WriteProcessMemory(hProcess, (LPVOID)dwAddress, &Value, sizeof(cData), NULL);
	}

	//WRITE MEMORY - Pointer
	template <class cData>
	void Write(DWORD dwAddress, char *Offset, cData Value)
	{
		Write<cData>(Read<cData>(dwAddress, Offset, false), Value);
	}

	//MEMORY FUNCTION PROTOTYPES
	virtual void Process(char* ProcessName); //Return Handle To The Process
	virtual void Patch(DWORD dwAddress, char *chPatch_Bts, char *chDefault_Bts); //Write Bytes To Specified Address
	virtual void Inject(DWORD dwAddress, char *chInj_Bts, char *chDef_Bts, BOOL Type); //Jump To A Codecave And Write Memory
	virtual DWORD AOB_Scan(DWORD dwAddress, DWORD dwEnd, char *chPattern); //Find A Byte Pattern
	virtual DWORD Module(LPSTR ModuleName); //Return Module Base Address

#pragma endregion	

};


@HitByParkedCar AND @viking911
I'm in peace

First time was removed since i forgot a link there, oops, sorry ):
Thanks. I have only been coding for a month and without your help I would never have spotted these issues.
@PhY'z making 2 threads for Radar and ESP is really not necessary

Code:
if (EnemyESP && HealthBasedESP <= 100 && HealthBasedESP > 75) /* LESS OR EQUAL 100 OR MORE THAN 75 */
That's incorrect it means "less or equal to 100 AND(not OR) higher than 75"
Those codes are going to be useful
Quote Originally Posted by piritonga View Post
Those codes are going to be useful
lmao you could have just downloaded the polyhack... the source is in there
Quote Originally Posted by HitByParkedCar View Post
lmao you could have just downloaded the polyhack... the source is in there
What if i want to make one by myself...with my own menu and stuff...
Quote Originally Posted by Block4o View Post
@PhY'z making 2 threads for Radar and ESP is really not necessary

Code:
if (EnemyESP && HealthBasedESP <= 100 && HealthBasedESP > 75) /* LESS OR EQUAL 100 OR MORE THAN 75 */
That's incorrect it means "less or equal to 100 AND(not OR) higher than 75"
I know, ididn't fixed it at all, just the unseen bugs and errors, this part was already made by them, I just changed this (blablabal >=0 & & blablabal <= 0) to (blablabal >=0 && blablabal < 0)

I just removed one equal, that was useless

Like i fixed a part of bugs, and cleaned out the code, have some parts that stills useless,

And another thread to radar is a good idea, since they can use another headers so separate the hack, and make it even more clean

That's with the " " in tittle (I know that i wrote wrong, )

It can be clean like this: (the variables values are defined inside main and the others .cpp are inside GUI's)
Oh, thank you for your "FIX". But i can't see what you have done more than just comment the whole source.
And why would you comment ProcMems since mostly nobody is even using it anymore?
People creats they're own memory readings and writings.
Quote Originally Posted by viking911 View Post
.... since mostly nobody is even using it anymore?
People creats they're own memory readings and writings.
Which to 90 % of the times is copy pasted anyways.
Quote Originally Posted by viking911 View Post
Oh, thank you for your "FIX". But i can't see what you have done more than just comment the whole source.
And why would you comment ProcMems since mostly nobody is even using it anymore?
People creats they're own memory readings and writings.
Wait, i didn't commented it, so that proves it was copied because it was already commented
Ahahahha

If you can't see what is fixed, and what need's to be fixed, err...
Quote Originally Posted by WasserEsser View Post
Which to 90 % of the times is copy pasted anyways.
true, but i think you know what im trying to say

- - - Updated - - -

Quote Originally Posted by PhY'z View Post
Wait, i didn't commented it, so that proves it was copied because it was already commented
Ahahahha

If you can't see what is fixed, and what need's to be fixed, err...
I forgot the other files, u didn't comment them either?
Quote Originally Posted by viking911 View Post
true, but i think you know what im trying to say

- - - Updated - - -



I forgot the other files, u didn't comment them either?
Just Offsets and Source

ProcMem i didn't .-. how did you copied and didn't noticied, but i fixed somebugs in your procmem, one was: declaring 2 times the header, and a function and making #pragmaonce and then #... #define ProcMem_H
Didn't copy paste them, i downloaded them since i was very busy working on PolyMeme v9 [Internal]
And HitByParkedCar was busy doing the External.
Posts 1–13 of 13 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us