Yes I need help again.
I've already bugged 2 certain coders with my endless need for assistance, which they have kindly provided, now I would rather not pester them further with the cries for help. So instead I ask the forum as a whole,
I am already done with the menu, everything is fine, the hacks are working, the only problem is I need a detour function.
-Credits to Azorbix
void *DetourCreate(BYTE *src, const BYTE *dst, const int len)
BYTE *jmp = (BYTE*)malloc(len+5);
VirtualProtect(src, len, PAGE_EXECUTE_READWRITE, &dwBack);
memcpy(jmp, src, len);
jmp += len;
jmp = 0xE9;
*(DWORD*)(jmp+1) = (DWORD)(src+len - jmp) - 5;
src = 0xE9;
*(DWORD*)(src+1) = (DWORD)(dst - src) - 5;
for (int i=5; i<len; i++) src[i]=0x90;
VirtualProtect(src, len, dwBack, &dwBack);
Great... now I have the function, but I don't know what the hell to do with it. I'm completely stumped.
I tried a tutorial: http://www.progamercity.net/code-tut...functions.html
But that tutorial is so confusing, it made me frustrated trying to figure it out lol.
So I ask, please, can someone lend a helping hand?