DX9 Render Hook

Technical Discussions not Related Directly to MHS. For Example, Coding, Hex Editing, General Hacking, Etc.

Moderators: g3nuin3, SpeedWing, WhiteHat

DX9 Render Hook

Postby PsychoTron » Mon Apr 30, 2012 8:09 pm

I'm trying to hook DX9 in a game I'm hacking. (I'm already hooked into the game(DLL), and have a nice lib set up for hacking, etc,. So, I can do about anything I want.)

I have several things I'm trying to accomplish:

1. Windowed Mode (The game doesn't have one.)
2. Rendering Text\Etc

I don't need help with those two things directly, I need help getting the tools to make them happen. (The game already has them, I just can't find them.)

What I really need to do, is to change the present parameters to allow for windowed mode, and to store a reference to the device, so I can draw. (I also need to find Begin\End\Present, so I can draw safely.)

If I can find CreateDevice, I can overwrite the call, JMP to my own function, call it myself, with any parameters I want, and then store a reference, etc,. (That takes care of most of my problems, in one move.)

I just can't find them(CreateDevice\Begin\End\Present), I've found many DX calls, but, none of them are labeled, it's always: call DWORD PTR [address].. (I CAN get a reference to IDirect3D9, it was labeled, and easy to find.)

So, I've read that the DX calls can be found using a VTable(on IDirect3d9 ???), or some such, and I've also read that they are at fixed offsets within the DX DLL, so, you could do: DX_DLL_Memory_Offset + DX_Function_Offset to get an address for them.

I just have no clue how to go about this. ? Is there a better way?

Any help would be appreciated. :)

(Been up all night hacking, sorry if this doesn't make sense, or if it's a bit rambly.. If you need clarification, just ask.)

---

Upon further research, it seems the VTable is the way to go, however, I still can't seem to find any info on actually accessing it, though, I did find an enum for getting what I want, once I do find it. (Half way there....)
PsychoTron
Hackleberry Fin
 
Posts: 21
Joined: Sun Aug 29, 2010 7:02 am

Return to Technical Unrelated

Who is online

Users browsing this forum: No registered users and 0 guests

cron