______ __ ____ __ __ __ __
/ ____/___ ________ __ / |/ (_)___/ / / / / /___ ____ / /__
/ __/ / __ `/ ___/ / / / / /|_/ / / __ / / /_/ / __ \/ __ \/ //_/
/ /___/ /_/ (__ ) /_/ / / / / / / /_/ / / __ / /_/ / /_/ / ,<
/_____/\__,_/____/\__, / /_/ /_/_/\__,_/ /_/ /_/\____/\____/_/|_|
/____/
Mid Hook Template (x64)
Easy way to mid function hooking in x64
This template teach you and help you how to easily create x64 mid hook in C++ using MS Detours and seperate ASM file, since inline ASM is not available in x64.
The code cave permit to execute new instructions in the middle of a function, the hook will redirect the flow into our new code then jump back to the original function, this is very useful for game hacking.
This project also show you how to exchange datas between you C++ code and your ASM code.
The project include a test executable to see how it works.
MS Detours is already setup and include in the project.
Note
This is a x64 executable / DLL, you can't compile this project in x86, we are using x64 assembly.
- Open the solution file (.sln).
- Build the project in Debug (x64)
Warning
If the hook does not work, you should check if the address is good if you recompiled, else you can test with test files in the Release section.