# futurelesswindchan/opensteamtool-kazefork architecture

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

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

## Overview

OpenSteamTool is a Windows Steam-unlock DLL. The user configures Lua rules and TOML settings; the DLL loads into Steam, watches and reloads configuration, then hooks Steam client/UI behavior to apply unlock, manifest, ticket, stats, family-sharing, and online-fix features. Game-process pipe handshakes separately resolve the target process before applying Denuvo authorization and optional library injection. The graph combines shown calls and README-documented capabilities; some hook internals and integrations are unsampled, so their relationships are documented rather than inferred from names.

Main entry points: [`src/dllmain.cpp`](https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/dllmain.cpp) (DLL bootstrap), [`src/Pipe/PipeManager.cpp`](https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Pipe/PipeManager.cpp) (Pipe handshake), [`src/Utils/Config/LuaConfig.cpp`](https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Utils/Config/LuaConfig.cpp) (Lua rules), [`src/Hook/Hooks_NetPacket.cpp`](https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Hook/Hooks_NetPacket.cpp) (Steam hooks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Runtime startup"]
  node_bootstrap["DLL bootstrap<br/>[dllmain.cpp]"]
end

subgraph group_rules["Configuration"]
  node_lua_rules["Lua rules<br/>[LuaConfig.cpp]"]
  node_toml_config["TOML config<br/>[Config.cpp]"]
  node_lua_watcher["Lua hot reload<br/>[LuaFileWatcher.cpp]"]
  node_config_watcher["Config watcher"]
end

subgraph group_steam["Steam integration"]
  node_hook_dispatch["Hook dispatch<br/>[HookManager.cpp]"]
  node_steam_hooks["Steam hooks"]
  node_ipc_metadata["IPC metadata<br/>[IPCLoader.cpp]"]
  node_pattern_loader["Pattern loader<br/>[PatternLoader.cpp]"]
  node_cloud_redirect["Cloud redirect"]
end

subgraph group_game["Game process features"]
  node_pipe_manager["Pipe handshake<br/>[PipeManager.cpp]"]
  node_process_inspector["Process inspection"]
  node_denuvo["Denuvo authorization<br/>[DenuvoAuth.cpp]"]
  node_protection_scan["Protection scan<br/>[ProtectionScan.cpp]"]
  node_injection["Library injection<br/>[Injection.cpp]"]
  node_ticket_store["Ticket handling<br/>[AppTicket.cpp]"]
end

subgraph group_metadata["Metadata services"]
  node_manifest["Manifest resolver<br/>[ManifestClient.cpp]"]
  node_manifest_api(("Manifest providers"))
  node_stats["Stats lookup<br/>[StatsClient.cpp]"]
  node_stats_api(("Stats service"))
end

node_user(("Steam user"))
node_steam_runtime["Steam runtime"]
node_steam_client["Steam client libraries"]
node_game_process["Game process"]

node_user -->|"defines rules"| node_lua_rules
node_user -->|"sets options"| node_toml_config
node_bootstrap -->|"loads libraries"| node_steam_client
node_bootstrap -->|"loads config"| node_toml_config
node_bootstrap -->|"parses directories"| node_lua_rules
node_bootstrap -->|"starts watcher"| node_lua_watcher
node_bootstrap -->|"starts watcher"| node_config_watcher
node_bootstrap -->|"installs hooks"| node_hook_dispatch
node_bootstrap -->|"loads patterns"| node_pattern_loader
node_bootstrap -->|"loads metadata"| node_ipc_metadata
node_bootstrap -->|"initializes optionally"| node_cloud_redirect
node_hook_dispatch -->|"installs hooks"| node_steam_hooks
node_steam_hooks -.->|"intercepts Steam behavior"| node_steam_runtime
node_lua_watcher -->|"reloads scripts"| node_lua_rules
node_config_watcher -->|"reloads settings"| node_toml_config
node_manifest -->|"tries Lua handlers"| node_lua_rules
node_manifest -->|"requests codes"| node_manifest_api
node_manifest -->|"reads timeouts"| node_toml_config
node_stats -->|"fetches SteamID"| node_stats_api
node_steam_hooks -.->|"resolves manifests"| node_manifest
node_steam_hooks -.->|"enables achievement data"| node_stats
node_steam_runtime -.->|"signals handshake"| node_pipe_manager
node_pipe_manager -->|"resolves process"| node_process_inspector
node_pipe_manager -->|"checks app rules"| node_lua_rules
node_pipe_manager -->|"applies authorization"| node_denuvo
node_pipe_manager -->|"applies injection"| node_injection
node_denuvo -->|"uses scan"| node_protection_scan
node_denuvo -->|"reads ticket data"| node_ticket_store
node_injection -.->|"injects library"| node_game_process
node_denuvo -.->|"authorizes game"| node_game_process
node_cloud_redirect -.->|"redirects cloud saves"| node_steam_client

click node_bootstrap "https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/dllmain.cpp"
click node_hook_dispatch "https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Hook/HookManager.cpp"
click node_steam_hooks "https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Hook/Hooks_NetPacket.cpp"
click node_lua_rules "https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Utils/Config/LuaConfig.cpp"
click node_toml_config "https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Utils/Config/Config.cpp"
click node_lua_watcher "https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Utils/Config/LuaFileWatcher.cpp"
click node_config_watcher "https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Utils/Config/ConfigFileWatcher.cpp"
click node_manifest "https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Utils/SteamMetadata/ManifestClient.cpp"
click node_stats "https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Utils/SteamMetadata/StatsClient.cpp"
click node_ipc_metadata "https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Utils/SteamMetadata/IPCLoader.cpp"
click node_pattern_loader "https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Utils/SteamMetadata/PatternLoader.cpp"
click node_pipe_manager "https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Pipe/PipeManager.cpp"
click node_process_inspector "https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Pipe/ProcessInspector.cpp"
click node_denuvo "https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Pipe/Features/DenuvoAuth/DenuvoAuth.cpp"
click node_protection_scan "https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Pipe/Features/DenuvoAuth/ProtectionScan.cpp"
click node_injection "https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Pipe/Features/Injection/Injection.cpp"
click node_ticket_store "https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Utils/Tickets/AppTicket.cpp"
click node_cloud_redirect "https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Utils/CloudRedirect/CloudRedirectHost.cpp"

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_bootstrap,node_user,node_steam_client toneBlue
class node_lua_rules,node_toml_config,node_lua_watcher,node_config_watcher toneAmber
class node_hook_dispatch,node_steam_hooks,node_ipc_metadata,node_pattern_loader,node_cloud_redirect toneMint
class node_pipe_manager,node_process_inspector,node_denuvo,node_protection_scan,node_injection,node_ticket_store toneRose
class node_manifest,node_manifest_api,node_stats,node_stats_api,node_steam_runtime,node_game_process toneIndigo
```

## Components

### Runtime startup

- [DLL bootstrap](https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/dllmain.cpp): `src/dllmain.cpp`

### Configuration

- [Lua rules](https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Utils/Config/LuaConfig.cpp): `src/Utils/Config/LuaConfig.cpp`
- [TOML config](https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Utils/Config/Config.cpp): `src/Utils/Config/Config.cpp`
- [Lua hot reload](https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Utils/Config/LuaFileWatcher.cpp): `src/Utils/Config/LuaFileWatcher.cpp`
- [Config watcher](https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Utils/Config/ConfigFileWatcher.cpp): `src/Utils/Config/ConfigFileWatcher.cpp`

### Steam integration

- [Hook dispatch](https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Hook/HookManager.cpp): `src/Hook/HookManager.cpp`
- [Steam hooks](https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Hook/Hooks_NetPacket.cpp): `src/Hook/Hooks_NetPacket.cpp`
- [IPC metadata](https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Utils/SteamMetadata/IPCLoader.cpp): `src/Utils/SteamMetadata/IPCLoader.cpp`
- [Pattern loader](https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Utils/SteamMetadata/PatternLoader.cpp): `src/Utils/SteamMetadata/PatternLoader.cpp`
- [Cloud redirect](https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Utils/CloudRedirect/CloudRedirectHost.cpp): `src/Utils/CloudRedirect/CloudRedirectHost.cpp`

### Game process features

- [Pipe handshake](https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Pipe/PipeManager.cpp): `src/Pipe/PipeManager.cpp`
- [Process inspection](https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Pipe/ProcessInspector.cpp): `src/Pipe/ProcessInspector.cpp`
- [Denuvo authorization](https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Pipe/Features/DenuvoAuth/DenuvoAuth.cpp): `src/Pipe/Features/DenuvoAuth/DenuvoAuth.cpp`
- [Protection scan](https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Pipe/Features/DenuvoAuth/ProtectionScan.cpp): `src/Pipe/Features/DenuvoAuth/ProtectionScan.cpp`
- [Library injection](https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Pipe/Features/Injection/Injection.cpp): `src/Pipe/Features/Injection/Injection.cpp`
- [Ticket handling](https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Utils/Tickets/AppTicket.cpp): `src/Utils/Tickets/AppTicket.cpp`

### Metadata services

- [Manifest resolver](https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Utils/SteamMetadata/ManifestClient.cpp): `src/Utils/SteamMetadata/ManifestClient.cpp`
- **Manifest providers**
- [Stats lookup](https://github.com/futurelesswindchan/opensteamtool-kazefork/blob/main/src/Utils/SteamMetadata/StatsClient.cpp): `src/Utils/SteamMetadata/StatsClient.cpp`
- **Stats service**

### Other components

- **Steam user**
- **Steam runtime**
- **Steam client libraries**
- **Game process**

## Connections

- Steam user → Lua rules: defines rules (evidence: `README.md`)
- Steam user → TOML config: sets options (evidence: `README.md`)
- DLL bootstrap → Steam client libraries: loads libraries (evidence: `src/dllmain.cpp`)
- DLL bootstrap → TOML config: loads config (evidence: `src/dllmain.cpp`)
- DLL bootstrap → Lua rules: parses directories (evidence: `src/dllmain.cpp`)
- DLL bootstrap → Lua hot reload: starts watcher (evidence: `src/dllmain.cpp`)
- DLL bootstrap → Config watcher: starts watcher (evidence: `src/dllmain.cpp`)
- DLL bootstrap → Hook dispatch: installs hooks (evidence: `src/dllmain.cpp`)
- DLL bootstrap → Pattern loader: loads patterns (evidence: `src/dllmain.cpp`)
- DLL bootstrap → IPC metadata: loads metadata (evidence: `src/dllmain.cpp`)
- DLL bootstrap → Cloud redirect: initializes optionally (evidence: `src/dllmain.cpp`)
- Hook dispatch → Steam hooks: installs hooks (evidence: `src/Hook/HookManager.cpp`)
- Steam hooks → Steam runtime: intercepts Steam behavior (evidence: `README.md`)
- Lua hot reload → Lua rules: reloads scripts (evidence: `README.md`)
- Config watcher → TOML config: reloads settings (evidence: `README.md`)
- Manifest resolver → Lua rules: tries Lua handlers (evidence: `src/Utils/SteamMetadata/ManifestClient.cpp`)
- Manifest resolver → Manifest providers: requests codes (evidence: `src/Utils/SteamMetadata/ManifestClient.cpp`)
- Manifest resolver → TOML config: reads timeouts (evidence: `src/Utils/SteamMetadata/ManifestClient.cpp`)
- Stats lookup → Stats service: fetches SteamID (evidence: `src/Utils/SteamMetadata/StatsClient.cpp`)
- Steam hooks → Manifest resolver: resolves manifests (evidence: `README.md`)
- Steam hooks → Stats lookup: enables achievement data (evidence: `README.md`)
- Steam runtime → Pipe handshake: signals handshake
- Pipe handshake → Process inspection: resolves process (evidence: `src/Pipe/PipeManager.cpp`)
- Pipe handshake → Lua rules: checks app rules (evidence: `src/Pipe/PipeManager.cpp`)
- Pipe handshake → Denuvo authorization: applies authorization (evidence: `src/Pipe/PipeManager.cpp`)
- Pipe handshake → Library injection: applies injection (evidence: `src/Pipe/PipeManager.cpp`)
- Denuvo authorization → Protection scan: uses scan (evidence: `src/Pipe/Features/DenuvoAuth/DenuvoAuth.cpp`)
- Denuvo authorization → Ticket handling: reads ticket data (evidence: `src/Pipe/Features/DenuvoAuth/DenuvoAuth.cpp`)
- Library injection → Game process: injects library (evidence: `README.md`)
- Denuvo authorization → Game process: authorizes game (evidence: `README.md`)
- Cloud redirect → Steam client libraries: redirects cloud saves (evidence: `README.md`)
