martona / mhook

A Windows API hooking library
Other
728 stars 326 forks source link

I found a bug. #14

Closed kkqy closed 8 years ago

kkqy commented 8 years ago

If there is a jump at the beginning of the function,the program will crash after hook the function.

7FF959F8F580 - test r8,r8
7FF959F8F583 - jng 7FF959F8F7DE
7FF959F8F589 - mov r11,rsp
7FF959F8F58C - push rbx
7FF959F8F58D - push rbp
7FF959F8F58E - push rsi
7FF959F8F58F - sub rsp,00000890 { 2192 }
7FF959F8F596 - mov rax,[7FF95A670860] { [6D1852D2] }

After hook:

7FF8D9FA0038 - test r8,r8
7FF8D9FA003B - jng 7FF8CF3DE996
7FF8D9FA0041 - db -02
7FF8D9FA0042 - jg 7FF8D9FA0044
7FF8D9FA0044 - add [rax],al
7FF8D9FA0046 - add [rax],al
7FF8D9FA0048 - add [rax],al
7FF8D9FA004A - add [rax],al