Is there any function that's similar to...

ChangeInstruction(address, "push eax");

I'm making a trainer in C++, and I need these kinds of functions.
I know, ChangeInstruction isn't a valid function, it's just an example.
Not really so straightforward. To "transform" 'push eax' into valid bytecode you need a compiler bundled with your program, plus operation are variable-sized. Besides this you can compile it by hand and get its bytecode and "copypaste" it to that address with no efforts.

Ok, I did a little test.
Get your nasm copy ready.
Create your code you want to add into a test file.
Run nasm-shell from the Programs menu.
Command is:

nasm (file) -f bin -o (output)

It's either nasm or nasmw depending on which version you take.
The output file contains the raw machine code you need.
Last edited on
Topic archived. No new replies allowed.