Solved GetPointer function

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

Lostflash

Newbie
Full Member
Feb 22, 2015
14
114
0
Hey there,

I wrote a function to get pointers without repeating RPM all the time and wanted to know if it could be improved without losing the way it is used.

C++:
	DWORD_PTR GetPointerAddress(HANDLE dwProcID, DWORD BaseAddress, DWORD offsets[], int level){

		DWORD buffer;

		ReadProcessMemory(dwProcID, (LPCVOID)(BaseAddress + offsets[0]), &buffer, sizeof(buffer), NULL);

		for (int i = 1; i < level - 1; i++){

			ReadProcessMemory(dwProcID, (LPCVOID)(buffer + offsets[i]), &buffer, sizeof(buffer), NULL);
		}

		return buffer + offsets[level - 1];
	}

In usage:
C++:
DWORD ptr_Money = GetPointerAddress(handle, EtG_Address, ofs_Money, 5);
WriteProcessMemory(handle, (LPVOID)ptr_Money, &val_Money, sizeof(val_Money), NULL);
best regards

~Lostflash
 

MasterG

Coder
Dank Tier Donator
Nobleman
Mar 14, 2015
102
888
1
Nice, btw you based your func on the codenz I have posted ?
 

Lostflash

Newbie
Full Member
Feb 22, 2015
14
114
0
Yeah the idea is from your code ^^
Just changed it a bit so it would fit my "style" probably not the best code but it works and makes me happy :)
 

basber

Newbie
Full Member
Jun 4, 2015
13
114
0
If the pointer doesn't change anymore you need to call your function to get the base address only once, and store in the ptrmoney, e.g if (ptrmoney == 0) {ptrmoney = GetPointerAddress... ;}
why is the fidst value of your ofs_money not used? i see you start at index 1, not 0?
 

Lostflash

Newbie
Full Member
Feb 22, 2015
14
114
0
The pointer ptr_Money uses the final address of the module "EtG.exe" with its offset + the actual offsets in ofs_Money.
I start at 1 because I need to first RPM the Module Baseaddress + Offset + ofs_Money[0].
Then the for() starts at 1 because I RPM the other offsets minus 1 'cause I need to add the last one to my ptr_Money without RPM.

Hope thats understandable <.< (I dont think so myself)
 
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