Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › C++/C Programming › Correct me

Correct me

Posts 1–4 of 4 · Page 1 of 1
aanthonyz
aanthonyz
Correct me
Could you please correct me if im wrong. I want to make sure im understanding this.

Im making some of these up I just want to understand the concept of it

Description:
Retrieving the module handle to store in a DWORD.
Code:
DWORD CShellBase = (DWORD) GetModuleHandle("cshell.dll");
Question:
Why do we need to retrieve the modulehandle?

Description:
Add the LTC to the ModuleHandle that you retrieved before.
Code:
DWORD *LTClient = ( DWORD* )( (CShellBase + 0x005976) );
Question:
Why do you need to add it to the ModuleHandle? Why not just the LTC?


This little section if from Lauwy's Tutorial for a base:

Code:
void __cdecl PushToConsole(char* szVal ) {
	DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
	if( dwCShell != NULL )
	{
		DWORD *LTClient = ( DWORD* )( (dwCShell + 0x299D40) );
		void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x1F8 );
		_asm
		{
			push szVal;
			call CONoff;
			add esp, 4;
		}
	}
}
Question:
What is this doing exactly?

Thanks in advance
#1 · 15y ago
.::SCHiM::.
.::SCHiM::.
Quote Originally Posted by aanthonyz View Post
Could you please correct me if im wrong. I want to make sure im understanding this.

Im making some of these up I just want to understand the concept of it

Description:
Retrieving the module handle to store in a DWORD.
Code:
DWORD CShellBase = (DWORD) GetModuleHandle("cshell.dll");
Question:
Why do we need to retrieve the modulehandle?

Description:
Add the LTC to the ModuleHandle that you retrieved before.
Code:
DWORD *LTClient = ( DWORD* )( (CShellBase + 0x005976) );
Question:
Why do you need to add it to the ModuleHandle? Why not just the LTC?


This little section if from Lauwy's Tutorial for a base:

Code:
void __cdecl PushToConsole(char* szVal ) {
	DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
	if( dwCShell != NULL )
	{
		DWORD *LTClient = ( DWORD* )( (dwCShell + 0x299D40) );
		void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x1F8 );
		_asm
		{
			push szVal;
			call CONoff;
			add esp, 4;
		}
	}
}
Question:
What is this doing exactly?

Thanks in advance
Why do we need to retrieve the modulehandle?
You need to retrieve the modulehandle because you need the address of the module to add the offset of the variable you need inside it to it.

The module handle is the starting (base) offset of that module in the calling processes context(think of it as memory for now): cShell.dll is a module loaded Engine.exe's process.

CShellBase + 0x005976
You stored the base address of CShell and now you add the offset of the variable you need to it. You need the address of CShell because the variable you need is in there.



What is this doing exactly?
I'll comment the lines one by one for you.

Code:
void __cdecl PushToConsole(char* szVal ) {
This is as you know a function, don't be thrown off by the __cdecl thingy, it just tells windows what to expect form the caller (This means: caller fixes the stack)

Code:
DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
We just discussed this one.

Code:
if( dwCShell != NULL )
This checks if dwCShell (the one that receives the module handle) is not NULL, if it is it means that the module is not loaded into memory, and thus we cannot use it

Code:
		DWORD *LTClient = ( DWORD* )( (dwCShell + 0x299D40) );
		void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x1F8 );
We already did the first line, and the second line is almost the same, apart from the fact that it's a multi level pointer.

Code:
		_asm
		{
			push szVal;
			call CONoff;
			add esp, 4;
		}
The __asm statement tells your compiler that you're going to input some ASM code into your code.

The push instruction pushes the push to console command onto the stack. Windows functions take their variables of the stack to use.

The call instruction tells windows/processor to call the address that you've stored in CONoff, CONoff if I'm correct points to some in-game console function. I'm sure you know what that is. In most games you can put such a console up with the '`' key(so you know what I'm talking about)

add esp, 4 is a mandatory because you just told windows with __cdecl that you're going to fix the stack. Adding 4 to the esp register fixes the stack


And that's basically what this code does. It shoves commands to the in-game command function that Nexon has removed from the GUI (you can't bring it up with the '`' key in CA or Warrock)

-SCHiM
#2 · 15y ago
aanthonyz
aanthonyz
Thank you very much.

+rep and thanked
#3 · 15y ago
KI
kibbles18
thanks SCHiM for the explanation, i know i learned something from it
#4 · 15y ago
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Tags for this Thread

None