Solved Where can i learn this part in game hacking?

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

KA34

Newbie
Full Member
Jan 25, 2017
17
48
0
Hello! So i have tried to find a tutorial or an explanation for how you can get the Module Name Pointer for example "client.dll" "engine.dll". I got this code that shows how you get it
C++:
DWORD GetModuleNamePointer(LPSTR LPSTRModuleName, DWORD __DwordProcessId)
{ 
		MODULEENTRY32 lpModuleEntry = {0};
		HANDLE hSnapShot = CreateToolhelp32Snapshot( TH32CS_SNAPMODULE, __DwordProcessId);
		if(!hSnapShot)
			return NULL;  
		lpModuleEntry.dwSize = sizeof(lpModuleEntry);
		BOOL __RunModule = Module32First( hSnapShot, &lpModuleEntry );
		while(__RunModule)
		{
			if(!strcmp(lpModuleEntry.szModule, LPSTRModuleName ) )
			{CloseHandle( hSnapShot );
			return (DWORD)lpModuleEntry.modBaseAddr;
			}
			__RunModule = Module32Next( hSnapShot, &lpModuleEntry );
		}
		CloseHandle( hSnapShot );
		return NULL;
}
But it does not really explain mutch. I do not really want to copy and paste so what is the best way to learn how this code works?
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,073
78,998
2,371
Hello! So i have tried to find a tutorial or an explanation for how you can get the Module Name Pointer for example "client.dll" "engine.dll". I got this code that shows how you get it
C++:
DWORD GetModuleNamePointer(LPSTR LPSTRModuleName, DWORD __DwordProcessId)
{ 
		MODULEENTRY32 lpModuleEntry = {0};
		HANDLE hSnapShot = CreateToolhelp32Snapshot( TH32CS_SNAPMODULE, __DwordProcessId);
		if(!hSnapShot)
			return NULL;  
		lpModuleEntry.dwSize = sizeof(lpModuleEntry);
		BOOL __RunModule = Module32First( hSnapShot, &lpModuleEntry );
		while(__RunModule)
		{
			if(!strcmp(lpModuleEntry.szModule, LPSTRModuleName ) )
			{CloseHandle( hSnapShot );
			return (DWORD)lpModuleEntry.modBaseAddr;
			}
			__RunModule = Module32Next( hSnapShot, &lpModuleEntry );
		}
		CloseHandle( hSnapShot );
		return NULL;
}
But it does not really explain mutch. I do not really want to copy and paste so what is the best way to learn how this code works?
https://guidedhacking.com/getmodulebase
https://msdn.microsoft.com/en-us/library/windows/desktop/ms686701(v=vs.85).aspx
https://msdn.microsoft.com/en-us/library/windows/desktop/ms686849(v=vs.85).aspx

I explain how all this works in this tutorial at ?t=665
https://youtu.be/jLfPdujSuRA?t=665
 
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