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 


How to make script with "Replace that code with nothing
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Jacusiek
Advanced Cheater
Reputation: 0

Joined: 24 Jan 2011
Posts: 81

PostPosted: Mon Sep 30, 2013 5:28 am    Post subject: Reply with quote

My answer is 2. Here is the new script (I don't know how I did it wrong, I did it twice and I was sure I did it in correct order):
Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

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

originalcode:
mov [esi+57],bl
call h3wog.exe+B84A0

exit:
jmp returnhere

"h3wog.exe"+C6578:
jmp newmem
nop
nop
nop
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"h3wog.exe"+C6578:
mov [esi+57],bl
call h3wog.exe+B84A0
//Alt: db 88 5E 57 E8 20 1F FF FF

Now, game doesn't crash when I disable it after enabling, but the code itself doesn't work. Instruction is returning to normal state, like it was before.

@Edit, few posts ago, someone told me to search array of bytes, and if one is found, then to write that script:
Code:
[ENABLE]
aobscan(AOB,88 5E 57 E8 20 1F FF FF)     //May have to revise this AOB data
alloc(newmem,40)
label(returnhere)
label(XXXX)
registersymbol(XXXX)

newmem:
db 90 90 90
jmp returnhere

AOB:
XXXX:
jmp newmem
nop
nop
nop
returnhere:

[DISABLE]
dealloc(newmem)
XXXX:
db 88 5E 57 E8 20 1F FF FF

unregistersymbol(XXXX)

And I have to say that it is working. Thanks everyone for help, I think it's good now. But I still don't understand, why first code from this post isn't working... It does the same, because I checked it in Memory View.



Nowy obraz mapy bitowej.png
 Description:
Here's a picture after enabling code
 Filesize:  71.91 KB
 Viewed:  9538 Time(s)

Nowy obraz mapy bitowej.png


Back to top
View user's profile Send private message  
eax.qbyte
Advanced Cheater
Reputation: 3

Joined: 25 Jun 2011
Posts: 59
Location: CEDisasmView

PostPosted: Tue Oct 01, 2013 9:15 am    Post subject: This post has 1 review(s) Reply with quote

If you change it into :
Code:

[enable]
"h3wog.exe"+C6578:
db 90 90 90
db 90 90 90 90 90
[disable]
"h3wog.exe"+C6578:
mov [esi+57],bl
call h3wog.exe+B84A0


Same reason is why second script in your last code is working and the first one is not. Read more about code injection in CE and you will know every thing.



aainfo.png
 Description:
 Filesize:  72.5 KB
 Viewed:  9499 Time(s)

aainfo.png



_________________
My special thanx to Cheat Engine and its developers. It helps me do the hard and boring but valuable process of understanding the code, easily and with fun.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger  
Jacusiek
Advanced Cheater
Reputation: 0

Joined: 24 Jan 2011
Posts: 81

PostPosted: Tue Oct 01, 2013 9:56 am    Post subject: Reply with quote

Ok, thanks, I think I understand it now.
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 Gamehacking All times are GMT - 6 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
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