Arcade Prehacks

Results 1 to 4 of 4
  1. #1

    Join Date
    May 2009
    Posts
    32

    [TuT] Create a Hack+DLL in VC++6

    CREDITS GO TO LegendaryHacker1337 OF MPGH. I TAKE NO CREDIT

    What you need:
    #Visual C++ 6
    #Basic Knowledge Of C++

    DLL
    * Create a new Win32 Dynamic-Link Library Project, Call it ("LH1337DLL")
    * Choose A simple DLL project
    * Add 3 new files to the project: {Text File, "LH1337DLL.def"} {Source, "functions"} {Header, "functions"}

    Add the following code into functions.cpp.
    Code:
    #include "stdafx.h"
    #include "functions.h"
    
    DWORD dfgiddfg;
    HANDLE dfgdsgdsg;
    
    void OpenMemory()
    {
    HWND frgss = FindWindow(0, "WarRock");
    GetWindowThreadProcessId(frgss, &dfgiddfg);
    dfgdsgdsg = OpenProcess(PROCESS_ALL_ACCESS|PROCESS_VM_OPERATION|PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_QUERY_INFORMATION, FALSE, dfgiddfg);
    }
    
    
    void Stamina()
    {
        int t=1120403456;
        OpenMemory();
        WriteProcessMemory(dfgdsgdsg,(LPVOID*)(DWORD)0x8B9B04, &t , 4,NULL);
    }
    
    void Teleport(float x, float y, float z)
    {
        long raddyx, raddyy, raddyz; // Real address of coordinates
        long readxyz;                 // Read base address
    
        ReadProcessMemory(dfgdsgdsg,(LPVOID*)(DWORD)0x1279280, &readxyz, 4,NULL);
    
        raddyx = readxyz + 0x174;
        raddyy = readxyz + 0x17C;
        raddyz = readxyz + 0x178;
    
        WriteProcessMemory(dfgdsgdsg,(LPVOID*)(DWORD)raddyx, &x , 4,NULL);
        WriteProcessMemory(dfgdsgdsg,(LPVOID*)(DWORD)raddyy, &y , 4,NULL);
        WriteProcessMemory(dfgdsgdsg,(LPVOID*)(DWORD)raddyz, &z , 4,NULL);
    }
    Add the following code into functions.h.
    Code:
    #pragma once
    
    void Stamina();
    void Teleport(float x, float y, float z);
    Add the following code into LH1337DLL.def.
    Code:
    LIBRARY LH1337DLL
    
    EXPORTS
        Stamina
        Teleport
    EXE
    * Create a MFC Project, call it ("LH1337EXE")
    * Choose, Dialog based.
    * Add 2 button {Refill Stamina, Teleport}
    * Add 3 Edit Box. (X, Y, Z)
    * Make 3 new member variable. {X->m_cox} {Y->m_coy} {Z->m_coz}

    Add this code in LH1337EXEDlg.cpp at top after all '#include'.

    Code:
    HINSTANCE hDLL = NULL;
    
    
    // 1) Teleport
    typedef void (*STAMINA)();
    STAMINA Stamina;
    
    
    // 2) Teleport
    typedef void (*TELEPORT)(float x, float y, float z);
    TELEPORT Teleport;

    Go to the OnInitDialog() function and add this code:

    Code:
    hDLL = AfxLoadLibrary("LH1337DLL");
    
        if( hDLL == NULL )
        {
            MessageBox("Could not load LH1337DLL.dll");
        }
        else
        {
         Stamina = (STAMINA)GetProcAddress(hDLL, "Stamina");
         Teleport = (TELEPORT)GetProcAddress(hDLL, "Teleport");
        }
    Now, add a BN_CLICKED event the Refill Stamina button and add this code:
    Code:
    Stamina();
    Now, add a BN_CLICKED event the Teleport button and add this code:
    Code:
        UpdateData(1);
        Teleport(m_cox, m_coy, m_coz);
    EXE is Done
    Once again I TAKE NO CREDIT FOR THIS. The original thread can be found here.

  2. #2
    Senior Member
    Join Date
    Oct 2008
    Location
    Having a rave in the UK!
    Posts
    1,706

    Re: [TuT] Create a Hack+DLL in VC++6

    Nice one. This will come in handy...some time.

  3. #3

    Join Date
    Jun 2008
    Posts
    29

    Re: [TuT] Create a Hack+DLL in VC++6

    Code:
    typedef void (*TELEPORT)(float x, float y, float z);
    That is wrong, you have to define TELEPORT first and not use a pointer for it, instead a conversion:

    Code:
    teleport = (int*)TELEPORT
             void teleport (bla bla bla)
             {
                 function;
                    return;
                  }

  4. #4

    Join Date
    May 2009
    Posts
    32

    Re: [TuT] Create a Hack+DLL in VC++6

    Quote Originally Posted by Royce
    Code:
    typedef void (*TELEPORT)(float x, float y, float z);
    That is wrong, you have to define TELEPORT first and not use a pointer for it, instead a conversion:

    Code:
    teleport = (int*)TELEPORT
             void teleport (bla bla bla)
             {
                 function;
                    return;
                  }
    I didnt make it -.-

Posting Permissions

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