Solved Read Memory Problem

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

Chri907

Newbie
May 6, 2014
3
122
0
Hi, i have a problem with a read memory address (by pointer) in my c++ dll. I found pointer and offset with CE (2 offset) when I try to read it from the dll (injected in the process) i found another value and not what I wanted.
I checked on CE and i found the correct value.

this is the code (in the windows form):
C++:
#pragma once
#include <Windows.h>
#include <ctime> 
#include <string>

	DWORD PNameBaseAddress = { 0x8116F0  };
	DWORD PNameOffsets[] = { 0x0, 0x30  };
	DWORD PlayerName;

 DWORD FindDmaAddy(int PointerLevel, DWORD Offsets[], DWORD BaseAddress)
			 {
				 DWORD Ptr = *(DWORD*)(BaseAddress); 
				 if (Ptr == 0) return NULL;//prevent crash

				 for (int i = 0; i < PointerLevel; i++)
				 {
					 if (i == PointerLevel - 1)
					 {
						 Ptr = (DWORD)(Ptr + Offsets[i]);  
						 if (Ptr == 0) return NULL;
						 return Ptr;
					 }
					 else
					 {
						 Ptr = *(DWORD*)(Ptr + Offsets[i]); 
						 if (Ptr == 0) return NULL;
					 }
				 }
				 return Ptr;
			 }



private: System::Void timer1_Tick(System::Object^  sender, System::EventArgs^  e) 
{

	PlayerName = FindDmaAddy(2, PNameOffsets, PNameBaseAddress);
	label1->Text = "PlayerName: " + PlayerName;
}
The tutorial I used is " C++ HOW TO HACK any game TUTORIAL [Trainer & DLL Injection]".
The value I'm looking for is a text... How can i do?

Excuse me if I'm wrong section, but I'm new here on the forum
Sorry for my bad english :) Thanks for replies
 
Last edited:

GAFO666

Hacker
Meme Tier VIP
Aug 19, 2012
520
3,188
23
Depending if its the correct addy and os-list cast it to what you need ? --> *(Type*)(Playername);
idk if 'label1->Text =' takes a char array as well, if yes ' ... = *(char*)(Playername);' ~
 

Chri907

Newbie
May 6, 2014
3
122
0
Isn't the pointer lvl 2?
yes, the pointer is 2nd level

Depending if its the correct addy and os-list cast it to what you need ? --> *(Type*)(Playername);
idk if 'label1->Text =' takes a char array as well, if yes ' ... = *(char*)(Playername);' ~
I tried but does not work ...
Should I read an array of bytes in the value of an address and then convert it to text.
 

GAFO666

Hacker
Meme Tier VIP
Aug 19, 2012
520
3,188
23
try it, Im not puting together visual c++ and game-hacking, I always do intern hacks but it may works if everything else is correct
or you do like char myArray[] = *(char*)(Playername); and if Visual C++ allows it like label1->Text = myArray.ToString(); etc idk if theres sth like in c# -> Convert.ToString(myArray);
so try around a bit :)

edit: I gues in VC++ should it be called Convert::ToString(myArray);
 
Last edited:

Chri907

Newbie
May 6, 2014
3
122
0
Yes, but my problem is that I do not know how to find the array of bytes (to be converted) using the pointer and the offsets from dll correctly.
I apologize if I was not very clear earlier...

//-------------------edit 05/21-------------------//

I was able to do what I wanted, thank you all for your answers :).
 
Last edited:
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