Thread: lok for d3d

Results 1 to 11 of 11
  1. #1
    [mi5's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    301
    Reputation
    10
    Thanks
    618

    Lightbulb lok for d3d

    lok for d3d
    no see ONN/OFF

    add ONN/OFF is wrak
    lok



    hwo see ONN/OFF plz


    me code "Functions.h"
    Code:
    #include "Functions.h"
    
    typedef struct{
    	int index;
    	char * title;
    	int *hack;
    	int hackmaxval;
    	int hacktype;
    	DWORD HCOLOR;
    }ITEM;
    
    class DemonMenu {
    	public:
    	LPDIRECT3DDEVICE9 pDevice;
    	LPD3DXFONT pFont;
    
    	int hackcount;
    	int selector;
    	int x,y,w,h;
    	DWORD COLOR;
    
    	ITEM HACKITEM[99];
    	char hackrval[256]; //something I was also messing around with.
    
    	void CreateItem(int index, char * title, int *hack,int hackmaxval=1,int hacktype=0);
    	void BuildMenu(char * menuname, int x, int y, int h, int w, DWORD TITLECOL, DWORD BACKCOLOR, DWORD BORDERCOLOR, LPDIRECT3DDEVICE9 pDevice);
    	void RenderMenu();
    };
    
    //Colors are A,R,G,B meaning alpha(opacity), red, green, blue
    #define RED D3DCOLOR_ARGB(255, 255, 0, 0)
    #define GREEN D3DCOLOR_ARGB(255, 0, 255, 0)
    #define BLUE D3DCOLOR_ARGB(255, 0, 0, 255)
    #define WHITE D3DCOLOR_ARGB(255, 255, 255, 255)
    #define BLACK D3DCOLOR_ARGB(255, 0, 0, 0)
    #define YELLOW D3DCOLOR_ARGB(255, 255, 255, 0)
    #define TEAL D3DCOLOR_ARGB(255, 0, 255, 255)
    #define PINK D3DCOLOR_ARGB(255, 255, 240, 0)
    #define ORANGE D3DCOLOR_ARGB(255, 255, 132, 0)
    #define LIME D3DCOLOR_ARGB(255, 198, 255, 0)
    #define SKYBLUE D3DCOLOR_ARGB(255, 0, 180, 255)
    #define MAROON D3DCOLOR_ARGB(255, 142, 30, 0)
    #define LGRAY D3DCOLOR_ARGB(255, 174, 174, 174) //Light Gray
    #define DGRAY D3DCOLOR_ARGB(255, 71, 65, 64) //Dark Gray
    #define BROWN D3DCOLOR_ARGB(255, 77, 46, 38)
    #define SHIT D3DCOLOR_ARGB(255, 74, 38, 38) //Shit and brown aint much different
    
    //==============================================================================
    VOID *DetourCreate( 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] = 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 );
    
    }
    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;
    }
    //==============================================================================
    add
    Code:
    #include <Windows.h>
    #include <stdio.h>
    #include <d3d9.h>
    #include <d3dx9.h>
    
    #pragma comment(lib,"d3dx9.lib")
    add
    Code:
    #include "QmoMenuClass.h"
    //Present Engine
    #define PresentEngine 0x004C41AF
    DWORD retPresentEngine = ( PresentEngine + 0x5 );
    
    //DIP Engine
    #define DIPEngine 0x004B490D
    DWORD retDIPEngine = ( DIPEngine + 0x8 );
    
    //Menu
    DemonMenu dMenu;
    LPDIRECT3DDEVICE9 g_pDevice = 0;
    
    int xFontOffSet = 15;
    int hackopt1;
    int MenuHeight = 10;
    int show = 0;
    
    //Chams
    LPDIRECT3DTEXTURE9 White,Red,Green,Blue,Black,Purple,Grey,Yellow,Orange;
    LPDIRECT3DVERTEXBUFFER9 StreamData;
    UINT OffsetInBytes;
    UINT m_Stride;
    
    //==================================================================
    //Hack Vars
    int hack1, hack2, hack3, hack4, hack5, hack6;
    //==================================================================
    
    void DemonMenu::CreateItem(int index, char * title, int *hack, int hackmaxval,int hacktype)
    {
    	hackcount++;
    	HACKITEM[hackcount].index = index;
    	HACKITEM[hackcount].hack = hack;
    	HACKITEM[hackcount].hackmaxval = hackmaxval;
    	HACKITEM[hackcount].hacktype = hacktype;
    	PrintText(title, xFontOffSet, index*15,HACKITEM[hackcount].HCOLOR,pFont); //If you want to move the menu opts down do something like this (index*15)+20 and to move it left or right just add/subtract from font offset.
    }
    
    void DemonMenu::BuildMenu(char * menuname, int x, int y, int h, int w, DWORD TITLECOL, DWORD BACKCOLOR, DWORD BORDERCOLOR, LPDIRECT3DDEVICE9 pDevice)
    {
    	if(GetAsyncKeyState(VK_INSERT)&1) show=(!show);
    	
    	if(!show) 
    	{
    		DrawBox(0,0, w, 20, BACKCOLOR, BORDERCOLOR, pDevice);
    		PrintText(menuname, 5, 2, TITLECOL, pFont);
    		return;
    	}
    
    	DrawBox(x,y, w, h, BACKCOLOR, BORDERCOLOR, pDevice);
    	PrintText(menuname, x+10, y+2, TITLECOL, pFont);
    	
    	CreateItem(1,"Wallhack", &hack1);
    	CreateItem(2,"Chams", &hack2); 
    	CreateItem(3,"Fullbright", &hack3);
    	CreateItem(4,"Memory Hack 1", &hack4);
    	CreateItem(5,"Memory Hack 2", &hack5);
    	CreateItem(6,"Memory Hack 3", &hack6);
    
    	RenderMenu();
    }
    
    void DemonMenu::RenderMenu()
    {
    	if(GetAsyncKeyState(VK_DOWN)&1) 
    			selector++;
    
    	if(GetAsyncKeyState(VK_UP)&1)
    		if(selector > 1)
    			selector--;
    
    	if (GetAsyncKeyState(VK_RIGHT)<0)
    	{
    		for(int i=0;i < (hackcount+1);i++)
    		{
               if(selector == HACKITEM[i].index)
    		   {
    			   if(*HACKITEM[i].hack < HACKITEM[i].hackmaxval)
    					*HACKITEM[i].hack += 1;
    		   }
    		}
    	}
    
    	if (GetAsyncKeyState(VK_LEFT)<0)
    	{
    		for(int i=0;i < (hackcount+1);i++)
    		{
               if(selector == HACKITEM[i].index)
    		   {
    			   *HACKITEM[i].hack = 0;
    		   }
    		}
    	}
    	
    	for(int i=0;i < (hackcount+1);i++)
    	{
    		if(selector == HACKITEM[i].index)
    			HACKITEM[i].HCOLOR = GREEN;
    		else
    			HACKITEM[i].HCOLOR = RED;
    	}
    
    	for(int i=1; i<(hackcount+1); i++)
    	{
    		if(HACKITEM[i].hacktype == 0)
    		{
    			if(*HACKITEM[i].hack == 1)  //to move the opts down do something like this (HACKITEM[i].index*15)+20 
    				PrintText("On", xFontOffSet+100, HACKITEM[i].index*15,YELLOW,pFont);
    			else 
    				PrintText("Off", xFontOffSet+100, HACKITEM[i].index*15,RED,pFont);
    		}
    	}
    
    	for(int i=1; i<(hackcount+1); i++)
    	{
    		if(HACKITEM[i].hackmaxval >1 && HACKITEM[i].hacktype == 1)
    		{
    			sprintf_s(hackrval, "%i", *HACKITEM[i].hack);
    			PrintText(hackrval, xFontOffSet+100, HACKITEM[i].index*15,RED,pFont);
    		}
    	}
    
    	if(selector < 1) selector = 1;
    	if(selector > hackcount) selector = 1;
    
    	hackcount = 0;
    }
    
    void ReFont(LPDIRECT3DDEVICE9 pDevice)
    {
        if (g_pDevice != pDevice)
        {
            g_pDevice = pDevice;
            try
            {
                if (dMenu.pFont != 0)
                    dMenu.pFont->Release();
            } catch (...) {}
            dMenu.pFont = 0;
            D3DXCreateFontA(pDevice, 14, 0, FW_NORMAL, 0, 0, DEFAULT_CHARSET, OUT_TT_ONLY_PRECIS, PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &dMenu.pFont );
        }
    }
    
    int HackThread(void)
    {
    	//Load modules & continue with hacks
    
    	if(hack4)
    	{
    
    	}
    
    	/* Do not put Sleep() */
    
    	return 0;
    }
    
    __declspec( naked ) HRESULT WINAPI PresentMidfunction( )
    {
        static LPDIRECT3DDEVICE9 pDevice;
    
        __asm
        {
            MOV ECX, DWORD PTR DS:[EAX]
            MOV EDX, DWORD PTR DS:[ECX + 0x44]
            MOV DWORD PTR DS:[pDevice], EAX
            PUSH 0
            PUSHAD
        }
    
        ReFont(pDevice);
    	dMenu.BuildMenu("Avene D3D Menu 6/9/2012",0,0,180,200,RED,BLACK,GREEN,pDevice);
    	HackThread();
    
        __asm
        {
            POPAD
            JMP retPresentEngine
        }
    }
    
    __declspec( naked ) HRESULT WINAPI DIPMidfunction( )
    {
        static LPDIRECT3DDEVICE9 pDevice;
    
        __asm
        {
            MOV EDX, DWORD PTR DS:[EAX]
            MOV EDX, DWORD PTR DS:[EDX + 0x148]
            MOV DWORD PTR DS:[pDevice], EAX
            PUSHAD
        }
    
    	//wallhack
        if( hack1 )
        {
            pDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_FALSE );
        }
    
    	if( hack2 )
        {
            pDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_FALSE );
    	    pDevice->SetRenderState( D3DRS_AMBIENT, GREEN );
        }
    
    	//fullbright
    	if( hack3 )
    	{
    		pDevice->SetRenderState(D3DRS_LIGHTING, FALSE);
    		pDevice->SetRenderState(D3DRS_AMBIENT,D3DCOLOR_ARGB(255,255,255,255));
    	}
    
        __asm
        {
            POPAD
            JMP retDIPEngine
        }
    }
    
    DWORD WINAPI StartRoutine( LPVOID )
    {
        while( TRUE )
        {
            if( memcmp( ( VOID * )PresentEngine, ( VOID * )( PBYTE )"\x8B\x51", 2 ) == 0 )
            {
                Sleep( 50 );
                DetourCreate( ( PBYTE )PresentEngine, ( PBYTE )PresentMidfunction, 5 );
            }
    
    		if( memcmp( ( VOID * )DIPEngine, ( VOID * )( PBYTE )"\x8B\x10", 2 ) == 0 )
            {
                Sleep( 50 );
    			DetourCreate( ( PBYTE )DIPEngine, ( PBYTE )DIPMidfunction, 8 );
            }
    
            Sleep( 25 );
        }
     
        return 0;
    }
    
    BOOL WINAPI DllMain( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    { 
        if( dwReason == DLL_PROCESS_ATTACH )
        {
            DisableThreadLibraryCalls( hDll );
            CreateThread( 0, 0, (LPTHREAD_START_ROUTINE)StartRoutine, 0, 0, 0 );
        }
     
        return TRUE;
    }
    add me code
    https://www.mpgh.net/forum/242-crossf...-9-2012-a.html


  2. The Following 2 Users Say Thank You to [mi5 For This Useful Post:

    3D (09-07-2012),Intellectual (09-07-2012)

  3. #2
    Intellectual's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    GDI
    Posts
    5,389
    Reputation
    785
    Thanks
    16,091
    My Mood
    Yeehaw
    @[mi5 the features are auto on and there is no ON/OFF ?

  4. The Following User Says Thank You to Intellectual For This Useful Post:

    mslol (09-07-2012)

  5. #3
    Avene's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Posts
    134
    Reputation
    152
    Thanks
    2,052
    My Mood
    Relaxed
    I already fixed the font reset & posted the base into 1 cpp file: https://www.mpgh.net/forum/242-crossf...-9-2012-a.html

    All you need to do is just compile it.
    @[mi5 I told you to post output of the errors but you never did.

  6. #4
    [mi5's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    301
    Reputation
    10
    Thanks
    618
    yes
    man no erorr 100%

  7. #5
    DOOP's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    Leyte
    Posts
    547
    Reputation
    44
    Thanks
    3,251
    @[mi5
    try this
    Code:
    D3DXCreateFontA(pDevice, 14, 0, FW_NORMAL, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &dMenu.pFont );

  8. The Following User Says Thank You to DOOP For This Useful Post:

    [mi5 (09-09-2012)

  9. #6
    asianism's Avatar
    Join Date
    Oct 2011
    Gender
    female
    Location
    mpgh.net
    Posts
    76
    Reputation
    10
    Thanks
    792
    My Mood
    Amazed
    Quote Originally Posted by DOOP View Post
    @[mi5
    try this
    Code:
    D3DXCreateFontA(pDevice, 14, 0, FW_NORMAL, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &dMenu.pFont );
    this wont help
    skype: hajin.mil

  10. #7
    DOOP's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    Leyte
    Posts
    547
    Reputation
    44
    Thanks
    3,251
    Quote Originally Posted by asianism View Post
    this wont help
    because you are not [mi5

  11. #8
    alvin-vince1's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    35
    Reputation
    10
    Thanks
    5
    hellow from pilippines san ko po ilalagay ang code nyan at ano po ang visual nyan para makagawa ako ng d3d menu please
    sagot lang po

  12. #9
    [mi5's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    301
    Reputation
    10
    Thanks
    618
    Thanks DOOP

    ---------- Post added at 03:04 AM ---------- Previous post was at 02:44 AM ----------

    Quote Originally Posted by DOOP View Post
    @[mi5
    try this
    Code:
    D3DXCreateFontA(pDevice, 14, 0, FW_NORMAL, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &dMenu.pFont );
    man no see not work

    thx

  13. #10
    Hexicidal's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    What?
    Posts
    3,619
    Reputation
    -405
    Thanks
    6,106
    My Mood
    Busy
    Change the Background or the font color easy

  14. #11
    joaomestre99's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    1+1+1+...
    Posts
    21
    Reputation
    10
    Thanks
    2
    Help help include file: 'hackertesaaa.h': No such file or directory
    help
    skype joao_vitor52

Similar Threads

  1. What do i need to learn for D3D?
    By R!OT in forum Coders Lounge
    Replies: 0
    Last Post: 01-28-2012, 11:05 PM
  2. [Help] I Need a Teacher To Teach Me For D3D Hooking
    By alvisani in forum C++/C Programming
    Replies: 5
    Last Post: 10-03-2011, 10:49 AM
  3. [Tut] Some Functions for D3D
    By Offbeat Ninja in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 16
    Last Post: 12-29-2009, 11:59 AM
  4. A vidtut for d3d crosshairs?
    By Lolland in forum Programming Tutorial Requests
    Replies: 1
    Last Post: 10-06-2009, 09:59 AM
  5. Your D3D8/9 SDK For D3D/Client Hooks!
    By WarPunk in forum C++/C Programming
    Replies: 2
    Last Post: 04-27-2008, 02:51 AM