or this detour
VOID *DetourCreate(BYTE *src, const BYTE *dst, const int len)
{
int pPointer [] = { 0xE9, 0x90 };
BYTE *jmp = (BYTE *)malloc(len + 5);
DWORD dwback;
VirtualProtect(src, len, PAGE_READWRITE, &dwback);
memcpy(jmp, src, len);
jmp += len;
jmp[0] = pPointer[0];
*(DWORD *)(jmp + 1) = (DWORD)(src + len - jmp) - 5;
src[0] = pPointer[0];
*(DWORD *)(src + 1) = (DWORD)(dst - src) - 5;
for(INT i = 5; i < len; i++) src[i] = pPointer[1];
VirtualProtect(src, len, dwback, &dwback);
return(jmp - len);
}
yes i use PTC, to mony times i dont know how much, 3 week ago i had another detour and 3 day ago i have it changed to this
and 3 days i played fine, but today crash why, i dont know((void *cDirectx:esvioJMP(BYTE *src, CONST BYTE *dst, CONST INT len)
{
BYTE *jmp=(BYTE*)malloc(len+5);
DWORD dwback;
VirtualProtect(src,len,PAGE_READWRITE,&dwback);
memcpy(jmp,src,len);jmp+=len;jmp[0]=JMP+0x1E;
*(DWORD*)(jmp+1)=(DWORD)(src+len-jmp)-5;
src[0]=JMP+0x1E;
*(DWORD*)(src+1)=(DWORD)(dst-src)-5;
for(INT i=5;i<len;i++)src[i]=0x90;
VirtualProtect(src,len,dwback,&dwback );
FlushInstructionCache(GetCurrentProcess(),src,0x10 );
return(jmp-len);
}
the old my detour was thisbut its crashed and i have changed to thisVOID *DetourCreate(BYTE *src, const BYTE *dst, const int len)
{
int pPointer [] = { 0xE9, 0x90 };
BYTE *jmp = (BYTE *)malloc(len + 5);
DWORD dwback;
VirtualProtect(src, len, PAGE_READWRITE, &dwback);
memcpy(jmp, src, len);
jmp += len;
jmp[0] = pPointer[0];
*(DWORD *)(jmp + 1) = (DWORD)(src + len - jmp) - 5;
src[0] = pPointer[0];
*(DWORD *)(src + 1) = (DWORD)(dst - src) - 5;
for(INT i = 5; i < len; i++) src[i] = pPointer[1];
VirtualProtect(src, len, dwback, &dwback);
return(jmp - len);
}then no crash was finevoid *cDirectx:esvioJMP(BYTE *src, CONST BYTE *dst, CONST INT len)
{
BYTE *jmp=(BYTE*)malloc(len+5);
DWORD dwback;
VirtualProtect(src,len,PAGE_READWRITE,&dwback);
memcpy(jmp,src,len);jmp+=len;jmp[0]=JMP+0x1E;
*(DWORD*)(jmp+1)=(DWORD)(src+len-jmp)-5;
src[0]=JMP+0x1E;
*(DWORD*)(src+1)=(DWORD)(dst-src)-5;
for(INT i=5;i<len;i++)src[i]=0x90;
VirtualProtect(src,len,dwback,&dwback );
FlushInstructionCache(GetCurrentProcess(),src,0x10 );
return(jmp-len);
}
Y U NO USE CLASS POINTERS AS GAME CHECKS
The simplest shit,
Most classes are only initialized InGame, use them as InGame checks. Always works, better than GameStatus.Code:bool bInGameFlag; cPlayerInfo *pPlayerInfo; if(ValidPointer(pPlayerInfo)) bInGameFlag = true; if(bInGameFlag == true) //Blabla Call Ingame Stuff
Last edited by arun823; 10-31-2013 at 12:00 AM.
Reversing is the only way to move forward.
kssiobr (12-02-2013),Timboy67678 (10-31-2013)
@DisOwned please, stop post old stuff saying that you just finded as new.
J (11-14-2013)
I saw this method on the basis of MMBOB
Muito bom!!!