Go Back   UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats > Anti-Cheat Software & Programming > Direct3D

- Sponsored Advertisement -
http://www.myfpscheats.com/

Welcome to the UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats.
You have to register before you can post and see and access any of the advanced forum features, please click the register link to proceed to the registration form. To start viewing threads or posts, select a forum that you want to visit from the selection below.
Direct3D
hacking programming reversing
You are Unregistered, please register to gain Full access.    
Reply
 
Thread Tools

MidFunction Hook (W7 & Vista)
Old 08-27-2010, 06:39 AM   #1
UnKnoWnCheaTeR

disavow's Avatar

Join Date: Jul 2009
Posts: 1,068
Reputation: 49844
Rep Power: 551
disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (2)
Points: 31,279, Level: 26
Points: 31,279, Level: 26 Points: 31,279, Level: 26 Points: 31,279, Level: 26
Activity: 13.8%
Activity: 13.8% Activity: 13.8% Activity: 13.8%
Last Achievements
MidFunction Hook (W7 & Vista)

Thought I would release this since I don't use it anymore
I made it as a method to counter hackshields protection
However there are easier methods to counter hackshield


Defines
Code:
DWORD * VTable;
DWORD dwEndscene_hook, dwEndscene_ret;
BYTE EndSceneOpCodes[6];
Endscene
Code:
__declspec(naked) void MyEndscene( )
{
    __asm 
    {
        mov dword ptr ss:[ebp - 10], esp;
        mov esi, dword ptr ss:[ebp + 0x8]; //replace patched code
                mov m_pD3Ddev, esi; //Get the device
    }


    __asm 
    {
        jmp dwEndscene_ret;//jump back to normal endscene
    }

}
My offset init function using vtable pattern that Gordon' posted
Code:
void Dx9Hook( LPCSTR D3D9 )
{
    DWORD hD3D = NULL;
    while (!hD3D) hD3D = (DWORD)GetModuleHandle(D3D9);
    DWORD PPPDevice = FindPattern(hD3D, 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86", "xx????xx????xx");
    memcpy( &VTable, (void *)(PPPDevice + 2), 4);

    dwEndscene_hook = VTable[42] + 0x2A; //mid function
    dwEndscene_ret = dwEndscene_hook + 0x6; //return address
}
Usuage @ Mainthread
Code:
Dx9Hook("d3d9.dll");


Memcpy((void *)Endscene_opcodes, (void *)"\x89\x65\xF0\x8B\x75\x08", 6);
        
while( 1 )
{
    Sleep( 1000 );

    if(memcmp((void *)Endscene_opcodes, (void *)dwEndscene_hook, 6) == 0 )
        Detour(dwEndscene_hook, MyEndscene);
 
}
Loop to counter repatching from hackshield
Detour must be 6 bytes long, since your over writing this instruction in endscene:
mov dword ptr ss:[ebp - 10], esp;
mov esi, dword ptr ss:[ebp + 0x8];

Enjoy.

This should work on most functions within the d3d interface, since I'm hooking just after the device is mov to esi.
__________________

Shad0w_'s Alter Ego

Last edited by disavow; 08-31-2010 at 03:48 AM.
disavow is online now

Reply With Quote


Old 08-27-2010, 06:53 AM   #2
SEGnosis
Guest

Posts: n/a
o: looks decent, but too many undefined vars.

Reply With Quote

Old 08-27-2010, 06:56 AM   #3
UnKnoWnCheaTeR

disavow's Avatar

Threadstarter
Join Date: Jul 2009
Posts: 1,068
Reputation: 49844
Rep Power: 551
disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (2)
Points: 31,279, Level: 26
Points: 31,279, Level: 26 Points: 31,279, Level: 26 Points: 31,279, Level: 26
Activity: 13.8%
Activity: 13.8% Activity: 13.8% Activity: 13.8%
Last Achievements
Quote:
Originally Posted by SEGnosis View Post
o: looks decent, but too many undefined vars.
Not really, 4 basic and simple ones.
For people who can't master them, they should be doing this:
Code:
DWORD * VTable;
DWORD dwEndscene_hook, dwEndscene_ret;
BYTE EndSceneOpCodes[6];
__________________

Shad0w_'s Alter Ego

Last edited by disavow; 09-26-2010 at 11:23 PM.
disavow is online now

Reply With Quote

Old 08-27-2010, 07:05 AM   #4
Level 3

Gellin's Avatar

Join Date: Nov 2007
Location: msdn
Posts: 528
Reputation: 22916
Rep Power: 291
Gellin has reputation that takes up 2GB of server space!Gellin has reputation that takes up 2GB of server space!Gellin has reputation that takes up 2GB of server space!Gellin has reputation that takes up 2GB of server space!Gellin has reputation that takes up 2GB of server space!Gellin has reputation that takes up 2GB of server space!Gellin has reputation that takes up 2GB of server space!Gellin has reputation that takes up 2GB of server space!Gellin has reputation that takes up 2GB of server space!Gellin has reputation that takes up 2GB of server space!Gellin has reputation that takes up 2GB of server space!
Points: 16,705, Level: 17
Points: 16,705, Level: 17 Points: 16,705, Level: 17 Points: 16,705, Level: 17
Activity: 1.1%
Activity: 1.1% Activity: 1.1% Activity: 1.1%
Last Achievements
Code:
__declspec(naked) void MyEndscene( )
{
	__asm 
	{
		mov dword ptr ss:[ebp - 10], esp;
		mov esi, dword ptr ss:[ebp + 0x8]; //replace patched code
                mov m_pD3Ddev, esi; //Get the device
                pushad;
	}


	__asm 
	{
                popad;
		jmp dwEndscene_ret;//jump back to normal endscene
	}

}
__________________
Gellin is offline

Reply With Quote

Old 08-27-2010, 07:07 AM   #5
UnKnoWnCheaTeR

disavow's Avatar

Threadstarter
Join Date: Jul 2009
Posts: 1,068
Reputation: 49844
Rep Power: 551
disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (2)
Points: 31,279, Level: 26
Points: 31,279, Level: 26 Points: 31,279, Level: 26 Points: 31,279, Level: 26
Activity: 13.8%
Activity: 13.8% Activity: 13.8% Activity: 13.8%
Last Achievements
When I was using this method of hooking, I never had the need to push or pop any registers.
Never crashed, failed or error'd anyways.
__________________

Shad0w_'s Alter Ego
disavow is online now

Reply With Quote

Old 08-27-2010, 01:00 PM   #6
h4x0!2

thelick's Avatar

Join Date: Jul 2010
Posts: 95
Reputation: 1050
Rep Power: 31
thelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of rep
Points: 1,473, Level: 3
Points: 1,473, Level: 3 Points: 1,473, Level: 3 Points: 1,473, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Last Achievements
I'm not expert like you by the way i don't use the endscene in my hook and i don't see any reason to use it or i'm wrong?
Endscene it's constantly scanned from the hs but it isn't so needful
thelick is offline

Reply With Quote

Old 08-27-2010, 01:52 PM   #7
Level 3

fatboy88's Avatar

Join Date: May 2005
Posts: 1,103
Reputation: 38964
Rep Power: 494
fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!
Recognitions:
The UC Member of the Month award is a prestigious award given to a single community member on a monthly basis. Based on a vote by UnKnoWnCheaTs staff, the award is given to the forum member that has shown exemplary achievement and potential in the UnKnoWnCheaTs community, and has shown great commitment to upholding the principles upon which UnKnoWnCheaTs stands for. A member who has been awarded the Member of the Month award has been distinguished as an asset to the UnKnoWnCheaTs community. Member of the Month
Points: 27,267, Level: 24
Points: 27,267, Level: 24 Points: 27,267, Level: 24 Points: 27,267, Level: 24
Activity: 9.9%
Activity: 9.9% Activity: 9.9% Activity: 9.9%
Last Achievements
Quote:
Originally Posted by thelick View Post
I'm not expert like you by the way i don't use the endscene in my hook and i don't see any reason to use it or i'm wrong?
Endscene it's constantly scanned from the hs but it isn't so needful
its scanned cuz people with esp usally hook and draw there.

BeginScene: begins the scene data is drawn to back buffer

Present: the backbuffer is flipped to front buffer

Endscene: ends the front buffer drawing, swaps pointer back to the back buffer?

correct me if wrong ^^
__________________


My greatest fear is a Windows Vista Update! D:

ȜǷ-ɲآɳᶨ4 Hack:http://img42.imageshack.us/img42/473/20090203132330.png

Last edited by fatboy88; 08-27-2010 at 02:03 PM.
fatboy88 is online now

Reply With Quote

Old 08-27-2010, 02:06 PM   #8
h4x0!2

thelick's Avatar

Join Date: Jul 2010
Posts: 95
Reputation: 1050
Rep Power: 31
thelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of rep
Points: 1,473, Level: 3
Points: 1,473, Level: 3 Points: 1,473, Level: 3 Points: 1,473, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Last Achievements
And is it really needed?
I should thank Shad0w for his contribute aniway,but i think that there is always another way..
thelick is offline

Reply With Quote

Old 08-27-2010, 03:06 PM   #9
Junior Member

M.Holder's Avatar

Join Date: Aug 2010
Location: Germany
Posts: 47
Reputation: -91
Rep Power: 0
M.Holder is becoming an outcast
Whre kann i find the LPDIRECT3DDEVICE9 ?

Quote:
Endscene
Code:
__declspec(naked) void MyEndscene( )
{
    __asm 
    {
        mov dword ptr ss:[ebp - 10], esp;
        mov esi, dword ptr ss:[ebp + 0x8]; //replace patched code
                mov m_pD3Ddev, esi; //Get the device
    }
 
 
    __asm 
    {
        jmp dwEndscene_ret;//jump back to normal endscene
    }
 
}
Can i use this for Reset and DIP too?

Thank you for releasing this hook.
M.Holder is offline

Reply With Quote

Old 08-27-2010, 03:24 PM   #10
Super H4x0r

Geecko's Avatar

Join Date: Apr 2009
Posts: 318
Reputation: 7861
Rep Power: 119
Geecko DEFINES UNKNOWNCHEATSGeecko DEFINES UNKNOWNCHEATSGeecko DEFINES UNKNOWNCHEATSGeecko DEFINES UNKNOWNCHEATSGeecko DEFINES UNKNOWNCHEATSGeecko DEFINES UNKNOWNCHEATSGeecko DEFINES UNKNOWNCHEATSGeecko DEFINES UNKNOWNCHEATSGeecko DEFINES UNKNOWNCHEATSGeecko DEFINES UNKNOWNCHEATSGeecko DEFINES UNKNOWNCHEATS
Chopper Challenge Champion Extreme Racing Champion Super Clicker v2.0 Champion Ditto Dropoff Champion Fisticuffs Boxing Champion Graveler Gunblast Champion
Points: 7,850, Level: 10
Points: 7,850, Level: 10 Points: 7,850, Level: 10 Points: 7,850, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Last Achievements
just add:
Quote:
LPDIRECT3DDEVICE9 m_pD3Ddev;
before the first "_asm"
i think u can use it, u only need to get more parameters...ebp+0xC..and so on..
__________________

Geecko is offline

Reply With Quote

Old 08-27-2010, 04:14 PM   #11
Junior Member

M.Holder's Avatar

Join Date: Aug 2010
Location: Germany
Posts: 47
Reputation: -91
Rep Power: 0
M.Holder is becoming an outcast
Can you give me an example please?
M.Holder is offline

Reply With Quote

Old 08-27-2010, 06:47 PM   #12
Level 3

fatboy88's Avatar

Join Date: May 2005
Posts: 1,103
Reputation: 38964
Rep Power: 494
fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!fatboy88 has a huge epeen!
Recognitions:
The UC Member of the Month award is a prestigious award given to a single community member on a monthly basis. Based on a vote by UnKnoWnCheaTs staff, the award is given to the forum member that has shown exemplary achievement and potential in the UnKnoWnCheaTs community, and has shown great commitment to upholding the principles upon which UnKnoWnCheaTs stands for. A member who has been awarded the Member of the Month award has been distinguished as an asset to the UnKnoWnCheaTs community. Member of the Month
Points: 27,267, Level: 24
Points: 27,267, Level: 24 Points: 27,267, Level: 24 Points: 27,267, Level: 24
Activity: 9.9%
Activity: 9.9% Activity: 9.9% Activity: 9.9%
Last Achievements
Quote:
Originally Posted by thelick View Post
And is it really needed?
I should thank Shad0w for his contribute aniway,but i think that there is always another way..

there is but im explaining why most people hook it.
__________________


My greatest fear is a Windows Vista Update! D:

ȜǷ-ɲآɳᶨ4 Hack:http://img42.imageshack.us/img42/473/20090203132330.png
fatboy88 is online now

Reply With Quote

Old 08-27-2010, 06:58 PM   #13
Senior Member

Kosaki's Avatar

Join Date: Aug 2009
Posts: 89
Reputation: 2974
Rep Power: 60
Kosaki is a legend in the cheating communityKosaki is a legend in the cheating communityKosaki is a legend in the cheating communityKosaki is a legend in the cheating communityKosaki is a legend in the cheating communityKosaki is a legend in the cheating communityKosaki is a legend in the cheating communityKosaki is a legend in the cheating communityKosaki is a legend in the cheating communityKosaki is a legend in the cheating communityKosaki is a legend in the cheating community
Disc Dash Champion
Points: 3,422, Level: 5
Points: 3,422, Level: 5 Points: 3,422, Level: 5 Points: 3,422, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Last Achievements
Quote:
Originally Posted by Geecko View Post
just add:


before the first "_asm"
i think u can use it, u only need to get more parameters...ebp+0xC..and so on..
You can't do that in a naked function.
Rather use a global variable.
Kosaki is offline

Reply With Quote

Old 08-27-2010, 07:05 PM   #14
Junior Member

M.Holder's Avatar

Join Date: Aug 2010
Location: Germany
Posts: 47
Reputation: -91
Rep Power: 0
M.Holder is becoming an outcast
Hi,

thank you two for your replies.
Can you explain me where to put ebp + 0xC and what happens at the execution? (bcause i am not a c&p coder, i want to know what the code does at runtime)

How can i understand this: BYTE EndSceneOpCodes[6]; ?
When i am hooking Reset, what must be changed to get it working?
M.Holder is offline

Reply With Quote

Old 08-28-2010, 12:06 AM   #15
h4x0!2

thelick's Avatar

Join Date: Jul 2010
Posts: 95
Reputation: 1050
Rep Power: 31
thelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of rep
Points: 1,473, Level: 3
Points: 1,473, Level: 3 Points: 1,473, Level: 3 Points: 1,473, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Last Achievements
You don't need it for the reset :S
And some1 correct me if i'm wrong, cause i'm not so good with asm and i'm a beginner with the c++ , EBP allocate variables on the stack
thelick is offline

Reply With Quote

Old 08-28-2010, 03:28 AM   #16
UnKnoWnCheaTeR

disavow's Avatar

Threadstarter
Join Date: Jul 2009
Posts: 1,068
Reputation: 49844
Rep Power: 551
disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (2)
Points: 31,279, Level: 26
Points: 31,279, Level: 26 Points: 31,279, Level: 26 Points: 31,279, Level: 26
Activity: 13.8%
Activity: 13.8% Activity: 13.8% Activity: 13.8%
Last Achievements
Quote:
Originally Posted by thelick View Post
You don't need it for the reset :S
And some1 correct me if i'm wrong, cause i'm not so good with asm and i'm a beginner with the c++ , EBP allocate variables on the stack
EBP is filled with data from the stack pointer.
EBP now points to offsets containing data (the parameters).
It's the most generic place I found to hook, as far as I know it will work on many functions.
Not present, since it works... differently.

For endscene however, this is pretty much a complete working base code.
__________________

Shad0w_'s Alter Ego
disavow is online now

Reply With Quote

Old 08-28-2010, 06:51 AM   #17
Level 3

Gellin's Avatar

Join Date: Nov 2007
Location: msdn
Posts: 528
Reputation: 22916
Rep Power: 291
Gellin has reputation that takes up 2GB of server space!Gellin has reputation that takes up 2GB of server space!Gellin has reputation that takes up 2GB of server space!Gellin has reputation that takes up 2GB of server space!Gellin has reputation that takes up 2GB of server space!Gellin has reputation that takes up 2GB of server space!Gellin has reputation that takes up 2GB of server space!Gellin has reputation that takes up 2GB of server space!Gellin has reputation that takes up 2GB of server space!Gellin has reputation that takes up 2GB of server space!Gellin has reputation that takes up 2GB of server space!
Points: 16,705, Level: 17
Points: 16,705, Level: 17 Points: 16,705, Level: 17 Points: 16,705, Level: 17
Activity: 1.1%
Activity: 1.1% Activity: 1.1% Activity: 1.1%
Last Achievements
This is probably OS specific, because the d3d9.dll differs for Win XP and Win 7 | Win Vista, unless you found a place to hook that the code you patched over is the same for both d3d9.dll versions.

I might be wrong though.
__________________
Gellin is offline

Reply With Quote

Old 08-28-2010, 09:35 AM   #18
Junior Member

M.Holder's Avatar

Join Date: Aug 2010
Location: Germany
Posts: 47
Reputation: -91
Rep Power: 0
M.Holder is becoming an outcast
Quote:
Originally Posted by Shad0w_ View Post
EBP is filled with data from the stack pointer.
EBP now points to offsets containing data (the parameters).
It's the most generic place I found to hook, as far as I know it will work on many functions.
Not present, since it works... differently.

For endscene however, this is pretty much a complete working base code.
So, if i understand you correctly, i canīt hook Present with it?

Can i hook DIP and Reset with it?

EDIT:

Warrock crashs with that code:

Hookthread:
Code:
void HookD3D()
{
    Dx9EndSceneHook("d3d9.dll");
 
 
    memcpy((void *)EndSceneOpCodes, (void *)"\x89\x65\xF0\x8B\x75\x08", 6);
 
    while( 1 )
    {
        Sleep( 1000 );
 
        if(memcmp((void *)EndSceneOpCodes, (void *)dwEndScene_hook, 6) == 0 )
            DetourCreate((PBYTE)dwEndScene_hook, (PBYTE)myEndScene, 6);
 
    } 
}
Code:
__declspec(naked) void myEndScene()
{
    __asm
    {
        mov dword ptr ss:[ebp - 10], esp;
        mov esi, dword ptr ss:[ebp + 0x8];    //replace pathced code
        mov m_pD3DDev, esi;    //Get Device
    }
 
    DrawBoxA(m_pD3DDev, 20, 20, 200, 200, D3DCOLOR_ARGB(255, 255, 255, 0), D3DCOLOR_ARGB(255, 0, 0, 0));
 
    __asm
    {
        jmp dwEndScene_ret; //jump back to normal endscene
    }
}
Code:
void Dx9EndSceneHook(LPCSTR D3D9)
{
    DWORD hD3D = NULL;
    while (!hD3D) hD3D = (DWORD)GetModuleHandle(D3D9);
    DWORD PPPDevice = FindPattern(hD3D, 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86", "xx????xx????xx");
    memcpy ( &VTable, (void *)(PPPDevice + 2), 4);
 
    dwEndScene_hook = VTable[42] + 0x2A;
    dwEndScene_ret =dwEndScene_hook + 0x6;
}
My Detour:
Code:
void *DetourCreate (BYTE *src, const BYTE *dst, const int len)
{
    BYTE *jmp;
    DWORD dwback;
    DWORD jumpto, newjump;
 
    VirtualProtect(src,len,PAGE_READWRITE,&dwback);
 
    if(src[0] == 0xE9)
    {
        jmp = (BYTE*)malloc(10);
        jumpto = (*(DWORD*)(src+1))+((DWORD)src)+5;
        newjump = (jumpto-(DWORD)(jmp+5));
        jmp[0] = 0xE9;
        *(DWORD*)(jmp+1) = newjump;
        jmp += 5;
        jmp[0] = 0xE9;
        *(DWORD*)(jmp+1) = (DWORD)(src-jmp);
    }
    else
    {
        jmp = (BYTE*)malloc(5+len);
        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);
}
Should i use an other detour?

It is crashing after the the Chapter 2 MainScreen. But it shows my Rectangle there.
F*** HackShield.

Regards

Last edited by M.Holder; 08-28-2010 at 10:31 AM.
M.Holder is offline

Reply With Quote

Old 08-28-2010, 10:16 AM   #19
Donator

ZeaS's Avatar

Join Date: May 2008
Location: Germany
Posts: 251
Reputation: 18729
Rep Power: 239
ZeaS Will always be a legend at UCZeaS Will always be a legend at UCZeaS Will always be a legend at UCZeaS Will always be a legend at UCZeaS Will always be a legend at UCZeaS Will always be a legend at UCZeaS Will always be a legend at UCZeaS Will always be a legend at UCZeaS Will always be a legend at UCZeaS Will always be a legend at UCZeaS Will always be a legend at UC
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (12)
Awarded to members who have donated 10 times or more. Gratuity (1)
Points: 13,610, Level: 15
Points: 13,610, Level: 15 Points: 13,610, Level: 15 Points: 13,610, Level: 15
Activity: 19.5%
Activity: 19.5% Activity: 19.5% Activity: 19.5%
Last Achievements
Quote:
Originally Posted by M.Holder View Post
So, if i understand you correctly, i canīt hook Present with it?

Can i hook DIP and Reset with it?
you basically can hook every function, you just need to replace the code that your jump messed up, thats all

Quote:
How can i understand this: BYTE EndSceneOpCodes[6]; ?

he's storing the original bytes in there and is checking them in a loop so if the current bytes match these bytes he knows that hackshield removed his hooks and is rehooking then.

Quote:
Whre kann i find the LPDIRECT3DDEVICE9 ?
if you would look at shadow's example, you would see, where you can get the device from "mov m_pD3DDev, esi; //Get the device"

edit
he edited his post

please use code tags :S try using pushad(fd) / popad(fd)
__________________


Last edited by ZeaS; 08-28-2010 at 10:26 AM.
ZeaS is online now

Reply With Quote

Old 08-28-2010, 10:43 AM   #20
h4x0!2

thelick's Avatar

Join Date: Jul 2010
Posts: 95
Reputation: 1050
Rep Power: 31
thelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of rep
Points: 1,473, Level: 3
Points: 1,473, Level: 3 Points: 1,473, Level: 3 Points: 1,473, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Last Achievements
Quote:
Originally Posted by Shad0w_ View Post
EBP is filled with data from the stack pointer.
EBP now points to offsets containing data (the parameters).
It's the most generic place I found to hook, as far as I know it will work on many functions.
Not present, since it works... differently.

For endscene however, this is pretty much a complete working base code.
thx for the explanation and good job

@M.Holder this works goods for the endscene,and the detour that you are using is a simple jmp detour detected from the hackshield ---> 0xe9 00 00 00 00 almost patched months ago

Last edited by thelick; 08-28-2010 at 10:47 AM.
thelick is offline

Reply With Quote
Reply  

  • Submit Thread to Digg
  • Submit Thread to del.icio.us
  • Submit Thread to StumbleUpon
  • Submit Thread to Google
  • Submit Thread to Facebook
  • Submit Thread to My Yahoo!
  • Submit Thread to MySpace
  • Submit Thread to Twitter
  • Submit Thread to Reddit



Tags
d3d9, hook, midfunction, source
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT +1. The time now is 06:39 AM.