A reverse engineering tool to interactively reconstruct structures and generate header files

Overview

ReGenny

Build status

ReGenny is a reverse engineering tool to interactively reconstruct structures and generate usable C++ header files. Header file generation is done by the sister project SdkGenny.

Early build preview

Status

ReGenny is still early in development but is usable. Things may change unexpectedly. Existing projects may break and need to be updated. Many more features are planned. There will be bugs.

Download

ReGenny is under active development. Any published builds (or lack thereof) may be out of date. It is advised that if you want to use ReGenny in its current form that you build ReGenny yourself. However, you may be able to grab the latest artifact from AppVeyor here.

Building

ReGenny uses CMake and vcpkg. Both need to be installed and properly configured. Currently ReGenny is only tested on Visual Studio 2019 for Windows 10 environments.

From the command line:

mkdir build
cd build
cmake .. -G "Visual Studio 16 2019" -A "x64" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_TOOLCHAIN_FILE="<path to vcpkg>\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET="x64-windows-static"
cmake --build . --config "Release"

Alternatively, if vcpkg is integrated with Visual Studio and you have the Visual Studio CMake integration, you can just open the ReGenny folder.

Design decisions

  • ReGenny uses plaintext project files instead of binary ones (.genny and .json). Plaintext formats are much better for inclusion in git repositories and makes collaborating with others on ReGenny projects easier since you can diff/merge project files.
  • Tree based display (like ReClass.NET) but you build the tree using .genny files.
  • ReGenny uses SdkGenny for output. One of SdkGenny's primary goals is to generate good output and ReGenny reaps all the benefits from that. Instead of a single monolithic header file, ReGenny uses SdkGenny to generate a proper header file hierarchy for inclusion into your project. If your project is already using SdkGenny then you don't even need to generate header files since you can just use the .genny file directly.
  • Since ReGenny uses SdkGenny, it supports everything .genny files do:
    • Namespaces
    • Enums
    • Structs
    • Classes
    • Function prototypes
    • Static function prototypes
    • Bitfields
    • Arrays
    • Multi-dimensional arrays
    • Pointers
    • Namespaces can be nested within each other
    • Structs, enums and classes can be nested within other structs/classes
    • Bring your own external types
  • The .genny format is flexible enough to parse simple C/C++ structures directly with zero (or minimal) modification making importing existing structures into ReGenny easy.
You might also like...
An assortment of commonly used algorithms and data structures implemented with C++.

Algorithms-And-Data-Structures This repo contains C++ implementations of common algorithms and data structures, grouped by topics. The list will be sp

Wonderful library with lots of useful functions, algorithms and data structures in C, link it with -l9wada

Lib9wada Wonderful library with lots of useful functions, algorithms and data structures in C, link it with -l9wada Usage Compile the library with mak

Wonderful library with lots of useful functions, algorithms and data structures in C, link it with -l9wada

LibC+ Wonderful library with lots of useful functions, algorithms and data structures in C, link it with -lC+ Better than C, not as much as c++ Usage

A collection of basic data structures syntaxes, useful for competitive coding and placement exams
A collection of basic data structures syntaxes, useful for competitive coding and placement exams

Data-Structures A collection of basic data structures syntaxes, useful for competitive coding and placement exams 1. Array 2. Matrix 3. Linked List Si

The aim of this repository is to make it a one final stop for revision for technical interviews involving data structures and algorithms .

Hey πŸ™‹β€β™‚οΈ This repository is meant for data structures and algorithms . I will be updating this often and will include all the data structures importa

This is a beginner-friendly project aiming to build a problem-set on different data structures and algorithms in different programming languages.

DSAready Overview This is a beginner-friendly project that aims to create a problem-set for various Data Structures and Algorithms. Being a programmer

Explore the world of Data Structures and Algorithm
Explore the world of Data Structures and Algorithm

Hey Everyone! πŸ‘‹ DSA- PlayYard is the first open source project of Lets Grow More Community. It is the perfect place to start with or to test your DSA

Postmodern immutable and persistent data structures for C++ β€” value semantics at scale
Postmodern immutable and persistent data structures for C++ β€” value semantics at scale

immer is a library of persistent and immutable data structures written in C++. These enable whole new kinds of architectures for interactive and concu

Implementation of various data structures and algorithms.
Implementation of various data structures and algorithms.

Data Structures and Algorithms A place where you can find and learn the copious number of algorithms in an efficient manner. This repository covers va

