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 › Reading pointers

Reading pointers

Posts 1–15 of 22 · Page 1 of 2
Jabberwock
Jabberwock
Reading pointers
So after I inject my DDL, how can I read a pointer's content? And how can I change it?
By memcpy function or by WriteProcessMemory?

if I have a pointer like this one:
[[01BFC478+45]+74]
How can I change it?

Thanks in advance for all the helpers!
#1 · 14y ago
MarkHC
MarkHC
If you're using a dll you don't need the WriteProcessMemory, you can access the pointer directly. In your case it'll be like this.

*(*(*01BFC478)+45)+74) <== it's been a while since I last used C++, so this is probably wrong.. wait for someone with a little more experience ;P
#2 · 14y ago
Jabberwock
Jabberwock
I forgot to mention my pointer type is an unicode string. So any helpers? Ant thank you General Shepherd for trying to help me.
#3 · edited 14y ago · 14y ago
25
258456
Well, we would have to shoot in the dark since we don't know how many levels down the pointer is because you didn't post disassembly, but just logically from your post i would have to say:

Code:
TCHAR string = *(TCHAR*)(*(DWORD*)(01BFC478+45)+74);
And again, this might not be right since you haven't posted disassembly so we can't exactly tell you for sure.
#4 · edited 14y ago · 14y ago
Jabberwock
Jabberwock
OK so by looking at this; will you be able to tell me how?



The base pointer is "AVA.exe"+01BFC478

I thought it will be like this:
Code:
TCHAR string = *(TCHAR*)(*(DWORD*)(*(DWORD*)0x01BFC478+0x90)+0x24);
But it doesn't seem to work.

---------- Post added at 06:46 AM ---------- Previous post was at 05:54 AM ----------

I'm just trying to make a message with the pointer's content, and it shows me a blank message.

MessageBox(NULL, (LPCWSTR)*(DWORD*)0x01BFC478, TEXT("ERROR"), MB_OK);

---------- Post added at 07:03 AM ---------- Previous post was at 06:46 AM ----------

Wow never thought pointers will be this difficult to handle.

---------- Post added at 08:01 AM ---------- Previous post was at 07:03 AM ----------

Tried to do:
Code:
MessageBox(NULL, (LPCTSTR)*(TCHAR*)(*(DWORD*)(*(DWORD*)(0x01BFC478) + 0x90) + 0x24), TEXT("ERROR"), MB_OK);
But the game is crashing on me. Why it's doing that?

---------- Post added at 09:37 AM ---------- Previous post was at 08:01 AM ----------

OK tried a different thing:
Code:
	DWORD var;
	VirtualProtect((TCHAR*)(*(DWORD*)(*(DWORD*)(0x01BFC478) + 0x90) + 0x24), 4, PAGE_EXECUTE_READWRITE, (DWORD*)&var);
	*(TCHAR*)(*(DWORD*)(*(DWORD*)(0x01BFC478) + 0x90) + 0x24) = 123;
And still it crashes.

---------- Post added at 09:43 AM ---------- Previous post was at 09:37 AM ----------

OK.

#5 · edited 14y ago · 14y ago
MarkHC
MarkHC
@Anonymouss, @master131, @barata55 Any idea?
#6 · edited 14y ago · 14y ago
Jabberwock
Jabberwock
OK i think I got it right! but a small problem at the end:

Code:
			DWORD value = (DWORD)GetModuleHandle(0);
			value = *(DWORD*)(0x01BFC478 + value);
			value = *(DWORD*)(value + 0x90);
			TCHAR rara = *(TCHAR*)(value + 0x24);
			
			char *buffer = new char[255];
			sprintf(buffer, "%d", rara);
			MessageBoxA(NULL, buffer, "test", MB_OK);
It's showing me the first or 2 bytes. And a number 76. It should show me the player's name which is in unicode.
#7 · 14y ago
barata55
barata55
Try this:

sprintf(buffer, "%d", rara);

Change to:

sprintf(buffer, "%s", rara);

Thanks Barata...
#8 · 14y ago
Jabberwock
Jabberwock
I did that and the game crashed.
And when I change "new char[255]" to "new char[2147483647]" it also crashes.

