Exceuting a simple assembly code in C++ without it being in a function
问题 I'm trying to write a trampoline hook to some win32 api function, when I write the JMP instruction to the start of the original function I want it to jump to a codecave instead of calling a function. The original function start looks like this in OllyDBG: PUSH 14 MOV EAX, 12345678 ... And I patch it to: JMP 87654321 NOP NOP The address of the following function: int HookFunc(int param) { DoStuff(param); return ExecuteOriginal(param); } ExceuteOriginal looks like this: unsigned long address =