TsudaKageyu / minhook

The Minimalistic x86/x64 API Hooking Library for Windows

Home Page:http://www.codeproject.com/KB/winsdk/LibMinHook.aspx

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MinHook seems to be failing to read the instructions properly

ThePixelGamer opened this issue · comments

Hi I'm trying to hook this one function that looks like this
image
but for some reason MinHook is failing to understand that the instruction at C4 is 2 bytes long which results in this
image
Something to note I'm currently using the latest GitHub release and haven't tried using a build of master yet, if this is a duplicate feel free to close.

There's nothing wrong in this picture. MinHook is supposed to jump back to C6 when the original function is called through the pointer it returns. The byte at C5 (54 - push rsp) will just never be used. MinHook could patch it with a nop, but that's just extra work that can be avoided.

Ah I see, I guess I should've examined the trampoline before posting this. Thanks for the clarification!