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 


Issue with complexed pointers

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
PoZHx
How do I cheat?
Reputation: 0

Joined: 27 Jun 2009
Posts: 7

PostPosted: Fri Jul 08, 2011 2:26 pm    Post subject: Issue with complexed pointers Reply with quote

Address of player: 0x0B7D4668

Code:

Probable base pointer =0B7D465C
004FEDAE - mov [edx+0C],eax


So offset is 0xC. Scanned for hex "0B7D465C".

Go through all addresses and found the opcode accesses which is:
Code:
0041A06D - mov eax,[eax+edx*4]


Full information from CE:
Code:
EAX=0B7D465C
EBX=028B7B78
ECX=00000001
EDX=00000001
ESI=004340EC
EDI=00000000
EBP=0018F524
ESP=0018F518
EIP=0041A070

Probable base pointer =0B7D465C

0041A067 - mov eax,[eax+04]
0041A06A - mov edx,[ebp-08]
0041A06D - mov eax,[eax+edx*4]
0041A070 - mov [ebp-0C],eax
0041A073 - mov eax,[ebp-0C]


Offset is EDX*4 (1*4=4)
So offset is 4, right?

But I've got no idea what the base to scan for is.

So I went on set tracer on instruction
(Can't post url's yet so can't use [img] tags)


Next instruction:
(Can't post url's yet so can't use [img] tags)


So i tried scanning EAX from this instruction which is 0x2874558-offset which is 4 which is now 0x2874554 which no result occur.

So i tried scanning for 0x2874558 which loads of result come up. Went through them don't seem to be any valid addresses set access debugger on pretty much most of them below the address 0x2874558.

I'd like know how to manually work it out. I don't want to use pointer scanner.

So if anyone any tips or pointers would be great. Thanks for reading.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 475

Joined: 09 May 2003
Posts: 25987
Location: The netherlands

PostPosted: Fri Jul 08, 2011 4:50 pm    Post subject: Reply with quote

For the first part, remember that the register values are shown after the instruction has been executed, and the tracer looks like it's done from the wrong situation (same instruction accesses multiple addresses, and this isn't the one)

So, disregard the tracer stuff and focus on the "find what accesses this address" part

you used find what accesses on "An Address" and that returned "mov eax,[eax+edx*4]" (see if you can't find another address that is accessed but not using an array)

so, we know that "mov eax,[eax+edx*4]" accesses "An Address"
that means that you can also read this as "mov eax,[An Address]"

that brings us to:
An Address = eax+edx*4
EDX is known, it is 1, so:

An Address = eax+4
that means that
eax = An Address - 4

so, look for a pointer thathas as value "An Address" -4

_________________
Tools give you results. Knowledge gives you control.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
PoZHx
How do I cheat?
Reputation: 0

Joined: 27 Jun 2009
Posts: 7

PostPosted: Fri Jul 08, 2011 5:20 pm    Post subject: Reply with quote

Thanks for the reply.

All other addresses don't have anything access them expect for the:
Code:
0041A06D - mov eax,[eax+edx*4]



Dark Byte wrote:
For the first part, remember that the register values
that brings us to:
An Address = eax+edx*4
EDX is known, it is 1, so:


eax+edx*4 = B12183C ( 0B121838+1*4 = B12183C)

Dark Byte wrote:

An Address = eax+4

B12183C+4= 0B121838 (EAX)
That's correct.

Dark Byte wrote:

that means that
eax = An Address - 4

so, look for a pointer thathas as value "An Address" -4

B12183C-4= B121838

Which was same pointer as the level 1 pointer. So it's an endless loop.
So I'm still confused on what to do. :/
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 475

Joined: 09 May 2003
Posts: 25987
Location: The netherlands

PostPosted: Fri Jul 08, 2011 5:32 pm    Post subject: Reply with quote

don't mistake VALUES for ADDRESSES , they are not the same

(have you tried the multilevel pointer tutorial? It has a place with offset 0 which should give the same kind of confusion)

Anyhow, let's start from the beginning and explaining values and addresses

You have the address of the player which is 0x0B7D4668
you use find what accesses on ADDRESS 0B7D4668 and find mov [edx+0C],eax
0x0B7D4668-C=B7D465C

So you look for an ADDRESS with the VALUE 0xB7D465C and you find ADDRESS B12183C (so: ADDRESS B12183C has VALUE B7D465C)

When you use find out what accesses ADDRESS B12183C you find "mov eax,[eax+edx*4]"

B12183C-4=B121838

So now you look for an ADDRESS with the VALUE B121838 and continue from there

---
Or if it gets too difficult just use the pointerscanner. You already know the last 2 offsets it should end with (4, c)

_________________
Tools give you results. Knowledge gives you control.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
PoZHx
How do I cheat?
Reputation: 0

Joined: 27 Jun 2009
Posts: 7

PostPosted: Fri Jul 08, 2011 6:17 pm    Post subject: Reply with quote

Thanks for the reply.

Dark Byte wrote:
don't mistake VALUES for ADDRESSES , they are not the same

(have you tried the multilevel pointer tutorial? It has a place with offset 0 which should give the same kind of confusion)


Yeah, i've done your mutli-level pointer and done it in several other games too but never came across anything like above.

Dark Byte wrote:

Anyhow, let's start from the beginning and explaining values and addresses

You have the address of the player which is 0x0B7D4668
you use find what accesses on ADDRESS 0B7D4668 and find mov [edx+0C],eax
0x0B7D4668-C=B7D465C

So you look for an ADDRESS with the VALUE 0xB7D465C and you find ADDRESS B12183C (so: ADDRESS B12183C has VALUE B7D465C)

When you use find out what accesses ADDRESS B12183C you find "mov eax,[eax+edx*4]"

B12183C-4=B121838

So now you look for an ADDRESS with the VALUE B121838 and continue from there


Think i may of confused you since first post and second post are different pointer values since player address changed due to DMA.

Player updated value: 0x0B7BAC10


Ok, so what write to the player (0x0B7BAC10)
Code:
mov [edx+0C],eax

Probable base pointer = 0B7BAC04
EDX - 0B7BAC04

I search for that in CE using hex option and 4 bytes selected.
Set accesss debugger on all addresses and this is the 0x09A5EDF0
Code:
0041A06D - mov eax,[eax+edx*4]

Probable base pointer =0B7BAC04

eax+edx*4 = B7BAC08 ( 0B7BAC04+1*4=B7BAC08 )
B7BAC08-4= B7BAC04

Which is same as first pointer so it's endless loop.


Dark Byte wrote:

Or if it gets too difficult just use the pointerscanner. You already know the last 2 offsets it should end with (4, c)


Already got some pointers from pointerscanner but i wanted to manually work it out so it's 100% reliable.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 475

Joined: 09 May 2003
Posts: 25987
Location: The netherlands

PostPosted: Fri Jul 08, 2011 6:23 pm    Post subject: Reply with quote

ignore probable base pointer. Never look at that

Quote:

Set accesss debugger on all addresses and this is the 0x09A5EDF0

so: eax+edx*4=0x09A5EDF0

0x09A5EDF0 -1*4=9A5EDEC = eax = probably base pointer

_________________
Tools give you results. Knowledge gives you control.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
PoZHx
How do I cheat?
Reputation: 0

Joined: 27 Jun 2009
Posts: 7

PostPosted: Fri Jul 08, 2011 7:46 pm    Post subject: Reply with quote

Dark Byte wrote:
ignore probable base pointer. Never look at that

Quote:

Set accesss debugger on all addresses and this is the 0x09A5EDF0

so: eax+edx*4=0x09A5EDF0

0x09A5EDF0 -1*4=9A5EDEC = eax = probably base pointer


No addresses found when i did the -1*4.

Well I won't waste your time as i'm sure you've got alot to do but if you do have the time - i'll post screenshot of everything i did in CE.

I've got valid pointers from pointer scanner already or i could use code-cave to grab the valid pointer (messy) for the array of the player class.

Thanks for all your help.
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 Gamehacking 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