| View previous topic :: View next topic |
| Author |
Message |
malengwen How do I cheat?
Reputation: 0
Joined: 12 Jun 2015 Posts: 1
|
Posted: Fri Jun 12, 2015 6:20 am Post subject: Calculating a Offset |
|
|
Hi Everyone,
Just after some help really.... I need to know how to work out an offset when its more complicated than just a value. like ESI+16.
The offset I am looking to calculate is
| Quote: | | mov edx,[ebx+esi*8+00000740] |
esi=00000000
I would like to know HOW I can calculate this rather than just the answer. Thanks for any help.
|
|
| Back to top |
|
 |
Rissorr Master Cheater
Reputation: 3
Joined: 17 Sep 2013 Posts: 273 Location: Israel!
|
Posted: Fri Jun 12, 2015 6:31 am Post subject: |
|
|
Lets look at your code:
you have 2 registers involved, and you see the 8 number, and the 740 offset
in your case:
EBX is the base register
ESI is the structure index
8 is the structure "step"
and 740 is the actual offset of the address
so if ESI==0 then the address will be:
EBX + 0*8 + 740 ==> EBX + 740
Note-
Veterans please correct me if i am wrong.
|
|
| Back to top |
|
 |
STN I post too much
Reputation: 43
Joined: 09 Nov 2005 Posts: 2676
|
Posted: Fri Jun 12, 2015 7:12 am Post subject: |
|
|
Just do simple maths and you should get to the address.
Know the value of ebx, esi then multiply/add in the order that is in the brackets and you should come to the answer. The index will change upon each execution and iterates through the items in the structure.
You have to understand that an instruction like this deals with a lot of addresses and in most cases, you don't even want to bother finding a pointer because once you know the index value(esi value) for a specific item, that is all you need for a working cheat.
esi*8+00000740 is your offset anyhow or 0*8+00000740 = 740 as you mentioned esi = 0.
_________________
|
|
| Back to top |
|
 |
|