Results 1 to 14 of 14
  1. #1
    dborba's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    18
    Reputation
    10
    Thanks
    3
    My Mood
    Fine

    [Help] Programmers help me!

    I'm starting to ride my first menu with Hacker'm already with the base but not his place to put the code of the hacker, I would like someone could tell me where to put the codes.

    Code:
    #include "Base.h"
    #include "Menu.h"
    #include "Detour.h"
    #include "ADE32.h"
    #include <time.h>
    #include <stdio.h>
    int frame;
    
    
    DWORD dwHSDevicePointer, dwDevicePointer;
    
    int menuX = 20, menuY = 100, offsetX, offsetY;
    bool isDragging = false;
    POINT cPos;
    
    DWORD hD3D, adr, *vtbl; 
    
    bool Compare(const BYTE* pData, const BYTE* bMask, const char* szMask){
    	for(;*szMask;++szMask,++pData,++bMask)
    		if(*szMask=='x' && *pData!=*bMask)   return 0;
    	return (*szMask) == NULL;
    }
    
    DWORD Pattern(DWORD dwAddress,DWORD dwLen,BYTE *bMask,char * szMask){
    	for(DWORD i=0; i<dwLen; i++)
    		if (Compare((BYTE*)(dwAddress+i),bMask,szMask))  return (DWORD)(dwAddress+i);
    	return 0;
    }
    
    void __cdecl Push( const char* szCommand )
    {
    DWORD *LTClient = ( DWORD* )(0xLTADRESS);
    DWORD CNADDIE = 0x46F670;
    void* Send = ( void* )*( DWORD* )(CNADDIE);
    void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
    __asm
    {
    push szCommand;
    call CONoff;
    add esp,4;
    
    }
    }
    
    /***************************************************************************************************/
    LPD3DXFONT pFont;
    LPDIRECT3DDEVICE9 g_pDevice = 0;
    
    int	  FPScounter = 0;
    float FPSfLastTickCount = 0.0f;
    float FPSfCurrentTickCount;
    
    
    void DrawString(LPD3DXFONT Font, long x, long y, D3DCOLOR fontColor, char *text, ...)
    {  
        RECT rct;    
        rct.left     = x - 1;    
        rct.right    = x + 1;    
        rct.top      = y - 1 ;    
        rct.bottom   = y + 1;  
    
        if(!text) { return; } 
        va_list va_alist; 
        char logbuf[256] = {0}; 
        va_start (va_alist, text); 
        _vsnprintf (logbuf+strlen(logbuf), sizeof(logbuf) - strlen(logbuf), text, va_alist); 
        va_end (va_alist); 
        RECT FontRect = { x, y, x, y }; 
        pFont->DrawTextA(NULL, logbuf, -1, &rct, DT_NOCLIP, fontColor);  
    }
    
    
    void FillRGB( int x, int y, int w, int h, D3DCOLOR yourcolor, IDirect3DDevice9* pDevice )
    {
    const DWORD D3D_FVF = D3DFVF_XYZRHW | D3DFVF_DIFFUSE;
    struct Vertex
    {
    float x,y,z,ht;
    DWORD yourcolor;
    }
    
    V[4] =
    {
    {(float)x,(float)(y+h), 0.0f, 0.0f, yourcolor},
    {(float)x,(float)y, 0.0f, 0.0f, yourcolor},
    {(float)(x+w),(float)(y+h), 0.0f, 0.0f, yourcolor},
    {(float)(x+w),(float)y, 0.0f, 0.0f, yourcolor}
    };
    pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );
    pDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA );
    pDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_FALSE );
    pDevice->SetRenderState( D3DRS_FOGENABLE, false );
    
    pDevice->SetFVF(D3D_FVF);
    pDevice->SetTexture(0, NULL);
    pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,2,V,sizeof(Vertex));
    }
    
    
    void DrawBorder( int x, int y, int w, int h, int px, D3DCOLOR BorderColor, IDirect3DDevice9* pDevice )
    {
    	FillRGB( x, (y + h - px), w, px,	BorderColor, pDevice );
    	FillRGB( x, y, px, h,				BorderColor, pDevice );
    	FillRGB( x, y, w, px,				BorderColor, pDevice );
    	FillRGB( (x + w - px), y, px, h,	BorderColor, pDevice );
    }
    
    void DrawBox( int x, int y, int w, int h, D3DCOLOR BoxColor, D3DCOLOR BorderColor, IDirect3DDevice9* pDevice )
    {
    	FillRGB( x, y, w, h,		BoxColor, pDevice );
    	DrawBorder( x, y, w, h, 1,	BorderColor, pDevice );
    }
    
    void FPScheck(char *str, char *format)
    {
    	FPSfCurrentTickCount = clock() * 0.001f;
    	FPScounter++;
    
    	if((FPSfCurrentTickCount - FPSfLastTickCount) > 1.0f) {
    	    FPSfLastTickCount = FPSfCurrentTickCount;
    		sprintf(str,format,FPScounter);
    	    FPScounter = 0;
    	} 
    }
    
    HRESULT GenerateTexture(IDirect3DDevice9 *Device_Interface, IDirect3DTexture9 **ppD3Dtex, DWORD colour32)
    {
    	if( FAILED(Device_Interface->CreateTexture(8, 8, 1, 0, D3DFMT_A4R4G4B4, D3DPOOL_MANAGED, ppD3Dtex, NULL)) )
    	return E_FAIL;
    
    	WORD colour16 = ((WORD)((colour32>>28)&0xF)<<12)
    	|(WORD)(((colour32>>20)&0xF)<<8)
    	|(WORD)(((colour32>>12)&0xF)<<4)
    	|(WORD)(((colour32>>4)&0xF)<<0);
    
    	D3DLOCKED_RECT d3dlr;
    	(*ppD3Dtex)->LockRect(0, &d3dlr, 0, 0);
    	WORD *pDst16 = (WORD*)d3dlr.pBits;
    
    	for(int xy=0; xy < 8*8; xy++)
    	*pDst16++ = colour16;
    
    	(*ppD3Dtex)->UnlockRect(0);
    
    	return S_OK;
    }
    /************************************************************************************/
    bool Memoria( void * pDest, char * szPatch, size_t sSize ){
    DWORD dwOrgProtect = NULL;
    if ( !VirtualProtect ( pDest, sSize, PAGE_EXECUTE_READWRITE, &dwOrgProtect ))
    return FALSE;
    
    
    memcpy( pDest, szPatch, sSize );
    VirtualProtect( pDest, sSize, dwOrgProtect, NULL );
    return TRUE;
    }
    
    bool IsGameReadyForHook(void)
    {
        if( GetModuleHandleA( "d3d9.dll"     ) != NULL 
         && GetModuleHandleA( "ClientFX.fxd" ) != NULL 
         && GetModuleHandleA( "CShell.dll"   ) != NULL )
            return true;
        return false;
    }
    
    char sFPS[20]       ="xxx Fps";
    
    int visuals		= 0;
    
    int	cham		= 0;
    int	xhair		= 0;
    int Menu		= 0;
    
    int reload      = 0;
    
    
    char *Folder[] = { "+"  , "-" };	
    char *OnOff[]  = { "ON", "OFF"};
    	
    void RebuildMenu(void)
    
    {
       MenuAddText("Framerate"	, sFPS);
    	MenuAddItem("Menu"	, Folder, &visuals, 2, MENUFOLDER);
    	 if (visuals) {
    	MenuAddItem("No-Reload"	, OnOff	, &Menu	, 2, MENUITEM);
    
     
    	}
    }
    
    void ReFont(LPDIRECT3DDEVICE9 pDevice)
    {
    	if (g_pDevice != pDevice)
    	{
    		g_pDevice = pDevice;
    		try
    		{
    			if (pFont != 0)
    				pFont->Release();
    		} catch (...) {}
    		pFont = 0;
    		D3DXCreateFontA(pDevice, 15, 0, FW_NORMAL, 0, 0, DEFAULT_CHARSET, OUT_TT_ONLY_PRECIS, PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &pFont );
    		
    	}
    
    }
    
    void RenderFrame(LPDIRECT3DDEVICE9 pDevice)
    {
    	ReFont(pDevice);
    	if(Visible == 1) {
    
    
    	DrawBox(menuX-10, menuY-8, 140, frame, D3DCOLOR_ARGB(150, 0, 0, 0), D3DCOLOR_ARGB(255, 255, 255, 255), pDevice);
    	DrawBox( 8, 8, 140, 20, D3DCOLOR_ARGB(150, 0, 0, 0), D3DCOLOR_ARGB(255, 255, 255, 255), pDevice);
    	DrawString( pFont, 10, 10, D3DCOLOR_ARGB(255, 255, 0, 0), "   Nice-Shotter 1.0");
    
    	}else{
    
    	DrawBox( 8, 8, 140, 20, D3DCOLOR_ARGB(150, 0, 0, 0), D3DCOLOR_ARGB(255, 255, 255, 255), pDevice);
    	DrawString( pFont, 10, 10, D3DCOLOR_ARGB(255, 255, 0, 0), " Nice-Shotter 1.0");
    
    	}
    	
    FPScheck(sFPS,"%d");
    
    	if (Menu == 1){
    	if(GetAsyncKeyState(VK_LBUTTON) < 0) 
    	{
    
    		GetCursorPos(&cPos);
    		
    		if(cPos.x > menuX - 10 && cPos.x < menuX + 125 && cPos.y > menuY - 10 && cPos.y < menuY + 455){
    			
    			if(!isDragging){
    
    				offsetX = cPos.x - menuX;
    				offsetY = cPos.y - menuY;
    				isDragging = true;
    			}
    		}
    	} else {
    
    		isDragging = false;
    	}
    	}
    	if(isDragging){
    		
    		menuX = cPos.x - offsetX;
    		menuY = cPos.y - offsetY;
    	}
    
    
    	if (Max == 0) RebuildMenu();
    	MenuShow(menuX,menuY,pFont);
    	MenuNav();
    }
    
    
    void PTC(void)
    {
    	while(1)
    	{
    		Sleep(200);
    
    		}
    		Sleep(200);
    	}
    
    HRESULT myPresent(LPDIRECT3DDEVICE9 pDevice, CONST RECT* pSourceRect,CONST RECT* pDestRect, HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion)
    {
    	_asm NOP;
    	RenderFrame(pDevice);
    	return pPresent(pDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
    }
    
    HRESULT WINAPI myReset( LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters )
    {
    	__asm NOP;
    	pFont->OnLostDevice();
    	HRESULT hRet = pReset(pDevice, pPresentationParameters);
    	pFont->OnResetDevice();
        return hRet;
    }
    
    DWORD WINAPI Hacks(LPVOID)
    {
    	while( !IsGameReadyForHook() )
    	Sleep(100);
    	PTC();
    	return 0;
    }
    
    bool bCompare(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( bCompare( (BYTE*)( dwAddress+i ),bMask,szMask) )
    			return (DWORD)(dwAddress+i);
    	return 0;
    }
    
    DWORD WINAPI D3DInit(LPVOID)
    {
    	
    	hD3D = 0; 
    
        do {
    		hD3D = (DWORD)GetModuleHandleA("d3d9.dll"); 
            Sleep(10); 
        } while(!hD3D); 
        adr = FindPattern(hD3D, 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86", "xx????xx????xx"); 
       
    	if (adr) { 
            memcpy(&vtbl,(void *)(adr+2),4);
            pReset     =  (oReset)DetourCreate		(( BYTE* )vtbl[16],	( BYTE* )myReset,	DETOUR_TYPE_JMP );
    		pPresent   =  (oPresent)DetourCreate	(( BYTE* )vtbl[17],	( BYTE* )myPresent, DETOUR_TYPE_JMP );
    	}
    	return 0;
    }
    
    BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    {
    	DisableThreadLibraryCalls(hDll);
    	if (dwReason == DLL_PROCESS_ATTACH)
    	{
    		CreateThread(NULL, NULL, Hacks, NULL, NULL, NULL);
    		CreateThread(NULL, NULL, D3DInit, NULL, NULL, NULL);
    	}
    	return TRUE;
    }
    I appreciate if someone help me.

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

    rodolfgonzales4 (11-21-2010)

  3. #2
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,159
    Reputation
    490
    Thanks
    2,253
    Just Create a new void Function then thread it in dll main
    /Moved Coding Help/Discussion

  4. #3
    BSOD's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    181
    Reputation
    31
    Thanks
    35
    What whit said is true.

    But to make it clear for a person like you ,

    after this VV
    Code:
    void PTC(void)
    {
    	while(1)
    	{
    		Sleep(200);
    Call your hacks.

  5. #4
    NOOB's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,843
    Reputation
    425
    Thanks
    8,616
    Don't forget that your PTC method is out of date.

  6. #5
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,159
    Reputation
    490
    Thanks
    2,253
    Quote Originally Posted by ᴺᴼᴼᴮ View Post
    Don't forget that your PTC method is out of date.
    bool Out_Of_Date = true;

  7. #6
    dborba's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    18
    Reputation
    10
    Thanks
    3
    My Mood
    Fine
    Quote Originally Posted by whit View Post
    Just Create a new void Function then thread it in dll main
    /Moved Coding Help/Discussion
    Sorry friend but not really understand how you would put a working example of already void by calling the hacker? And where exactly I would have to create this void?

  8. #7
    Dewerong's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    Inside a Packet
    Posts
    59
    Reputation
    10
    Thanks
    2
    Quote Originally Posted by BSOD View Post
    What whit said is true.

    But to make it clear for a person like you ,

    after this VV
    Code:
    void PTC(void)
    {
    	while(1)
    	{
    		Sleep(200);
    Call your hacks.
    Your code is missing something.

    void Leecher()
    {
    while(true)
    {

    Sleep(150);
    }
    }
    I don't even code in C++, but I'm learning. I just felt like being a smart ass :P.

  9. #8
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,159
    Reputation
    490
    Thanks
    2,253
    Quote Originally Posted by Dewerong View Post
    Your code is missing something.

    I don't even code in C++, but I'm learning. I just felt like being a smart ass :P.
    You Daum Smart Ass../

  10. #9
    dborba's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    18
    Reputation
    10
    Thanks
    3
    My Mood
    Fine
    help me plz ^^

  11. #10
    Xlilzoosk8rX's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    the-ville, PA
    Posts
    358
    Reputation
    24
    Thanks
    53
    Quote Originally Posted by dborba View Post
    help me plz ^^
    we are helping,
    but its hard to help a leecher.
    this is deff C+P.
    if you dont know how to use it and work it then
    why should we help you? Make an effort to learn
    then come talk to us

  12. #11
    Nubzgetkillz's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    hacktown
    Posts
    838
    Reputation
    13
    Thanks
    411
    My Mood
    Amazed
    Quote Originally Posted by ᴺᴼᴼᴮ View Post
    Don't forget that your PTC method is out of date.
    Code:
    int detected() {
    
       while ( ptc = detected )   
       {
          switch ( detected )
          {
             case 0:
                detected = true;
                break;
             case 1:
                detected = true;
                break;
          }
       }
    }
    notice never false because it is currently still detected

    Member since September 25, 2010

    Current Objectives:
    • Graduate college with a degree in Computer Science
    • Find a decent job in the Computer Science Field
    • Learn more programming languages

    Looking for Elo Boosting Job - League of Legends
    Looking for Bronze -> Gold Jobs


    Skype: whatthedream

  13. #12
    BSOD's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    181
    Reputation
    31
    Thanks
    35
    Quote Originally Posted by whit View Post
    Just Create a new void Function then thread it in dll main
    /Moved Coding Help/Discussion
    He already has a void function and has a thread. What he needs to do is follow he current bypass for PTC using the most up to date method. It's hard for him to follow it because he doesn't even know where to call the hacks or how to.

  14. #13
    Rigby's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    NJ
    Posts
    2,050
    Reputation
    37
    Thanks
    279
    My Mood
    Amazed
    I DONT UNDERSTAND THIS SHIT

    Source Filmmaker Animator/Poster Maker
    Former Minecraft Minion
    Film Enthusiast
    TF2 Player

  15. #14
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,159
    Reputation
    490
    Thanks
    2,253
    Quote Originally Posted by BSOD View Post
    He already has a void function and has a thread. What he needs to do is follow he current bypass for PTC using the most up to date method. It's hard for him to follow it because he doesn't even know where to call the hacks or how to.
    Its called updating the code in your tags..
    Its not new

Similar Threads

  1. [HELP] Does any C++ programmer know how to edit a dll?
    By EI2468 in forum C++/C Programming
    Replies: 20
    Last Post: 11-05-2010, 04:50 PM
  2. [SOLVED][HELP] Programm AutoIt
    By Zanxx in forum CrossFire Help
    Replies: 0
    Last Post: 10-29-2010, 11:39 AM
  3. Programmers to help me
    By 117898140 in forum C++/C Programming
    Replies: 4
    Last Post: 02-17-2010, 09:53 AM
  4. [Request] A little help from programmers...
    By Ozman999 in forum CrossFire Hacks & Cheats
    Replies: 1
    Last Post: 02-13-2010, 01:10 PM
  5. Can a programmer help me?
    By moho401 in forum Hack Requests
    Replies: 1
    Last Post: 08-12-2009, 01:22 PM