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 1, 2, 3  Next
 
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: Thu Sep 26, 2013 8:01 am    Post subject: How to make script with "Replace that code with nothing Reply with quote

Here is my original code:
Code:
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],bl
je h3wog.exe+C6445
mov eax,[ebp-06]

exit:
jmp returnhere

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

and I would like to have script, which activated will replace my code with nothing:
Code:
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:
nop
nop
je h3wog.exe+C6445
mov eax,[ebp-06]

exit:
jmp returnhere

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


Please, help.
Back to top
View user's profile Send private message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Thu Sep 26, 2013 9:51 am    Post subject: This post has 1 review(s) Reply with quote

You mean this?
Code:

[enable]
"h3wog.exe"+C640D:
db 90 90
[disable]
"h3wog.exe"+C640D:
mov [esi],bl

_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
Jacusiek
Advanced Cheater
Reputation: 0

Joined: 24 Jan 2011
Posts: 81

PostPosted: Thu Sep 26, 2013 2:41 pm    Post subject: Reply with quote

Yes, that's what I meant, thank You very much.

@Edit: And what about this one? I tried to do this the similar way, but it didn't work:
Code:
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:


to be like that:

Code:
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:
nop
nop
nop
call h3wog.exe+B84A0

exit:
jmp returnhere

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

Back to top
View user's profile Send private message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Thu Sep 26, 2013 10:28 pm    Post subject: Reply with quote

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

_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
Jacusiek
Advanced Cheater
Reputation: 0

Joined: 24 Jan 2011
Posts: 81

PostPosted: Fri Sep 27, 2013 6:54 am    Post subject: Reply with quote

It doesn't work, it crushes the game. I tried to do something like that:

Code:
[enable]
"h3wog.exe"+C6578:
db 90 90 90
[disable]
"h3wog.exe"+C6578:
mov [esi+57],bl
call h3wog.exe+B84A0
//cmp [ebx],-01

but it didn't work too.



Nowy obraz mapy bitowej - Kopia.png
 Description:
How it looks after "replace with nothing"
 Filesize:  81.56 KB
 Viewed:  32766 Time(s)

Nowy obraz mapy bitowej - Kopia.png



Nowy obraz mapy bitowej.png
 Description:
This is how it looks originally
 Filesize:  95.58 KB
 Viewed:  32766 Time(s)

Nowy obraz mapy bitowej.png


Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Fri Sep 27, 2013 8:55 pm    Post subject: Reply with quote

If you right-click on the instruction in Memory Viewer, and select 'Replace with code that does nothing', does it crash?

If not...

Follow the tutorial. Follow these steps for setting up your script:

In memory viewer, highlight the instruction that you want to change. With the instruction highlighted, select 'tools' from the drop-down menu. Click on 'auto assemble'. In the new auto assemble window, select 'template' from the drop-down menu. Click on 'cheat table framework'. Select 'template' again, and this time, click on 'code injection'. Click okay.

When you are finished making your changes, select 'file' from the drop-down menu and click on 'assign to current cheat table'.

In your cheat table, right-click on the script and select 'set/change hotkeys'.

If it does crash, you either need to find a new instruction to work with, or right click on the instruction to see what other addresses it accesses, and filter them out.
Back to top
View user's profile Send private message
Jacusiek
Advanced Cheater
Reputation: 0

Joined: 24 Jan 2011
Posts: 81

PostPosted: Sat Sep 28, 2013 7:49 am    Post subject: Reply with quote

++METHOS wrote:
If you right-click on the instruction in Memory Viewer, and select 'Replace with code that does nothing', does it crash?

No, it doesn't crash, I think it's for 99,99% the right instruction.
I did what You said, but it didn't work to any of those 2 instructions, it just did nothing. This is the new script made with the method, which You told me:
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
cmp al,[83909090]

exit:
jmp returnhere

"h3wog.exe"+C6578:
jmp newmem
nop
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
cmp al,[83909090]
//Alt: db 88 5E 57 3A 05 90 90 90 83



Nowy obraz mapy bitowej.png
 Description:
This is what happens in Memory View while activating Your script. As You can see, it's quite different from the original "replace with nothing".
 Filesize:  105.08 KB
 Viewed:  32706 Time(s)

Nowy obraz mapy bitowej.png


Back to top
View user's profile Send private message
vergilganesh
Expert Cheater
Reputation: 0

Joined: 01 Jul 2013
Posts: 134
Location: India

PostPosted: Sat Sep 28, 2013 9:30 am    Post subject: Reply with quote

you just right click and change with the code that does nothing. play the game. if the game is crashed, then this code works perfect.
Code:


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

just enable and disable make sure the code works. if the game is not crashed after some seconds while playing, you have selected a wrong code.

if you want ur code by code injection this is correct one that nop.
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
jmp exit
originalcode:
mov [esi+57],bl
cmp al,[83909090]

