Project Blackout - DrawMenu
Hello Guys,
I am using Hans211 Base, but I got some problems in Project Blackout...
1: The Background and the Site wont be drawed look at the Screenshot
2: The Game will be showed fully Black, I can just see the Login Textboxes
3: Its crashes after 2 - 5minutes
( The Functions arent set at the moment )
Screenshot:

I hope you can help me as fast as you can.
-xThePirate
I am using Hans211 Base, but I got some problems in Project Blackout...
1: The Background and the Site wont be drawed look at the Screenshot
2: The Game will be showed fully Black, I can just see the Login Textboxes
3: Its crashes after 2 - 5minutes
( The Functions arent set at the moment )
Screenshot:
Code:
bool bCompare(const BYTE* pData, const BYTE* bMask, const char* szMask)
{
for(;*szMask;++szMask,++pData,++bMask)
if(*szMask=='x' && *pData!=*bMask) return 0;
return (*szMask) == NULL;
}
DWORD FindPattern(DWORD dwAddress,DWORD dwLen,BYTE *bMask,char * szMask)
{
for(DWORD i=0; i<dwLen; i++)
if (bCompare((BYTE*)(dwAddress+i),bMask,szMask)) return (DWORD)(dwAddress+i);
return 0;
}
void *DetourCreate(BYTE *src, const BYTE *dst, const int len)
{
BYTE *jmp = (BYTE*)malloc(len+5);
DWORD dwBack;
VirtualProtect(src, len, PAGE_EXECUTE_READWRITE, &dwBack);
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;
for (int i=5; i<len; i++) src[i]=0x90;
VirtualProtect(src, len, dwBack, &dwBack);
return (jmp-len);
}
DWORD *hookVFunc(DWORD *vtable, int index, DWORD *newFunction)
{
DWORD dwOldProt, *oldFunc;
VirtualProtect(&vtable[index], 4, PAGE_EXECUTE_READWRITE, &dwOldProt);
oldFunc=(DWORD*)vtable[index];
vtable[index]=(DWORD)newFunction;
VirtualProtect(&vtable[index], 4, dwOldProt, &dwOldProt);
return oldFunc;
}
int D3Dinit(void)
{
DWORD hD3D, adr, *vtbl;
hD3D=0;
do
{
hD3D = (DWORD)GetModuleHandle(D3Ddllname);
Sleep(10);
}
while(!hD3D);
adr = FindPattern(hD3D, 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86", "xx????xx????xx");
if (adr)
{
memcpy(&vtbl,(void *)(adr+2),4);
pReset = (oReset) hookVFunc(vtbl, 16, (DWORD*)myReset);
pEndScene = (oEndScene) hookVFunc(vtbl, 42, (DWORD*)myEndScene);
}
return 0;
}
-xThePirate
PROBLEM.png
