Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[C++]Calculating a Multiply Pointer [HELP]

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Blackvz
Newbie cheater
Reputation: 0

Joined: 08 Jul 2012
Posts: 19

PostPosted: Thu Apr 04, 2013 9:07 am    Post subject: [C++]Calculating a Multiply Pointer [HELP] Reply with quote

So after 100 of Trys i finally came back to you , because i need help from professionals Razz

..Ok my problem is that I somehow cant calculate my pointer.
I think Code will describe it better than 1000 words.

Here is the important Code Snippet:

Code:
 //Setting Baseadress + offsets
   DWORD BaseAddress = 0x518F80;
   DWORD offset1 = 0x70;
   DWORD offset2 = 0x10;
   DWORD offset3 = 0x5C4;
   DWORD offset4 = 0x7E0;
   DWORD offset5 = 0x48;

   //calculate Pointer

   DWORD erg1 = BaseAddress + offset1; // Adresse + Offset = New adress to scan
   DWORD pointer1 = ReadProcessMemory(hproc,(LPCVOID)erg1,&buffer,sizeof(buffer),NULL);   // Scan for new Adress
      

   // [[[BaseAddress + 0x26767C]+0x70]+0x10]+0x5c4]+0x7e0]+0x48


I know it's not complete.I didn't make it complete because i saw in the debugger that it's wrong..The right Value is in erg1. But if i want to scan for the new Adress and store it in pointer 1 , there will be just some wrong values in pointer1.

A picture of Cheat engine :
+Check the attackments please!

..Sorry for my bad english but i really need help with it , so if you know a selution pleaseeeeee help me out Razz



Unbenannt.PNG
 Description:
Cheat Engine Adress + Offsets
 Filesize:  25.55 KB
 Viewed:  7559 Time(s)

Unbenannt.PNG


Back to top
View user's profile Send private message
TsTg
Master Cheater
Reputation: 5

Joined: 12 Dec 2012
Posts: 340
Location: Somewhere....

PostPosted: Thu Apr 04, 2013 9:58 am    Post subject: Re: [C++]Calculating a Multiply Pointer [HELP] Reply with quote

First, you are using ReadProcessMemory call wrong, the output value is in the Buffer and not in the function's return, so copy what's inside 'Buffer' to your variable,or assign your variable pointer instead:

DWORD Buffer = 0x0;
DWORD result = ReadProcessMemory(hproc,(LPCVOID)erg1,&Buffer,sizeof(Buffer),NULL);
DWORD Pointer1 = Buffer


or

DWORD Pointer1 = 0x0;
DWORD result = ReadProcessMemory(hproc,(LPCVOID)erg1,&Pointer1,sizeof(Pointer1),NULL);




Second,Don't assume that 0x518F80 will not change, read the value from your 'HackMe2+......' address, then assign the output to your BaseAddress value


DWORD BaseAddress = 0x0;
DWORD result = ReadProcessMemory(hproc,(LPCVOID)HackMe2+Address_Here,&BaseAddress,sizeof(BaseAddress),NULL);


Last edited by TsTg on Thu Apr 04, 2013 10:19 am; edited 1 time in total
Back to top
View user's profile Send private message
Blackvz
Newbie cheater
Reputation: 0

Joined: 08 Jul 2012
Posts: 19

PostPosted: Thu Apr 04, 2013 10:18 am    Post subject: Reply with quote

Thanks for your answer.

@Edit: Question to the Baseadress thing.

Code:
DWORD base1 = ReadProcessMemory(hproc,(LPCVOID)HackMe2+Address_Here,&BaseAddress,sizeof(BaseAddress),NULL);


How do i write that in the right way ?
I mean the Base, which CE for example shows to me ,change every time I start up "HackMe2.exe".

I mean that (LPCVOID)HackMe2+Address_Here don't work for me :/
Back to top
View user's profile Send private message
TsTg
Master Cheater
Reputation: 5

Joined: 12 Dec 2012
Posts: 340
Location: Somewhere....

PostPosted: Thu Apr 04, 2013 3:40 pm    Post subject: Reply with quote

It's JUST an explanation by saying (LPCVOID)HackMe2+Address_Here and NOT A CODE TO USE, i mean you put the address value there AS A DWORD INTEGER, this is not even a variable defined so how would it work??!! Smile,...to view the address as a number,...in your cheat engine table, copy the HackMe2+..... to clipboard, then open cheat engine's memory view window, press ctrl+G and paste it there and press enter, then press ctrl+C, you will see the corresponding address to it in the first text field.
Back to top
View user's profile Send private message
m0us
Newbie cheater
Reputation: 0

Joined: 25 Apr 2013
Posts: 11

PostPosted: Thu Apr 25, 2013 12:22 pm    Post subject: Reply with quote

okay, i suppose u r know how to scan remote address space with VirtualQuery/ReadProcessMemory?

first we are founding a value. of course after that - we knows its address. then we scanning memory again, to find this address lying in some other variable - when hit - it will be pointer. now we know pointer address, scanning again and again until we wont find anything. then we will have something like a tree. probably the top address will be found in the .data section of one from executable modules
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites