Solved My internal Patternscan isn`t working

  • CSGO recently moved logic from 'client_panorama.dll' to 'client.dll', you must update all code that uses 'client_panorama.dll' and replace it with 'client.dll' or the code will not work.
Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

0x123

Russians are so good at hacking ._.
Dank Tier Donator
Nobleman
Oct 18, 2015
71
623
2
First a few Questions
Can i just put a dll Name as Module?
2nd, whats wrong with my Patternscan function // Coded it like that for having not the same code like Fleep
----------------------------------------------------------------------------------------------------------------------------------------
#include <iostream>
#include <Windows.h>
#include <Psapi.h>

void MemoryEdit(DWORD Adresse, BYTE *x86Befehl)
{
DWORD OldProtect;
VirtualProtect((LPVOID)Adresse, 4, PAGE_EXECUTE_READWRITE, &OldProtect);
memcpy((void*)Adresse, x86Befehl, sizeof x86Befehl);
VirtualProtect((LPVOID)Adresse, 4, OldProtect, &OldProtect);
}

DWORD PatternScan(char *modul, char *pattern, char *mask)
{
MODULEINFO ModuleStruct;
GetModuleInformation(GetCurrentProcess(), GetModuleHandle(modul), &ModuleStruct, sizeof (MODULEINFO));
DWORD patternLength = (DWORD)strlen(mask);
DWORD size = (DWORD)ModuleStruct.SizeOfImage;
DWORD base = (DWORD)ModuleStruct.lpBaseOfDll;

for (DWORD i = 0; i < size - patternLength; i++)
{
bool found = true;
for (DWORD j = 0; j < patternLength; j++)
found &= mask[j] == '?' || pattern[j] == *(char*)(base + i + j);
if (found)
return base + i;
}
return NULL;
}

void Hook()
{
DWORD CoutAddy = PatternScan("engine.dll","\xE8\x5E\x34\x00\x00\xE9\x00\x00\x00\x00\x6A\x14\x68\xE8\x30\xBE\x00", "x????x????xxxxxxx");
}


BOOL WINAPI DllMain(HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved)
{
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
MessageBoxA(NULL, "Dll attached!", NULL, MB_OK);
Hook();
break;
}
}
 

Broihon

edgy 12 y/o
Escobar Tier VIP
Fleep Tier Donator
Dec 22, 2013
1,745
40,528
316
Use c++ tags and just don't do lines like this because noone understands what's going. Probably not even the compiler.
found &= mask[j] == '?' || pattern[j] == *(char*)(base + i + j);

Just do this:
C++:
DWORD PatternScan(char * modul, BYTE * pattern, char *mask)
{
	MODULEINFO ModuleStruct;
	K32GetModuleInformation(GetCurrentProcess(), GetModuleHandleA(modul), &ModuleStruct, sizeof(MODULEINFO));
	DWORD patternLength = (DWORD)strlen(mask);
	DWORD size = (DWORD)ModuleStruct.SizeOfImage;
	DWORD base = (DWORD)ModuleStruct.lpBaseOfDll;

	for (DWORD i = 0; i < size - patternLength; i++)
	{
		bool found = true;
		for (DWORD j = 0; j < patternLength; j++)
		{
			if (mask[j] == 'x' && pattern[j] != *(BYTE*)(base + i + j))
			{
				found = false;
				break;
			}
		}

		if (found)
			return base + i;
	}
	return NULL;
}
I changed pattern to a BYTE pointer just to be sure there are no signed/unsigned conflicts.

To answer the first question: yes, "engine.dll" should be fine.
 

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,294
37,938
269
1. You literally just had to read the first 2 lines of the function ( that you said you coded )
2. Tell us where its broken
 
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