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 


Help with AA Code

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Xoslorg
How do I cheat?
Reputation: 0

Joined: 03 Nov 2016
Posts: 5
Location: A Coruņa, Spain

PostPosted: Tue Nov 08, 2016 5:48 am    Post subject: Help with AA Code Reply with quote

Hi, I'm trying to create a variable and assign it a value and this in turn assign it to another and I do not know why it does not work as it should.

I have been looking for and almost I have not found information about it and how little there is I do not understand it.

Application: Chean Engine Tutorial i386 (Tutorial-i386.exe) of CE v6.6

Code:
// Step 07 - Code Injection (PW=013370)
[ENABLE]

aobscanmodule(INJECT,Tutorial-i386.exe,83 AB 78 04 00 00 01) // should be unique
alloc(newmem,$1000)
alloc(miVar,4)
registersymbol(miVar)

label(code)
label(return)

newmem:

code:
  mov [miVar], (int)500
  mov dword ptr [ebx+00000478], miVar
  jmp return

INJECT:
  jmp newmem
  nop
  nop
return:

registersymbol(INJECT)

[DISABLE]

INJECT:
  db 83 AB 78 04 00 00 01

unregistersymbol(miVar)
dealloc(miVar)

unregistersymbol(INJECT)
dealloc(newmem)


Thank you very much.
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

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

PostPosted: Tue Nov 08, 2016 6:09 am    Post subject: Reply with quote

You assign address instead of value.
Code:
mov dword ptr [ebx+00000478], miVar


Proper 1
Code:
push eax                           // store eax original value
mov eax,[miVar]                    // get value into eax
mov dword ptr [ebx+00000478],eax
pop eax                            // restore eax



Proper 2
Code:
fld  [miVar]        // push [miVar] onto the FPU register stack
fstp [ebx+00000478] // copy ST0 to [ebx+00000478] and pop FPU register stack



Proper 3
Code:
movss xmm0,[miVar]
movss [ebx+00000478],xmm0

_________________
Back to top
View user's profile Send private message MSN Messenger
Xoslorg
How do I cheat?
Reputation: 0

Joined: 03 Nov 2016
Posts: 5
Location: A Coruņa, Spain

PostPosted: Tue Nov 08, 2016 6:41 am    Post subject: Reply with quote

Thank you very much, I just tried the three ways and it works perfectly.
Now I understand how it works.
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