View previous topic :: View next topic |
Author |
Message |
levis Newbie cheater Reputation: 0
Joined: 30 Nov 2005 Posts: 24
|
Posted: Wed Nov 30, 2005 7:25 am Post subject: Hotkeys to change registers in CE? |
|
|
lets say i have a code
00400000: 89 01 - mov [ecx], eax
to get my desired function, i change the registers, and alter "eax" to 99
is there a way to toogle in to 99, and back to original, using some form of global hotkeys?
i've read http://forum.cheatengine.org/viewtopic.php?t=3647 and it teaches how to use array of bytes to do something similar..
i've tried implementing it, by modifying the opcode to
mov [ecx], 99 and it says the generated opcode is 6bytes long whereas the original is only 2bytes and asks if i want to replace them with nops...
whether or not i replace with nops, the byte values becoms as such
00400000: c7 01 99 00 00 00 - mov [ecx], 99
does this mean that i have to manually add an array of bytes (size 6) and input those values? when i do so, my whole game crashes though.. anyone can help me with this? of course if there was something else simpler, ie juz by using hotkeys to change registers, that'll be great.. thankx
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Wed Nov 30, 2005 8:11 am Post subject: |
|
|
Let's assume you arn't talking about maple because that will disconnect you if you edit the code.
Use code caves.
when that instruction is selected go to memory view->tools->auto assembler (or just press ctrl+a)
then template->code injection, make sure the adderess is correct, and click ok
then at the line: //place your code here type in
mov eax,99
then click template->cheattable framework code
and in the [DISABLE] section write
00400000:
followed by the original code that will be overwritten by the jump (same as the original code part in the code injection enable part)
when everything is right, click file->assign to cheat table, and close the auto assembler window. in ce you can now rightclick that cheat and assign it a hotkey
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
levis Newbie cheater Reputation: 0
Joined: 30 Nov 2005 Posts: 24
|
Posted: Wed Nov 30, 2005 8:43 am Post subject: |
|
|
why does this template script assumes that the original code only consist of the next 3 consecutive addresses?
i understand a little on code injection using code caves, but what i've read on previously was to set the EIP onto my code cave.. having done your way, however, when i enable the cheat, it works well, but i cannot disable it.. lol am i doing anything wrong?
original code:
400000 - somecode
400001 - blabla
400002 - blablabla
at the [DISABLE] part, i placed in all 3 lines of the original code, is that correct?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Wed Nov 30, 2005 8:58 am Post subject: |
|
|
the template assumes there are 3 because it has to overwrite 3 instructions to place the jump (the jump is 5 bytes, the mov [ecx], eax is 2, so that leaves 3 other bytes to be replaced as well)
yes, placing the 3 original lines at the disable part is right, but make it look like:
Code: |
00400000: //assuming 00400000 is the original address
somecode
blabla
blablabla
|
don't add the "originalcode:" line
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Wed Nov 30, 2005 9:05 am Post subject: |
|
|
Here is a example of a really retarded method to freeze time in minesweeper, but it should give a good example:
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)
01002FF5:
jmp newmem
nop
returnhere:
newmem: //this is allocated memory, you have read,write,execute access
//place your code here
dec [0100579c]
originalcode:
inc [0100579c]
exit:
jmp returnhere
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
01002FF5:
inc [0100579c]
|
notice that at the dissable part I have the original address and the original code that should be there
on a completly unrelated note:
no idea if it's because I have all windows symbols, or not, but 01002FF5 shows as DoTimer+15 to me, and 0100579c as cSec, so I might have used those names as well
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
levis Newbie cheater Reputation: 0
Joined: 30 Nov 2005 Posts: 24
|
Posted: Wed Nov 30, 2005 10:03 am Post subject: |
|
|
hey alright this works.. now i can switch on and off already~
thx darkbyte~!
erm btw, does modifying a register literally mean changing the opcode?
eg: i modify eax of 400001 - mov [ecx], eax to 99
is it equal to changing opcode to mov [ecx], 99?
i think it works this way but........
how bout i modify EAX of 400001 - mov [EDX], ECX to 99
in this, the opcode dont contain any eax... ?
erh yea i'm refering to maple.. lol u got it.. anyway this could be a great start to learn hacking rite?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Wed Nov 30, 2005 10:37 am Post subject: |
|
|
changing registers and changing opcodes are different things
when you change the opcode you change the bytes.
with changing registers you don't change the memory, but when that memory location gets executed it changes the state of the registers
and yes, if you change eax to 99 at mov [ecx],eax it means the same as mov [ecx],99
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Wed Nov 30, 2005 12:35 pm Post subject: |
|
|
oh yes, I forget to add dealloc(newmem) in the disable part.
it isn't needed, but it'll free the allocated memory, else you may run out of memory after you enable it for about 250000 times.
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
levis Newbie cheater Reputation: 0
Joined: 30 Nov 2005 Posts: 24
|
Posted: Wed Nov 30, 2005 4:51 pm Post subject: |
|
|
hmm.. sometimes when i change register eax to 99 in mov[ecx],eax... its the same effect as changing opcode to mov[ecx], 99..
yet again sometimes when i change register eax to, say 200, in another opcode, say mov[edx],eax... the effect i get isnt the same as changing the opcode directly to move[edx],200..
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Wed Nov 30, 2005 4:56 pm Post subject: |
|
|
it is, but perhaps you are interpreting it wrong?
200 means 512, perhaps you didn't notice it with 99(153)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
levis Newbie cheater Reputation: 0
Joined: 30 Nov 2005 Posts: 24
|
Posted: Thu Dec 01, 2005 8:16 pm Post subject: |
|
|
how do u get to the answer, as in why does 200 mean 512? erm sorry for this lol..
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Thu Dec 01, 2005 8:20 pm Post subject: |
|
|
the assembler uses hexadecimal notation
200 mean 200 hexadecimal. (or 00 02 written as bytes)
the easiest way to convert from hex to dec is by using the windows calculator in scientifc mode
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
levis Newbie cheater Reputation: 0
Joined: 30 Nov 2005 Posts: 24
|
Posted: Thu Dec 01, 2005 8:32 pm Post subject: |
|
|
yea so i was wondering, 200dec converted to hex would be C8? why 512
|
|
Back to top |
|
|
levis Newbie cheater Reputation: 0
Joined: 30 Nov 2005 Posts: 24
|
Posted: Thu Dec 01, 2005 9:22 pm Post subject: |
|
|
ok here's what i'm trying to do again.. editing the code cave would not dc me. so issit alright to do this..
Code: | [ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
label(returnhere)
label(originalcode)
label(exit)
004001C5:
jmp 004001D5
nop
nop
returnhere:
004001D5: //this is allocated memory, you have read,write,execute access
//place your code here
mov [ecx],99
jmp 0042b177
originalcode:
mov [ecx],eax
jmp 0042b177
exit:
jmp returnhere
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
004001C5:
mov [ecx],eax
jmp 0042b177 |
4001c5 is the cave, i modified the first 2 lines to:
mov [ecx],eax
jmp 0042b177
then i change EIP of 42b175 to point to 4001c5
would this work? or am i missing something
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Fri Dec 02, 2005 6:13 am Post subject: |
|
|
levis wrote: | yea so i was wondering, 200dec converted to hex would be C8? why 512 |
200 hex converted to dec is 512
you filled in 200 in the register, which equale 512 to the game (or 0 if it only uses 1 byte)
And about that assembler script:
you are changing the memory at [ecx] to 153
also, the code in originalcode will never get executed, so not sure if you need it
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
|