๐Ÿ›๏ธ Augur

March 1, 2026 ยท View on GitHub

A religious official in ancient Rome who interpreted the will of the gods by reading signs and omens hidden in nature.

Riot Vanguard, the anti cheat system used across Riot Games titles, dynamically streams user mode modules in a proprietary binary format identified by the RITO magic signature. These modules arrive with hashed imports and a compact custom header rather than a standard Portable Executable (PE) layout. Augur parses this format, resolves the hashed imports against loaded system modules, constructs PE32+ sections with appropriate memory protections, and writes a valid Dynamic Link Library (DLL) to disk.


๐Ÿ“– Overview

Augur operates in two phases. The first phase parses the input binary, extracts section data and import descriptors from a compact custom header, and maps them into a new Portable Executable (PE) image using the LIEF library. The second phase resolves hashed module and function names against the live process environment, builds jmp stub trampolines for each resolved import, patches the original address references, and writes the final DLL.

The Vanguard streamed module format encodes the following at fixed offsets from the file header:

OffsetSizeField
0x004 bytesMagic (RITO)
0x088 bytesImage base address
0x144 bytesEntry point Relative Virtual Address (RVA)
0x204 bytesOffset to import module table
0x244 bytesNumber of import modules
0x304 bytesOffset to section table
0x344 bytesNumber of sections

๐Ÿ—๏ธ Architecture

The project is organized into three core components:

VLX::Image serves as the central orchestrator. It owns the raw binary data and the LIEF PE::Binary instance. Initialize reads the input file, validates the magic signature, and configures the PE optional header with the entry point and image base from the Vanguard format. Build delegates to the Sections and Imports subsystems in sequence, then invokes the LIEF builder to produce the output file.

VLX::Sections iterates the section table embedded in the Vanguard module. Each entry contains a raw data offset, an RVA, and a size. The builder copies raw content into new PE sections (named .VLX0, .VLX1, etc.) and marks each with read, write, and execute characteristics.

VLX::Imports handles the most complex part of the conversion. Module names in the Vanguard format are not stored as strings. They are stored as 64 bit FNV-1a hashes. The resolver enumerates modules loaded in the current process via CreateToolhelp32Snapshot, hashes each module name, and matches against the stored hash. Once a module is identified, the resolver parses its export table (loaded from System32 via LIEF) to match individual function hashes. For each resolved import, the builder creates a 6 byte jmp [rip+disp32] stub, calculates the RIP relative displacement to the Import Address Table (IAT) entry predicted by LIEF, and patches the original address slot to point at the stub.


๐Ÿ”— Dependencies

  • LIEF - PE parsing, construction, and building. LIEF provides the PE::Binary, PE::Builder, PE::Parser, and PE::Section classes that Augur uses to construct the output image from scratch.
  • Windows API - CreateToolhelp32Snapshot, Module32FirstW, Module32NextW for runtime module enumeration during import resolution.
  • C++17 or later - std::filesystem, structured bindings, and designated initializers are used throughout the codebase.

๐Ÿš€ Usage

#include "VLX/Image.hpp"

int main()
{
    VLX::Image VLXModule;

    if (!VLXModule.Initialize("VLXModule.bin"))
        return 0;

    if (!VLXModule.Build("VLXModule.dll"))
        return 0;

    return 0;
}

๐Ÿ“ Project Structure

.
โ”œโ”€โ”€ Main.cpp                      # Entry point
โ”œโ”€โ”€ LICENSE                       # MIT License
โ””โ”€โ”€ VLX/
    โ”œโ”€โ”€ Image.hpp                 # Image class declaration
    โ”œโ”€โ”€ Image.cpp                 # Initialization and build orchestration
    โ”œโ”€โ”€ Imports/
    โ”‚   โ”œโ”€โ”€ Imports.hpp           # Import resolver and stub builder declarations
    โ”‚   โ””โ”€โ”€ Imports.cpp           # Hash resolution, IAT construction, stub generation
    โ””โ”€โ”€ Sections/
        โ”œโ”€โ”€ Sections.hpp          # Section builder declaration
        โ””โ”€โ”€ Sections.cpp          # Section extraction and PE section creation

๐Ÿ“„ License

This project is licensed under the MIT License.


๐Ÿ‘ฅ Contributors

This project was co-authored by Xyrem.