Results 1 to 12 of 12
  1. #1
    wicho_koz's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    193
    Reputation
    12
    Thanks
    52
    My Mood
    Shocked

    Unhappy i need help with Base

    i need update the CodeDemonD3DBase... is detected before login and the game are crash!

    i have this code:
    (D3DBase.cpp)
    Code:
    #include "DemonMenuClass.h"
    #define LTClientEXE 0x7daff8
    
    oReset pReset;
    oEndScene pEndScene;
    
    DemonMenu dMenu;
    
    LPDIRECT3DDEVICE9 g_pDevice = 0;
    
    int xFontOffSet = 15;
    
    int hackopt1;
    int MenuHeight = 10;
    
    int show=1;
    
    int b = 0;
    //==================================================================
    //Hack Vars
    int hack1 = 1;
    int hack2 = 0;
    int hack3 = 0;
    int hack4 = 1;
    int hack5 = 0;
    //==================================================================
    
    void DemonMenu::CreateItem(int index, char * title, int *hack, int hackmaxval,int hacktype)
    {
    	hackcount++;
    	HACKITEM[hackcount].index = index;
    	HACKITEM[hackcount].hack = hack;
    	HACKITEM[hackcount].hackmaxval = hackmaxval;
    	HACKITEM[hackcount].hacktype = hacktype;
    	PrintText(title, xFontOffSet, index*15,HACKITEM[hackcount].HCOLOR,pFont); //If you want to move the menu opts down do something like this (index*15)+20 and to move it left or right just add/subtract from font offset.
    }
    
    void DemonMenu::BuildMenu(char * menuname, int x, int y, int h, int w, DWORD TITLECOL, DWORD BACKCOLOR, DWORD BORDERCOLOR, LPDIRECT3DDEVICE9 pDevice)
    {
    	if(GetAsyncKeyState(VK_INSERT)&1)show=(!show);
    	if(!show) {
    		DrawBox(0,0, w, 20, BACKCOLOR, BORDERCOLOR, pDevice);
    		PrintText(menuname, 5, 2, TITLECOL, pFont);
    		return;
    	}
    
    	DrawBox(x,y, w, h, BACKCOLOR, BORDERCOLOR, pDevice);
    	PrintText(menuname, x+10, y+2, TITLECOL, pFont);
    	CreateItem(1,"Hack 1", &hack1);
    	CreateItem(2,"Hack 2", &hack2); 
    	CreateItem(3,"Hack 3", &hack3);
    	CreateItem(4,"Hack 4", &hack4);
    	CreateItem(5,"Hack 5", &hack5);
    	RenderMenu();
    }
    VOID CosolePush(CONST CHAR *Command)
    {
    __asm {
    
    PUSHAD;
    NOP;
    MOV EAX, LTClientEXE; 
    WAIT;
    MOV EBX, LTClientEXE;
    WAIT;
    NOP;
    CMP EAX, EBX;
    NOP;
    add eax, 4
    JZ Hello; 
    NOP;
    Hello:       
    NOP;
    PUSH Command;
    NOP;
    MOV EAX, LTClientEXE;
    NOP;
    CALL EAX;
    NOP;
    ADD ESP, 0x4;
    NOP;
    sub EDI, 0x5;
    sub esi, 0x1;
    POPAD;
    }
    }
    
    void DemonMenu::RenderMenu()
    {
    	if(GetAsyncKeyState(VK_DOWN)&1) 
    			selector++;
    
    	if(GetAsyncKeyState(VK_UP)&1)
    		if(selector > 1)
    			selector--;
    
    	if (GetAsyncKeyState(VK_RIGHT)<0){
    		for(int i=0;i < (hackcount+1);i++){
               if(selector == HACKITEM[i].index){
    			   if(*HACKITEM[i].hack < HACKITEM[i].hackmaxval)
    					*HACKITEM[i].hack += 1;
    			   //else
    					//*HACKITEM[i].hack = HACKITEM[i].hackmaxval;
    			  // Sleep(200);
    		}
    	}
    	}
    
    	if (GetAsyncKeyState(VK_LEFT)<0){
    		for(int i=0;i < (hackcount+1);i++){
               if(selector == HACKITEM[i].index){
    			   *HACKITEM[i].hack = 0;
    			   Sleep(200);
    		}
    	}
    	}
    	
    	for(int i=0;i < (hackcount+1);i++){
    		if(selector == HACKITEM[i].index)
    			HACKITEM[i].HCOLOR = GREEN;
    		else
    			HACKITEM[i].HCOLOR = RED;
    	}
    
    	for(int i=1; i<(hackcount+1); i++){
    		if(HACKITEM[i].hacktype == 0){
    		if(*HACKITEM[i].hack == 1)  //to move the opts down do something like this (HACKITEM[i].index*15)+20 
    		PrintText("On", xFontOffSet+100, HACKITEM[i].index*15,YELLOW,pFont);
    	 else 
    		PrintText("Off", xFontOffSet+100, HACKITEM[i].index*15,RED,pFont);
    	
    	}
    	}
    
    	/*for(int i=1; i<(hackcount+1); i++){
    		if(HACKITEM[i].hackmaxval >1 && HACKITEM[i].hacktype == 1){
    		sprintf_s(hackrval, "%i", *HACKITEM[i].hack);
    		PrintText(hackrval, xFontOffSet+100, HACKITEM[i].index*15,RED,pFont);
    	}
    	}*/ // Just something I was messing around with.
    
    	//==============================================
    
    	//==============================================
    
    	if(selector < 1)
    		selector = 1;
    
    	if(selector > hackcount)
    		selector = 1;
    
    	hackcount = 0;
    }
    
    void TestThread()
    {
    	if( hack2 == 1)
    		PrintText("hack2 on", 30, 200, GREEN, dMenu.pFont);
    	else
    		PrintText("hack2 Off", 30, 200, RED, dMenu.pFont);
    }
    
    void ReFont(LPDIRECT3DDEVICE9 pDevice) // Credits for the ReFont function go to mmbob
    {
        if (g_pDevice != pDevice)
        {
            g_pDevice = pDevice;
            try
            {
                if (dMenu.pFont != 0)
                    dMenu.pFont->Release();
            } catch (...) {}
            dMenu.pFont = 0;
            D3DXCreateFontA(pDevice, 14, 0, FW_BOLD, 0, 0, DEFAULT_CHARSET, OUT_TT_ONLY_PRECIS, PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &dMenu.pFont );
        }
    }
    
    HRESULT WINAPI Reset(IDirect3DDevice9* pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters )
    {
    	dMenu.pFont->OnLostDevice();
    
    	HRESULT hRet = pReset(pDevice, pPresentationParameters);
    
    	dMenu.pFont->OnResetDevice();
    
    	return hRet;
    }
    
    HRESULT WINAPI EndScene(LPDIRECT3DDEVICE9 pDevice)
    {
    	ReFont(pDevice);
    	dMenu.BuildMenu("CodeDemonD3D Menu Base",0,0,180,200,RED,BLACK,GREEN,pDevice);
    	TestThread();
    	return pEndScene(pDevice);
    }
    
    
    
    int D3Dinit(void) //Just a hook I used for testing, got it from Marko I believe.
    {
    	DWORD		hD3D, adr, *vtbl;
    
    	// wait for the d3dx dll
    	hD3D=0;
    	do {
    		hD3D = (DWORD)GetModuleHandle("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)	DetourFunction((PBYTE)vtbl[16]   , (PBYTE)Reset   ,5);
     		pEndScene = (oEndScene)	DetourFunction((PBYTE)vtbl[42], (PBYTE)EndScene,5);
     	}
    	return 0;
    }
    
    BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    {
    	DisableThreadLibraryCalls(hDll);
    
    	if ( dwReason == DLL_PROCESS_ATTACH )
    	{
    		CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)D3Dinit, NULL, NULL, NULL);
    	}
    	if( dwReason == DLL_PROCESS_DETACH)
    	{
    		dMenu.pFont->Release();
    	}
    	return TRUE;
    }
    (Functions.h)
    Code:
    #include "SystemIncludes.h"
    //Credits to ac1d_bUrn, azorbix, and d0m1n1c here.
    void PrintText(char pString[], int x, int y, D3DCOLOR col, ID3DXFont *font)
    {
        RECT FontRect = { x, y, x+500, y+30 };
        font->DrawText( NULL, pString, -1, &FontRect, DT_LEFT | DT_WORDBREAK, col);
    }
    
    void FillRGB( int x, int y, int w, int h, D3DCOLOR color, IDirect3DDevice9* pDevice )
    {
        if( w < 0 )w = 1;
        if( h < 0 )h = 1;
        if( x < 0 )x = 1;
        if( y < 0 )y = 1;
    
        D3DRECT rec = { x, y, x + w, y + h };
        pDevice->Clear( 1, &rec, D3DCLEAR_TARGET, color, 0, 0 );
    }
    
    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 );
    }  
    
    bool isMouseinRegion(int x1, int y1, int x2, int y2) //Credits to IcySeal For this function, it saved me some typing time :D
    {
    	POINT cPos;
    	GetCursorPos(&cPos);
    	if(cPos.x > x1 && cPos.x < x2 && cPos.y > y1 && cPos.y < y2){
    		return true;
    	} else {
    		return false;
    	}
    }
    
    bool bCompare(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 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;
    }
    
    void *DetourFunction (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);
    }
    (SystemIncludes)
    Code:
    #include <Windows.h>
    #include <stdio.h>
    #include <d3d9.h>
    #include <d3dx9.h>
    
    #pragma comment(lib,"d3dx9.lib")
    (DemonMenuClass)
    Code:
    #include "Functions.h"
    
    typedef struct{
    	int index;
    	char * title;
    	int *hack;
    	int hackmaxval;
    	int hacktype;
    	DWORD HCOLOR;
    }ITEM;
    
    class DemonMenu {
    	public:
    	LPDIRECT3DDEVICE9 pDevice;
    	LPD3DXFONT pFont;
    
    	int hackcount;
    	int selector;
    	int x,y,w,h;
    	DWORD COLOR;
    
    	ITEM HACKITEM[99];
    	char hackrval[256]; //something I was also messing around with.
    
    	void CreateItem(int index, char * title, int *hack,int hackmaxval=1,int hacktype=0);
    	void BuildMenu(char * menuname, int x, int y, int h, int w, DWORD TITLECOL, DWORD BACKCOLOR, DWORD BORDERCOLOR, LPDIRECT3DDEVICE9 pDevice);
    	void RenderMenu();
    };
    
    typedef HRESULT ( WINAPI* oReset )( LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters );
    typedef HRESULT (WINAPI* oEndScene)(LPDIRECT3DDEVICE9 pDevice);
    
    //Colors are A,R,G,B meaning alpha(opacity), red, green, blue
    #define RED D3DCOLOR_ARGB(255, 255, 0, 0)
    #define GREEN D3DCOLOR_ARGB(255, 0, 255, 0)
    #define BLUE D3DCOLOR_ARGB(255, 0, 0, 255)
    #define WHITE D3DCOLOR_ARGB(255, 255, 255, 255)
    #define BLACK D3DCOLOR_ARGB(255, 0, 0, 0)
    #define YELLOW D3DCOLOR_ARGB(255, 255, 255, 0)
    #define TEAL D3DCOLOR_ARGB(255, 0, 255, 255)
    #define PINK D3DCOLOR_ARGB(255, 255, 240, 0)
    #define ORANGE D3DCOLOR_ARGB(255, 255, 132, 0)
    #define LIME D3DCOLOR_ARGB(255, 198, 255, 0)
    #define SKYBLUE D3DCOLOR_ARGB(255, 0, 180, 255)
    #define MAROON D3DCOLOR_ARGB(255, 142, 30, 0)
    #define LGRAY D3DCOLOR_ARGB(255, 174, 174, 174) //Light Gray
    #define DGRAY D3DCOLOR_ARGB(255, 71, 65, 64) //Dark Gray
    #define BROWN D3DCOLOR_ARGB(255, 77, 46, 38)
    #define SHIT D3DCOLOR_ARGB(255, 74, 38, 38) //Shit and brown aint much different

    I need to do to work?

    please help me!!!

    @flameswor10
    @CodeDemon
    Last edited by wicho_koz; 07-12-2011 at 08:08 PM. Reason: no reason

  2. #2
    CAFlames's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Where ever my imagination takes me
    Posts
    3,006
    Reputation
    202
    Thanks
    2,944
    My Mood
    Twisted
    LTClientEXE maybe? try using console unwrapped for "ptc"

    Current Works:
    ---Horror Game





    [IMG]https://i645.photobucke*****m/albums/uu180/drgnforce9/Siggys/signature3.jpg[/IMG]
    Special thanks to drgnforce9 for my sig picture

    Quote Originally Posted by m_t_h View Post

    CAflames is one epic coder.

    Rep and thanks him.. or you're perma banned.

  3. #3
    wicho_koz's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    193
    Reputation
    12
    Thanks
    52
    My Mood
    Shocked
    lol dont work...
    the base are patched???
    Last edited by wicho_koz; 07-12-2011 at 09:12 PM. Reason: tested...

  4. #4
    flameswor10's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    12,528
    Reputation
    981
    Thanks
    10,410
    My Mood
    In Love
    Yes, the addies in the base are patchedd
    No I do not make game hacks anymore, please stop asking.

  5. #5
    CodeDemon's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    vagina
    Posts
    1,070
    Reputation
    50
    Thanks
    940
    My Mood
    Fine
    Base has no addresses

    Reason you are crashing is because you are hooking endscene with standard detours, both of which are detected. Replace endscene with present, and then replace the detours with some working ones

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

    flameswor10 (07-13-2011)

  7. #6
    flameswor10's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    12,528
    Reputation
    981
    Thanks
    10,410
    My Mood
    In Love
    Quote Originally Posted by CodeDemon View Post
    Base has no addresses

    Reason you are crashing is because you are hooking endscene with standard detours, both of which are detected. Replace endscene with present, and then replace the detours with some working ones
    I thought it had addresses.
    Oh well.

    Grab detours of Whit v3 base
    No I do not make game hacks anymore, please stop asking.

  8. #7
    wicho_koz's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    193
    Reputation
    12
    Thanks
    52
    My Mood
    Shocked
    thanks! all people

  9. #8
    wicho_koz's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    193
    Reputation
    12
    Thanks
    52
    My Mood
    Shocked
    i add the files ADE32.cpp and ADE32.h and detour.cpp + detour.h and i have this error:

    Operation ------ Build started: Project: CodeDemonD3Dbase, Configuration: Release Win32 ------
    ADE32.cpp
    detourxs.cpp
    LINK: fatal error LNK1104: can not open file 'detourxs.lib'
    ========== Build: 0 succeeded, 1 failed, 0 upgraded, 0 skipped ==========

  10. #9
    Ch40zz-C0d3r's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    831
    Reputation
    44
    Thanks
    401
    My Mood
    Twisted
    Quote Originally Posted by wicho_koz View Post
    i add the files ADE32.cpp and ADE32.h and detour.cpp + detour.h and i have this error:

    Operation ------ Build started: Project: CodeDemonD3Dbase, Configuration: Release Win32 ------
    ADE32.cpp
    detourxs.cpp
    LINK: fatal error LNK1104: can not open file 'detourxs.lib'
    ========== Build: 0 succeeded, 1 failed, 0 upgraded, 0 skipped ==========
    -_-
    U need to include the file 'detourxs.lib'.
    Why people can c&p but not reading the compiler-errors?

    Progress with my game - "Disbanded"
    • Fixed FPS lag on spawning entities due to the ent_preload buffer!
    • Edit the AI code to get some better pathfinding
    • Fixed the view bug within the sniper scope view. The mirror entity is invisible now!
    • Added a new silencer for ALL weapons. Also fixed the rotation bugs
    • Added a ton of new weapons and the choice to choose a silencer for every weapon
    • Created a simple AntiCheat, noobs will cry like hell xD
    • The name will be Disbanded, the alpha starts on the 18th august 2014



    Some new physics fun (Serversided, works on every client)



    My new AI
    https://www.youtube.com/watch?v=EMSB1GbBVl8

    And for sure my 8 months old gameplay with 2 friends
    https://www.youtube.com/watch?v=Na2kUdu4d_k

  11. The Following User Says Thank You to Ch40zz-C0d3r For This Useful Post:

    wicho_koz (07-13-2011)

  12. #10
    Wilds's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Location
    here
    Posts
    522
    Reputation
    1
    Thanks
    170
    My Mood
    Relaxed
    Quote Originally Posted by wicho_koz View Post
    i add the files ADE32.cpp and ADE32.h and detour.cpp + detour.h and i have this error:

    Operation ------ Build started: Project: CodeDemonD3Dbase, Configuration: Release Win32 ------
    ADE32.cpp
    detourxs.cpp
    LINK: fatal error LNK1104: can not open file 'detourxs.lib'
    ========== Build: 0 succeeded, 1 failed, 0 upgraded, 0 skipped ==========
    project>add existing item...>project folder>detourxs.lib

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

    wicho_koz (07-13-2011)

  14. #11
    wicho_koz's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    193
    Reputation
    12
    Thanks
    52
    My Mood
    Shocked
    Quote Originally Posted by wolffang0000 View Post
    project>add existing item...>project folder>detourxs.lib
    Thanks man..... you helped me!!!!



    request close

    @flameswor10
    Last edited by wicho_koz; 07-13-2011 at 04:24 PM.

  15. #12
    flameswor10's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    12,528
    Reputation
    981
    Thanks
    10,410
    My Mood
    In Love
    /closed on request of OP.
    No I do not make game hacks anymore, please stop asking.

Similar Threads

  1. [Help Request] Need help with making binds !
    By JonathanTBM in forum Vindictus Help
    Replies: 4
    Last Post: 05-10-2011, 07:40 PM
  2. [Help Request] Need help with numpad while recording macro !
    By JonathanTBM in forum Vindictus Help
    Replies: 2
    Last Post: 05-10-2011, 07:37 PM
  3. [Help Request] need help with mod
    By .:MUS1CFR34K:. in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 4
    Last Post: 05-01-2011, 12:40 PM
  4. [Help Request] need help with modding
    By BayBee Alyn in forum Combat Arms Help
    Replies: 0
    Last Post: 04-27-2011, 09:06 PM
  5. need help with base
    By Andrew89898 in forum Combat Arms EU Hack Coding/Source Code
    Replies: 8
    Last Post: 08-18-2010, 09:48 PM