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 


Problem while copying complex address to User Defined Symbol

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
aikoncwd
Grandmaster Cheater
Reputation: 23

Joined: 21 Dec 2012
Posts: 591
Location: Spain (Barcelona)

PostPosted: Wed Jul 16, 2014 7:00 am    Post subject: Problem while copying complex address to User Defined Symbol Reply with quote

Hi!

I have a problem with this instruction:

Code:
mov [esi+edi*4],edx


esi+edi*4 is the base-pointer of my player structure. I want to create a UserDefinedSymbol, so I tried this:

Code:
globalalloc(pPlayer,4)
mov [pPlayer],esi+edi*4
mov [esi+edi*4],edx


But this instruction can't be assembled. In other games I have the same scenario but with less complex address, like this:

Code:
mov [ebx+00000D14],eax


So I only need to add:

Code:
globalalloc(pPlayer,4)
mov [pPlayer],ebx
mov [ebx+00000D14],eax


This second example works very well, but I don't know how to deal with [esi+edi*4]

Any suggestions? Smile

_________________
Hey Hitler
Test here your skill with CheatEngine, I coded a challenge for you. Try to beat it!
HERE
Back to top
View user's profile Send private message
Redouane
Master Cheater
Reputation: 3

Joined: 05 Sep 2013
Posts: 363
Location: Algeria

PostPosted: Wed Jul 16, 2014 7:16 am    Post subject: Re: Problem while copying complex address to User Defined Sy Reply with quote

AikonCWD wrote:
Hi!

I have a problem with this instruction:

Code:
mov [esi+edi*4],edx


esi+edi*4 is the base-pointer of my player structure. I want to create a UserDefinedSymbol, so I tried this:

Code:
globalalloc(pPlayer,4)
mov [pPlayer],esi+edi*4
mov [esi+edi*4],edx



Code:
globalalloc(pPlayer,4)
push eax
lea eax,[esi+edi*4]
mov [pPlayer],eax
mov [eax],edx
pop eax

It should work
Back to top
View user's profile Send private message
aikoncwd
Grandmaster Cheater
Reputation: 23

Joined: 21 Dec 2012
Posts: 591
Location: Spain (Barcelona)

PostPosted: Wed Jul 16, 2014 7:38 am    Post subject: Re: Problem while copying complex address to User Defined Sy Reply with quote

Redone wrote:
Code:
globalalloc(pPlayer,4)
push eax
lea eax,[esi+edi*4]
mov [pPlayer],eax
mov [eax],edx
pop eax

It should work





IT WORKS!!!

Thanks man!

_________________
Hey Hitler
Test here your skill with CheatEngine, I coded a challenge for you. Try to beat it!
HERE
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Thu Jul 17, 2014 4:31 am    Post subject: Reply with quote

Yes, for those always use LEA.

much easier than:
Code:
mov [pPlayer],edi
rol dword ptr [pPlayer],2
add dword ptr [pPlayer],esi

_________________
Back to top
View user's profile Send private message MSN Messenger
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