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 


Little pointer problem (MASM)

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

Joined: 04 May 2007
Posts: 478

PostPosted: Mon Aug 06, 2007 1:43 am    Post subject: Little pointer problem (MASM) Reply with quote

Alright here's the scenario.

FROM CE:
ecx, [eax]
eax, [ecx+24]
movzx edx, byte ptr [eax+1234]
cmp byte ptr [edx+eax+1235], 09

I'm trying to get pointer for [edx+eax+1235].

So here's what I know.

I have the pointer for ecx (static).

So follow the code.

I got, [pointer+24] = eax
then, [eax+1234] = edx
then, edx+eax+1235 is the pointer I want.

[eax+1234] is a 2 level pointer. Basically code should be like this.

Code:

mov   eax, pointer
mov   eax, [eax]
add   eax, 0024h
mov   eax, [eax] ;after this instruction, eax should contain the value of pointer + 24.
      
push eax
   add eax, 1234h ;2nd level, add 1234 to the value of pointer + 24.
   mov eax, [eax] ;move value of 2nd level pointer into eax
   mov ecx, eax ;save eax into ecx
pop eax
add eax, 1235h ;add 1235 to value of pointer + 24
add eax, ecx ;add value in edx
mov dword ptr ds:[eax],0 ;move 0 into pointer [edx+eax+1235]


I'm not sure whether I did it correctly, but my goal is so that the last line mov [eax], 0 moves 0 into [edx+eax+1235]
Back to top
View user's profile Send private message
assaf84
Expert Cheater
Reputation: 0

Joined: 03 Oct 2006
Posts: 238

PostPosted: Mon Aug 06, 2007 11:59 pm    Post subject: Reply with quote

It looks just fine.. Do u have any problems using it?
Back to top
View user's profile Send private message
TheSorc3r3r
I post too much
Reputation: 0

Joined: 06 Sep 2006
Posts: 2404

PostPosted: Tue Aug 07, 2007 5:46 am    Post subject: Reply with quote

Code:
mov byte ptr [eax+edx+1235], 0

_________________


Don't laugh, I'm still learning photoshop!
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 programming 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