exit:
jmp returnhere

"h3wog.exe"+C6578:
jmp newmem
nop
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
cmp al,[83909090]
//Alt: db 88 5E 57 3A 05 90 90 90 83

_________________
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Jacusiek
Advanced Cheater
Reputation: 0

Joined: 24 Jan 2011
Posts: 81

PostPosted: Sat Sep 28, 2013 10:47 am    Post subject: Reply with quote

vergilganesh wrote:
if the game is crashed, then this code works perfect.

Well, I don't understand this part... I want to game work normally, not to crash, so why it should be fine if game crashes?

When I use
Code:

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

enables it and disables, game crashes.

The second script also crashes my game after being enabled and then disabled. When I right click and then "replace with ... nothing" it works perfectly without any crash.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sat Sep 28, 2013 12:26 pm    Post subject: Reply with quote

If you right-click on the instruction, and it doesn't crash your game, then this script should work:

Code:

[ENABLE]
alloc(newmem,2048)
label(returnhere)

newmem:
cmp al,[83909090]
jmp returnhere

"h3wog.exe"+C6578:
jmp newmem
nop
nop
nop
nop
returnhere:
 
[DISABLE]
dealloc(newmem)
"h3wog.exe"+C6578:
mov [esi+57],bl
cmp al,[83909090]
//Alt: db 88 5E 57 3A 05 90 90 90 83
Back to top
View user's profile Send private message
Jacusiek
Advanced Cheater
Reputation: 0

Joined: 24 Jan 2011
Posts: 81

PostPosted: Sat Sep 28, 2013 2:06 pm    Post subject: Reply with quote

++METHOS wrote:
If you right-click on the instruction, and it doesn't crash your game, then this script should work:

I right click on instruction, press "replace ... nothing", I can play, save game, load game (even after I close game and open again, and load my previous game it still works normally).
I have 2 new pictures about Your script (which unfortunatelly doesn't work, even after being disabled it crashes game):



Nowy obraz mapy bitowej - Kopia.png
 Description:
After being disabled.
 Filesize:  88.07 KB
 Viewed:  32652 Time(s)

Nowy obraz mapy bitowej - Kopia.png



Nowy obraz mapy bitowej.png
 Description:
After being Enabled.
 Filesize:  90.66 KB
 Viewed:  32654 Time(s)

Nowy obraz mapy bitowej.png


Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sat Sep 28, 2013 3:06 pm    Post subject: Reply with quote

That doesn't make sense. Show the assembly as it is, before you alter any code. Also, show the code after you enable...and...after you disable.

If you replace code that does nothing at the same instruction, and the game doesn't crash, then injecting my code should not crash the game either.
Back to top
View user's profile Send private message
Jacusiek
Advanced Cheater
Reputation: 0

Joined: 24 Jan 2011
Posts: 81

PostPosted: Sat Sep 28, 2013 3:10 pm    Post subject: Reply with quote

++METHOS wrote:
That doesn't make sense. Show the assembly as it is, before you alter any code. Also, show the code after you enable...and...after you disable.

If you replace code that does nothing at the same instruction, and the game doesn't crash, then injecting my code should not crash the game either.

I put all needed images before:
original one
after replacing ... nothing
after being enabled by Your script
after being disabled by Your script
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sat Sep 28, 2013 4:04 pm    Post subject: Reply with quote

Yes, but your images changed...because you changed your instruction.

Look at your code after enabled:



The sti is wrong. Paste your script here so we can look at it.

It looks like your code is changing:

Originally:
"h3wog.exe"+C6578:
mov [esi+57],bl
cmp al,[83909090]

Now:
"h3wog.exe"+C6578:
mov [esi+57],bl
call h3wog.exe+B8480
cmp ebx,-01


Last edited by ++METHOS on Sat Sep 28, 2013 4:11 pm; edited 1 time in total
Back to top
View user's profile Send private message
Jacusiek
Advanced Cheater
Reputation: 0

Joined: 24 Jan 2011
Posts: 81

PostPosted: Sat Sep 28, 2013 4:08 pm    Post subject: Reply with quote

That sti appears after using Your script:

Code:
[ENABLE]
alloc(newmem,2048)
label(returnhere)

newmem:
cmp al,[83909090]
jmp returnhere

"h3wog.exe"+C6578:
jmp newmem
nop
nop
nop
nop
returnhere:
 
[DISABLE]
dealloc(newmem)
"h3wog.exe"+C6578:
mov [esi+57],bl
cmp al,[83909090]
//Alt: db 88 5E 57 3A 05 90 90 90 83


@Edit: Originally it shouldn't be "cmp al,[83909090] "
but "call h3wog.exe+B84A0" (look at the pictures "original one").


Last edited by Jacusiek on Sat Sep 28, 2013 4:36 pm; edited 1 time in total
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 1, 2, 3  Next
Page 1 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