Thread: PTC Method

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    H4ckBlood's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    The Neterlands
    Posts
    78
    Reputation
    10
    Thanks
    6

    PTC Method

    Hi guys, well as the title says could u guys tell me the undetected PTC Method?
    And/Or write a small tutorial about making a undetected PTC Method this will help other Hackers a lot, and also will it increase our skills

    Its true, im H4ckBlood and im back,
    Still not afraid, Just Google me!

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

    xXTheFirstXx (06-08-2011)

  3. #2
    LionelMessi10's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    MPGH.NET
    Posts
    6,125
    Reputation
    114
    Thanks
    4,545
    My Mood
    Aggressive
    Code:
    void Push ( const char* cmd )
    {
    	_asm
    	{
    		PUSH cmd
    		MOV EAX, 0x485F60
    		CALL EAX
    		ADD ESP, 0x4
    	}
    }
    Code:
    Push("ShowFps 1");
    Last edited by LionelMessi10; 06-08-2011 at 03:46 PM.

  4. The Following 2 Users Say Thank You to LionelMessi10 For This Useful Post:

    H4ckBlood (06-09-2011),xXTheFirstXx (06-08-2011)

  5. #3
    H4ckBlood's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    The Neterlands
    Posts
    78
    Reputation
    10
    Thanks
    6
    Quote Originally Posted by Alessandra View Post
    Code:
    void Push ( const char* cmd )
    {
    	_asm
    	{
    		PUSH cmd
    		MOV EAX, 0x485F60
    		CALL EAX
    		ADD ESP, 0x4
    	}
    }
    Code:
    Push("ShowFps 1");
    Thank you a lot
    You helped me out, and im sure alot of other hackers 2

    Hmm it is not working?

    Code:
    #include <windows.h>
    
    
    #pragma comment(lib,"shell32.lib")
    
    void Push ( const char* cmd )
    {
    	_asm
    	{
    		PUSH cmd
    		MOV EAX, 0x485F60
    		CALL EAX
    		ADD ESP, 0x4
    	}
    }
    
    
    DWORD *LTClient = ( DWORD* )( 0x375087EC );
    void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
    
    bool IsGameReadyForHook()
    {
    if( GetModuleHandleA( "d3d9.dll" ) != NULL
    && GetModuleHandleA( "ClientFX.fxd" ) != NULL
    && GetModuleHandleA( "CShell.dll" ) != NULL )
    return true;
    
    return false;
    }
    void MemCopy(void* Dest, const void* Src, int Len)
    {
    DWORD OldProtect;
    DWORD OldProtect2;
    VirtualProtect(Dest, Len, PAGE_EXECUTE_READWRITE, &OldProtect);
    memcpy(Dest, Src, Len);
    VirtualProtect(Dest, Len, OldProtect, &OldProtect2);
    FlushInstructionCache(GetCurrentProcess(), Dest, Len);
    }
    void main()
    {
    
    while (!IsGameReadyForHook()){
    Sleep(20);
    }
    bool FPS = false;//FPS
    
    //right here is stuff that will be on when it starts up
    //Example Below
    //PushToConsole("FireSpeed 999.999999" );
    //firerate= false;
    
    while(true){
    if(GetAsyncKeyState(VK_HOME)<0){
    if(FPS){
    Push("ShowFps 1");
    FPS = false;
    } else {
    Push("ShowFps 0");
    FPS = true;
    }
    }
    
    
    Sleep(160);
    }
    }
    BOOL APIENTRY DllMain( HMODULE hModule,
    DWORD ul_reason_for_call,
    LPVOID lpReserved
    )
    {
    	switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH:
    ShellExecute;
    CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)&main, NULL, 0,NULL);
    break;
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
    break;
    }
    return TRUE;
    }
    }
    Ive got this but it seems not working!
    Last edited by H4ckBlood; 06-08-2011 at 04:01 PM.

    Its true, im H4ckBlood and im back,
    Still not afraid, Just Google me!

  6. The Following User Says Thank You to H4ckBlood For This Useful Post:

    xXTheFirstXx (06-08-2011)

  7. #4
    LionelMessi10's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    MPGH.NET
    Posts
    6,125
    Reputation
    114
    Thanks
    4,545
    My Mood
    Aggressive
    Hotkey Base Working..

    Scan:
    VirusTotal - Free Online Virus, Malware and URL Scanner
    Hotkeys.rar - Verificador de malware do Jotti


    Code:
    Code:
    #include "stdafx.h"
    #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 Push ( const char* cmd )
    {
    	_asm
    	{
    		PUSH cmd
    		MOV EAX, 0x485F60
    		CALL EAX
    		ADD ESP, 0x4
    	}
    }
    
    void main() 
    {
    Push("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;
    }
    U Need Directx SDK (June 2010)

    @Disturbed
    @AVGN
    Last edited by LionelMessi10; 06-08-2011 at 04:24 PM.

  8. The Following 4 Users Say Thank You to LionelMessi10 For This Useful Post:

    [MPGH]AVGN (06-08-2011),ctpsolo (07-05-2011),H4ckBlood (06-09-2011),OBrozz (06-10-2011)

  9. #5
    AVGN's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Making America Great Again.
    Posts
    15,451
    Reputation
    1549
    Thanks
    6,234
    Quote Originally Posted by Alessandra View Post
    Hotkey Base Working..

    Scan:
    VirusTotal - Free Online Virus, Malware and URL Scanner
    Hotkeys.rar - Verificador de malware do Jotti


    Code:
    Code:
    #include "stdafx.h"
    #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 Push ( const char* cmd )
    {
        _asm
        {
            PUSH cmd
            MOV EAX, 0x485F60
            CALL EAX
            ADD ESP, 0x4
        }
    }
    
    void main() 
    {
    Push("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;
    }
    U Need Directx SDK (June 2010)

    @Disturbed
    @AVGN
    .approved .



    ^Thanks to RJ^




  10. #6
    H4ckBlood's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    The Neterlands
    Posts
    78
    Reputation
    10
    Thanks
    6
    Now ive got it like this:

    Code:
    bool FPS=true
    
    void main(){ 
    if(GetAsyncKeyState(VK_HOME)<0){
    	if(FPS){
    {
    Push("ShowFps 1");
    FPS = false;
    } else {
    Push("ShowFps 0");
    FPS = true;
    }
    }
    But now i get this error at else : Error Expected a Statement.
    It can be me, but im not really getting this and its a long time ago that i coded and i forget a lot ,

    Its true, im H4ckBlood and im back,
    Still not afraid, Just Google me!

  11. #7
    mo3ad001's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    842
    Reputation
    53
    Thanks
    795
    My Mood
    Busy
    Quote Originally Posted by H4ckBlood View Post
    Now ive got it like this:

    Code:
    bool FPS=true
    
    void main(){ 
    if(GetAsyncKeyState(VK_HOME)<0){
    	if(FPS){
    {
    Push("ShowFps 1");
    FPS = false;
    } else {
    Push("ShowFps 0");
    FPS = true;
    }
    }
    But now i get this error at else : Error Expected a Statement.
    It can be me, but im not really getting this and its a long time ago that i coded and i forget a lot ,
    or you can use this

    [html]class LTClient
    {
    public:
    char _0x0000[520];
    int( *PushConsoleCommand )( const char* Command ); //0x0208

    };//Size=0x020C[/html]
    Last edited by mo3ad001; 06-09-2011 at 06:21 AM.

    H A X O
    Email : Noobmem@hotmail.com


  12. #8
    NOOB's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,863
    Reputation
    425
    Thanks
    8,598
    Quote Originally Posted by H4ckBlood View Post
    Now ive got it like this:

    Code:
    bool FPS=true
    
    void main(){ 
    if(GetAsyncKeyState(VK_HOME)<0){
    	if(FPS){
    {
    Push("ShowFps 1");
    FPS = false;
    } else {
    Push("ShowFps 0");
    FPS = true;
    }
    }
    But now i get this error at else : Error Expected a Statement.
    It can be me, but im not really getting this and its a long time ago that i coded and i forget a lot ,
    are you fucking kidding me?

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

    OBrozz (06-10-2011)

  14. #9
    H4ckBlood's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    The Neterlands
    Posts
    78
    Reputation
    10
    Thanks
    6
    Quote Originally Posted by NOOB View Post


    are you fucking kidding me?
    Shall we switch names?

    Its true, im H4ckBlood and im back,
    Still not afraid, Just Google me!

  15. #10
    speedforyou's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    741
    Reputation
    -59
    Thanks
    108
    My Mood
    Happy
    LOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLO LOLOLO
    ok XD

    steel o-o's sig =
    = Done , = Not Done

    Leecher 0 =
    Newbie 25 =
    Member 50 =
    Advanced Member 100 =
    H4X0R Member 150 =
    Dual-Keyboard Member 250 =
    Expert Member 500 =
    's Trainer 750 =
    MPGH Expert 1000 =
    Synthetic Hacker 1250 =
    Blackhat Hacker 1500 =
    Whitehat Hacker 2000 =
    's Guardian 2500 =
    Upcoming MPGHiean 3000 =
    MPGH Addict 3500 =
    MPGHiean 4000 =
    MPGH Knight 4500 =
    MPGH Lord 5000 =
    MPGH Champion 5500 =
    MPGH King 6000 =
    MPGH Legend 6500 =
    MPGH God 7000 =
    MPGH God II 7500 =
    MPGH God III 8000 =
    MPGH God IV 8500 =
    MPGH God V 9000 =
    Arun's Slave 9500 =
    Dave's Slave 10000 =

  16. #11
    SNal2F's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    175
    Reputation
    30
    Thanks
    99
    Games that rely on virtual calls can be easily rewritten

    we know there are check in the console command function,but we also know that it is a virtual call

    so hook the function on the table and re write it


    int __cdecl myConsoleCommand( const char* szCommand )
    {


    ConsoleSub(0xADDBEEF,szCommand);


    }


    this is something worth learning specially for games where you need to modify something simple like a jmp or a NOP and the game actually scans memory and doesnt check the table.


    other then that you could call the subfunctions, modify the checks but this is something a few people might know about and can be used to exploit a number of functions and rewriting them in your favor

  17. #12
    OBrozz's Avatar
    Join Date
    May 2011
    Gender
    male
    Posts
    820
    Reputation
    65
    Thanks
    813
    Quote Originally Posted by NOOB View Post


    are you fucking kidding me?
    LOL you made me laugh for a strait minute.

    Quote Originally Posted by H4ckBlood View Post
    Now ive got it like this:

    Code:
    bool FPS=true
    
    void main(){ 
    if(GetAsyncKeyState(VK_HOME)<0){
    	if(FPS){
    {
    Push("ShowFps 1");
    FPS = false;
    } else {
    Push("ShowFps 0");
    FPS = true;
    }
    }
    But now i get this error at else : Error Expected a Statement.
    It can be me, but im not really getting this and its a long time ago that i coded and i forget a lot ,
    you forgot a "}" at the end of your code. Your C++ compiler tells you that I'm sure.
    Here let me fix with notepad.

    Code:
    bool FPS=true
    
    void main(){ 
    if(GetAsyncKeyState(VK_HOME)<0){
    Push("ShowFps 1");
    FPS = false;
    } else {
    Push("ShowFps 0");
    FPS = true;
       }
    }
    Last edited by OBrozz; 06-10-2011 at 06:09 PM.

  18. #13
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    4,922
    My Mood
    Cool
    Quote Originally Posted by OBrozz View Post
    LOL you made me laugh for a strait minute.



    you forgot a "}" at the end of your code. Your C++ compiler tells you that I'm sure.
    Here let me fix with notepad.

    Code:
    bool FPS=true
    
    void main(){ 
    if(GetAsyncKeyState(VK_HOME)<0){
    Push("ShowFps 1");
    FPS = false;
    } else {
    Push("ShowFps 0");
    FPS = true;
       }
    }
    whats the point in FPS in yours?? it is just they to be true or false.


    i am working on a New Brand PTC, , it is under the down low
    Last edited by topblast; 06-10-2011 at 07:01 PM.
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  19. #14
    ctpsolo's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    252
    Reputation
    10
    Thanks
    34
    My Mood
    Amused
    Quote Originally Posted by Alessandro10 View Post
    Hotkey Base Working..

    Scan:
    VirusTotal - Free Online Virus, Malware and URL Scanner
    Hotkeys.rar - Verificador de malware do Jotti


    Code:
    Code:
    #include "stdafx.h"
    #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 Push ( const char* cmd )
    {
    	_asm
    	{
    		PUSH cmd
    		MOV EAX, 0x485F60
    		CALL EAX
    		ADD ESP, 0x4
    	}
    }
    
    void main() 
    {
    Push("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;
    }
    U Need Directx SDK (June 2010)

    @Disturbed
    @AVGN
    I'd like to thank you for this, the code got me going again because last time I fiddled with hacks for CA was nearly a year ago before they started to check from where the console commands where coming...

    However with a slightly modified version of that source the game crashes after 2-3 minutes ingame so I guess something is detected, the hook perhaps? Anyone have an idea? I also believe they implemented some more things while I was gone, sources nowadays seems to check that you are ingame before they activate the hacks. Do you DC with them on in the lobby?

    Edit: Wasn't hook, it seems to crash due to a memory access violation... Found this in debug files


    2011/x/x ----- 0:9:56 - CombatArms Debug Start!

    Exception code: C0000005


    Fault address: 374B9AA6 01:003B8AA6 C:\Nexon\Combat Arms EU\Game\cshell.dll
    Last edited by ctpsolo; 07-06-2011 at 04:00 AM.

  20. #15
    -Dimensions-'s Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    243
    Reputation
    2
    Thanks
    161
    My Mood
    Aggressive
    Sorry to bring up a old thread but I sort of have a problem...
    I'm using these functions with these addies: [C++] Unwrapped Console PTC Function - Pastebin.com and its not getting detected nor working.
    Commented out in the PTC Function means I've tried it all ready.
    I also additionally tried both codes with and without the InGame function.
    Just to keep things straight credits for InGame thingy to flameswor10.
    Came from a hotkey base a friend sent me.

Page 1 of 2 12 LastLast