Thread: HotKey Base

Page 1 of 3 123 LastLast
Results 1 to 15 of 32
  1. #1
    mo3ad001's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    842
    Reputation
    53
    Thanks
    795
    My Mood
    Busy

    HotKey Base


    Hey Guys
    this is a simple HotKeyBase HaveFun
    now you can make your own hack
    Code:
    #include <windows.h>
    #include <d3dx9.h>
    
    #pragma message( "[www.MPGh.me] HotKeyBase CopyRight (C) \nE-Mail : Noobmem@hotmail.com" )
    
    typedef HRESULT ( WINAPI* oPresent ) ( LPDIRECT3DDEVICE9 pDevice, CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion);
    oPresent pPresent;
    
    bool IsGameReadyForHook()
    {
    	if( GetModuleHandleA( "d3d9.dll"     ) != NULL 
    		&& GetModuleHandleA( "ClientFX.fxd" ) != NULL 
    		&& GetModuleHandleA( "CShell.dll"   ) != NULL )
    		return true;
    	return false;
    }
    void Memoria( void* pvAddress, void* pvBuffer, size_t len )
    {
    	if( *(BYTE*)pvAddress == *(BYTE*)pvBuffer )
    		return;
    
    	memcpy( ( void* )pvAddress, ( void* )pvBuffer, len );
    }
    
    bool bDataCompare(const BYTE* pData, const BYTE* bMask, const char* szMask) 
    { 
        for(;*szMask;++szMask,++pData,++bMask) 
            if(*szMask=='x' && *pData!=*bMask )  
                return false; 
        return (*szMask) == NULL; 
    } 
    
    
    DWORD FindPattern(DWORD dwAddress,DWORD dwLen,BYTE *bMask,char * szMask) 
    { 
        for(DWORD i=0; i < dwLen; i++) 
    		if(bDataCompare( (BYTE*)( dwAddress+i ),bMask,szMask) ) 
                return (DWORD)(dwAddress+i); 
         
        return 0; 
    }
    
    // Kef... it's hard name xD
    DWORD VTable(int index)
    {
    	DWORD* devicePtr = 0;
    	
    	DWORD hD3D9 = NULL;
    	
    	while(hD3D9 == NULL){
    		Sleep(100);
    		try
    		{
    		hD3D9 = (DWORD)GetModuleHandleA("d3d9.dll");}
    		catch(...)
    		{
    			hD3D9 = NULL;
    		}}
    
    	DWORD addy = FindPattern(hD3D9, 0x1280000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86", "xx????xx????xx");
    	Memoria (&devicePtr, (void*)(addy+2), 4);
    
    	if(devicePtr == NULL){
    		return 0;}
    
    	return devicePtr[index];
    
    }
    void CPush(const char* cmd)
    {
    	_asm
    	{
    		PUSH cmd
    		MOV EAX, 0x0485E40
    		CALL EAX
    		ADD ESP, 0x4
    	}
    }
    void main() 
    {
    
    	CPush("ShowFps 1");
    }
    
    HRESULT WINAPI gellPresent(LPDIRECT3DDEVICE9 pDevice, CONST RECT *pSourceRect, 
    						   CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion)
    {
    	_asm pushad;
    	main();
    	_asm popad;
    	return pPresent(pDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
    }
    
    void *DetourCreate( BYTE *src, const BYTE *dst )
    {
    	int len = 5;
    
    	BYTE *jmp = (BYTE*)malloc( len+5 );
    	DWORD dwBack;
    	VirtualProtect( src, len, PAGE_EXECUTE_READWRITE, &dwBack );
    	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;
    	VirtualProtect( src, len, dwBack, &dwBack );
    
    	return( jmp-len );
    }
    
    void Hook(void)
    {
    	DWORD dwPresent  = VTable(17);
    	pPresent    = (oPresent)DetourCreate(( PBYTE)dwPresent, ( PBYTE )gellPresent);
    }
    
    DWORD WINAPI dwD3D9Thread(LPVOID)
    {
    	while( !IsGameReadyForHook() )
    		Sleep(100);
    	Hook();
    	return 0;
    }
    BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    {
    	DisableThreadLibraryCalls(hDll);
    	if ( dwReason == DLL_PROCESS_ATTACH )
    	{
    		CreateThread(NULL, NULL, dwD3D9Thread, NULL, NULL, NULL);
    	}
    	return TRUE;
    }

    Creetiz :
    Gellin
    Gordon`
    kotentopf
    @tony_Blaster
    @Zippolino
    Last edited by mo3ad001; 04-12-2011 at 02:25 PM.

    H A X O
    Email : Noobmem@hotmail.com


  2. The Following User Says Thank You to mo3ad001 For This Useful Post:

    SteamAss (04-13-2011)

  3. #2
    S0aD's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    2,250
    Reputation
    5
    Thanks
    589
    U Make C+P ?

  4. #3
    mo3ad001's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    842
    Reputation
    53
    Thanks
    795
    My Mood
    Busy
    Quote Originally Posted by S0aD View Post
    U Make C+P ?
    Yep because it's too fast :P

    H A X O
    Email : Noobmem@hotmail.com


  5. #4
    LionelMessi10's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    MPGH.NET
    Posts
    6,125
    Reputation
    114
    Thanks
    4,545
    My Mood
    Aggressive
    Nice C+P

  6. #5
    mo3ad001's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    842
    Reputation
    53
    Thanks
    795
    My Mood
    Busy
    Quote Originally Posted by Alessandro10 View Post
    Nice C+P
    lol
    as you like

    H A X O
    Email : Noobmem@hotmail.com


  7. #6
    PashaAmd's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Posts
    1,014
    Reputation
    58
    Thanks
    224
    change some things about it...don't make it straight c & p change some addies etc...

  8. #7
    DeadLinez's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    http://mpgh.net Sexy Points: 989,576,420
    Posts
    465
    Reputation
    11
    Thanks
    499
    My Mood
    Psychedelic
    Quote Originally Posted by PashaAmd View Post
    change some things about it...don't make it straight c & p change some addies etc...
    well maybe you can do that instead getting other people to do it for you lazy ass..
    #define Fucking_dumbass

  9. The Following User Says Thank You to DeadLinez For This Useful Post:

    ken53406 (07-14-2011)

  10. #8
    ac1d_buRn's Avatar
    Join Date
    Aug 2009
    Gender
    female
    Location
    CA Source Section
    Posts
    3,406
    Reputation
    157
    Thanks
    3,991
    My Mood
    Flirty
    Is the hook patched?

  11. #9
    PashaAmd's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Posts
    1,014
    Reputation
    58
    Thanks
    224
    Quote Originally Posted by DeadLinez View Post
    well maybe you can do that instead getting other people to do it for you lazy ass..
    #define Fucking_dumbass
    what are you talking about i'm not OP
    noob

  12. #10
    NOOBJr's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    in NOOB
    Posts
    1,426
    Reputation
    112
    Thanks
    693


    My views on this thread^^

  13. The Following User Says Thank You to NOOBJr For This Useful Post:

    PashaAmd (04-12-2011)

  14. #11
    mo3ad001's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    842
    Reputation
    53
    Thanks
    795
    My Mood
    Busy
    Quote Originally Posted by ac1d_buRn View Post
    Is the hook patched?
    it's work Perfect without any crashing
    Last edited by mo3ad001; 04-13-2011 at 04:04 AM.

    H A X O
    Email : Noobmem@hotmail.com


  15. #12
    ac1d_buRn's Avatar
    Join Date
    Aug 2009
    Gender
    female
    Location
    CA Source Section
    Posts
    3,406
    Reputation
    157
    Thanks
    3,991
    My Mood
    Flirty
    Quote Originally Posted by mo3ad001 View Post
    it's work Perfect without any crashing
    i will be the judge of that right now

    EDIT: Tested and DC'd with my base.
    FOR FUCK SAKES
    Last edited by ac1d_buRn; 04-13-2011 at 08:55 AM.

  16. #13
    swatfx's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    661
    Reputation
    20
    Thanks
    108
    My Mood
    Mellow
    Quote Originally Posted by ac1d_buRn View Post


    i will be the judge of that right now

    EDIT: Tested and DC'd with my base.
    FOR FUCK SAKES
    lol...

  17. #14
    yoyoman4567's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    205
    Reputation
    9
    Thanks
    4
    My Mood
    Happy
    thanks for the base

  18. #15
    PashaAmd's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Posts
    1,014
    Reputation
    58
    Thanks
    224
    Poor acid

Page 1 of 3 123 LastLast