Results 1 to 5 of 5
  1. #1
    dreamers0911's Avatar
    Join Date
    Jun 2016
    Gender
    male
    Posts
    33
    Reputation
    10
    Thanks
    0
    My Mood
    Amazed

    LOOK My HOOK IF It Is Correct

    LOOK My HOOK IF It Is Correct

    Code:
    #include "d3dbase.h"
    #include "XOR.h"
    
    LPD3DXFONT pFont;
    
    VOID StartFont( LPDIRECT3DDEVICE9 pDevice )
    {
        if( pFont )
        {
            pFont->Release();
            pFont = 0;
        }
    
        if( !pFont )
        {
            D3DXCreateFont( pDevice,
                            14,
                            0,
                            FW_BOLD,
                            1,
                            0,
                            DEFAULT_CHARSET,
                            OUT_DEFAULT_PRECIS,
                            ANTIALIASED_QUALITY,
                            DEFAULT_PITCH | FF_DONTCARE,
                            "Arial",
                            &pFont );
        }
    }
    
    DWORD retPRESENT10;
    
    __declspec(naked) void Present10()
    {
    
        static LPDIRECT3DDEVICE9 pDevice;
    
        __asm
        {
            MOV EDI, EDI
                PUSH EBP
                MOV EBP, ESP
                MOV ESI, DWORD PTR SS : [EBP + 0x8]
                MOV pDevice, ESI
        }
        if (pDevice)
        {
            StartFont(pDevice);
        }
        __asm
        {
            POPAD
            JMP retPRESENT10
        }
    }
    
    DWORD retPRESENT7;
    
    __declspec(naked) void Present7()
    {
    
        static LPDIRECT3DDEVICE9 pDevice;
    
        __asm
        {
            MOV EDI, EDI
                PUSH EBP
                MOV EBP, ESP
                PUSH ESI
                PUSH EDI
                MOV EDI, DWORD PTR SS : [EBP + 8]
                MOV pDevice, EDI
        }
        if (pDevice)
        {
            DoMenu(pDevice);
            DoHackMemory(pDevice);
        }
        __asm
        {
            POPAD
            JMP retPRESENT7
        }
    }
    
    DWORD retPRESENT8;
    
    __declspec(naked) void Present8()
    {
    
        static LPDIRECT3DDEVICE9 pDevice;
    
        __asm
        {
            MOV EDI, EDI
                PUSH EBP
                MOV EBP, ESP
                MOV EAX, DWORD PTR SS : [EBP + 0x8]
                MOV pDevice, EAX
        }
        if (pDevice)
        {
            DoHackDirectx(pDevice);
        }
        __asm
        {
            POPAD
            JMP retPRESENT8
        }
    }
    
    
    VOID *DetourFunction(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 );
    }
    
    void Ellang()
    {
        DWORD hD3D = (DWORD)LoadLibraryA(ed3d9);
        DWORD GetAddressP10 = FindPattern(hD3D, 0x128000, (PBYTE)"\x8B\xFF\x55\x8B\xEC\x83\xE4\xF8\x83\xEC\x0C\x56\x8B\x75\x08\x85\xF6\x74\x05\x8D\x46\x04\xEB\x02\x33\xC0\x6A\x00\x50\x8D\x4C\x24\x10\xE8\x00\x00\x00\x00\xF7\x46\x00\x00\x00\x00\x00\x74\x07\xBE\x00\x00\x00\x00\xEB\x17", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx????xx?????xxx????xx");
        if (GetAddressP10)
        {
            retPRESENT10 = GetAddressP10 + 0xC;
            DetourFunction((PBYTE)GetAddressP10, (PBYTE)Present10, 5);
        }
        DWORD GetAddressP7 = FindPattern(hD3D, 0x128000, (PBYTE)"\x8B\xFF\x55\x8B\xEC\x56\x57\x8B\x7D\x08\x85\xFF\x74\x44\x8D\x77\x04\x83\x7E\x18\x00\x0F\x85\x00\x00\x00\x00\xF6\x47\x2C\x02", "xxxxxxxxxxxxxxxxxxxxxxx????xxxx");
        if (GetAddressP7)
        {
            retPRESENT7 = GetAddressP7 + 0x7;
            DetourFunction((PBYTE)GetAddressP7, (PBYTE)Present7, 5);
        }
        DWORD GetAddressP8 = FindPattern(hD3D, 0x128000, (PBYTE)"\x8B\xFF\x55\x8B\xEC\x83\xE4\xF8\x83\xEC\x0C\x56\x8B\x75\x08\x85\xF6\x74\x48\x8D\x46\x04\x83\x64\x24\x0C\x00\x83\x78\x18\x00\x89\x44\x24\x08\x75\x3A\xF7\x46\x00\x00\x00\x00\x00\x0F\x85\x00\x00\x00\x00\x6A\x00\xFF\x75\x18\x8B\xCE\xFF\x75\x14\xFF\x75\x10\xFF\x75\x0C\xE8\x00\x00\x00\x00\x8B\xF0\x8D\x4C\x24\x08\xE8\x00\x00\x00\x00", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx?????xx????xxxxxxxxxxxxxxxxx????xxxxxxx????");
        if (GetAddressP8)
        {
            retPRESENT8 = GetAddressP8 + 0xC;
            DetourFunction((PBYTE)GetAddressP8, (PBYTE)Present8, 5);
        }
    }
    
    BOOL WINAPI DllMain( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    {
        DisableThreadLibraryCalls( hDll );
        if( dwReason == DLL_PROCESS_ATTACH )
        {
            MessageBox( 0, "CrossFire Project", "HOOK", 0 );
            CreateThread( 0, 0, ( LPTHREAD_START_ROUTINE )Ellang, 0, 0, 0 );
        }
    
        return TRUE;
    }

  2. #2
    mamo007's Avatar
    Join Date
    Apr 2012
    Gender
    male
    Location
    Behind You !
    Posts
    1,655
    Reputation
    216
    Thanks
    15,607
    My Mood
    Amazed
    Wow , you got nice hook , oh wait , its mine xd
    [Source Code] Present Hooks Win 7/8 .. 8.1/10


    - removed youtube video as it had an outside link


  3. The Following User Says Thank You to mamo007 For This Useful Post:

    MyNameIsElinson (06-13-2017)

  4. #3
    dreamers0911's Avatar
    Join Date
    Jun 2016
    Gender
    male
    Posts
    33
    Reputation
    10
    Thanks
    0
    My Mood
    Amazed
    Quote Originally Posted by mamo007 View Post
    Wow , you got nice hook , oh wait , its mine xd
    But Its Not Working

  5. #4
    ComboDance's Avatar
    Join Date
    Aug 2013
    Gender
    male
    Location
    C:\Windows\System32
    Posts
    222
    Reputation
    10
    Thanks
    84
    My Mood
    Tired
    Quote Originally Posted by dreamers0911 View Post
    But Its Not Working
    because you dont know what present hook can do !, read carefully your place you put your menu in ! learning more about hook !
    Stop right here...!!!

  6. #5
    dreamers0911's Avatar
    Join Date
    Jun 2016
    Gender
    male
    Posts
    33
    Reputation
    10
    Thanks
    0
    My Mood
    Amazed
    Quote Originally Posted by ComboDance View Post
    because you dont know what present hook can do !, read carefully your place you put your menu in ! learning more about hook !


    Need A Dip Hook For The Directx Menu ..

    - - - Updated - - -

    Quote Originally Posted by ComboDance View Post
    because you dont know what present hook can do !, read carefully your place you put your menu in ! learning more about hook !
    CreateThread( 0, 0, ( LPTHREAD_START_ROUTINE )Ellang, 0, 0, 0 );

    Is Detect By The Xtrap

    What Is The Updated ?

Similar Threads

  1. [Help Request] Looking to develop a player location hook service -- Does it already exist?
    By strich in forum DayZ Help & Requests
    Replies: 8
    Last Post: 12-10-2013, 09:50 AM
  2. [WTB] Looking to buy DC Hook. (DOTA 2)
    By badkingpro in forum Buying Accounts/Keys/Items
    Replies: 3
    Last Post: 08-09-2013, 08:01 AM
  3. [Preview] Me showing of first EndScene hook :p Please look !
    By kmanev073 in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 31
    Last Post: 09-03-2012, 02:00 AM
  4. Looking for relevant hook lesson
    By draku1 in forum Combat Arms Coding Help & Discussion
    Replies: 0
    Last Post: 04-12-2012, 02:12 AM
  5. Mines look like missles ! [ Correct file and download ]
    By Artixxion in forum Combat Arms Mods & Rez Modding
    Replies: 49
    Last Post: 06-20-2010, 02:12 AM