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 


[Pointer] esi+exc*4-04 Offset

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
syntex
Cheater
Reputation: 0

Joined: 31 Jul 2007
Posts: 32

PostPosted: Thu Sep 11, 2008 12:15 pm    Post subject: [Pointer] esi+exc*4-04 Offset Reply with quote

Hi @ all,

I have a problem with finding a pointer, I actually dont know how to calculate the offset.

esi+ecx*4-04 this is the Offset

-> esi = 0?
-> ecx = 0?
-> *4
-> -04

(esi+ecx-04) * (4)? or what?

can somebody please explain?

thanks
Back to top
View user's profile Send private message
ThatPage
Grandmaster Cheater
Reputation: 0

Joined: 24 Oct 2007
Posts: 515

PostPosted: Thu Sep 11, 2008 12:54 pm    Post subject: Reply with quote

it'll be more easy to help if you put a pic.
Back to top
View user's profile Send private message
syntex
Cheater
Reputation: 0

Joined: 31 Jul 2007
Posts: 32

PostPosted: Thu Sep 11, 2008 1:08 pm    Post subject: Reply with quote

cant you just tell me how to calculate it?

cause it takes ages to search that value again Mad
Back to top
View user's profile Send private message
ThatPage
Grandmaster Cheater
Reputation: 0

Joined: 24 Oct 2007
Posts: 515

PostPosted: Thu Sep 11, 2008 1:22 pm    Post subject: Reply with quote

I can't say like that,but i'll post here a pic.
Back to top
View user's profile Send private message
syntex
Cheater
Reputation: 0

Joined: 31 Jul 2007
Posts: 32

PostPosted: Thu Sep 11, 2008 1:32 pm    Post subject: Reply with quote

This one is a easy one!

esi+ecx*4-04

my looks like this Wink in red
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Thu Sep 11, 2008 1:43 pm    Post subject: Reply with quote

esi+ecx*4-04

esi=basepointer
ecx=element in array
-4 =adjustment in calculation. (most likely an array starting from index 1 ?)

so, the offset is ecx*4-4
remember it's all in hex, so set your calculator to hex when calculating
ecx=0 -> offset=0*4-4=-4
ecx=1 -> offset=1*4-4=0
ecx=2 -> offset=2*4-4=4
ecx=3 -> offset=3*4-4=8
ecx=4 -> offset=4*4-4=c
ecx=5 -> offset=5*4-4=10

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

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

Joined: 31 Jul 2007
Posts: 32

PostPosted: Thu Sep 11, 2008 1:47 pm    Post subject: Reply with quote

thanks Dark Byte,

Why it is like this?
ecx=5 -> offset=5*

why do you count ecx up to 5? could you explain this part?
and how it comes that you know it counts up to 5?

Thank you so much Wink

@@@@EDIT@@@@

I see its just an example to show what happens when ecx 5*-04 happens
Back to top
View user's profile Send private message
nog_lorp
Grandmaster Cheater
Reputation: 0

Joined: 26 Feb 2006
Posts: 743

PostPosted: Thu Sep 11, 2008 2:02 pm    Post subject: Reply with quote

ECX is the "counter register", it is usually used to count place in loops (like "int i" in most languages).

DarkByte was just going up to 5 as an example, 5 doesn't have any special significance.

Also, it is ecx*4 - 4, ecx times 4, minus 4. The multiple (4) signifies the number of bytes in each element of the array.

What you want to do is Find What Accesses This Address, and double click the line with that code ([esi+ecx*4-04]) and see what ECX and ESI are.

_________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish
Back to top
View user's profile Send private message
syntex
Cheater
Reputation: 0

Joined: 31 Jul 2007
Posts: 32

PostPosted: Thu Sep 11, 2008 3:20 pm    Post subject: Reply with quote

what about this?

so esi+ecx*4-04 = c ... im right?
1A487E20 + 00000001 * 4 - 4 = 1A487E20
00000001 * 4 - 4 = 0 Mad

this will be a hard one >.<

-> EDIT:

Code:


804D9B2F - 80 34 9b 4d                - xor byte ptr [ebx+ebx*4],4d
804D9B33 - 80 8b 44 8e e4 89 44       - or byte ptr [ebx-761b71bc],44
804D9B3A - 8f                         - db 8f
804D9B3B - e4 8b                      - in al,8b
804D9B3D - 44                         - inc esp
804D9B3E - 8e e8                      - mov gs,ax
804D9B40 - 89 44 8f e8                - mov [edi+ecx*4-18],eax
804D9B44 - 8b 44 8e ec                - mov eax,[esi+ecx*4-14]
804D9B48 - 89 44 8f ec                - mov [edi+ecx*4-14],eax
804D9B4C - 8b 44 8e f0                - mov eax,[esi+ecx*4-10]
804D9B50 - 89 44 8f f0                - mov [edi+ecx*4-10],eax
804D9B54 - 8b 44 8e f4                - mov eax,[esi+ecx*4-0c]
804D9B58 - 89 44 8f f4                - mov [edi+ecx*4-0c],eax
804D9B5C - 8b 44 8e f8                - mov eax,[esi+ecx*4-08]
804D9B60 - 89 44 8f f8                - mov [edi+ecx*4-08],eax
804D9B64 - 8b 44 8e fc                - mov eax,[esi+ecx*4-04]
804D9B68 - 89 44 8f fc                - mov [edi+ecx*4-04],eax
804D9B6C - 8d 04 8d 00 00 00 00       - lea eax,[ecx*4+00000000]
804D9B73 - 03 f0                      - add esi,eax
804D9B75 - 03 f8                      - add edi,eax




2.JPG
 Description:
Sceenshot 2
 Filesize:  36.17 KB
 Viewed:  11807 Time(s)

2.JPG



1.JPG
 Description:
Screenshot 1
 Filesize:  21.39 KB
 Viewed:  11807 Time(s)

1.JPG


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