Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Xlilzoosk8rX's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    the-ville, PA
    Posts
    358
    Reputation
    24
    Thanks
    53

    DIP midfunction hook

    NOTE: This is not my work just found it and thought i would share with MPGH.
    Code:
    DWORD dwDrawIndexedPrimitive_EngineCall = 0x006A3AEA;
    DWORD dwDrawIndexedPrimitive_CaveJumpBack = dwDrawIndexedPrimitive_EngineCall + 0x8;

    Code:
    __declspec(naked) void __cdecl DrawIndexedPrimitive_CodeCave()
    {
        static LPDIRECT3DDEVICE9 pDevice;
        static D3DPRIMITIVETYPE PrimType = D3DPT_TRIANGLELIST; //constant parameter 4
        static UINT MinIndex, nNumVertices, StartIndex, nPrimitiveCount;
        static INT BaseVertexIndex;
        
        __asm
        {
            MOV ECX, DWORD PTR DS:[EAX]
            MOV pDevice, EAX; 
            MOV EDX, DWORD PTR DS:[ECX+0x148]
            PUSHAD
            MOV ECX, [EBP + 0x18]
            MOV BaseVertexIndex, ECX 
            MOV ECX, [EBP + 0x8]
            MOV MinIndex, ECX      
            MOV ECX, [EBP + 0x10]
            MOV nNumVertices, ECX  
            MOV ECX, [EBP + 0xC]
            MOV StartIndex, ECX    
            MOV ECX, [EBP + 0x14]
            MOV nPrimitiveCount, ECX
        }
    
    
        //Second DIP call
        pDevice->DrawIndexedPrimitive(PrimType, BaseVertexIndex,  MinIndex, nNumVertices, StartIndex, nPrimitiveCount);
    
    
        __asm
        {
            POPAD
            JMP dwDrawIndexedPrimitive_CaveJumpBack;
        }
    }
    hook when in-game

    Code:
    DWORD CALLBACK DIPHook(LPVOID)
    {
        while(1)
        {    
            if(*(int*)0x377B11B0 == 1)
                DetourCreate((PBYTE)dwDrawIndexedPrimitive_EngineCall, (PBYTE)DrawIndexedPrimitive_CodeCave, 8);
            else
                memcpy((void*)dwDrawIndexedPrimitive_EngineCall, (PBYTE)"\x8B\x08\x8B\x91\x48\x01\x00\x00", 8);
    
            Sleep(500);
        }
    
        return 0;
    }
    create thread when injected:

    Code:
    CreateThread(NULL, NULL, DIPHook, NULL, NULL, NULL);
    please correct me if i credited wrwing person(s)
    Credit to:
    CodeDemon
    Crash
    donoob
    fatboy88
    Gellin
    Marko
    mmbob
    NOOB
    Scimmy
    whit
    i think thats everyone now
    (Thanks @[POWER]
    Last edited by Xlilzoosk8rX; 08-26-2011 at 09:29 AM.

  2. #2
    [POWER]'s Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    117
    Reputation
    10
    Thanks
    21
    My Mood
    Pensive
    Credits

    • CodeDemon
    • Crash
    • donoob
    • fatboy88
    • Gellin
    • Marko
    • mmbob
    • NOOB
    • Scimmy
    • whit

  3. The Following User Says Thank You to [POWER] For This Useful Post:

    markoj (08-28-2011)

  4. #3
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    6,285
    Reputation
    435
    Thanks
    3,715
    My Mood
    Doh
    quit leeching shit you noob

    commando: You're probably the best non-coder coder I know LOL


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

    markoj (08-28-2011),matypatty (08-27-2011)

  6. #4
    Xlilzoosk8rX's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    the-ville, PA
    Posts
    358
    Reputation
    24
    Thanks
    53
    its not leeched you dick i gave credits

  7. #5
    supascimmy's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    asdf
    Posts
    102
    Reputation
    10
    Thanks
    15
    obvious leech is obvious from one of my threads

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

    markoj (08-28-2011),matypatty (08-27-2011)

  9. #6
    freedompeace's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    3,033
    Reputation
    340
    Thanks
    2,792
    My Mood
    Sad
    You forgot the code to `DetourCreate()`..

  10. #7
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    5,052
    My Mood
    Cool
    Quote Originally Posted by freedompeace View Post
    You forgot the code to `DetourCreate()`..
    Changes addy to {0xE9, Your Function}
    Change Return to {Replaced Bytes , 0xE9 , Addy +length}
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  11. #8
    matypatty's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Posts
    864
    Reputation
    229
    Thanks
    2,694
    My Mood
    Amused
    you're a stupid dumb ass. I want to -rep you more.

  12. The Following User Says Thank You to matypatty For This Useful Post:

    markoj (08-28-2011)

  13. #9
    Tonylx4's Avatar
    Join Date
    May 2009
    Gender
    male
    Posts
    589
    Reputation
    27
    Thanks
    49
    My Mood
    Blah
    He said he didn't make it so why are you hating?

  14. #10
    FukoBackup's Avatar
    Join Date
    Feb 2011
    Gender
    female
    Posts
    551
    Reputation
    31
    Thanks
    57
    Quote Originally Posted by Tonylx4 View Post
    He said he didn't make it so why are you hating?
    Why the fuck are you begging for minion in your signature

  15. The Following 3 Users Say Thank You to FukoBackup For This Useful Post:

    flameswor10 (08-27-2011),Girlz Rule (09-08-2011),matypatty (09-03-2011)

  16. #11
    freedompeace's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    3,033
    Reputation
    340
    Thanks
    2,792
    My Mood
    Sad
    Quote Originally Posted by topblast View Post


    Changes addy to {0xE9, Your Function}
    Change Return to {Replaced Bytes , 0xE9 , Addy +length}
    Regardless, if a code sample is going to be posted, all the code should be posted - leaving out functions that sample code depends on is counteracting the entire idea of a code snippet - this isn't some trivial 2 line function (what you said in the quote doesn't is ambiguous and has no real helpful value, as, again, it is incomplete -- length of what? addy of what?).

  17. The Following User Says Thank You to freedompeace For This Useful Post:

    FailHacker (08-29-2011)

  18. #12
    matypatty's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Posts
    864
    Reputation
    229
    Thanks
    2,694
    My Mood
    Amused
    I still hate this kid.... Why leach this...

  19. #13
    -Dimensions-'s Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    243
    Reputation
    2
    Thanks
    162
    My Mood
    Aggressive
    Leeched, this should be removed. Even if you did give credits, it was originally found on another forum and therefore its leeched.

  20. #14
    CoderNever's Avatar
    Join Date
    Feb 2009
    Gender
    female
    Location
    https://mpgh.net MPGHCash: $700,458,011
    Posts
    1,198
    Reputation
    131
    Thanks
    2,236
    My Mood
    Buzzed
    The credits for this is only

    donoob - Posting his CA DIP Mid Function Other Players.
    Crash - Finding GameStatus

    It doesn't take all the coders listed to add parems to Donoobs' code.

  21. #15
    [POWER]'s Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    117
    Reputation
    10
    Thanks
    21
    My Mood
    Pensive
    Quote Originally Posted by CoderNever View Post
    The credits for this is only

    donoob - Posting his CA DIP Mid Function Other Players.
    Crash - Finding GameStatus

    It doesn't take all the coders listed to add parems to Donoobs' code.
    scimmy can credit whoever he wants to credit.

Page 1 of 2 12 LastLast

Similar Threads

  1. [Release] MidFunction Hook new.
    By lucifereviluser in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 4
    Last Post: 11-11-2011, 09:48 PM
  2. [Release] My old Midfunction Hook
    By Stephen in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 30
    Last Post: 03-14-2011, 05:55 PM
  3. DIP Hook
    By scimmyboy in forum Combat Arms Coding Help & Discussion
    Replies: 68
    Last Post: 10-08-2010, 12:44 PM
  4. DIP Hook.
    By Crash in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 39
    Last Post: 09-14-2010, 05:57 PM
  5. Hook Function for DIP?
    By ipwnuuaal5 in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 12
    Last Post: 08-06-2010, 03:52 AM