Source Code TheProxy D3D Menu

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

TheProxy

Newbie
Dank Tier Donator
Full Member
Jul 18, 2013
13
1,328
0
Hi guys i made recently this d3d menu and now i want to share it with you guys


Features:
-Moving menu with mouse
-Enabling hacks with mouse
-Header (Title)/ Footer
-Enabling hacks with keyboard clicks (Key Up, Down. Left, Right)
-Hiding Menu (Key Insert)
-Tabs (Openning and Closing)
-Transparent Background



Credits:
Flash for helping me with some stuff
And the guy i forgot user on UC who posted Source of Stride Logger where i forked d3d Hook


Enjoj :D
 

Attachments

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,093
78,998
2,372
nice work, looks better than mine and nicer code!
 

LOOTPACK

Newbie
Full Member
Nov 9, 2015
16
92
0
I got this successfully compiled and it worked on cs:go as a test game I'd like to say thank you for your excellent work.
This is the kind of community people like to see *:D
 

LOOTPACK

Newbie
Full Member
Nov 9, 2015
16
92
0
Hello, So Before Attempting To Ask This Question I Would Like To Say Thanks To TheProxy For Providing This Fine Menu Base
& So That He Is Aware Of Me Pasting His Code On The Forum

So I have This Code From TheProxy


C++:
#include "Menu.h"

TpMenu menu;

/////////////////////////////////////////////////// Menu Functions  ///////////////////////////////////////////////////////////////////////



void TpMenu::StartHack()
{
	if (Col[2].hk[0].value == 1)
	{
		FillRGB(g_ViewPort.Width / 2 - 10, g_ViewPort.Height / 2, 20, 1, RED, g_pDevice);
		FillRGB(g_ViewPort.Width / 2, g_ViewPort.Height / 2 - 10, 1, 20, RED, g_pDevice);
	}
}


void TpMenu::AddColum(int id, char *name)
{
	Col[id].Name = name;
	colCount++;
}

void TpMenu::AddItem(int colum, int id, char *name, int type)
{
	Col[colum].hk[id].id = id;
	Col[colum].hk[id].Name = name;
	Col[colum].hk[id].type = type;
	switch (type)
	{
	case 0:
		Col[colum].hk[id].maxVal = 1;
		break;
	case 1:
		Col[colum].hk[id].maxVal = 99;
		break;
	case 2:
		Col[colum].hk[id].maxVal = 4;
		break;
	}
	Col[colum].hacks++;

}

void TpMenu::BuildMenu(char *name, int x, int y, int w)
{
	cPos = GetMousePos(GetActiveWindow());
	if (isMenuOn)
	{

		FillARGB(x, y, w, FontSize + 5, BLACKTransparent);              // Drawing Header Box
		DrawBorder(x, y, w, FontSize + 5, 1, GREEN, g_pDevice);       //

		PrintText(name, x + (w - GetTextWidth(name, g_pFont)) / 2, y + 2, RED, g_pFont); //Drawing Menu Name

		FillARGB(x + 3, y + FontSize + 5, MenuW - 6, MenuH - (FontSize + 5), BLACKTransparent);     // Drawing Items Box
		DrawBorder(x + 3, y + FontSize + 5, MenuW - 6, MenuH - (FontSize + 5), 1, GREEN, g_pDevice);//


		MenuH = FontSize + 10;


		for (int i = 0; i < colCount; i++)      ////Drawing Items
		{
			char hName[15];
			sprintf(hName, "[%s]", Col[i].Name);
			Col[i].isMouseOver = isMouseinRegion(x + 5, y + MenuH, x + 5 + w - 10, y + MenuH + FontSize + 10);
			if (Col[i].isMouseOver){
				itemSelector = -1;
				selector = i;
			}
			DrawBorder(x + 5, y + MenuH, w - 10, FontSize + 10, 1, (selector == i &&itemSelector == -1) ? GREEN : RED, g_pDevice);
			PrintText(hName, x + (w - 10 - GetTextWidth(hName, g_pFont)) / 2, y + MenuH + 5, Col[i].on ? GREEN : RED, g_pFont);
			Col[i].y = y + MenuH;
			MenuH += FontSize + 13;
			if (Col[i].on)
			for (int a = 0; a < Col[i].hacks; a++)
			{
				Col[i].hk[a].isMouseOver = isMouseinRegion(x + 5, y + MenuH, x + 5 + w - 10, y + MenuH + FontSize);
				if (Col[i].hk[a].isMouseOver){
					itemSelector = a;
					selector = i;
				}
				PrintText(Col[i].hk[a].Name, x + 10, y + MenuH, selector == i && itemSelector == a ? GREEN : RED, g_pFont);
				PrintText(Col[i].hk[a].value == 0 ? "Off" : "On", x + w - 35, y + MenuH, Col[i].hk[a].value == 0 ? RED : GREEN, g_pFont);
				MenuH += FontSize + 3;

			}

		}
		FillRGB(x + 3, y + MenuH + 3, w - 6, 3, GREEN, g_pDevice);
		PrintText("Proxy's MenuMenu", x + (w - GetTextWidth("Proxy's Menu", g_pFont)) / 2, y + MenuH + 6, RED, g_pFont); //Name OF Menu Bottom
		MenuH += FontSize + 8;
	}
}

