Results 1 to 2 of 2

Thread: CoD 1 1.5 DLL Basic Stuff

  1. #1
    Private First Class php's Avatar
    Join Date
    Nov 2012
    Posts
    142
    Thanks
    28
    Thanked 116 Times in 59 Posts

    CoD 1 1.5 DLL Basic Stuff



    CoD 1.5 DLL

    IDE: Code::Blocks
    Inject with any injector you'd like.

    DLL Download: http://filesmelt.com/dl/MDLL1.dll


    PHP Code:
    #include "Windows.h"

    #define COM_PRINTF 0x0437C00

    DWORD WINAPI MyThread(LPVOID);
    DWORD g_threadID;
    HMODULE g_hModule;

    typedef void ( *xcommand_t )( void );

    typedef int (*Com_Printf_t)(const char *format, ...);
    Com_Printf_t Com_Printf = (Com_Printf_t)COM_PRINTF;

    void testFunc();
    void Cmd_AddCommand(const char*, xcommand_t);

    extern "C" BOOL APIENTRY DllMain(HINSTANCE hinstDLLDWORD fdwReasonLPVOID lpvReserved)
    {
        switch (
    fdwReason)
        {
            case 
    DLL_PROCESS_ATTACH:
                
    g_hModule hinstDLL;
                
    DisableThreadLibraryCalls(hinstDLL);
                
    CreateThread(NULLNULL, &MyThreadNULLNULL, &g_threadID);
                break;

            case 
    DLL_PROCESS_DETACH:
            case 
    DLL_THREAD_ATTACH:
            case 
    DLL_THREAD_DETACH:
                break;
        }
        return 
    true;
    }

    void patchCvars() {
     
    DWORD old;
     
    //Read Only
     
    VirtualProtect((void*)0x43BCDA,1,PAGE_EXECUTE_READWRITE,&old);
     *((
    BYTE*)0x43BCDA) = 0xEB;
     
    VirtualProtect((void*)0x43BCDA,1,old,&old);

     
    //Write Protected
     
    VirtualProtect((void*)0x43BD20,1,PAGE_EXECUTE_READWRITE,&old);
     *((
    BYTE*)0x43BD20) = 0xEB;
     
    VirtualProtect((void*)0x43BD20,1,old,&old);

     
    //Cheat Protected
     
    VirtualProtect((void*)0x43BD20,1,PAGE_EXECUTE_READWRITE,&old);
     *((
    BYTE*)0x43BD20) = 0xEB;
     
    VirtualProtect((void*)0x43BD20,1,old,&old);
    //Credits to King-Orgy
    }

    DWORD WINAPI MyThread(LPVOID) {
        
    patchCvars();
        
    Cmd_AddCommand("testfunc"testFunc);
        while(
    true)
        {
            if(
    GetAsyncKeyState(VK_LCONTROL) & 1) {
                
    Com_Printf("Hello people %d\n"1337);
            }
        
    Sleep(100);
        }
        
    FreeLibraryAndExitThread(g_hModule0);
        return 
    0;
    }

    void testFunc() {
        
    /*typedef void (__stdcall *outz)(const char*);
        outz func2 = (outz) (0x080609D4);
        func2("status");*/
        //printf("hey");
        //MessageBox(NULL, "Call of Duty MessageBox", "Call of Duty", MB_OK);
        
    Com_Printf("Is this working? //php\n");
    }

    void Cmd_AddCommand(const char *cmd_namexcommand_t function) {
        
    void (*signature)(const char *cmd_namexcommand_t function);
        *((
    int *)(&signature)) = 0x042A870;
        
    signature(cmd_name, function);

    Last edited by php; 19th September 2013 at 17:08.

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

    kubislav23 (21st January 2017),kung foo man (19th September 2013)

  3. #2
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Click image for larger version. 

Name:	ss (2013-09-19 at 06.24.43).jpg 
Views:	76 
Size:	84.3 KB 
ID:	459

    According to this screenshot, you are adding a console command to CoD1.

    Please write more information to your source, to actually make it understandable for most ppl:
    - which IDE you use for compiling the DLL
    - how do you inject the DLL?

    Thanks!
    timescale 0.01

  4. The Following User Says Thank You to kung foo man For This Useful Post:

    smect@ (19th September 2013)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •