Thread: Hook DIP Engine

Page 1 of 5 123 ... LastLast
Results 1 to 15 of 63
  1. #1
    PikaMucha_Itu's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Itu City
    Posts
    2,391
    Reputation
    59
    Thanks
    4,105
    My Mood
    Goofy

    Hook DIP Engine

    Hook DIP Engine

    Pra quem não tem , está ai !

    Code:
    #include <windows.h>
    #include <d3d9.h>
    #include <d3dx9.h>
     
    #pragma comment(lib, "d3d9.lib")
    #pragma comment(lib, "d3dx9.lib")
    
    // NUMPAD1 => Types of chams. 
    // NUMPAD2 => Types of colors for front and back.
    // LEFT and Right => Change colors.
     
    // Change here the version of your Combat Arms => CABR or CAEU or CANA or CAKR
    #define CABR
     
    // Actual Address: 06/03/2012
     
    #ifdef CABR
    // Combat Arms Brazil
    #define GameStatus      0x377F0DDC
    #define DIPEngine       0x006A086A
    #endif
     
    #ifdef CAEU
    // Combat Arms Europe
    #define GameStatus      0x37806FC4
    #define DIPEngine       0x006A3E0A
    #endif
     
    #ifdef CANA
    // Combat Arms North American
    #define GameStatus      0x37806FC4
    #define DIPEngine       0x006A3E1A
    #endif
     
    #ifdef CAKR
    // Combat Arms Korean
    #define GameStatus      0x3774C6F0
    #define DIPEngine       0x006A358A
    #endif
     
    DWORD retDIPEngine = (DIPEngine + 0x8);
     
    INT chams;
    INT color[2];
    INT indexcolor;
     
    #define Red     D3DCOLOR_ARGB( 255, 255, 000, 000 )
    #define Green   D3DCOLOR_ARGB( 255, 000, 255, 000 )
    #define Blue    D3DCOLOR_ARGB( 255, 000, 000, 255 )
    #define Black   D3DCOLOR_ARGB( 255, 000, 000, 000 )
     
    VOID SetLightChams(LPDIRECT3DDEVICE9 pDevice, FLOAT A, FLOAT R, FLOAT G, FLOAT B)
    {
        D3DMATERIAL9 pMaterial;
        ZeroMemory(&pMaterial, sizeof(D3DMATERIAL9));
        pDevice->SetRenderState(D3DRS_LIGHTING, TRUE);
        //Ambient
        pMaterial.Ambient.a = (A/255);
        pMaterial.Ambient.r = (R/255);
        pMaterial.Ambient.g = (G/255);
        pMaterial.Ambient.b = (B/255);
        //Diffuse
        pMaterial.Diffuse.a = (A/255);
        pMaterial.Diffuse.r = (R/255);
        pMaterial.Diffuse.g = (G/255);
        pMaterial.Diffuse.b = (B/255);
        //Specular
        pMaterial.Specular.a = (A/255);
        pMaterial.Specular.r = (R/255);
        pMaterial.Specular.g = (G/255);
        pMaterial.Specular.b = (B/255);
        pDevice->SetMaterial(&pMaterial);
    }
     
    __declspec( naked ) HRESULT WINAPI DIPMidfunction( )
    {
        static LPDIRECT3DDEVICE9 pDevice;
        static INT BaseVertexIndex;
        static UINT MinVertexIndex, NumVertices, startIndex, primCount;
     
        __asm
        {
            MOV ECX, DWORD PTR DS:[EAX]
            MOV EDX, DWORD PTR DS:[ECX + 0x148]
            MOV DWORD PTR DS:[pDevice], EAX;
            MOV ECX, DWORD PTR DS:[EBP + 0x18]
            MOV DWORD PTR DS:[BaseVertexIndex], ECX
            MOV ECX, DWORD PTR DS:[EBP + 0x8]
            MOV DWORD PTR DS:[MinVertexIndex], ECX
            MOV ECX, DWORD PTR DS:[EBP + 0x10]
            MOV DWORD PTR DS:[NumVertices], ECX
            MOV ECX, DWORD PTR DS:[EBP + 0xC]
            MOV DWORD PTR DS:[startIndex], ECX
            MOV ECX, DWORD PTR DS:[EBP + 0x14]
            MOV DWORD PTR DS:[primCount], ECX
            PUSHAD
        }
     
        if( chams ) {
     
            pDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_FALSE );
     
            if( chams == 1 ) {
                if( color[0] == 1 ) SetLightChams( pDevice, 255, 255, 000, 000 );
                if( color[0] == 2 ) SetLightChams( pDevice, 255, 000, 255, 000 );
                if( color[0] == 3 ) SetLightChams( pDevice, 255, 000, 000, 255 );
                if( color[0] == 4 ) SetLightChams( pDevice, 255, 000, 000, 000 );
            }
            if( chams == 2 ) {
                pDevice->SetRenderState( D3DRS_LIGHTING, D3DZB_TRUE );
                pDevice->SetRenderState( D3DRS_SHADEMODE, D3DSHADE_FLAT );
                pDevice->SetRenderState( D3DRS_FOGENABLE, D3DZB_FALSE );
                if( color[0] == 1 ) pDevice->SetRenderState( D3DRS_AMBIENT, Red   );
                if( color[0] == 2 ) pDevice->SetRenderState( D3DRS_AMBIENT, Green );
                if( color[0] == 3 ) pDevice->SetRenderState( D3DRS_AMBIENT, Blue  );
                if( color[0] == 4 ) pDevice->SetRenderState( D3DRS_AMBIENT, Black );
            }
            if( chams > 2 ) {
                pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, D3DZB_TRUE );
                pDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVDESTCOLOR );
                if( chams == 3 ) pDevice->SetRenderState( D3DRS_SRCBLEND, D3DBLEND_INVSRCCOLOR );
                if( chams == 4 ) pDevice->SetRenderState( D3DRS_SRCBLEND, D3DBLEND_INVSRCALPHA );
            }
     
            pDevice->DrawIndexedPrimitive( D3DPT_TRIANGLELIST, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
     
            pDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_TRUE );
     
            if( chams == 1 ) {
                if( color[1] == 1 ) SetLightChams( pDevice, 255, 255, 000, 000 );
                if( color[1] == 2 ) SetLightChams( pDevice, 255, 000, 255, 000 );
                if( color[1] == 3 ) SetLightChams( pDevice, 255, 000, 000, 255 );
                if( color[1] == 4 ) SetLightChams( pDevice, 255, 000, 000, 000 );
            }
            if( chams == 2 ) {
                if( color[1] == 1 ) pDevice->SetRenderState( D3DRS_AMBIENT, Red   );
                if( color[1] == 2 ) pDevice->SetRenderState( D3DRS_AMBIENT, Green );
                if( color[1] == 3 ) pDevice->SetRenderState( D3DRS_AMBIENT, Blue  );
                if( color[1] == 4 ) pDevice->SetRenderState( D3DRS_AMBIENT, Black );
            }
            if( chams > 2 ) {
                pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, D3DZB_TRUE );
                pDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVDESTCOLOR );
                if( chams == 3 ) pDevice->SetRenderState( D3DRS_SRCBLEND, D3DBLEND_INVSRCCOLOR );
                if( chams == 4 ) pDevice->SetRenderState( D3DRS_SRCBLEND, D3DBLEND_INVSRCALPHA );
            }
        } else {
            pDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_TRUE );
        }
     
        __asm
        {
            POPAD
            JMP retDIPEngine
        }
    }
     
    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 );
    }
     
    VOID Hook( VOID )
    {
        while( TRUE ) {
            if( *(BYTE *)GameStatus == 1 ) {
     
                DetourCreate( (PBYTE)DIPEngine, (PBYTE)DIPMidfunction, 8 );
     
                if( GetAsyncKeyState(VK_NUMPAD1)&1 ) {
                    chams++;
                    if(chams > 4) chams = 0;
                }
     
                if( GetAsyncKeyState(VK_NUMPAD2)&1 ) indexcolor = !indexcolor;
     
                if( GetAsyncKeyState(VK_LEFT)&1 ) {
                    color[indexcolor]--;
                    if(color[indexcolor] < 0) color[indexcolor] = 4;
                }
     
                if( GetAsyncKeyState(VK_RIGHT)&1 ) {
                    color[indexcolor]++;
                    if(color[indexcolor] > 4) color[indexcolor] = 0;
                }
            }
            else
                memcpy( (VOID *)DIPEngine, (CONST VOID *)(PBYTE)"\x8B\x08\x8B\x91\x48\x01\x00\x00", 8 );
     
            Sleep(100);
        }
    }
     
    BOOL CheckModules( VOID )
    {
        if( GetModuleHandleA("d3d9.dll") != NULL
            && GetModuleHandleA("CShell.dll") != NULL
            && GetModuleHandleA("ClientFX.fxd") != NULL )
            return TRUE;
     
        return FALSE;
    }
     
    DWORD WINAPI StartRoutine( LPVOID )
    {
        while( !CheckModules( ) )
            Sleep(100);
     
        Hook( );
     
        return 0;
    }
     
    BOOL WINAPI DllMain( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    {
        DisableThreadLibraryCalls( hDll );
     
        if( dwReason == DLL_PROCESS_ATTACH ) {
            CreateThread( NULL, NULL, (LPTHREAD_START_ROUTINE)StartRoutine, NULL, NULL, NULL );
        }
     
        return TRUE;
    }

    Créditos

    Detour -> Azorbix
    Types of chams -> Pheron or Phenomand
    Midfunction -> Shadow_ && Gellin
    WE11ington
    E outros não citados aqui.
    Last edited by PikaMucha_Itu; 06-04-2012 at 08:35 AM.

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

    Hacker Fail (02-14-2013),The Decoder (01-16-2013)

  3. #2
    CoderBlack09's Avatar
    Join Date
    Jan 2012
    Gender
    male
    Location
    Visual C++ 2008 Express Editions
    Posts
    769
    Reputation
    10
    Thanks
    62
    My Mood
    Aggressive
    Lol Man!
    Para Que Isso...
    Posta isso...

  4. #3
    elcamu9878's Avatar
    Join Date
    Feb 2012
    Gender
    male
    Posts
    258
    Reputation
    10
    Thanks
    253
    My Mood
    Blah
    bom trabalho

  5. #4
    FR1GHT's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Location
    Comendo Peru Pato Frango Burguer e Bebendo Whisky
    Posts
    1,633
    Reputation
    68
    Thanks
    987
    My Mood
    Yeehaw
    Quote Originally Posted by CoderBlack09 View Post
    Lol Man!
    Para Que Isso...
    Posta isso...
    É só chams e ainda pode estar patched¬¬



  6. #5
    jr.trancoso's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    3
    O we11 soltou isso na UC...

  7. #6
    elcamu9878's Avatar
    Join Date
    Feb 2012
    Gender
    male
    Posts
    258
    Reputation
    10
    Thanks
    253
    My Mood
    Blah
    eu tentei não funciona

  8. #7
    CoderBlack09's Avatar
    Join Date
    Jan 2012
    Gender
    male
    Location
    Visual C++ 2008 Express Editions
    Posts
    769
    Reputation
    10
    Thanks
    62
    My Mood
    Aggressive
    Quote Originally Posted by 50-CeNt- View Post


    É só chams e ainda pode estar patched¬¬
    Eu Sei ...

  9. #8
    xXLukinhazXx's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Brasil
    Posts
    124
    Reputation
    10
    Thanks
    7
    My Mood
    Happy
    cretitos ao NEO I.I.I tbm.... ele tava ajudando o wE11.

    NEO I.I.I fala tanta coisa de BRs q vcs num tem noção

  10. #9
    Eduardo Casas Putinha's Avatar
    Join Date
    Feb 2012
    Gender
    female
    Posts
    60
    Reputation
    -1
    Thanks
    2
    Quote Originally Posted by xXLukinhazXx View Post
    cretitos ao NEO I.I.I tbm.... ele tava ajudando o wE11.

    NEO I.I.I fala tanta coisa de BRs q vcs num tem noção
    Ajudando ele ? lol

  11. #10
    streetBackup's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    18
    Reputation
    10
    Thanks
    1
    good job² ....

  12. #11
    CoderBlack09's Avatar
    Join Date
    Jan 2012
    Gender
    male
    Location
    Visual C++ 2008 Express Editions
    Posts
    769
    Reputation
    10
    Thanks
    62
    My Mood
    Aggressive
    Quote Originally Posted by streetBackup View Post
    good job² ....
    Flood On Hein kkkkkkkkkkkk

  13. #12
    HackShieldFail's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Posts
    16
    Reputation
    19
    Thanks
    81
    Quote Originally Posted by xXLukinhazXx View Post
    cretitos ao NEO I.I.I tbm.... ele tava ajudando o wE11.

    NEO I.I.I fala tanta coisa de BRs q vcs num tem noção
    Cala boca, não diz o que você não sabe, WE11ington não da creditos a quem não pertence.
    Somente os citados e de coerência.

    Outro detalhe, WE11ington não depende de ninguém.
    Last edited by HackShieldFail; 06-04-2012 at 07:05 AM.

  14. The Following 2 Users Say Thank You to HackShieldFail For This Useful Post:

    pDevice (06-05-2012),PikaMucha_Itu (06-04-2012)

  15. #13
    Nightmare's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Location
    North of Hell
    Posts
    2,396
    Reputation
    149
    Thanks
    6,601
    My Mood
    Worried
    Nice job brother!!

  16. #14
    PikaMucha_Itu's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Itu City
    Posts
    2,391
    Reputation
    59
    Thanks
    4,105
    My Mood
    Goofy
    Prova então mano , e outra WE11 me disse que nem tem esse cara no msn !
    Teve algumas mudanças no topico !
    Last edited by PikaMucha_Itu; 06-04-2012 at 08:39 AM.

  17. #15
    xXLukinhazXx's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Brasil
    Posts
    124
    Reputation
    10
    Thanks
    7
    My Mood
    Happy
    Quote Originally Posted by HackShieldFail View Post
    Cala boca, não diz o que você não sabe, WE11ington não da creditos a quem não pertence.
    Somente os citados e de coerência.

    Outro detalhe, WE11ington não depende de ninguém.

    num depende kkk ele acho esses endereços sem logger? kkk pq ele pega endereços com o logger do gellin?/ kkkkk

    Quote Originally Posted by Neo I.I.I
    Brazilians coder's are sucker.
    quer mais eu posto uma par de quotes aki...

    Quote Originally Posted by DrUnKeN ChEeTaH
    BRs are monkeys lol

    acha q está por cima mas.....

Page 1 of 5 123 ... LastLast

Similar Threads

  1. [Help] client hook [source engine]
    By bluedog9 in forum C++/C Programming
    Replies: 0
    Last Post: 07-19-2011, 01:04 PM
  2. How do you hook DIP
    By PashaAmd in forum Combat Arms Coding Help & Discussion
    Replies: 4
    Last Post: 03-13-2011, 08:31 AM
  3. [GUIDE]Hooking the source engine.
    By Hell_Demon in forum C++/C Programming
    Replies: 15
    Last Post: 02-23-2010, 04:33 PM
  4. [RELEASE] Crysis engine hook
    By Hell_Demon in forum C++/C Programming
    Replies: 14
    Last Post: 01-20-2010, 08:59 AM
  5. [Release] WiirtuallCA Cheat Engine Hook V 1.2 [64BIT Vista/7Only]
    By Wiirtuallca in forum Combat Arms Europe Hacks
    Replies: 11
    Last Post: 12-16-2009, 05:40 PM