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 › [Help] Dealing with pointers from a dll

[Help] Dealing with pointers from a dll

Posts 1–12 of 12 · Page 1 of 1
CT
ctpsolo
[Help] Dealing with pointers from a dll
I'm currently learning how to find and use pointers in memory hacks.
I got adress + offset to a simple hack by using CE on the game, and according to some sources I found I could use this in my dll to retrieve the adress that the pointer directs to:

DWORD Addy = *((DWORD*)0x00053B78+0x44);

I'm not sure if it's correct because it seems like everyone are saying different things. Anyway, this only gives me an error the second after I injected my dll to the game, "the instruction on xxxxxxxx refered to 0x00053B78 - error, could not read memory", something like that. So I tried using VirtualProtect on the pointer adress before retrieving the addy, which only results in the same error unfortunately.

This is a snippet from how my dll looks right now:

Code:
DWORD Protection;
DWORD Addy = *((DWORD*)0x00053B78+0x44); //This gives error when injected

while(1==1){

//This part should work fine because I used it on a emulator with statical adresses and it writes the memory without error messages.
if(GetAsyncKeyState('Z') == -32767){
VirtualProtect((LPVOID)Addy, 4, PAGE_EXECUTE_READWRITE, &Protection);
*(DWORD*)Addy = 0x12;
So, anyone could give me a helping hand? I'm sure it's a somewhat trivial error due to incorrect sources I looked at =)
#1 · 16y ago
CT
ctpsolo
Added errorhandling for VirtualProtect on the pointer addy before I try to retrieve the adress it points to and it seems like VP fails... Hmm, this is very frustrating :/
#2 · 16y ago
TE
TehKiller
Code:
DWORD *pBasePointer = (DWORD*)0x00053B78;
DWORD *pOffsetPointer = (DWORD*)(*pBasePointer)+0x44;
*pOffsetPointer = value;
edit: or try:
Code:
DWORD *pPointer = (DWORD*)(*(DWORD*)0x00053B78)+0x44;
*pPointer = value
#3 · 16y ago
CT
ctpsolo
Quote Originally Posted by TehKiller View Post
Code:
DWORD *pBasePointer = (DWORD*)0x00053B78;
DWORD *pOffsetPointer = (DWORD*)(*pBasePointer)+0x44;
*pOffsetPointer = value;
edit: or try:
Code:
DWORD *pPointer = (DWORD*)(*(DWORD*)0x00053B78)+0x44;
*pPointer = value
Okey I would like to thank you altough I still haven't got it to work. I'm no longer recieveing memory errors so I'm probably on the road again, just need to figure out what else is wrong.
#4 · 16y ago
Hell_Demon
Hell_Demon
what game/app is it for?
#5 · 16y ago
CO
Combatant
For MapleStory, I use a snippet I learnt a while ago from Kitterz:
Code:
__inline ULONG_PTR ReadPointer(ULONG_PTR* ulBase, INT nOffset)
{
   if ( !IsBadReadPtr((VOID*)ulBase, sizeof(ULONG_PTR)) )
        if ( !IsBadReadPtr((VOID*)((*(ULONG_PTR*)ulBase)+nOffset), sizeof(ULONG_PTR)) )
            return *(ULONG_PTR*)((*(ULONG_PTR*)ulBase)+nOffset);
    return 0;
}
Code:
DWORD MonsterBase = 0x00B414E8;
DWORD MonsterOffset = 0x24;
Code:
ReadPointer((ULONG_PTR*)MonsterBase, MonsterOffset)
I still use this in bots that I make, but technically, it SHOULD work for whatever game you're working with.
#6 · 16y ago
CT
ctpsolo
Thanks for the answers so far!
Ok, my question now is how do I go along with "multi layers" of pointers?
Let's say I have a base pointer that with offset 37 takes me to another pointer with offset 40 that takes me to another pointer... yea you get it, until it takes me to the actual hack address. How would I then express it in c++ to retrieve the adress I want to change?

I looked for dll sources and found couple of interesting but none of them seems to have dealt with a lot of pointers.
#7 · 16y ago
ZE
zeco
Quote Originally Posted by ctpsolo View Post
Thanks for the answers so far!
Ok, my question now is how do I go along with "multi layers" of pointers?
Let's say I have a base pointer that with offset 37 takes me to another pointer with offset 40 that takes me to another pointer... yea you get it, until it takes me to the actual hack address. How would I then express it in c++ to retrieve the adress I want to change?

I looked for dll sources and found couple of interesting but none of them seems to have dealt with a lot of pointers.
I'm going to assume that you have the address in a DWORD initally.

so you say offset of 37, then offset of 40, then let's say offset of 68, and that gives us the value we are looking for


DWORD Addy = 0xFF01CD;

DWORD Value = *( *( *( (DWORD***)Addy + 37 ) + 40) + 68 );

Ignore my explanation below if you wish, due to the cumbersome nature of multilevel pointers, and My failure with communication, The way I have said it below is EXTREMELY confusing. You have been forewarned.

As you can see, In the orange, we have type casted Addy to the type pointer to a pointer to a pointer to an DWORD, and we dereference Addy+37, which results in a value of type pointer to a pointer to a DWORD, and so on. Otherwise, i suppose you could have typecasted it to a pointer to Int multiple times to dereference it, but this way is better.

In the green, we have dereferenced, (the value contained within Addy +37), + 40.

In the purple we have dereferenced,( the value contained within (, the value contained within Addy+37, and 40,) ) + 68.
#8 · edited 16y ago · 16y ago
why06
why06
Really is that how that works?

I'll be damned. o_O
I always wondered why people did those ungodly complex pointers like DWORD***, and now I guess this is why....

So is the first offset in the center or on the outside?
#9 · 16y ago
ZE
zeco
Quote Originally Posted by why06 View Post
Really is that how that works?

I'll be damned. o_O
I always wondered why people did those ungodly complex pointers like DWORD***, and now I guess this is why....

So is the first offset in the center or on the outside?
First offset, is on the Inside. I can't even think of a way to visualize it. . . Maybe difference sized containers inside each other?

Either way, it's a bit easier to understand in assembly syntax come to think of it.

[ [ [Addy+37] + 40 ] + 38]

Atleast I think that's assembly syntax. This is how you refer to multilevel pointers in MHS (memory hacking software). I never actually managed to figure it out in CE, then again I haven't tried in a long time.

P.S. This isn't why! You are Why!
P.P.S Yay my post count is the same as the size of my harddrive.
P.P.P.S And Why06's post count is the year of birth of someone i know. . .
P.P.P.P.S WTH Why06. . . 2000 posts? You are crazy.
#10 · edited 16y ago · 16y ago
SH
shad0w'
In pure assembly, it would be far more ugly than that.
If you think you would have to separately parse each offset to the register.

Also (back to C++) you should use DWORD_PTR, its 0x64 compatible and uses less runtime memory.
#11 · 16y ago
CO
Combatant
For multi-level pointers, I always use something like:

Code:
DWORD MouseBase = 0x00B43EDC;
DWORD MouseOffset = 0x978;
DWORD MouseXOffset = 0x84;
DWORD MouseYOffset = 0x88;
int RealMouse = 0;
RealMouse = *((DWORD*)MouseBase) + MouseOffset;
SetDlgItemText(hWnd, IDC_TXTMOUSEXPOINTER, _itoa(ReadPointer((ULONG_PTR*)RealMouse, MouseXOffset), buf, 10) );
SetDlgItemText(hWnd, IDC_TXTMOUSEYPOINTER, _itoa(ReadPointer((ULONG_PTR*)RealMouse, MouseYOffset), buf, 10) );
or, since the MouseYOffset is just MouseXOffset + 4, I'd use this for setting the MouseY text.

Code:
SetDlgItemText(hWnd, IDC_TXTMOUSEYPOINTER, _itoa(ReadPointer((ULONG_PTR*)RealMouse, MouseXOffset + 4), buf, 10) );
#12 · 16y ago
Posts 1–12 of 12 · Page 1 of 1

Post a Reply

Similar Threads

  • i need some help dealing with warrock pointersBy shakib in Hack Requests
    1Last post 19y ago
  • QCZM 3.1 combine with weapons from 5.0 - helpBy maciek1o3s in Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    13Last post 15y ago
  • Help with hooking from a dllBy Anddos in C++/C Programming
    5Last post 16y ago
  • C# Dealing with webbrowser images help.By Calebb in C++/C Programming
    3Last post 16y ago
  • Question dealing with mfc42d.dllBy Killallnoobs112 in WarRock - International Hacks
    44Last post 18y ago

Tags for this Thread

None