//--------------End of drawing



void TpMenu::KeyboardEvents()
{
	if (GetAsyncKeyState(VK_INSERT) & 1)
		isMenuOn = !isMenuOn;
	if (GetAsyncKeyState(VK_LBUTTON) & 0x8000)
	{
		if (!isMenuMoving && !isMouseOnButton)
		if (isMenuOn)
		{
			if (isMouseinRegion(MenuX, MenuY, MenuX + MenuW, MenuY + 30))
			{
            xDifference = cPos.x - MenuX;
			yDifference = cPos.y - MenuY;
			isMenuMoving = true;
			}

			for (int i = 0; i < colCount; i++)
			{
				if (Col[i].isMouseOver)
					Col[i].on = !Col[i].on;
				for (int a = 0; a < Col[i].hacks; a++)
				if (Col[i].on&& Col[i].hk[a].isMouseOver)
					Col[i].hk[a].value = Col[i].hk[a].value ==0 ? 1:0;
			}
			isMouseOnButton = true;
		}

		if (isMenuMoving)
		{
			MenuX = cPos.x - xDifference;
			MenuY = cPos.y - yDifference;

			if (MenuX < 0)
				MenuX = 0;
			if (MenuY < 0)
				MenuY = 0;
			if (MenuX + MenuW> g_ViewPort.Width)
				MenuX = g_ViewPort.Width - MenuW;
			if (MenuY + MenuH> g_ViewPort.Height)
				MenuY = g_ViewPort.Height - MenuH;

		}

	}
	else
	{
		isMouseOnButton = false;
		isMenuMoving = false;
	}

	
	if (GetAsyncKeyState(VK_UP) & 1)
	{
		if (selector > 0 && !Col[selector].on)
		{
			selector--;
			if (Col[selector].on)
			{
				itemSelector = Col[selector].hacks - 1;
				return;
			}
		}

		if (Col[selector].on && itemSelector >-1)  itemSelector--;
		else
		{
			if (selector > 0)
			{

				if (Col[selector].on)
				{
					selector--;
					if (Col[selector].on)
						itemSelector = Col[selector].hacks - 1;
				}
				else			
					itemSelector = -1;
				
			}
		}
	}
	if (GetAsyncKeyState(VK_DOWN) & 1)
	{
		if (selector < colCount - 1 && !Col[selector].on)
		{
			selector++;
			if (Col[selector].on)
				itemSelector = -1;
			return;
		}

		if (Col[selector].on && itemSelector < Col[selector].hacks - 1) itemSelector++;
		else
		{
			if (selector < colCount - 1)
			{
				if (Col[selector].on)
				selector++;
				itemSelector = -1;
			}
		}
	}
	if (GetAsyncKeyState(VK_RIGHT) & 1)
	{
		if (itemSelector == -1)
			Col[selector].on = true;
		if (Col[selector].on &&  Col[selector].hk[itemSelector].value < Col[selector].hk[itemSelector].maxVal)
			Col[selector].hk[itemSelector].value++;
		
	}
	if (GetAsyncKeyState(VK_LEFT) & 1)
	{
		if (itemSelector == -1)
			Col[selector].on = false;

		if (Col[selector].on &&  Col[selector].hk[itemSelector].value > 0)
			Col[selector].hk[itemSelector].value--;
	}
	

}

