Results 1 to 14 of 14
  1. #1
    Zippolino's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    My Mood
    Inspired

    Help me, Only nx chams

    Hi all, i'm italian and sorry for my bad english

    I tried to create a thread in the appropriate section but it does not make me ..could you please move it?

    I want created hack for Combat arms EU..(Simple, only nx chams) i used Visual C++ 2008..
    i have any questions... :
    1) i used perX for Inject my dll (it work? :S)
    2) Dll inject in the game, but not work. (as if there was anything... not crash and not cheat xD)
    3) maybe I'm wrong something in the code :
    Code:
    #include <windows.h>
    #include <stdio.h>
    
    bool IsGameReadyForHook()
    {
    if( GetModuleHandleA( "d3d9.dll"     ) != NULL 
    && GetModuleHandleA( "ClientFX.fxd" ) != NULL 
    && GetModuleHandleA( "CShell.dll"   ) != NULL )
    return true;
    return false;
    }
    void CPush(const char* cmd)
    {
    	_asm
    	{
    		PUSH cmd
    		MOV EAX, 0x0485E40
    		CALL EAX
    		ADD ESP, 0x4
    	}
    }
    void main() {
    
    CPush("SkelModelStencil 1");
    }
    
    DWORD WINAPI dwHackThread(LPVOID)
    {
    while( !IsGameReadyForHook() )
    Sleep(100);
    main();
    return 0;
    }
    BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    {
    DisableThreadLibraryCalls(hDll);
    if ( dwReason == DLL_PROCESS_ATTACH )
    {
    CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL);
    }
    return TRUE;
    }
    Help me please?

  2. #2
    mo3ad001's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    842
    Reputation
    53
    Thanks
    797
    My Mood
    Busy
    wrong section !!
    and you should change your code for this ( you can copy and paste no Errors) it's work perfect test it :
    Code:
    #include <windows.h>
    #include <d3dx9.h>
    
    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");// here u can add your commands
    }
    
    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
    Kenf....(i don't know what is her name)
    You
    Gordon`
    ......
    Last edited by mo3ad001; 04-12-2011 at 12:48 PM.

    H A X O
    Email : Noobmem@hotmail.com


  3. #3
    Zippolino's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    My Mood
    Inspired
    Thank you so much mo3ad001 i edited the code (There was an error on your) but IT WORK! Thank's all MPGH!! Admin, close the thread, it's SOLVED!.
    Last edited by Zippolino; 04-12-2011 at 07:56 AM.

  4. #4
    swatfx's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    659
    Reputation
    20
    Thanks
    108
    My Mood
    Mellow
    lol @mo3ad001 spoonfeed more

    but anyway zippolino your code didn't work because you have to call Pushtoconsole from within one of the games functions ex( Endscene or Present) and that is what mo3 added.

  5. #5
    PashaAmd's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Posts
    1,008
    Reputation
    58
    Thanks
    224
    he....gave....him....everythign??! hook and all!

  6. #6
    Reimy's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    178
    Reputation
    28
    Thanks
    704
    My Mood
    Sleepy
    HAHAH Funny,

    On top

    #include Hell


    hahaha XD

    im boring


    haha


    ---------------------------------------------
    ---------------------------------------------

    Quote Originally Posted by ihackyoufack View Post
    reimys hack looks epic and has epic features
    NOBODY SHALL DEFEAT REIMY!!!
    exept chocolate but chocoleate hacks in real life :O


  7. #7
    mo3ad001's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    842
    Reputation
    53
    Thanks
    797
    My Mood
    Busy
    Yeah There is no any problem

    H A X O
    Email : Noobmem@hotmail.com


  8. #8
    PashaAmd's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Posts
    1,008
    Reputation
    58
    Thanks
    224
    I wish when I started I got this :c

  9. #9
    mo3ad001's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    842
    Reputation
    53
    Thanks
    797
    My Mood
    Busy
    Quote Originally Posted by PashaAmd View Post
    I wish when I started I got this :c
    Lol you were have a Gellins base , Right !!

    H A X O
    Email : Noobmem@hotmail.com


  10. #10
    PashaAmd's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Posts
    1,008
    Reputation
    58
    Thanks
    224
    what? you make no sense...

  11. #11
    mo3ad001's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    842
    Reputation
    53
    Thanks
    797
    My Mood
    Busy
    Quote Originally Posted by PashaAmd View Post
    what? you make no sense...
    No Problem
    //closed ^^

    H A X O
    Email : Noobmem@hotmail.com


  12. #12
    PashaAmd's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Posts
    1,008
    Reputation
    58
    Thanks
    224
    we should keep it open in case someone else needs help

  13. #13
    Ch40zz-C0d3r's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    831
    Reputation
    44
    Thanks
    401
    My Mood
    Twisted
    U c&p very ogten :/
    U dont know whats asm right?
    U cant use the same asm code for other engine lolz

  14. #14
    PashaAmd's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Posts
    1,008
    Reputation
    58
    Thanks
    224
    Quote Originally Posted by Ch40zz-C0d3r View Post
    U c&p very ogten :/
    U dont know whats asm right?
    U cant use the same asm code for other engine lolz
    who me??