|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
eranj How do I cheat? Reputation: 0
Joined: 28 Feb 2010 Posts: 9
|
Posted: Fri Mar 12, 2010 5:55 pm Post subject: How to combine two codes and how to make them shorter... |
|
|
I made Auto Level Up cheat for World Of Goo and i Have two parts.
this one:
Code: | [ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)
00411A51:
jmp newmem
nop
returnhere:
newmem: //this is allocated memory, you have read,write,execute access
originalcode:
mov [esi+000000b8],0000001F4
nop
exit:
jmp returnhere
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
00411A51:
mov [esi+000000b8],ebx
//Alt: db 89 9E B8 00 00 |
and this one:
Code: | [ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)
0045DCC1:
jmp newmem
nop
returnhere:
newmem: //this is allocated memory, you have read,write,execute access
//place your code here
originalcode:
mov eax,00000001
mov [edi+000000b4],eax
exit:
jmp returnhere
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
0045DCC1:
mov [edi+000000b4],eax
//Alt: db 89 87 B4 00 00 |
How can I make them shorter and combine them into one code?
Every time I try to change the code (cut stuff) or combine one with the other, the program just ends... |
|
Back to top |
|
|
eranj How do I cheat? Reputation: 0
Joined: 28 Feb 2010 Posts: 9
|
Posted: Wed Mar 24, 2010 11:16 am Post subject: |
|
|
146 views and no replay?
i dont think its that hard :/ |
|
Back to top |
|
|
Slugsnack Grandmaster Cheater Supreme Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Thu Apr 08, 2010 9:55 am Post subject: |
|
|
don't know if you still want this.
Code: | [ENABLE]
alloc(newmem,32)
label(returnhere)
00411A51:
jmp newmem
nop
returnhere:
newmem: //this is allocated memory, you have read,write,execute access
mov [esi+000000b8],0000001F4
nop
jmp returnhere
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
00411A51:
mov [esi+000000b8],ebx
//Alt: db 89 9E B8 00 00 |
Code: | [ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,32)
label(returnhere)
0045DCC1:
jmp newmem
nop
returnhere:
newmem: //this is allocated memory, you have read,write,execute access
mov eax,00000001
mov [edi+000000b4],eax
jmp returnhere
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
0045DCC1:
mov [edi+000000b4],eax
//Alt: db 89 87 B4 00 00 |
didn't change much except allocation size to something more appropriate and also got rid of some labels that are not needed. the resulting code itself is the same though.
then to combine..
Code: | [ENABLE]
alloc(newmem,32)
alloc(newmem2,32)
label(returnhere)
label(returnhere2)
00411A51:
jmp newmem
nop
returnhere:
0045DCC1:
jmp newmem2
nop
returnhere2:
newmem: //this is allocated memory, you have read,write,execute access
mov [esi+000000b8],0000001F4
nop
jmp returnhere
newmem2: //this is allocated memory, you have read,write,execute access
mov eax,00000001
mov [edi+000000b4],eax
jmp returnhere2
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
dealloc(newmem2)
00411A51:
mov [esi+000000b8],ebx
//Alt: db 89 9E B8 00 00
0045DCC1:
mov [edi+000000b4],eax
//Alt: db 89 87 B4 00 00 |
you might even be able to combine those memory allocation/deallocations.
Code: | [ENABLE]
alloc(newmem,64)
label(newmem2)
label(returnhere)
label(returnhere2)
00411A51:
jmp newmem
nop
returnhere:
0045DCC1:
jmp newmem2
nop
returnhere2:
newmem: //this is allocated memory, you have read,write,execute access
mov [esi+000000b8],0000001F4
nop
jmp returnhere
newmem2: //this is the same block of allocated memory, this injected piece of code is directly after the first one
mov eax,00000001
mov [edi+000000b4],eax
jmp returnhere2
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
00411A51:
mov [esi+000000b8],ebx
//Alt: db 89 9E B8 00 00
0045DCC1:
mov [edi+000000b4],eax
//Alt: db 89 87 B4 00 00 |
|
|
Back to top |
|
|
|
|
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
|
|