I am proxying a method call in using a naked function and inline assembler.
__declspec(naked) void ProxyFunction()
{
static const unsigned int addressofRealFunction = 0x0041b200;
__asm
{
jmp [addressofRealFunction];
}
}
How can I translate this to x64? In visual studio there is no inline assembler or naked functions for x64.
Naked removes the assembly prologue and epilogue. I need this to make sure the stack frame stays equivalent for the call.
What would you do?
Try compiling it straight:
void ProxyFunction()
{
RealFunction();
}
See if the compiler optimizes it down to bare jump. It might.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With