Comments
  • Delete the editor

    Delete the editor

    The editor was bad. It's just an ImGui::InputTextMultiline which isn't robust enough for large file editing. So instead, lets rely on good existing editors (VS Code/Sublime/etc) and just auto-reload when the opened file changes. This PR does that. It also auto reloads whenever any imported file changes which wouldn't make sense with the built in editor which only supported editing a single file.

    This simplifies the project scope too, we don't want to be a text editor on top of being ReGenny.

    opened by cursey 1
  • Crashes when typing in same struct name as field member

    Crashes when typing in same struct name as field member

    Had this happen sometimes.

    Take the following example:

    enum FooEnum : uint32_t {
        Baz = 0
    };
    
    struct Foo 0x1000 {
        int blah;
        int foo_enum_before_i_found_the_enum;
    };
    

    Upon trying to insert FooEnum into Foo as a field member, it will crash at this point:

    enum FooEnum : uint32_t {
        Baz = 0
    };
    
    struct Foo 0x1000 {
        int blah;
        Foo foo_enum_before_i_found_the_enum;
    };
    
    opened by praydog 1
  • Lua API & REPL using luagenny

    Lua API & REPL using luagenny

    As per the title, this adds a Lua API & REPL using my library, luagenny.

    This adds three new dependencies, sol2, lua 5.4, and luagenny.

    The top level luagenny API can be accessed through the sdkgenny global table.

    ReGenny's implementation overrides luagenny's global sdkgenny_reader and sdkgenny_string_reader functions to read external memory instead.

    In addition to the luagenny bindings, I've added bindings for some of the core regenny objects:

    ReGenny class can be accessed by the Lua global regenny:

    regenny:address() -- Returns the current top level structure address being inspected in the viewer/editor
    regenny:type() -- Returns the current sdkgenny::Type* being inspected in the viewer/editor
    regenny:sdk() -- Returns the current sdkgenny::Sdk* created as a result of parsing the editor text
    regenny:process() -- Returns the current regenny Process* for the attached process, WindowsProcess* on Win32
    regenny:overlay() -- Constructs and returns a new sdkgenny.StructOverlay with the current address() and type()
    

    Process class: (read funcs only take (addr), write funcs are (addr, value))

    • read_uint8
    • read_uint16
    • read_uint32
    • read_uint64
    • read_int8
    • read_int16
    • read_int32
    • read_int64
    • read_float
    • read_double
    • write_uint8
    • write_uint1
    • write_uint3
    • write_uint6
    • write_int8
    • write_int16
    • write_int32
    • write_int64
    • write_float
    • write_double
    • read_string

    WindowsProcess class (on Windows only):

    • get_typename(obj_addr) - Returns the RTTI name of the object

    Example script to set the scale of a game object given the corret structure definitions:

    if regenny:overlay:type():name() ~= "HeroLocal" then
        print("overlay is not a HeroLocal")
        return
    end
    
    function set_scale(x, y, z)
        local data = regenny:overlay().owner.data_at_0
    
        if data then
            data.scale.x = x
            data.scale.y = y
            data.scale.z = z
        end
    end
    

    Then just run set_scale(1, 2, 3) inside the REPL window.

    Example script to dump component names for a given entity in that new game about the Arachnid Male (given the correct ReGenny structure definitions)

    arachnid

    local overlay = regenny:overlay()
    if overlay == nil then
        print("no overlay, exiting")
        return
    end
    
    if overlay:type():name() ~= "HeroLocal" then
        print("overlay is not a HeroLocal")
        return
    end
    
    for i=0, 1000 do
        local elements = overlay.data[0].elements
        if elements == nil then
            print("elements is nil")
            break
        end
    
        local element = overlay.data[0].elements[i]
        if element == nil then
            print("element at " .. tostring(i) .. " is nil")
            break
        end
        
        local descriptor = element.descriptor
        local comp = element.component
        if comp == nil then
            print("Encountered nil component at index " .. tostring(i))
            break
        end
    
        if descriptor == nil then
            print("Encountered nil descriptor at index " .. tostring(i))
            break
        end
    
        local name = descriptor.component_name
        if name == nil then
            print("Encountered nil component name at index " .. tostring(i))
            break
        end
    
        local data = comp.data
        if data == nil then
            print("Encountered nil data at index " .. tostring(i))
            break
        end
    
        print(tostring(i) .. " [" .. tostring(data.component_name) .. "]: " .. name)
    end
    
    opened by praydog 0
Owner
hi
null
Step is a C++17, header-only library of STL-like algorithms and data structures

Step is a C++17, header-only library of STL-like algorithms and data structures. Installation git clone --depth 1 https://github.com/storm-ptr/step.gi

storm-ptr 3 Sep 1, 2022
Multi-Purpose Header-Only C Data Structures

USAGE These header files are meant to be a simple means of using datastructures in a C project. They are universally useable with any other C datatype

Andre Schneider 2 Jul 15, 2022
This is a curve topology verification tool based on Fast Linking Numbers for Topology Verification of Loopy Structures.

Fast Linking Numbers This tool, called verifycurves, takes input models that consist of closed-loop curves, and outputs a topology certificate as a .t

Ante Qu 22 Jan 26, 2022
Generate a fictive and unique planet in ascii art with your gnupg fingerprint

GF2PA GPG Fingerprint 2 Planet Ascii Description Examples Usage Compilation Execution Other examples Description Generate a fictive and unique planet

null 4 Mar 12, 2022
Repository of problems and solutions of labsheets used for Data Structures and Algorithms (CS F211) in Semester 2, 2020-21 at BITS Pilani - Hyderabad Campus.

CS F211 Data Structures and Algorithms (BITS Pilani - Hyderabad Campus) This repository contains the problems, solution approaches & explanations and

Rohit Dwivedula 27 Oct 31, 2022
Algo-Tree is a collection of Algorithms and data structures which are fundamentals to efficient code and good software design

Algo-Tree is a collection of Algorithms and data structures which are fundamentals to efficient code and good software design. Creating and designing excellent algorithms is required for being an exemplary programmer. It contains solutions in various languages such as C++, Python and Java.

DSC-Banasthali 53 Oct 4, 2022
Templates, algorithms and data structures implemented and collected for programming contests.

Templates, algorithms and data structures implemented and collected for programming contests.

Shahjalal Shohag 2k Nov 29, 2022
πŸ”— Common Data Structures and Algorithms

?? Data Structures and Algorithms This library provides common data structures. It will also provide some data structures which needed in render or ga

Recep Aslantas 44 Nov 28, 2022
A collecton of generic reference counted data structures, tools to create compatible C style classes, and demo applications

The Offbrand library is a collection of reference counted generic data structures written in C for C. The library includes bash scripts to assist in t

Tyler Heck 81 Nov 21, 2022