////////////////////////////////////////////////////  D3D Functions  /////////////////////////////////////////////////////////////////////////

HRESULT WINAPI hkEndScene(LPDIRECT3DDEVICE9 pDevice)
{
	if (g_pDevice == NULL) g_pDevice = pDevice;


	if (g_pTexRed == NULL)		D3DXCreateTextureFromFileInMemory(pDevice, (LPCVOID)&bRed, sizeof(bRed), &g_pTexRed);
	if (g_pTexBlue == NULL)	D3DXCreateTextureFromFileInMemory(pDevice, (LPCVOID)&bBlue, sizeof(bBlue), &g_pTexBlue);
	if (g_pTexGreen == NULL)	D3DXCreateTextureFromFileInMemory(pDevice, (LPCVOID)&bGreen, sizeof(bGreen), &g_pTexGreen);


	if (g_pFont == NULL) D3DXCreateFont(pDevice, FontSize, 0, FW_BOLD, 1, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Lao UI", &g_pFont);
	if (g_pLine == NULL) D3DXCreateLine(pDevice, &g_pLine);

	pDevice->GetViewport(&g_ViewPort);

	

	if (g_pFont != NULL && g_pLine != NULL){ // Menu Options/Buttons
		if (isFirstRun)
		{
			menu.AddColum(0, "WallHack");
			menu.AddColum(1, "Aimbot");
			menu.AddColum(2, "CrossHair");

			menu.AddItem(0, 0, "Chams", 0);
			menu.AddItem(0, 1, "Boxes", 0);
			menu.AddItem(0, 2, "Names", 0);

			menu.AddItem(1, 0, "Enabled", 0);
			menu.AddItem(1, 1, "Aim Head Only", 0);

			menu.AddItem(2, 0, "Enabled", 0);


			isFirstRun = false;
		}
		menu.BuildMenu("Proxy's Menu V1", MenuX, MenuY, MenuW);
		menu.KeyboardEvents();
		menu.StartHack();
	
	}

	//----------End Of It


	return oEndScene(pDevice);
}



HRESULT WINAPI hkDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE PrimType, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT PrimitiveCount)
{
	__asm nop

	HRESULT hRet = oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, PrimitiveCount);

	


	return hRet;
}

HRESULT WINAPI hkSetStreamSource(LPDIRECT3DDEVICE9 pDevice, UINT StreamNumber, IDirect3DVertexBuffer9* pStreamData, UINT OffsetInBytes, UINT Stride)
{
	__asm nop

	if (StreamNumber == 0){
		uiStride = Stride;
	}

	return oSetStreamSource(pDevice, StreamNumber, pStreamData, OffsetInBytes, Stride);
}

LRESULT CALLBACK MsgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam){ return DefWindowProc(hwnd, uMsg, wParam, lParam); }

void DX_Init(DWORD* table)
{
	WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, MsgProc, 0L, 0L, GetModuleHandle(NULL), NULL, NULL, NULL, NULL, "DX", NULL };
	RegisterClassEx(&wc);
	HWND hWnd = CreateWindow("DX", NULL, WS_OVERLAPPEDWINDOW, 100, 100, 300, 300, GetDesktopWindow(), NULL, wc.hInstance, NULL);
	LPDIRECT3D9 pD3D = Direct3DCreate9(D3D_SDK_VERSION);
	D3DPRESENT_PARAMETERS d3dpp;
	ZeroMemory(&d3dpp, sizeof(d3dpp));
	d3dpp.Windowed = TRUE;
	d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
	d3dpp.BackBufferFormat = D3DFMT_UNKNOWN;
	LPDIRECT3DDEVICE9 pd3dDevice;
	pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &pd3dDevice);
	DWORD* pVTable = (DWORD*)pd3dDevice;
	pVTable = (DWORD*)pVTable[0];

	table[ES] = pVTable[42];
	table[DIP] = pVTable[82];
	table[SSS] = pVTable[100];

	DestroyWindow(hWnd);
}
//////////////////////////////////////////////////////// WinApi Functions  ///////////////////////////////////////////////////////////////////////


