# opensteam001/opensteamtool architecture

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

- Interactive diagram: https://gitdiagram.com/opensteam001/opensteamtool
- Repository: https://github.com/opensteam001/opensteamtool

## Overview

OpenSteamTool is a Windows Steam runtime extension that loads alongside Steam, reads Lua/TOML configuration, and alters Steam client behavior to unlock configured apps and depots. Its main workflow is initialization and hook installation, followed by Lua-driven Steam API interception; manifest-code lookup, process-handshake features, and ticket authorization support that workflow. The README also documents stats, injection, hot reload, family sharing, online fix, and optional cloud redirection. Several feature implementations were not sampled, so their links are included only where README or source-index evidence supports them.

Main entry points: [`src/dllmain.cpp`](https://github.com/opensteam001/opensteamtool/blob/main/src/dllmain.cpp) (DLL initialization), [`src/Hook`](https://github.com/opensteam001/opensteamtool/tree/main/src/Hook) (Steam API hooks), [`src/Pipe/PipeManager.cpp`](https://github.com/opensteam001/opensteamtool/blob/main/src/Pipe/PipeManager.cpp) (Process handshakes), [`src/Utils/Config/LuaConfig.cpp`](https://github.com/opensteam001/opensteamtool/blob/main/src/Utils/Config/LuaConfig.cpp) (Lua unlock rules)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime and hooks"]
  node_entry["DLL initialization<br/>[dllmain.cpp]"]
  node_hook_manager["Hook manager<br/>[HookManager.cpp]"]
  node_steam_hooks["Steam API hooks"]
  node_steam_abi["Steam ABI types<br/>[Structs.h]"]
end

subgraph group_config["Configuration"]
  node_toml_config["Runtime config<br/>[Config.h]"]
  node_lua_config["Lua unlock rules<br/>[LuaConfig.cpp]"]
  node_file_watchers["Config hot reload"]
end

subgraph group_unlock["Unlock features"]
  node_pipe_manager["Process handshakes<br/>[PipeManager.cpp]"]
  node_process_inspector["Process inspection"]
  node_denuvo["Denuvo authorization<br/>[DenuvoAuth.cpp]"]
  node_injection["Game library injection<br/>[Injection.cpp]"]
  node_tickets[("Ticket credentials<br/>[AppTicket.cpp]")]
end

subgraph group_metadata["Metadata services"]
  node_manifest["Manifest lookup<br/>[ManifestClient.cpp]"]
  node_stats["Stats lookup<br/>[StatsClient.cpp]"]
  node_steam_metadata["Steam metadata loading"]
end

subgraph group_platform["Platform integration"]
  node_cloud_redirect["Cloud redirection"]
  node_platform_services["Windows platform services"]
end

node_steam_user(("Steam user"))
node_steam_runtime["Steam runtime"]
node_external_apis["Manifest and stats APIs"]

node_steam_user -->|"loads alongside"| node_entry
node_entry -->|"loads configuration"| node_toml_config
node_entry -->|"parses Lua"| node_lua_config
node_entry -->|"starts watchers"| node_file_watchers
node_entry -->|"loads metadata"| node_steam_metadata
node_entry -->|"installs hooks"| node_hook_manager
node_entry -->|"initializes optional"| node_cloud_redirect
node_hook_manager -->|"registers hooks"| node_steam_hooks
node_steam_hooks -.->|"intercepts calls"| node_steam_runtime
node_steam_hooks -.->|"applies unlock rules"| node_lua_config
node_steam_hooks -.->|"requests manifest codes"| node_manifest
node_steam_hooks -.->|"resolves stats identity"| node_stats
node_steam_hooks -.->|"uses ABI layouts"| node_steam_abi
node_pipe_manager -->|"inspects process"| node_process_inspector
node_pipe_manager -->|"checks app rules"| node_lua_config
node_pipe_manager -->|"applies authorization"| node_denuvo
node_pipe_manager -->|"applies injection"| node_injection
node_denuvo -->|"reads tickets"| node_tickets
node_manifest -->|"tries Lua providers"| node_lua_config
node_manifest -->|"fetches manifest code"| node_external_apis
node_stats -->|"fetches SteamID"| node_external_apis
node_steam_metadata -.->|"loads patterns"| node_external_apis
node_cloud_redirect -.->|"uses Windows runtime"| node_platform_services
node_toml_config -.->|"configures behavior"| node_steam_hooks
node_file_watchers -.->|"reloads Lua"| node_lua_config
node_steam_user -.->|"starts game process"| node_pipe_manager

click node_entry "https://github.com/opensteam001/opensteamtool/blob/main/src/dllmain.cpp"
click node_hook_manager "https://github.com/opensteam001/opensteamtool/blob/main/src/Hook/HookManager.cpp"
click node_steam_hooks "https://github.com/opensteam001/opensteamtool/tree/main/src/Hook"
click node_steam_abi "https://github.com/opensteam001/opensteamtool/blob/main/src/Steam/Structs.h"
click node_toml_config "https://github.com/opensteam001/opensteamtool/blob/main/src/Utils/Config/Config.h"
click node_lua_config "https://github.com/opensteam001/opensteamtool/blob/main/src/Utils/Config/LuaConfig.cpp"
click node_file_watchers "https://github.com/opensteam001/opensteamtool/tree/main/src/Utils/Config"
click node_manifest "https://github.com/opensteam001/opensteamtool/blob/main/src/Utils/SteamMetadata/ManifestClient.cpp"
click node_stats "https://github.com/opensteam001/opensteamtool/blob/main/src/Utils/SteamMetadata/StatsClient.cpp"
click node_steam_metadata "https://github.com/opensteam001/opensteamtool/tree/main/src/Utils/SteamMetadata"
click node_pipe_manager "https://github.com/opensteam001/opensteamtool/blob/main/src/Pipe/PipeManager.cpp"
click node_process_inspector "https://github.com/opensteam001/opensteamtool/blob/main/src/Pipe/ProcessInspector.cpp"
click node_denuvo "https://github.com/opensteam001/opensteamtool/blob/main/src/Pipe/Features/DenuvoAuth/DenuvoAuth.cpp"
click node_injection "https://github.com/opensteam001/opensteamtool/blob/main/src/Pipe/Features/Injection/Injection.cpp"
click node_tickets "https://github.com/opensteam001/opensteamtool/blob/main/src/Utils/Tickets/AppTicket.cpp"
click node_cloud_redirect "https://github.com/opensteam001/opensteamtool/blob/main/src/Utils/CloudRedirect/CloudRedirectHost.cpp"
click node_platform_services "https://github.com/opensteam001/opensteamtool/tree/main/src/OSTPlatform/Windows"

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_entry,node_hook_manager,node_steam_hooks,node_steam_abi,node_steam_user toneBlue
class node_toml_config,node_lua_config,node_file_watchers toneAmber
class node_pipe_manager,node_process_inspector,node_denuvo,node_injection,node_tickets,node_external_apis toneMint
class node_manifest,node_stats,node_steam_metadata toneRose
class node_cloud_redirect,node_platform_services,node_steam_runtime toneIndigo
```

## Components

### Runtime and hooks

- [DLL initialization](https://github.com/opensteam001/opensteamtool/blob/main/src/dllmain.cpp): `src/dllmain.cpp`
- [Hook manager](https://github.com/opensteam001/opensteamtool/blob/main/src/Hook/HookManager.cpp): `src/Hook/HookManager.cpp`
- [Steam API hooks](https://github.com/opensteam001/opensteamtool/tree/main/src/Hook): `src/Hook`
- [Steam ABI types](https://github.com/opensteam001/opensteamtool/blob/main/src/Steam/Structs.h): `src/Steam/Structs.h`

### Configuration

- [Runtime config](https://github.com/opensteam001/opensteamtool/blob/main/src/Utils/Config/Config.h): `src/Utils/Config/Config.h`
- [Lua unlock rules](https://github.com/opensteam001/opensteamtool/blob/main/src/Utils/Config/LuaConfig.cpp): `src/Utils/Config/LuaConfig.cpp`
- [Config hot reload](https://github.com/opensteam001/opensteamtool/tree/main/src/Utils/Config): `src/Utils/Config`

### Unlock features

- [Process handshakes](https://github.com/opensteam001/opensteamtool/blob/main/src/Pipe/PipeManager.cpp): `src/Pipe/PipeManager.cpp`
- [Process inspection](https://github.com/opensteam001/opensteamtool/blob/main/src/Pipe/ProcessInspector.cpp): `src/Pipe/ProcessInspector.cpp`
- [Denuvo authorization](https://github.com/opensteam001/opensteamtool/blob/main/src/Pipe/Features/DenuvoAuth/DenuvoAuth.cpp): `src/Pipe/Features/DenuvoAuth/DenuvoAuth.cpp`
- [Game library injection](https://github.com/opensteam001/opensteamtool/blob/main/src/Pipe/Features/Injection/Injection.cpp): `src/Pipe/Features/Injection/Injection.cpp`
- [Ticket credentials](https://github.com/opensteam001/opensteamtool/blob/main/src/Utils/Tickets/AppTicket.cpp): `src/Utils/Tickets/AppTicket.cpp`

### Metadata services

- [Manifest lookup](https://github.com/opensteam001/opensteamtool/blob/main/src/Utils/SteamMetadata/ManifestClient.cpp): `src/Utils/SteamMetadata/ManifestClient.cpp`
- [Stats lookup](https://github.com/opensteam001/opensteamtool/blob/main/src/Utils/SteamMetadata/StatsClient.cpp): `src/Utils/SteamMetadata/StatsClient.cpp`
- [Steam metadata loading](https://github.com/opensteam001/opensteamtool/tree/main/src/Utils/SteamMetadata): `src/Utils/SteamMetadata`

### Platform integration

- [Cloud redirection](https://github.com/opensteam001/opensteamtool/blob/main/src/Utils/CloudRedirect/CloudRedirectHost.cpp): `src/Utils/CloudRedirect/CloudRedirectHost.cpp`
- [Windows platform services](https://github.com/opensteam001/opensteamtool/tree/main/src/OSTPlatform/Windows): `src/OSTPlatform/Windows`

### Other components

- **Steam user**
- **Steam runtime**
- **Manifest and stats APIs**

## Connections

- Steam user → DLL initialization: loads alongside (evidence: `README.md`)
- DLL initialization → Runtime config: loads configuration (evidence: `src/dllmain.cpp`)
- DLL initialization → Lua unlock rules: parses Lua (evidence: `src/dllmain.cpp`)
- DLL initialization → Config hot reload: starts watchers (evidence: `src/dllmain.cpp`)
- DLL initialization → Steam metadata loading: loads metadata (evidence: `src/dllmain.cpp`)
- DLL initialization → Hook manager: installs hooks (evidence: `src/dllmain.cpp`)
- DLL initialization → Cloud redirection: initializes optional (evidence: `src/dllmain.cpp`)
- Hook manager → Steam API hooks: registers hooks (evidence: `src/Hook/HookManager.cpp`)
- Steam API hooks → Steam runtime: intercepts calls
- Steam API hooks → Lua unlock rules: applies unlock rules
- Steam API hooks → Manifest lookup: requests manifest codes
- Steam API hooks → Stats lookup: resolves stats identity
- Steam API hooks → Steam ABI types: uses ABI layouts (evidence: `src/Hook/Hooks_IPC.h`)
- Process handshakes → Process inspection: inspects process (evidence: `src/Pipe/PipeManager.cpp`)
- Process handshakes → Lua unlock rules: checks app rules (evidence: `src/Pipe/PipeManager.cpp`)
- Process handshakes → Denuvo authorization: applies authorization (evidence: `src/Pipe/PipeManager.cpp`)
- Process handshakes → Game library injection: applies injection (evidence: `src/Pipe/PipeManager.cpp`)
- Denuvo authorization → Ticket credentials: reads tickets (evidence: `src/Pipe/Features/DenuvoAuth/DenuvoAuth.cpp`)
- Manifest lookup → Lua unlock rules: tries Lua providers (evidence: `src/Utils/SteamMetadata/ManifestClient.cpp`)
- Manifest lookup → Manifest and stats APIs: fetches manifest code (evidence: `src/Utils/SteamMetadata/ManifestClient.cpp`)
- Stats lookup → Manifest and stats APIs: fetches SteamID (evidence: `src/Utils/SteamMetadata/StatsClient.cpp`)
- Steam metadata loading → Manifest and stats APIs: loads patterns
- Cloud redirection → Windows platform services: uses Windows runtime
- Runtime config → Steam API hooks: configures behavior (evidence: `README.md`)
- Config hot reload → Lua unlock rules: reloads Lua (evidence: `README.md`)
- Steam user → Process handshakes: starts game process (evidence: `README.md`)
