# therevealz/stellasora-tool architecture

> Architecture diagram of the GitHub repository therevealz/stellasora-tool, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/therevealz/stellasora-tool
- Repository: https://github.com/therevealz/stellasora-tool

## Overview

1. **Overall shape**
   - This is a **Windows DLL cheat/injected overlay project** for the game *Stella Sora*.
   - The architecture is split into four main layers: **DLL entry/bootstrap**, **game API bindings**, **cheat feature logic**, and **DirectX 11 UI/rendering**.

2. **Process boundary**
   - The tool does not run as a standalone app; it is **injected into the game process**.
   - The target process is the game client, and the cheat code runs **inside the same address space**, which is why it can call game internals and hook rendering.

3. **Entry and startup flow**
   - `dllmain.cpp`, `main.cpp`, and `main.h` form the startup path.
   - On load, the DLL initializes logging, game bindings, hooks, and feature state before the menu becomes available.
   - The repo suggests a typical injected-module lifecycle: **attach → initialize → hook → render/update → cleanup**.

4. **Game binding layer**
   - `src/appdata/` is a generated/embedded binding layer for the game’s **IL2CPP runtime**.
   - Files such as `il2cpp-appdata.h`, `il2cpp-types.h`, `il2cpp-functions.h`, and `il2cpp-init.cpp` provide access to game types, methods, metadata, and initialization.
   - This layer is the key boundary between the cheat logic and the Unity/IL2CPP game internals.

5. **Feature framework**
   - `Feature.h` and `CheatMenu.*` define the shared abstraction for cheat modules and menu integration.
   - Individual cheats appear to be implemented as feature modules that can be toggled and updated independently.
   - This makes the cheat logic modular rather than monolithic.

6. **Gameplay modification modules**
   - `src/cheat/` contains the actual gameplay-impacting features:
     - `InstantBreak`
     - `MobVacuum`
     - `NoCD`
     - `StatModifier`
     - `HitEffect`
     - `misc/About`
   - These modules are likely responsible for altering game state, method behavior, or in-game entity properties through IL2CPP calls and/or hooks.
   - The README’s listed features map directly to these modules, with some features grouped under broader names like God Mode, Multi Hit, and Unlimited Energy.

7. **Rendering and overlay subsystem**
   - `src/render/` handles the in-game overlay and menu rendering.
   - `dx11-hook.cpp` indicates a **DirectX 11 hook**, likely used to intercept the game’s render loop and draw the cheat UI.
   - `renderer.*` and `gui-util.*` suggest a UI toolkit layered on top of the hook, probably for the feature menu shown with **F1**.

8. **Hook management**
   - `src/util/HookManager.h` is the central utility boundary for installing and tracking hooks.
   - This is where rendering hooks and possibly gameplay hooks are coordinated so they can be enabled, disabled, and cleaned up consistently.
   - Architecturally, this is the glue between the injected module and the game/runtime interception points.

9. **Logging and diagnostics**
   - `src/util/Logger.h` provides runtime logging, which is important in an injected DLL context where failures often happen during initialization, hook setup, or IL2CPP resolution.
   - The logger is likely used across startup, hook, and feature code to trace success/failure inside the host process.

10. **Data flow**
   - The main flow is:
     1. DLL loads into the game process.
     2. IL2CPP app data is initialized and game symbols are resolved.
     3. Hooks are installed, especially the DX11 render hook.
     4. The menu is rendered during the game’s frame loop.
     5. Feature toggles drive per-frame or event-driven game modifications.
   - In other words, **render loop drives UI**, while **feature logic drives gameplay changes**.

11. **Technology and runtime boundaries**
   - The project is a **Visual Studio C++ solution** (`.sln`, `.vcxproj`) targeting Windows.
   - The important external runtime is the game’s **Unity IL2CPP** environment, plus **DirectX 11** for the overlay.
   - The `vendor/` directory likely contains third-party dependencies used by the renderer or hooking layer.

12. **What to show in an architecture diagram**
   - Draw the game as the host process, with an injected DLL inside it.
   - Inside the DLL, separate:
     - **Bootstrap/entry**
     - **IL2CPP binding layer**
     - **Hooking layer**
     - **Feature modules**
     - **DX11 overlay/menu**
   - Show the IL2CPP layer as the bridge to game objects/methods, and the DX11 hook as the bridge to on-screen UI rendering.