DWORD WINAPI MyThread(LPVOID)
{
	DWORD VTable[3] = { 0 };

	while (GetModuleHandle("d3d9.dll") == NULL){
		Sleep(250);
	}

	DX_Init(VTable);

	HOOK(EndScene, VTable[ES]);
	HOOK(DrawIndexedPrimitive, VTable[DIP]);
	HOOK(SetStreamSource, VTable[SSS]);

	return 0;
}

BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved)
{
	if (dwReason == DLL_PROCESS_ATTACH){
		CreateThread(0, 0, MyThread, 0, 0, 0);
	}

	return TRUE;
}


Now I'm Just Going To Work On One Thing At A Time
I couldn't put in the Menu.H because it was to much.
I have all of my offsets & I have a script that I want to try so I'm not leaving these questions out in the ocean.
esp



C++:
// FindPattern & DataCompare by dom1n1k
BOOL DataCompare( BYTE* pData, BYTE* bMask, char * szMask )
{
    for( ; *szMask; ++szMask, ++pData, ++bMask )
        if( *szMask == 'x' && *pData != *bMask )
            return FALSE;

    return ( *szMask == NULL );
}

DWORD FindPattern( DWORD dwAddress, DWORD dwLen, BYTE *bMask, char * szMask )
{
    for( DWORD i = 0; i < dwLen; i++ )
        if( DataCompare( (BYTE*)( dwAddress + i ), bMask, szMask ) )
            return (DWORD)( dwAddress + i );

    return 0;
}

DWORD MainThread( LPVOID lpArgs )
{
    HMODULE hClient = GetModuleHandleA( "client.dll" );
    while(hClient == NULL) { hClient = GetModuleHandleA( "client.dll" ); }
    
    DWORD dwDrawOnRadar = FindPattern((DWORD)hClient, 0x005E5000, (BYTE*)"\xA1\x00\x00\x00\x00\x85\xC0\x74\x06\x05", "x????xxxxx") + 1;
    dwDrawOnRadar = *(DWORD*)dwDrawOnRadar;
    
    while(1)
    {
        // Loop through all indexes in the array
        for(int i = 0;i < 0x4F;i++) // at 0x50 seems to be start of clan name
        {
            // Short explanation, in the code we reversed,
            // ESI is dwDrawOnRadar (pointer)
            // EDI is i (player index)
            BYTE* pDrawOnRadar = (BYTE*)((*(DWORD*)dwDrawOnRadar) + 0xD1D + i);
            
            // 1 = draw on radar
            *pDrawOnRadar = 1;
        }

    }

    return 0;
}

BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved)
{
    if(dwReason == DLL_PROCESS_ATTACH)
    {
        DWORD dwThreadID = 0;
        HANDLE hThread = CreateThread( NULL, NULL, (LPTHREAD_START_ROUTINE)MainThread, NULL, NULL, &dwThreadID );
    }
    
    return TRUE;
}
Where would I Input This Esp?
If it needs to be added into MENU.H I will paste that one instead through an edit replacement.
If you would like to reedit the code to add in the code for it that would be an extra bonus, more of a visual learner but ether would suffice
Thanks will be given to helpful answers and appropriate Suggestions. Thank you fellas.
 
Last edited:

3sachhacker

