Results 1 to 6 of 6
  1. #1
    Coder.DiasII's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Location
    In My World
    Posts
    1,515
    Reputation
    156
    Thanks
    6,462

    Aimbot, Hook d3d9 [PBBR]

    Aimbot :

    Code:
    bool DeltaEnable;
    float MouseDeltaX = 0.0000f, MouseDeltaY = 0.0000f, MouseDeltaZ = 0.0000f;
     
    _declspec (naked) void DeltaX()
    {
            if (DeltaEnable)
            {
                    __asm
                    { 
                            fld dword ptr[MouseDeltaX]
                                    retn
                    }
            }
            else
            __asm
            {
                    fld dword ptr[ecx + 0x14]
                            retn
            }
    }
     
    _declspec (naked) void DeltaY()
    {
            if (DeltaEnable)
            {
                    __asm
                    {
                            fld dword ptr[MouseDeltaY]
                                    retn
                    }
            }
            else
            __asm
            {
                    fld dword ptr[ecx + 0x18]
                            retn
            }
    }
     
     int HookDelta = 0;
    void InitDelta()
    {
            DWORD InputMouse = (DWORD)GetModuleHandleA("i3InputDx.dll");
            int LocalX, LocalY, SetScreenCenterX, SetScreenCenterY, Priority, AimKey, BoneIndex = -1;
            D3DXVECTOR3 OnWorld, OnScreen;
            D3DVIEWPORT9 pViewer;
            pDevice->GetViewport(&pViewer);
     
            SetScreenCenterX = (pViewer.Width / 2.0f);
            SetScreenCenterY = (pViewer.Height / 2.0f);
     
            DWORD Player        = *(DWORD*)g_pPlayer;
                    if((Player != 0x000000))
                            {
                                    if(HookDelta == 0)
                                            {
                                                    HookDelta = 1;
                                                    CreateDetour((DWORD)DeltaX,(DWORD)InputMouse + 0xA0AF0,Detour_Type_0xE9, 5); //A0AF0
                                                    CreateDetour((DWORD)DeltaY,(DWORD)InputMouse + 0xA0B00,Detour_Type_0xE9, 5);
                                            }
            Priority = GetNearestToCrosshair();
            DeltaEnable = false;
     
                    if(Priority > -1)
                    {      
                            if (cPlayer->GetBone2(Priority,7))
                                    {
                                            if (GetAsyncKeyState(VK_SHIFT))
                                                    DeltaEnable = true;
                                            else
                                                    DeltaEnable = false;
                                            if (WorldToDelta(OnWorld, OnScreen))
                                                    {
                                                            LocalX = OnScreen.x;
                                                            LocalY = OnScreen.y;
                                            if (LocalX != SetScreenCenterX && LocalY != SetScreenCenterY)
                                            {
                                                    MouseDeltaX = LocalX - SetScreenCenterX;
                                                    MouseDeltaY = LocalY - SetScreenCenterY;
                                            }
                                            else
                                            {
                                                    MouseDeltaX = 0.00f;
                                                    MouseDeltaY = 0.00f;
                                            }
     
                                    }
                            }
                    }      
                   
            }
     
    }

    Hook D3D9

    Code:
    bool DeviceReset = true;
    
    #define pD3DdeviceX             LPDIRECT3DDEVICE9
    
    DWORD GetDevice__EndScene;
    DWORD Return_EndScene;
    DWORD retMyDIP;
    HMODULE Module_d3d9;
    LPDIRECT3DDEVICE9 ReadyDevice;
    pD3DdeviceX g_pDevice = 0;
    
    void PostReset(LPDIRECT3DDEVICE9 pDevice)
    {
    	D3DXCreateFontA(pDevice, 14, 0, FW_BOLD, 0, 0, DEFAULT_CHARSET, OUT_TT_ONLY_PRECIS, PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &pFont);
    	D3DXCreateLine(pDevice, &pLine);
    }
    
    void PreReset(pD3DdeviceX pDevice)
    {
    	if (pFont)
    	{
    		pFont = NULL;
    	}
    	if (g_pDevice != pDevice)
    	{
    		g_pDevice = pDevice;
    	}
    	if (pFont)
    	{
    		pFont->Release();
    		pFont = NULL;
    		pFont = FALSE;
    	}
    	pFont = NULL;
    }
    
    void PresetDevice()
    {
    	PreReset(pDevice);
    	DeviceReset = true;
    	ReadyDevice = pDevice;
    }
    
    bool bCreateFont = true;
    
    void FontReset()
    {
    	pFont->OnLostDevice();
    	pFont->OnResetDevice();
    	pLine->OnLostDevice();
    	pLine->OnResetDevice();
    }
    void Render()
    {
    	pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    	if (DeviceReset == true)
    	{
    		if (pDevice != ReadyDevice)
    		{
    			DeviceReset = false;
    			PresetDevice();
    		}
    	}
    	if (DeviceReset == true)
    	{
    		if (pFont == NULL)
    		{
    			PostReset(pDevice);
    			ReadyDevice = pDevice;
    		}
    		else
    		{
    			//Loop
    			FontReset();
    
    		}
    	}
    }
    
    __declspec(naked) void MidFunction_EndScene()
    {
    	__asm
    	{
    		mov edi, edi
    			push ebp
    			mov ebp, esp
    			mov pDevice, esi
    			pushad
    			call[Render]
    			popad
    			jmp[Return_EndScene]
    	}
    }
    
    BYTE HOOK_PAT_8[] = { "\x8B\xFF\x55\x8B\xEC\xFF\x75\x08\x8B\x01\x6A\x3E\xFF\x90\xF4\x00" };
    CHAR HOOK_MAS_8[] = { "xxxxxxxxxxxxxxx?" };
    
    BYTE HOOK_PAT_7[] = { "\x8B\xFF\x55\x8B\xEC\x8B\x55\x08\x8B\x01\x8B\x80\xF4\x00\x00\x00\x52\x6A\x3E\xFF\xD0\x5D\xC2\x04\x00" };
    CHAR HOOK_MAS_7[] = { "xxxxxxxxxxxxxxxxxxxxxxxxx" };
    
    bool CheckWindowsVersion(DWORD dwMajorVersion, DWORD dwMinorVersion, DWORD dwProductType)
    {
    	OSVERSIONINFOEX VersionInfo;
    	ZeroMemory(&VersionInfo, sizeof(OSVERSIONINFOEX));
    	VersionInfo.dwOSVersionInfoSize = sizeof(VersionInfo);
    	GetVersionEx((OSVERSIONINFO*) &VersionInfo);
    	if (VersionInfo.dwMajorVersion == dwMajorVersion)
    	{
    		if (VersionInfo.dwMinorVersion == dwMinorVersion)
    		{
    			if (VersionInfo.wProductType == dwProductType)
    			{
    				return (TRUE);
    			}
    		}
    	}
    	return (FALSE);
    }
    
    
    
    void DxHook()
    {
    	Module_d3d9 = LoadLibraryA(STR_HOOK_D3D9);
    	DWORD *vtbl;
    	DWORD adr;
    	if (CheckWindowsVersion(6, 2, VER_NT_WORKSTATION)) // Windows 8 / 8.1
    	{
    		GetDevice__EndScene = FindPattern((DWORD) Module_d3d9, 0xFFFFFF, (PBYTE) HOOK_PAT_8, (PCHAR) HOOK_MAS_8);
    		adr = FindPattern((DWORD) Module_d3d9, 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86", "xx????xx????xx");
    	}
    	else if (CheckWindowsVersion(6, 0, VER_NT_WORKSTATION) || CheckWindowsVersion(6, 1, VER_NT_WORKSTATION)) // Windows 7 / Vista
    	{
    		GetDevice__EndScene = FindPattern((DWORD) Module_d3d9, 0xFFFFFF, (PBYTE) HOOK_PAT_7, (PCHAR) HOOK_MAS_7);
    		adr = FindPattern((DWORD) Module_d3d9, 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86", "xx????xx????xx");
    	}
    
    	memcpy(&vtbl, (void*) (adr + 2), 4);
    
    	Return_EndScene = GetDevice__EndScene + 0x5;
    	retMyDIP = vtbl[147] + 0x5;
    
    	CreateDetour((DWORD) MidFunction_EndScene, (DWORD) GetDevice__EndScene, Detour_Type_0xE9, 5);
    
    }
    Créditos

    Mcclane <- o Cara Das PPK :3
    BinLaden
    AceStryker

    • Registered - February 03, 2012
    • Contributor since August 05, 2014



    CombatArms Brasil


    PointBlank Brasil


  2. The Following 3 Users Say Thank You to Coder.DiasII For This Useful Post:

    crcrcrcr551 (06-01-2015),mamo007 (04-19-2015),[MPGH]Mayion (04-18-2015)

  3. #2
    ferlanzk13's Avatar
    Join Date
    Apr 2015
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    0
    My Mood
    Aggressive
    Sir Can u give me your D3D Full Source Code ...

    I want to make Hacks with D3D ..

  4. #3
    Coder.DiasII's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Location
    In My World
    Posts
    1,515
    Reputation
    156
    Thanks
    6,462
    Quote Originally Posted by ferlanzk13 View Post
    Sir Can u give me your D3D Full Source Code ...

    I want to make Hacks with D3D ..
    you can find source of several menus in the area of ​​combat arms
    • Registered - February 03, 2012
    • Contributor since August 05, 2014



    CombatArms Brasil


    PointBlank Brasil


  5. #4
    ferlanzk13's Avatar
    Join Date
    Apr 2015
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    0
    My Mood
    Aggressive
    Sir I think their Their D3D Sources is For Windows XP and 7 .. But I'm Using windows 8 ..

    pLease I want your D3D Menu SOurce COde ..

  6. #5
    zedriclubos's Avatar
    Join Date
    Apr 2015
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    My Mood
    Amazed

    Aimbot, Hook d3d9 [PBBR]

    Quote Originally Posted by Coder.DiasII View Post
    you can find source of several menus in the area of ​​combat arms
    sir where do i find the Table contents so that i can copy and paste this hack!!!

  7. #6
    Hacker Fail's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    C++
    Posts
    2,136
    Reputation
    242
    Thanks
    12,562
    One more game to delete from the list
    Member Level 1 since November, 2011
    Contributor since March, 2015
    Game Hacking Team : 06/14/2017

     

Similar Threads

  1. [Source Code] Simple Hook D3D9
    By Hacker Fail in forum Combat Arms BR Hack Coding/Source Code
    Replies: 18
    Last Post: 03-12-2015, 07:09 PM
  2. [Source Code] Easy VTable Hook (D3D9)
    By Superspinne in forum C++/C Programming
    Replies: 5
    Last Post: 11-23-2014, 06:57 AM
  3. [Help Request] How To make hook d3d9
    By Astr3Lune in forum Crossfire Coding Help & Discussion
    Replies: 0
    Last Post: 08-24-2013, 10:36 PM
  4. [Help Request] Help please Hook D3D9 is Detect
    By Astr3Lune in forum Crossfire Coding Help & Discussion
    Replies: 2
    Last Post: 08-22-2013, 12:57 AM
  5. C.O.D Modern Warfare Reflex Wii Multiplayer Aimbot Hook?
    By Chairman Mao in forum Nintendo Game Hacking
    Replies: 5
    Last Post: 11-05-2010, 10:58 PM