---------- Post added at 12:38 PM ---------- Previous post was at 12:12 PM ----------

I changed the code to:
Code:
			DWORD value = (DWORD)GetModuleHandle(NULL);
			value = *(DWORD*)(0x01BFC478 + value);
			value = *(DWORD*)(value + 0x90);
			LPWSTR rara = *(LPWSTR*)(value + 0x24);
			
			char *buffer = new char[255];
			sprintf(buffer, "%s", rara);
			MessageBoxA(NULL, buffer, "test", MB_OK);
and I get this:



---------- Post added at 12:47 PM ---------- Previous post was at 12:38 PM ----------

In CE it's checked as "Zero-Terminate string"
#9 · 14y ago
MarkHC
MarkHC
Use swprintf which is the version of sprintf which is designed for wide-character strings. You'll also need an array of wchar_t instead of char. It'll be more or less like this.

Code:
wchar_t *buffer = new wchar_t[255];
swprintf(buffer, 255, L"%s", rara);
the second parameter of swprintf is the maximum number of characters to store(the array size)
#10 · edited 14y ago · 14y ago
Jabberwock
Jabberwock
"cannot convert parameter 2 from 'wchar_t *' to 'LPCSTR'"

And when I attach this type to it I get the same gibberish message.
http://i.imgur.com/ACyhv.png

I guess I need to modify the MessageBoxA function.
#11 · 14y ago
MarkHC
MarkHC
Quote Originally Posted by Jabberwo0ck View Post
"cannot convert parameter 2 from 'wchar_t *' to 'LPCSTR'"

And when I attach this type to it I get the same gibberish message.
http://i.imgur.com/ACyhv.png

I guess I need to modify the MessageBoxA function.
Change your project configuration to use multibyte strings. Open the properties, and navigate to Configuration Properties > General. Switch Character Set to "Use Multi-Byte Character Set". That will solve the error... i guess
#12 · 14y ago
master131
[MPGH]master131
You're forgetting the "AVA.exe" in "AVA.exe"+0x01BFC478 which is the base address for the AVA.exe module. You can obtain this by using GetModuleHandle. You should explicitly use "AVA.exe" instead of passing NULL.

Also, in Cheat Engine, is it a Unicode string? If not, you should not be using LPWSTR. A char* should work fine if it's ASCII and a null terminated string....
#13 · 14y ago
Jabberwock
Jabberwock
Quote Originally Posted by General Shepherd View Post


Change your project configuration to use multibyte strings. Open the properties, and navigate to Configuration Properties > General. Switch Character Set to "Use Multi-Byte Character Set". That will solve the error... i guess
I changed it and it didn't work. It's the same.

In CE it's unicode. Here:



---------- Post added at 01:49 AM ---------- Previous post was at 01:42 AM ----------

When I try to do:
Code:
DWORD value = (DWORD)GetModuleHandle("AVA.exe");
value = *(DWORD*)(0x01BFC478 + value);
value = *(DWORD*)(value + 0x90);
wchar_t rara = *(wchar_t*)(value + 0x24);
MessageBoxW(NULL, (LPWSTR)rara, NULL, MB_OK);
The game crashes.
From my reading, wchar_t is only 2 bytes long. So it isn't compitable. I need 4 bytes solution.
#14 · edited 14y ago · 14y ago
Jabberwock
Jabberwock
Even when I'm not tryng to show unicode string I can't.
#15 · 14y ago
Posts 1–15 of 22 · Page 1 of 2

Post a Reply

Similar Threads

  • [Help] Read Pointer FloatsBy wee123 in Visual Basic Programming
    2Last post 15y ago
  • [Help] Reading PointerBy jonyboy in C++/C Programming
    1Last post 14y ago
  • how can i write & read multi-pointer and offset ??? [VB.net]By zokz in Visual Basic Programming
    1Last post 14y ago
  • [vb6] How do i read a float from memory(pointer+offset)+how to use multilevelpointerBy freitag in Visual Basic Programming
    5Last post 17y ago
  • Rules - Read Before PostingBy Dave84311 in General Game Hacking
    0Last post 20y ago

Tags for this Thread

None