DragonX Posted February 19, 2016 Posted February 19, 2016 hook compileMethod like this HMODULE hJitMod = LoadLibrary(_T("mscorjit.dll")); if (!hJitMod) return; p_getJit = (ULONG_PTR *(__stdcall *)()) GetProcAddress(hJitMod, "getJit"); if (p_getJit) { JIT *pJit = (JIT *)*((ULONG_PTR *)p_getJit()); if (pJit) { DWORD OldProtect; VirtualProtect(pJit, sizeof(ULONG_PTR), PAGE_READWRITE, &OldProtect); compileMethod = pJit->compileMethod; pJit->compileMethod = &my_compileMethod; VirtualProtect(pJit, sizeof(ULONG_PTR), OldProtect, &OldProtect); bHooked = TRUE; } } .but how to hook the jitNativeCode and Compiler::compCompile method.... 1
DragonX Posted February 21, 2016 Author Posted February 21, 2016 looks like nobody want talk with this... 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now