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 


"Replace with code that does nothing" in an ASM sc

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

Joined: 13 Feb 2013
Posts: 76

PostPosted: Mon Jun 09, 2014 5:51 pm    Post subject: "Replace with code that does nothing" in an ASM sc Reply with quote

Hi,

I am currently working on a God Mod asm script and I've found the address storing the damage you take.

When I right click on it and press the "Replace with code that does nothing" button I don't take any damage anymore and I am invincible, that is what I am looking for. So, I tried to make the same thing in an asm script. My thought was to replace the original code by some "nop". But it doesn't work.

So how can I have the same result as "Replace with code that does nothing" but by doing an asm script?

Here is my code :

(note that I write 6 nop because when I replace with code that does nothing I can see 6 nop, but I am not really sure of how much I should put here. I tried with all numbers from 1 to 6 and I can still take damage.)

Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
label(aob)
registersymbol(aob)
aobscan(aob1,DE E9 D9 9E 8C 01 00 00 EB 11)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
nop
nop
nop
nop
nop
nop

originalcode:
//fstp dword ptr [esi+0000018C]

exit:
jmp returnhere

aob+2:
aob:
jmp newmem
nop
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
aob:
db D9 9E 8C 01 00 00
unregistersymbol(aob)
//Alt: db D9 9E 8C 01 00 00

_________________
01:34 - Souper: Are you the real redleouf?
01:34 - Redleouf: I am lol
01:34 - Souper: lol
01:35 - Souper: Im fangirling
01:35 - Redleouf: <3
Back to top
View user's profile Send private message
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 893

PostPosted: Mon Jun 09, 2014 6:08 pm    Post subject: Reply with quote

Code:

[ENABLE]
label(aob)
registersymbol(aob)
aobscan(aob1,DE E9 D9 9E 8C 01 00 00 EB 11)

aob+2:
aob:
db 90 90 90 90 90 90
 
[DISABLE]
aob:
db D9 9E 8C 01 00 00

_________________
A nagy kapu mellett, mindig van egy kis kapu.
----------------------
Come on...
Back to top
View user's profile Send private message
redleouf
Advanced Cheater
Reputation: 0

Joined: 13 Feb 2013
Posts: 76

PostPosted: Mon Jun 09, 2014 7:23 pm    Post subject: Reply with quote

Thanks for the help, but it doesn't seem to work Confused
_________________
01:34 - Souper: Are you the real redleouf?
01:34 - Redleouf: I am lol
01:34 - Souper: lol
01:35 - Souper: Im fangirling
01:35 - Redleouf: <3
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Mon Jun 09, 2014 7:27 pm    Post subject: Reply with quote

It's not working because there is an error in your script. Your aobscan is defined by "aob1", but you are not using it.

Cheat Engine 6.3:
Code:
[ENABLE]
alloc(newmem,2048)
label(returnhere)
registersymbol(aob)
aobscan(aob,DEE9D99E8C010000EB11)

newmem:
jmp returnhere

aob+2:
jmp newmem
nop
returnhere:

[DISABLE]
dealloc(newmem)
aob+2:
db D9 9E 8C 01 00 00
unregistersymbol(aob)


Older versions of Cheat Engine:
Code:
[ENABLE]
aobscan(AOB1,DEE9D99E8C010000EB11)
alloc(newmem,2048)
label(returnhere)
label(XX1)
registersymbol(XX1)

newmem:
jmp returnhere

AOB1+2:
XX1:
jmp newmem
nop
returnhere:
 
[DISABLE]
dealloc(newmem)
XX1:
db D9 9E 8C 01 00 00

unregistersymbol(XX1)
Back to top
View user's profile Send private message
redleouf
Advanced Cheater
Reputation: 0

Joined: 13 Feb 2013
Posts: 76

PostPosted: Mon Jun 09, 2014 7:56 pm    Post subject: Reply with quote

Wooow, damn... yeah I haven't saw that! I guess I am getting tired here ^^

Sorry to have bothered you for nothing guys. And thank you for your help.

_________________
01:34 - Souper: Are you the real redleouf?
01:34 - Redleouf: I am lol
01:34 - Souper: lol
01:35 - Souper: Im fangirling
01:35 - Redleouf: <3
Back to top
View user's profile Send private message
Rissorr
Master Cheater
Reputation: 3

Joined: 17 Sep 2013
Posts: 273
Location: Israel!

PostPosted: Tue Jun 10, 2014 2:32 pm    Post subject: Reply with quote

Why you did in the code:

aob+2?

i know that this is the number of bytes, that it is the AOB+ 2 bytes forward, but why?
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Tue Jun 10, 2014 2:37 pm    Post subject: Reply with quote

AOB represents the address of the bytes you searched for.
_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
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