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 


[ENABLE] and [DISABLE] not triggering?

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

Joined: 01 Apr 2012
Posts: 38
Location: earth

PostPosted: Tue Jun 28, 2016 4:48 pm    Post subject: [ENABLE] and [DISABLE] not triggering? Reply with quote

I have a specific ASM code that I added to the table. When I enable it, it works fine. But I cannot disable it and I honestly don't understand the way ENABLE and DISABLE works. Any help is appreciated.
(The X on the toggle box remains on forever)

Here's the code:
Code:

[ENABLE]
alloc(newmem,2048,"MK10.exe"+1F1450)
label(returnhere)
label(originalcode)
label(exit)
label(playerA)

//Player1 Infinite Health

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
push rax
mov ax, 0770
cmp bx, ax
jz playerA
mov ax, D510
cmp bx, ax
pop rax
jmp originalcode
playerA:
mov [rbx+000008D8], 3F800000
pop rax
jmp returnhere


originalcode:
movss [rbx+000008D8], xmm6

exit:
jmp returnhere

"MK10.exe"+1F1450:
jmp newmem
nop
nop
nop
returnhere:

[DISABLE]
movss [rbx+000008D8], xmm6
dealloc(newmem)



Edit:
fixed by adding this:
"MK10.exe"+1F1450: at the disable part.
Back to top
View user's profile Send private message
cooleko
Grandmaster Cheater
Reputation: 11

Joined: 04 May 2016
Posts: 717

PostPosted: Tue Jun 28, 2016 7:21 pm    Post subject: Reply with quote

yep, you were missing the location of the disable, glad you figured it out on your own! that is always the vest way to learn
Back to top
View user's profile Send private message
M-Z
Advanced Cheater
Reputation: 1

Joined: 08 Nov 2014
Posts: 77
Location: Poland

PostPosted: Wed Jun 29, 2016 2:58 am    Post subject: Reply with quote

May I ask what this 3-argument alloc does?
Back to top
View user's profile Send private message Send e-mail
hhhuut
Grandmaster Cheater
Reputation: 6

Joined: 08 Feb 2015
Posts: 607

PostPosted: Wed Jun 29, 2016 3:02 am    Post subject: Reply with quote

It's the so-called "prefered region" parameter which means that CE tries to allocate new memory as close as possible to that specified location.

This is only needed withing 64bit applications and becomes important when coding the jumps to the code injection and back to the original address.
Back to top
View user's profile Send private message
thethiny
Cheater
Reputation: 0

Joined: 01 Apr 2012
Posts: 38
Location: earth

PostPosted: Wed Jun 29, 2016 10:58 am    Post subject: Reply with quote

cooleko wrote:
yep, you were missing the location of the disable, glad you figured it out on your own! that is always the vest way to learn

True that Razz I find it funny how I joined before you but you got a better rank XD

M-Z wrote:
May I ask what this 3-argument alloc does?

alloc(ADDRESS_LABEL,SIZE,IN_RESPECT_TO), that's how I think of it.

hhhuut wrote:
It's the so-called "prefered region" parameter which means that CE tries to allocate new memory as close as possible to that specified location.

This is only needed withing 64bit applications and becomes important when coding the jumps to the code injection and back to the original address.


Thanks for the tip, never knew it was for 64bit only.
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