| View previous topic :: View next topic |
| Author |
Message |
CatHat How do I cheat?
Reputation: 0
Joined: 01 Jun 2007 Posts: 9
|
Posted: Wed Jul 01, 2009 2:08 pm Post subject: Creating a cheat table from code injection |
|
|
Hello.
I need to be able to hotkey the injection of certain code.
For example, after finding the mem address and getting the code injection template in the auto assemble window let's say I get this
.
.
.
16 add esp,1c
17 move ebp,[ebp-14]
.
.
.
But I want to be able to toggle between injecting the original code (above) and the next one (added a line and now line 17 is line 18)
.
.
16 add esp,1c
17 mov [ecx-14],4E2
18 move ebp,[ebp-14]
.
.
Also, let's say the address is 1075CF83. How can I turn this into a cheat table with a hotkey. I understand the cheat table would be different for different memory addresses.
Thanks for the help in advance.
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 472
Joined: 09 May 2003 Posts: 25870 Location: The netherlands
|
Posted: Wed Jul 01, 2009 5:57 pm Post subject: |
|
|
You can make use of getasynckeystate
As for changing addresses in a code injection that's no problem. Just write down the addressed in modulename+offset notation (use ctrl+m in the disassembler to see that notation)
Then make sure it has an [enable] and [disable] section and then you can assign the script to the current cheat table and save it for other people to use
example to do what you want WHILE x is pressed:
| Code: |
add esp,1c
pushfd //always wise to save the flags even if it isn't needed
pushad //not sure which registers get modified by getkeystate
push 'X' //key to get the state from (look up virtual keys like VK_F11 on google for their values)
call getasynckeystate
shl ax,f //bit 15 determines if it is currently down
cmp ax,1
jne notpressed
mov [ecx-14],4E2
notpressed:
popad
popfd
mov ebp,[ebp-14]
|
_________________
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 |
|
 |
CatHat How do I cheat?
Reputation: 0
Joined: 01 Jun 2007 Posts: 9
|
Posted: Wed Jul 01, 2009 7:11 pm Post subject: |
|
|
Not sure what you're talking about but I'll look around to find out.
Happy Birthday btw!
|
|
| Back to top |
|
 |
|