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 


Data Structure Dissection and offsets need help

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

Joined: 14 Jun 2014
Posts: 20

PostPosted: Wed Jun 18, 2014 11:21 pm    Post subject: Data Structure Dissection and offsets need help Reply with quote

Hello,

I'm trying to find a static offset, and I was wondering what the procedure is for offsets under a pointer. So let's say that at offset 08 there is a pointer and I go into that pointer and find a static value at 0010, how do I put that on paper for a cmp?
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Thu Jun 19, 2014 1:00 am    Post subject: Reply with quote

Code:
push edi
mov edi,[???+08]
mov edi,[edi+10]
cmp edi,???
pop edi
je ???
Back to top
View user's profile Send private message
Varstal
Newbie cheater
Reputation: 0

Joined: 14 Jun 2014
Posts: 20

PostPosted: Thu Jun 19, 2014 1:06 am    Post subject: Reply with quote

Appreciate the response, I've just got one more question for you. In my other point you said that I should compare registers as well, which I did, but the problem I'm having is learning to put that in code. I've scoured over different tutorials and seem to be struggling with it. So this is my process.

1. Find address
2. Find what accesses it
3. Find what addresses have been changed by said code.
4. Look at the register and realize that ALL other addresses (not my characters) is 000010, or 16 in decimal at the register rbx.
5. Can't figure out how to put that into a cmp without crashing the program.

I know my code works because I've found offsets that work through a couple reboots before the number at that offset changes, so I've got to be doing something wrong with rbx.

I've tried cmp [rbx+24],000010
cmp rbx, 000010
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Thu Jun 19, 2014 1:24 am    Post subject: Reply with quote

Show the whole script.
Back to top
View user's profile Send private message
Varstal
Newbie cheater
Reputation: 0

Joined: 14 Jun 2014
Posts: 20

PostPosted: Thu Jun 19, 2014 1:25 am    Post subject: Reply with quote

label(aob)
label(zombie)
label(friendly)
registersymbol(aob)
aobscan(aob1,F3 0F10 40 24 F3 0F 5A C0 F2 44 0F5A F8 F3 44 0F11 3C 24)

newmem:
cmp [rbx+24],000010
jne friendly
jmp zombie


friendly:
mov [rax+24],(float)100.0
movss xmm0,[rax+24]
jmp exit

zombie:
movss xmm0,[rax+24]
jmp exit

exit:
jmp returnhere

aob1:
aob:
jmp newmem
returnhere:



[DISABLE]
dealloc(newmem)
aob:
db F3 0F 10 40 24
unregistersymbol(aob)
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Thu Jun 19, 2014 1:49 am    Post subject: Reply with quote

Make sure you are running CE 6.3 or newer.

Code:
[ENABLE]
aobscan(aob,F30F104024F30F5AC0F2440F5AF8F3440F113C24)
alloc(newmem,248)

label(returnhere)
label(zombie)
label(friendly)

registersymbol(aob)

newmem:
push rbp
lea rbp,[rbx]
cmp rbp,10
pop rbp
jne friendly
jmp zombie

friendly:
mov [rax+24],(float)100.0
movss xmm0,[rax+24]
jmp returnhere

zombie:
movss xmm0,[rax+24]
jmp returnhere

aob:
jmp newmem
returnhere:

[DISABLE]
dealloc(newmem)
aob:
db F3 0F 10 40 24
unregistersymbol(aob)
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sat Jun 21, 2014 10:21 pm    Post subject: Reply with quote

Well?
Back to top
View user's profile Send private message
Varstal
Newbie cheater
Reputation: 0

Joined: 14 Jun 2014
Posts: 20

PostPosted: Sun Jun 22, 2014 7:46 pm    Post subject: Reply with quote

Hey,

I meant to respond earlier but for the life of me I couldn't find my own post. I found it and the info you gave me helped. It's been stable so thank you a ton! How do I up your rep for helping me?
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun Jun 22, 2014 10:27 pm    Post subject: Reply with quote

Thank you for letting me know.

FYI, I think you have to post more before you can give rep points. 'Thanks' is good enough for me.
Back to top
View user's profile Send private message
Rissorr
Master Cheater
Reputation: 3

Joined: 17 Sep 2013
Posts: 273
Location: Israel!

PostPosted: Mon Jun 23, 2014 1:14 am    Post subject: Reply with quote

Hey METHOS , just want to ask you why you used LEA and not just MOV (in your last post with the script)

Code:
newmem:

push rbp
lea rbp,[rbx]  <<HERE
cmp rbp,10
pop rbp
jne friendly
jmp zombie


you can do: (I think..)
Code:
mov rbp,[rbx]


What is the difference, What the difference in this case?

It would VARY help me Very Happy[/code]
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Mon Jun 23, 2014 1:04 pm    Post subject: Reply with quote

I don't normally do it this way. I just compare...

cmp edi,14EA50F4

lea is used for load effective address. We can compare both, addresses and values at address, as in this example for ammo:

edi = base address of ammo
+30 = offset from base address
edi+30 = address of ammo
[edi+30] = value of ammo
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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