First I would like to thank you for releasing this (I know you released a while go but I haven't seen it until now.).
Secondly I would like to ask for some help.
Since I don't have all your files I needed to change a few things, well two things actually:
Code:
DetourFunc((BYTE*)pf.Get("RecvFunc"), (BYTE*)&RecvHook, 7);
jBack = pf.Get("RecvFunc") + 7;
To:
Code:
VirtualProtect((void *)recvAddr, 5, PAGE_EXECUTE_READWRITE, &error);
*(BYTE *)(recvAddr) = 0xE9;
*(DWORD *)(recvAddr + 1) = (DWORD)&RecvHook - recvAddr -5;
jBack = recvAddr+7;
That works well, it redirects as it should and everything is fine.
But when it comes to:
Code:
typedef void (__cdecl* Proto)(unsigned char*, int);
Proto Func = (Proto)pf.Get("SendFunc");
Func(p, i);
I fail to change it into a working method.
Tried :
Code:
typedef void (__cdecl* Proto)(unsigned char*, int);
Proto Func = (Proto)sendAddr;
Func(p, i);
But without success. It's kinda obvious it would fail since my sendAddr and recvAddr is have the same type. And in your code you only typecast one of them.
So what I wonder is:
What does "pf.Get("SendFunc");" return?
If I know that I could try to figure out a solution which works.
I have no plans of releasing anything which involves this code, if I ever feel like releasing anything I will ask for your permission and I would make sure you get credited for it.
Thanks.