I am having a little trouble converting my asm script into C++ for dll injection.
Here is the ASM code.
Now in C++ i have it written like this..
but it tells me that "db" is not recognized. I did some research and I found that C++ inline asm can't recognize some operands such as "db".
But how do I go around this. I also tried using this.
But that results in a crash on the target process.
If anyone has an alternative solution, or some way I could directly write the bytes at a codecave that would be great.
Here is the ASM code.
Code:
mov ecx,[Value] mov [eax+08],ecx mov edx, [eax+04] jmp return Value: db 00 00 42 43
Code:
{
__asm
{
mov ecx,[Value]
mov [eax+0x08],ecx
mov edx,[eax+0x04]
jmp [Return]
Value:
db 00 00 42 43
}
}
But how do I go around this. I also tried using this.
Code:
#define Value __asm _emit 0x00 __asm _emit 0x00 __asm _emit 0x42 __asm _emit 0x43
If anyone has an alternative solution, or some way I could directly write the bytes at a codecave that would be great.