Dumper-7

repository·main·Indexed 24 days ago

https://github.com/encryqed/dumper-7

An SDK generator for Unreal Engine 4 and 5 games. It extracts game structures and metadata by injecting a DLL into a running game process. It includes generators for C++, mapping files, IDA Pro, and dumpspace, and supports dynamic configuration via .ini files and manual offset overrides for GObjects, FName, and ProcessEvent.

Tokens
5.3K
Snippets
17
Records
23
Agent score
85%

What's inside Dumper-7

  1. How to use Dumper-7

    main

    Dumper-7 is an SDK Generator for Unreal Engine games (UE4 and UE5). To use it, follow these steps:

    1. Compile: Build the project as a x64-Release DLL.
    2. Inject: Inject the resulting DLL into your target game process.
    3. Locate SDK: The generated SDK will be saved to the path defined by Settings::SDKGenerationPath. By default, this is C:\Dumper-7.

    For detailed instructions on using the generated SDK or migrating from older versions, refer to the UsingTheSDK.md guide.

    Compile the dll in x64-Release
  2. Override Offsets in Generator.cpp

    main

    If the generator fails to find offsets or identifies incorrect ones, you can manually override them in Generator::InitEngineCore() within Generator.cpp.

    GObjects Overrides: Use ObjectArray::Init to set the offset, chunk size, and chunked status:

    ObjectArray::Init(/*GObjectsOffset*/, /*ChunkSize*/, /*bIsChunked*/);

    To handle object array decryption, use InitObjectArrayDecryption. Ensure you only use types existing in the SDK (e.g., uint8, uint64):

    InitObjectArrayDecryption([](void* ObjPtr) -> uint8* { return reinterpret_cast<uint8*>(uint64(ObjPtr) ^ 0x8375); });

    FName Overrides:

    • To force GNames (useful if AppendString is wrong): FName::Init(/*bForceGNames*/);
    • To override specific offsets/types: FName::Init(/*OverrideOffset, OverrideType=[AppendString, ToString, GNames], bIsNamePool*/);

    ProcessEvent Overrides:

    Off::InSDK::InitPE(/*PEIndex*/);
  3. Install CMake

    main

    You can install CMake using either a native installer or the Visual Studio Installer.

    Using the Native Installer

    1. Download the appropriate installer from the official CMake website (e.g., Windows x64 Installer).
    2. Run the installer.
    3. Important: Select "Add CMake to the system PATH" during the installation process.
    4. Verify the installation by running cmake --version in a terminal.

    Using the Visual Studio Installer

    1. Open the Visual Studio Installer.
    2. Select your installed product (Build Tools or Visual Studio) and click Modify.
    3. Navigate to the Individual components tab.
    4. Search for "cmake".
    5. Check C++ CMake tools for Windows and/or CMake tools for Windows.
    6. Click Modify to complete the installation.
    cmake --version
  4. Generate Visual Studio projects from Xmake

    main

    If you prefer using Visual Studio instead of the Xmake CLI for building, you can generate project files using the xmake project command. Use the -k flag to specify the generator type and -m to specify the build configurations.

    Available generators:

    • vs: Standard Visual Studio project.
    • vsxmake2022: Visual Studio 2022 specific project.
    xmake project -k vs -m "debug;release"
    # Or for VS 2022
    xmake project -k vsxmake2022 -m "debug;release"
  5. Set up a Visual Studio C++ DLL project for Dumper-7 SDK

    main

    To use the Dumper-7 SDK, you must configure a Visual Studio C++ project as a Dynamic Library. Follow these steps:

    1. Create a new empty C++ project.
    2. In Project > Properties:
      • Set Configuration Type to Dynamic Library (.dll).
      • Set C++ Language Standard to Preview - Latest....
    3. Switch your build configuration from x86 to x64.
    4. Add a Main.cpp file to your project.
    5. Implement DllMain and a MainThread function to handle the DLL entry point and execution logic.
    /* Implementation pattern for DllMain and MainThread */
    #include <Windows.h>
    #include <iostream>
    
    DWORD MainThread(HMODULE Module)
    {
        AllocConsole();
        FILE* Dummy;
        freopen_s(&Dummy, "CONOUT$", "w", stdout);
        freopen_s(&Dummy, "CONIN$", "r", stdin);
    
        // Your code here
    
        return 0;
    }
    
    BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID lpReserved)
    {
        switch (reason)
        {
            case DLL_PROCESS_ATTACH:
                CreateThread(0, 0, (LPTHREAD_START_ROUTINE)MainThread, hModule, 0, 0);
                break;
        }
        return TRUE;
    }
  6. Include the Dumper-7 SDK in your project

    main

    To integrate the SDK, copy the contents of your CppSDK folder (e.g., C:\Dumper-7\GameName-GameVersion\CppSDK) into your Visual Studio project directory.

    Header Inclusion

    • For simplicity: Add #include "SDK.hpp" at the top of your Main.cpp. This includes everything but increases compilation time.
    • For performance: Include only the specific files you need, such as #include "SDK/Engine_classes.hpp".

    Source File Requirements

    • You must add Basic.cpp and CoreUObject_functions.cpp to your Visual Studio project.
    • If you call a function from the SDK, you must also add the .cpp file containing that function's body to your project. For example, calling GetViewportSize() from APlayerController requires adding Engine_functions.cpp to your project.

    Note: When building, ensure your Error List is set to Build Only to avoid unnecessary noise.

  7. Configure the project with Xmake

    main

    Use the xmake f command to configure the project settings, such as the platform, architecture, and build mode.

    Commonly used flags:

    • -p: Platform (e.g., windows)
    • -a: Architecture (e.g., x64)
    • -m: Build mode (e.g., release or debug)
    xmake f -p windows -a x64 -m release
    # Or for debug mode
    xmake f -p windows -a x64 -m debug
  8. Override GObjects-Layout for specific UE versions

    main

    If GObjects are not automatically detected, you must manually add a layout in ObjectArray.cpp (around line 30).

    • UE4.11 to UE4.20: Add the layout to the FFixedUObjectArrayLayouts struct.
    • UE4.21 and higher: Add the layout to the FChunkedFixedUObjectArrayLayouts struct.

    Layout Formats:

    Fixed Layout (UE4.11 - UE4.20):

    FFixedUObjectArrayLayout
    {
        .ObjectsOffset = 0x0,
        .MaxObjectsOffset = 0x8,
        .NumObjectsOffset = 0xC
    }

    Chunked Layout (UE4.21+):

    FChunkedFixedUObjectArrayLayout
    {
        .ObjectsOffset = 0x00,
        .MaxElementsOffset = 0x10,
        .NumElementsOffset = 0x14,
        .MaxChunksOffset = 0x18,
        .NumChunksOffset = 0x1C,
    }
    FFixedUObjectArrayLayout // Default UE4.11 - UE4.20
    {
        .ObjectsOffset = 0x0,
        .MaxObjectsOffset = 0x8,
        .NumObjectsOffset = 0xC
    }
  9. Configure Dumper-7 via ini file

    main

    Instead of modifying Settings.h in the source code, you can dynamically change settings using a Dumper-7.ini file.

    Placement Options:

    • Per-game: Place Dumper-7.ini in the same directory as the game's executable.
    • Global: Place Dumper-7.ini in C:\Dumper-7.

    Note: Global profiles do not merge with per-game profiles; they act as independent configurations.

    Available Settings:

    • SleepTimeout: Delay before dumping. Values < 1000 are treated as seconds; otherwise, they are milliseconds. If DumpKey is also set, the dump triggers on whichever occurs first.
    • DumpKey: A hex or decimal integer representing a Windows virtual keycode to trigger the dump.
    • SDKNamespaceName: The namespace used in the generated SDK files.
    • SDKGenerationPath: The output directory. Use absolute paths (e.g., C:/Path) or relative paths (e.g., ./ or ../). Do not use quotes.
    [Settings]
    SleepTimeout=30
    SDKNamespaceName=MyOwnSDKNamespace
    DumpKey=0x77
    SDKGenerationPath=./