Main entry points: [`src/Feature.h`](https://github.com/therevealz/stellasora-tool/blob/main/src/Feature.h) (Feature base), [`src/main.cpp`](https://github.com/therevealz/stellasora-tool/blob/main/src/main.cpp) (Main runtime), [`src/appdata/il2cpp-functions.h`](https://github.com/therevealz/stellasora-tool/blob/main/src/appdata/il2cpp-functions.h) (Functions), [`src/appdata/il2cpp-init.cpp`](https://github.com/therevealz/stellasora-tool/blob/main/src/appdata/il2cpp-init.cpp) (IL2CPP init)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_host["Host process"]
  node_game_client[("Stella Sora<br/>game process")]
end

subgraph group_dll["Injected DLL"]
  node_dll_entry["DLL entry<br/>bootstrap<br/>[dllmain.cpp]"]
  node_main_runtime["Main runtime<br/>init flow<br/>[main.cpp]"]
  node_main_api["Main API<br/>startup header<br/>[main.h]"]
end

subgraph group_bindings["IL2CPP bindings"]
  node_il2cpp_init["IL2CPP init<br/>runtime bootstrap<br/>[il2cpp-init.cpp]"]
  node_il2cpp_appdata["App data<br/>generated bindings<br/>[il2cpp-appdata.h]"]
  node_il2cpp_types["Types<br/>[il2cpp-types.h]"]
  node_il2cpp_functions["Functions<br/>generated methods<br/>[il2cpp-functions.h]"]
end

subgraph group_features["Cheat features"]
  node_feature_base["Feature base<br/>module interface<br/>[Feature.h]"]
  node_cheat_menu["Cheat menu<br/>ui controller<br/>[CheatMenu.cpp]"]
  node_cheat_menu_api["Menu API<br/>ui header<br/>[CheatMenu.h]"]
  node_stat_modifier["Stat modifier<br/>cheat module<br/>[StatModifier.cpp]"]
  node_instant_break["Instant break<br/>cheat module<br/>[InstantBreak.cpp]"]
  node_mob_vacuum["Mob vacuum<br/>cheat module<br/>[MobVacuum.cpp]"]
  node_no_cd["No cooldown<br/>cheat module<br/>[NoCD.cpp]"]
  node_hit_effect["Hit effect<br/>cheat module<br/>[HitEffect.cpp]"]
  node_about["About<br/>misc module<br/>[About.cpp]"]
end

subgraph group_rendering["Overlay rendering"]
  node_dx11_hook["DX11 hook<br/>render hook<br/>[dx11-hook.cpp]"]
  node_renderer["Renderer<br/>[renderer.cpp]"]
  node_gui_util["GUI utils<br/>ui helpers<br/>[gui-util.cpp]"]
end

subgraph group_util["Utilities"]
  node_hook_manager["Hook manager<br/>hook orchestration<br/>[HookManager.h]"]
  node_logger["Logger<br/>diagnostics<br/>[Logger.h]"]
end

node_game_client -->|"loads"| node_dll_entry
node_dll_entry -->|"starts"| node_main_runtime
node_main_runtime -->|"logs"| node_logger
node_main_runtime -->|"initializes"| node_il2cpp_init
node_il2cpp_init -->|"binds"| node_il2cpp_appdata
node_il2cpp_init -->|"resolves"| node_il2cpp_types
node_il2cpp_init -->|"resolves"| node_il2cpp_functions
node_main_runtime -->|"installs"| node_hook_manager
node_hook_manager -->|"manages"| node_dx11_hook
node_dx11_hook -->|"drives"| node_renderer
node_renderer -->|"uses"| node_gui_util
node_renderer -->|"renders"| node_cheat_menu
node_cheat_menu -->|"hosts"| node_feature_base
node_main_runtime -->|"registers"| node_cheat_menu
node_feature_base -->|"implements"| node_stat_modifier
node_feature_base -->|"implements"| node_instant_break
node_feature_base -->|"implements"| node_mob_vacuum
node_feature_base -->|"implements"| node_no_cd
node_feature_base -->|"implements"| node_hit_effect
node_feature_base -->|"implements"| node_about
node_stat_modifier -->|"calls"| node_il2cpp_functions
node_instant_break -->|"calls"| node_il2cpp_functions
node_mob_vacuum -->|"calls"| node_il2cpp_functions
node_no_cd -->|"calls"| node_il2cpp_functions
node_hit_effect -->|"calls"| node_il2cpp_functions
node_main_runtime -->|"declares"| node_main_api
node_cheat_menu -->|"declares"| node_cheat_menu_api

click node_dll_entry "https://github.com/therevealz/stellasora-tool/blob/main/src/dllmain.cpp"
click node_main_runtime "https://github.com/therevealz/stellasora-tool/blob/main/src/main.cpp"
click node_main_api "https://github.com/therevealz/stellasora-tool/blob/main/src/main.h"
click node_feature_base "https://github.com/therevealz/stellasora-tool/blob/main/src/Feature.h"
click node_cheat_menu "https://github.com/therevealz/stellasora-tool/blob/main/src/CheatMenu.cpp"
click node_cheat_menu_api "https://github.com/therevealz/stellasora-tool/blob/main/src/CheatMenu.h"
click node_il2cpp_init "https://github.com/therevealz/stellasora-tool/blob/main/src/appdata/il2cpp-init.cpp"
click node_il2cpp_appdata "https://github.com/therevealz/stellasora-tool/blob/main/src/appdata/il2cpp-appdata.h"
click node_il2cpp_types "https://github.com/therevealz/stellasora-tool/blob/main/src/appdata/il2cpp-types.h"
click node_il2cpp_functions "https://github.com/therevealz/stellasora-tool/blob/main/src/appdata/il2cpp-functions.h"
click node_stat_modifier "https://github.com/therevealz/stellasora-tool/blob/main/src/cheat/StatModifier.cpp"
click node_instant_break "https://github.com/therevealz/stellasora-tool/blob/main/src/cheat/InstantBreak.cpp"
click node_mob_vacuum "https://github.com/therevealz/stellasora-tool/blob/main/src/cheat/MobVacuum.cpp"
click node_no_cd "https://github.com/therevealz/stellasora-tool/blob/main/src/cheat/NoCD.cpp"
click node_hit_effect "https://github.com/therevealz/stellasora-tool/blob/main/src/cheat/HitEffect.cpp"
click node_about "https://github.com/therevealz/stellasora-tool/blob/main/src/cheat/misc/About.cpp"
click node_dx11_hook "https://github.com/therevealz/stellasora-tool/blob/main/src/render/dx11-hook.cpp"
click node_renderer "https://github.com/therevealz/stellasora-tool/blob/main/src/render/renderer.cpp"
click node_gui_util "https://github.com/therevealz/stellasora-tool/blob/main/src/render/gui-util.cpp"
click node_hook_manager "https://github.com/therevealz/stellasora-tool/blob/main/src/util/HookManager.h"
click node_logger "https://github.com/therevealz/stellasora-tool/blob/main/src/util/Logger.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_game_client toneBlue
class node_dll_entry,node_main_runtime,node_main_api toneAmber
class node_il2cpp_init,node_il2cpp_appdata,node_il2cpp_types,node_il2cpp_functions toneMint
class node_feature_base,node_cheat_menu,node_cheat_menu_api,node_stat_modifier,node_instant_break,node_mob_vacuum,node_no_cd,node_hit_effect,node_about toneRose
class node_dx11_hook,node_renderer,node_gui_util toneIndigo
class node_hook_manager,node_logger toneTeal
```

## Components

### Host process

The game client that loads and runs the injected module.

- **Stella Sora**: game process · Target Windows game process hosting the injected DLL.

### Injected DLL

The cheat module running inside the game process.

- [DLL entry](https://github.com/therevealz/stellasora-tool/blob/main/src/dllmain.cpp): bootstrap · Process attach and initial module startup path. · `src/dllmain.cpp`
- [Main runtime](https://github.com/therevealz/stellasora-tool/blob/main/src/main.cpp): init flow · Core startup and lifecycle coordination for the injected module. · `src/main.cpp`
- [Main API](https://github.com/therevealz/stellasora-tool/blob/main/src/main.h): startup header · Declarations for the module startup path and shared entry points. · `src/main.h`

### IL2CPP bindings

Generated bridge to Unity IL2CPP types, metadata, and functions.

- [IL2CPP init](https://github.com/therevealz/stellasora-tool/blob/main/src/appdata/il2cpp-init.cpp): runtime bootstrap · Initializes access to the game's IL2CPP runtime. · `src/appdata/il2cpp-init.cpp`
- [App data](https://github.com/therevealz/stellasora-tool/blob/main/src/appdata/il2cpp-appdata.h): generated bindings · Generated access to game types and metadata. · `src/appdata/il2cpp-appdata.h`
- [Types](https://github.com/therevealz/stellasora-tool/blob/main/src/appdata/il2cpp-types.h): generated types · IL2CPP type declarations and pointer aliases. · `src/appdata/il2cpp-types.h`
- [Functions](https://github.com/therevealz/stellasora-tool/blob/main/src/appdata/il2cpp-functions.h): generated methods · Resolved game method declarations and call wrappers. · `src/appdata/il2cpp-functions.h`

### Cheat features

Gameplay-modifying modules exposed through the feature framework.

- [Feature base](https://github.com/therevealz/stellasora-tool/blob/main/src/Feature.h): module interface · Shared abstraction for toggleable cheat modules. · `src/Feature.h`
- [Cheat menu](https://github.com/therevealz/stellasora-tool/blob/main/src/CheatMenu.cpp): ui controller · Menu integration and feature presentation. · `src/CheatMenu.cpp`
- [Menu API](https://github.com/therevealz/stellasora-tool/blob/main/src/CheatMenu.h): ui header · Declarations for menu state and feature wiring. · `src/CheatMenu.h`
- [Stat modifier](https://github.com/therevealz/stellasora-tool/blob/main/src/cheat/StatModifier.cpp): cheat module · Alters player or entity stats through game internals. · `src/cheat/StatModifier.cpp`
- [Instant break](https://github.com/therevealz/stellasora-tool/blob/main/src/cheat/InstantBreak.cpp): cheat module · Forces fast object or resource breaking behavior. · `src/cheat/InstantBreak.cpp`
- [Mob vacuum](https://github.com/therevealz/stellasora-tool/blob/main/src/cheat/MobVacuum.cpp): cheat module · Pulls enemies or objects toward the player. · `src/cheat/MobVacuum.cpp`
- [No cooldown](https://github.com/therevealz/stellasora-tool/blob/main/src/cheat/NoCD.cpp): cheat module · Removes ability or action cooldowns. · `src/cheat/NoCD.cpp`
- [Hit effect](https://github.com/therevealz/stellasora-tool/blob/main/src/cheat/HitEffect.cpp): cheat module · Modifies hit or impact behavior in combat. · `src/cheat/HitEffect.cpp`
- [About](https://github.com/therevealz/stellasora-tool/blob/main/src/cheat/misc/About.cpp): misc module · Informational miscellaneous feature page. · `src/cheat/misc/About.cpp`

### Overlay rendering

DirectX 11 hook and in-game menu rendering.

- [DX11 hook](https://github.com/therevealz/stellasora-tool/blob/main/src/render/dx11-hook.cpp): render hook · Intercepts the DirectX 11 frame loop for overlay drawing. · `src/render/dx11-hook.cpp`
- [Renderer](https://github.com/therevealz/stellasora-tool/blob/main/src/render/renderer.cpp): overlay renderer · Draws the in-game overlay and menu UI. · `src/render/renderer.cpp`
- [GUI utils](https://github.com/therevealz/stellasora-tool/blob/main/src/render/gui-util.cpp): ui helpers · Shared rendering helpers for menu components. · `src/render/gui-util.cpp`

### Utilities

Shared support for hooks and logging.

- [Hook manager](https://github.com/therevealz/stellasora-tool/blob/main/src/util/HookManager.h): hook orchestration · Installs, tracks, and cleans up runtime hooks. · `src/util/HookManager.h`
- [Logger](https://github.com/therevealz/stellasora-tool/blob/main/src/util/Logger.h): diagnostics · Runtime logging for startup, hook setup, and failures. · `src/util/Logger.h`

## Connections

- Stella Sora → DLL entry: loads · The game process loads the injected DLL.
- DLL entry → Main runtime: starts · DLL entry transfers control to module startup.
- Main runtime → Logger: logs · Startup and runtime events are recorded for diagnostics.
- Main runtime → IL2CPP init: initializes · The module resolves and initializes IL2CPP access.
- IL2CPP init → App data: binds · Initialization uses generated app data bindings.
- IL2CPP init → Types: resolves · Type information is prepared for runtime access.
- IL2CPP init → Functions: resolves · Method and function wrappers are prepared for calls.
- Main runtime → Hook manager: installs · Core runtime sets up hook coordination.
- Hook manager → DX11 hook: manages · Hook manager controls render hook lifecycle.
- DX11 hook → Renderer: drives · Render hook triggers overlay drawing each frame.
- Renderer → GUI utils: uses · Renderer relies on shared UI helpers.
- Renderer → Cheat menu: renders · The overlay menu is drawn through the renderer.
- Cheat menu → Feature base: hosts · Menu presents the toggleable feature abstraction.
- Main runtime → Cheat menu: registers · Startup wires feature UI into the runtime.
- Feature base → Stat modifier: implements · Concrete feature module.
- Feature base → Instant break: implements · Concrete feature module.
- Feature base → Mob vacuum: implements · Concrete feature module.
- Feature base → No cooldown: implements · Concrete feature module.
- Feature base → Hit effect: implements · Concrete feature module.
- Feature base → About: implements · Concrete misc feature module.
- Stat modifier → Functions: calls · Gameplay features use resolved game methods.
- Instant break → Functions: calls · Gameplay features use resolved game methods.
- Mob vacuum → Functions: calls · Gameplay features use resolved game methods.
- No cooldown → Functions: calls · Gameplay features use resolved game methods.
- Hit effect → Functions: calls · Gameplay features use resolved game methods.
- Main runtime → Main API: declares · Startup header supports the module entry flow.
- Cheat menu → Menu API: declares · Menu implementation uses its public interface.
