Click here to Skip to main content
15,878,543 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Would anyone happen to know why this would crash after the first WPM call, its not for malicous use but for learning other ways to detour other than using MS Detours with injected dll's

http://pastebin.com/j1Uq7gpS[^]
Posted
Comments
H_ 28-Jul-15 6:52am    
Why there are the confusing offsets?
*(BYTE*)((LPBYTE)lpCallbackAddress + 14) = 0xE9; //JMP ...
*(DWORD*)((LPBYTE)lpCallbackAddress + 15) = (((DWORD)SleepAddr + 5) - (((DWORD)lpCallbackAddress + 14) + 5)); //Offset math.

And what I particularly noticed, you have no return in your naked function __asm ret at the end of your detour function should do the magic.

And btw. you heared about DLL-Injection?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900