PostEnginePK Source

Posts 16–22 of 22 · Page 2 of 2
Yea i agree. Does anyone kno where to get updated detours?
Quote Originally Posted by motholen123 View Post
its no need bypass ?
No but you need detours.
I dont know if this is from the updated detours or not but it works perfectly for me:

Code:
void* DetourFunc(BYTE *src, const BYTE *dst, const int len)
{
	BYTE *jmp = (BYTE*)VirtualAlloc(NULL, len+5, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
	DWORD dwback, dwback2;

	VirtualProtect(src, len, PAGE_READWRITE, &dwback);
	VirtualProtect(jmp, len+5, PAGE_READWRITE, &dwback2);

	memcpy(jmp, src, len);	jmp += len;

	jmp[0] = 0xE9;
	*(DWORD*)(jmp+1) = (DWORD)(src+len - jmp) - 5;

	src[0] = 0xE9;
	*(DWORD*)(src+1) = (DWORD)(dst - src) - 5;

	VirtualProtect(jmp, len+5, dwback2, &dwback2);
	VirtualProtect(src, len, dwback, &dwback);

	return (jmp-len);
}
Works just the same way as the other in the PK Source but you just have to cast the function arguments to BYTE*

EDIT: NOT made by me, i dont take any credits, i found it somewhere on internet a long time ago.
Quote Originally Posted by Wizzup View Post
I dont know if this is from the updated detours or not but it works perfectly for me:

Code:
void* DetourFunc(BYTE *src, const BYTE *dst, const int len)
{
	BYTE *jmp = (BYTE*)VirtualAlloc(NULL, len+5, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
	DWORD dwback, dwback2;

	VirtualProtect(src, len, PAGE_READWRITE, &dwback);
	VirtualProtect(jmp, len+5, PAGE_READWRITE, &dwback2);

	memcpy(jmp, src, len);	jmp += len;

	jmp[0] = 0xE9;
	*(DWORD*)(jmp+1) = (DWORD)(src+len - jmp) - 5;

	src[0] = 0xE9;
	*(DWORD*)(src+1) = (DWORD)(dst - src) - 5;

	VirtualProtect(jmp, len+5, dwback2, &dwback2);
	VirtualProtect(src, len, dwback, &dwback);

	return (jmp-len);
}
Works just the same way as the other in the PK Source but you just have to cast the function arguments to BYTE*

EDIT: NOT made by me, i dont take any credits, i found it somewhere on internet a long time ago.
Thats hans detour, working on CA & WarRock
Not sure if its still UD for warrock since E9 is patched
I can hook Present & Reset with it UD, atleast the game doesnt say anything and lets me play for hours with them on.
Posts 16–22 of 22 · Page 2 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us