Results 1 to 4 of 4
  1. #1
    [H]aaBX's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    277
    Reputation
    23
    Thanks
    1,085
    My Mood
    Asleep

    Engine Hook - Reset, Present, BeginScene, EndScene and DrawIndexedPrimitive



    I updated my Engine Hooks today and they are working!
    I changed there a little thing, but I won't tell you want.
    I'm releasing the way how it gets called by Engine.exe and a few useful things for hooking it.

    Code:
    Reset:
    MOV ECX, [EAX]
    MOV EDX, [ECX + 0x40]
    MOV DWORD PTR DS:[pDevice], EAX
    PUSHAD
    
    Signature Scan + Mask: \x8B\x08\x8B\x51\x40\xFF\xD2 xxxxxxx
    Byte Pattern: 8B 08 8B 51 40 FF D2
    Patch this Bytes: 8B 08
    Return: Pointer + 0x5
    Code:
    Present:
    MOV ECX, [EAX]
    MOV EDX, [ECX + 0x44]
    MOV DWORD PTR DS:[pDevice], EAX
    PUSHAD
    
    Signature Scan + Mask: \x8B\x08\x8B\x51\x44\xFF\xD2 xxxxxxx
    Byte Pattern: 8B 08 8B 51 44 FF D2
    Patch this Bytes: 8B 08
    Return: Pointer + 0x5
    Code:
    BeginScene:
    MOV ECX, [EAX]
    MOV EDX, [ECX + 0xA4]
    MOV DWORD PTR DS:[pDevice]
    PUSHAD
    
    Signature Scan + Mask:  \x8B\x08\x8B\x91\xA4\x00\x00\x00 xxxxx???
    Byte Pattern: 8B 08 8B 91 A4 00 00 00
    Patch this Bytes: 8B 08
    Return: Pointer + 0x8
    Code:
    EndScene:
    MOV ECX, [EAX]
    MOV EDX, [ECX + 0xA8]
    MOV DWORD PTR DS:[pDevice]
    PUSHAD
    
    Signature Scan + Mask: \x8B\x08\x8B\x91\xA8\x00\x00\x00 xxxxx???
    Byte Pattern: 8B 08 8B 91 A8 ?? ?? ??
    Patch this Bytes: 8B 08
    Return: Pointer + 0x8
    Code:
    DrawIndexedPrimitive:
    MOV ECX, [EAX]
    MOV EDX, [ECX + 148]
    MOV DWORD PTR DS:[pDevice], EAX
    PUSHAD
    
    Signature Scan + Mask: \x8B\x08\x8B\x91\x48\x01\x00\x00 xxxxxx??
    Byte Pattern: 8B 08 8B 91 48 01 ?? ??
    Patch this Bytes: 8B 08
    Return: Pointer + 0x8
    Get the Pointers by your own - You have the sigs ^^
    I hooked more than only this basic shit. There are more functions that are pretty useful

    Credits: ME - [H]aaBX
    Give Credits
    Last edited by [H]aaBX; 02-21-2013 at 01:24 PM.

    Thanks @Scynix for this awesome picture
     


  2. The Following 2 Users Say Thank You to [H]aaBX For This Useful Post:

    GoldWhite (02-21-2013),kssiobr (03-19-2014)

  3. #2
    R4v0r's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Location
    London
    Posts
    234
    Reputation
    11
    Thanks
    142
    My Mood
    Amazed
    Are you kidding me? Why all these troubles for something such simple ...

  4. #3
    Flengo's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    /admincp/banning.php
    Posts
    20,591
    Reputation
    5180
    Thanks
    14,178
    My Mood
    Inspired
    Might as well release since I don't think it will be effective after the latest patch hits EU.
    I Read All Of My PM's & VM's
    If you need help with anything, just let me know.

     


     
    VM | PM | IM
    Staff Administrator Since 10.13.2019
    Publicist Since 04.04.2015
    Middleman Since 04.14.2014
    Global Moderator Since 08.01.2013
    Premium Since 05.29.2013

    Minion+ Since 04.18.2013

    Combat Arms Minion Since 12.26.2012
    Contributor Since 11.16.2012
    Member Since 05.11.2010


  5. #4
    wraithkilla's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    257
    Reputation
    10
    Thanks
    905
    My Mood
    Busy
     
    Code:
    	
    	pEndScene = (oEndScene) (DWORD)VTable[42];
       	DetourTransactionBegin();
        DetourUpdateThread(GetCurrentThread());
        DetourAttach(&(PVOID&)pEndScene, EndScene);
        DetourTransactaionCommit();
    
    	pDrawIndexedPrimitive = (oDrawIndexedPrimitive) (DWORD)VTable[82];
       	DetourTransactionBegin();
        DetourUpdateThread(GetCurrentThread());
        DetourAttach(&(PVOID&)pDrawIndexedPrimitive, DrawIndexedPrimitive);
        DetourTransactionCommit();
    	
     	
     Voids->log( " \n");
     Voids->log( " EndScene:				0x%X \n",pEndScene);
     Voids->log( " DIP:		 			    0x%X \n",pDrawIndexedPrimitive);


    using this lol

Similar Threads

  1. [Tutorial] Convert Source Engine models to Lithtech! (For CAPS and CA)
    By supercarz1991 in forum Combat Arms Mod Tutorials
    Replies: 26
    Last Post: 04-27-2012, 03:37 AM
  2. [Tutorial] i used Wieter20 public hook on punkbuster installed server and i m not banned
    By ssjgoku4 in forum Call of Duty Modern Warfare 2 Private Servers
    Replies: 6
    Last Post: 03-08-2011, 09:47 AM
  3. [RELEASE] Crysis engine hook
    By Hell_Demon in forum C++/C Programming
    Replies: 14
    Last Post: 01-20-2010, 08:59 AM
  4. [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
  5. Replies: 2
    Last Post: 06-23-2009, 07:50 AM