Write an asm part in another process

09/30/2014 18:31 Kyshubi#1
Hello everyone.

Today I was wondering if its possible to write an asm part stored in aother process.
Example

Program 1:
PHP Code:
Do My stuff
alloc some memory in Program 2
Write MyAsm in Program 2 in allocated memory

_asm
{
push 1
push 2
push 3
...

Program 2:
PHP Code:
Do his stuff 
I'm not sure to be really clear but to be brief I want to do something like WriteProcessMemory and write my asm function



thx in advance, have a nice day
09/30/2014 18:37 snow#2
[Only registered and activated users can see links. Click Here To Register...]
10/01/2014 12:34 mithra#3
AsmJit looks good.

If you want to do it the hard way, write your asm block in-line, compile it, disassemble your code in your disassembler and have a look at what the opcodes are that it generates ( or use a debugger ). You can then assign those values to bytes in an array and then use your WriteProcessMemory on the target process.

Or if you really want some pain, try learning to code IN opcodes haha. I'll start you out : 0x90 is a NOP lol.