Detour

Posts 1–8 of 8 · Page 1 of 1
Detour
Hey i just wanted some help on making a detour for a game like combat arms. Is there any working examples i can see? Thanks
Man, if you wanna do a hack for combat arms, just try to use engine hook.
I´m using an normal detours, and are working fine.

Example : Present Engine, End Scene, DIP Engine...
Quote Originally Posted by Hacker Fail View Post
Man, if you wanna do a hack for combat arms, just try to use engine hook.
I´m using an normal detours, and are working fine.

Example : Present Engine, End Scene, DIP Engine...
Could you show any of your working examples to him?
Quote Originally Posted by Sammy View Post
Could you show any of your working examples to him?
no need for examples
it's just getting the engine device which can be done by a tiny bit of reversal (searching for the string 'device' lol)
or hooking a function and getting the return address - then tracing back to where it uses the vtable of the device to call the function.

after this you place either a midfunction hook or a standard hook.
Quote Originally Posted by Hacker Fail View Post
Man, if you wanna do a hack for combat arms, just try to use engine hook.
I´m using an normal detours, and are working fine.

Example : Present Engine, End Scene, DIP Engine...
Quote Originally Posted by Park Bench View Post
no need for examples
it's just getting the engine device which can be done by a tiny bit of reversal (searching for the string 'device' lol)
or hooking a function and getting the return address - then tracing back to where it uses the vtable of the device to call the function.

after this you place either a midfunction hook or a standard hook.
well what i cant figure out is how to get the vtable from a function. What am i supposed to debug in olly/ida? i do have a working DIP but im trying to hook endscene i am just having trouble getting the vtable
VTable is located at the instance pointer of d3d device. Usually in the eax register. Look for calls to Direct3DCreate9 to get the IDirect3D9 instance pointer. The CreateDevice method is called through the IDirect3D9 pointer which is just an offset to a function pointer table. From there, you should be able to trace the CreateDevice call, grab device. Then the present, beginscene and endscene methods are stored in the vtable to which the offsets are public and could be found anywhere with a bit of searching. There is another way to get the device pointer, and that's by creating your own device which will end up pointing to an already existing device to make your job easier.
Quote Originally Posted by __readgsqword View Post
VTable is located at the instance pointer of d3d device. Usually in the eax register. Look for calls to Direct3DCreate9 to get the IDirect3D9 instance pointer. The CreateDevice method is called through the IDirect3D9 pointer which is just an offset to a function pointer table. From there, you should be able to trace the CreateDevice call, grab device. Then the present, beginscene and endscene methods are stored in the vtable to which the offsets are public and could be found anywhere with a bit of searching. There is another way to get the device pointer, and that's by creating your own device which will end up pointing to an already existing device to make your job easier.
Thanks so much! where am i looking for calls to Direct3DCreate9? what am i actually debugging? I understand how to find it but where am i looking/what module am i debugging/reversing?
Quote Originally Posted by anotherprogrammer View Post
Thanks so much! where am i looking for calls to Direct3DCreate9? what am i actually debugging? I understand how to find it but where am i looking/what module am i debugging/reversing?
never mind this, i found my answer
Posts 1–8 of 8 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?