Posted May 10, 200916 yr Since my topic got locked on the MASM forums because this might be a malicious attempt..I'll try it here: I hope the title says it all: I want to detour a function in another process after injecting my dll and then detour that function to a function inside my dll. The detours library do it for C++ but how do I it in MASM? I don't see anything logic at first sight when looking at the pcode bytes...I took this from the detours lib can this be used (after translating to MASM of course) to redirect the call? inline PBYTE DetourGenCall(PBYTE pbCode, PBYTE pbJmpDst, PBYTE pbJmpSrc = 0){ if (pbJmpSrc == 0) { pbJmpSrc = pbCode; } *pbCode++ = 0xE8; *((INT32*&)pbCode)++ = pbJmpDst - (pbJmpSrc + 5); return pbCode;} Thanks
Create an account or sign in to comment