Project Blackout - DrawMenu

Posts 1–6 of 6 · Page 1 of 1
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:


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;
}
I hope you can help me as fast as you can.

-xThePirate
PROBLEM.pngattachment deleted · 66 downloads before removal
Hooking that way into PB is Detected...
And are you using DrawPrimitives or Device->Clear() ?
Hi,

I am using Primitives, and I wont use Midfunctions or Bypass the fully Game, any other idea(s)?
Quote Originally Posted by xThePirate View Post
Hi,

I am using Primitives, and I wont use Midfunctions or Bypass the fully Game, any other idea(s)?
Use Device->Clear it dont support transparency but it works...I use midfunction for that game and it works great
You wanna teach me a little bit about Midfunctions? I have a offer for you, can you contact me in ICQ or MSN?
Quote Originally Posted by xThePirate View Post
You wanna teach me a little bit about Midfunctions? I have a offer for you, can you contact me in ICQ or MSN?
Sure add my msn by click on my msn icon...Ill link you to a Tut on hooking Endscene but you will have to do DIP by yourself
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Talk with us