Newbie
Full Member
Dec 19, 2012
9
234
0
I got build error please help !
1>------ Build started: Project: Proxy D3D Menu, Configuration: Release Win32 ------
1> main.cpp
1>c:\users\Zues\documents\visual studio 2010\projects\proxy d3d menu\proxy d3d menu\main.h(76): error C2864: 'HACK::isMouseOver' : only static const integral data members can be initialized within a class
1>c:\users\Zues\documents\visual studio 2010\projects\proxy d3d menu\proxy d3d menu\main.h(77): error C2864: 'HACK::value' : only static const integral data members can be initialized within a class
1>c:\users\Zues\documents\visual studio 2010\projects\proxy d3d menu\proxy d3d menu\main.h(80): error C2864: 'HACK::maxVal' : only static const integral data members can be initialized within a class
1>c:\users\Zues\documents\visual studio 2010\projects\proxy d3d menu\proxy d3d menu\main.h(85): error C2864: 'Colum::y' : only static const integral data members can be initialized within a class
1>c:\users\Zues\documents\visual studio 2010\projects\proxy d3d menu\proxy d3d menu\main.h(86): error C2864: 'Colum::isMouseOver' : only static const integral data members can be initialized within a class
1>c:\users\Zues\documents\visual studio 2010\projects\proxy d3d menu\proxy d3d menu\main.h(87): error C2864: 'Colum::eek:n' : only static const integral data members can be initialized within a class
1>c:\users\Zues\documents\visual studio 2010\projects\proxy d3d menu\proxy d3d menu\main.h(88): error C2864: 'Colum::hacks' : only static const integral data members can be initialized within a class
1>c:\users\Zues\documents\visual studio 2010\projects\proxy d3d menu\proxy d3d menu\main.h(98): error C2864: 'TpMenu::colCount' : only static const integral data members can be initialized within a class
1>c:\users\Zues\documents\visual studio 2010\projects\proxy d3d menu\proxy d3d menu\main.h(99): error C2864: 'TpMenu::selector' : only static const integral data members can be initialized within a class
1>c:\users\Zues\documents\visual studio 2010\projects\proxy d3d menu\proxy d3d menu\main.h(193): warning C4244: 'argument' : conversion from 'int' to 'FLOAT', possible loss of data
1>c:\users\Zues\documents\visual studio 2010\projects\proxy d3d menu\proxy d3d menu\main.h(193): warning C4244: 'argument' : conversion from 'int' to 'FLOAT', possible loss of data
1>c:\users\Zues\documents\visual studio 2010\projects\proxy d3d menu\proxy d3d menu\main.h(194): warning C4244: 'argument' : conversion from 'int' to 'FLOAT', possible loss of data
1>c:\users\Zues\documents\visual studio 2010\projects\proxy d3d menu\proxy d3d menu\main.h(194): warning C4244: 'argument' : conversion from 'int' to 'FLOAT', possible loss of data
1>c:\users\Zues\documents\visual studio 2010\projects\proxy d3d menu\proxy d3d menu\main.h(197): warning C4244: 'argument' : conversion from 'int' to 'FLOAT', possible loss of data
1>main.cpp(136): warning C4018: '>' : signed/unsigned mismatch
1>main.cpp(138): warning C4018: '>' : signed/unsigned mismatch
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,093
78,998
2,372
3sachhacker
I don't think you can initialize class member variables in visual studio 2010 as was done in this source code
 

LOOTPACK

Newbie
Full Member
Nov 9, 2015
16
92
0
Rake could I post my compiled version?
I got it compiled earlier like a 12 days ago
thanks bro
might help him a little
 

GAFO666

Hacker
Meme Tier VIP
Aug 19, 2012
520
3,188
23
well i like the structuring of you , but i prefer my version, since each element is an object, even the background, so i can give e.g. a button its parent which would be the form and the form holds the renderer&fontmanager&timemanager
but tbh I DONT KNOW WHERE I SHOULD PUT THE TITLE xD my title looks so bs there q.q maybe i should make it possible to use an image as title hm


 

toomuch

Newbie
Full Member
Jul 14, 2015
18
388
0
well i like the structuring of you , but i prefer my version, since each element is an object, even the background, so i can give e.g. a button its parent which would be the form and the form holds the renderer&fontmanager&timemanager
but tbh I DONT KNOW WHERE I SHOULD PUT THE TITLE xD my title looks so bs there q.q maybe i should make it possible to use an image as title hm


HMU for graphixs i make them for you in mah friend
 

GAFO666

Hacker
Meme Tier VIP
Aug 19, 2012
520
3,188
23


well its getting better if i change the fonts and the background xD
but if you want design something, i could need buttons (normal state and mouse-over state) and something for the dropdown-list :D
Im also working on making usage of images within checkboxes and radio-boxes :) or cool designed trackbars which contain 2 images for the bar itself and the little square which you hold to regulate the value ;)
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,093
78,998
2,372


well its getting better if i change the fonts and the background xD
but if you want design something, i could need buttons (normal state and mouse-over state) and something for the dropdown-list :D
Im also working on making usage of images within checkboxes and radio-boxes :) or cool designed trackbars which contain 2 images for the bar itself and the little square which you hold to regulate the value ;)
I suggest BonerBot as the name of your hack :p
 

GAFO666

Hacker
Meme Tier VIP
Aug 19, 2012
520
3,188
23
Rake;39436 said:
I suggest BonerBot as the name of your hack :p
hahaha xD hard to find peeps which are able to work propper with photoshop etc <.<
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods