Table of contents
- Loader & Virtual Filesystem (VFS)
- 1. Suspended-Process APC Injection & Child-Hook Propagation
- 2. PE Forwarder & Mixed-Case API-Set Resolution
- 3. Package Config (MicrosoftGame.Config) & ConsoleLsaPolicy
- 4. Clean-Room 12 KiB XVD / XVC Header Inspector
- 5. Virtual Filesystem (G:, T:, S:) & Copy-on-Write Overlay
- 6. First-Boot Probe Mode & VEH Crash Diagnostics
- Related Pages
Loader & Virtual Filesystem (VFS)
OpenScarlett's loader launches unpacked Xbox Series X|S / GDK packages directly on Windows x64 without modifying guest executables or copying shim DLLs into the game directory.
1. Suspended-Process APC Injection & Child-Hook Propagation
Source: src/loader/apc_injector.cpp, src/loader/hook_dll.cpp
sequenceDiagram
participant CLI as openscarlett.exe run
participant Guest as Guest Process (CREATE_SUSPENDED)
participant Hook as openscarlett_hook.dll
participant Shims as 30 OpenScarlett Shim DLLs
CLI->>CLI: Parse MicrosoftGame.Config & build VFS/LSA env
CLI->>Guest: CreateProcessW(..., CREATE_SUSPENDED)
CLI->>Guest: Allocate remote bootstrap path + QueueUserAPC(LoadLibraryW)
CLI->>Guest: ResumeThread()
Guest->>Hook: APC runs before guest entrypoint / CRT init
Hook->>Hook: Install IAT/EAT hooks, NtCreateFile VFS, CreateProcess child hook, TLS slot 0
Hook->>Shims: Route console/GDK DLL imports & PeForwarder chains
Hook->>Guest: Return control to guest main()
Note over Guest,Hook: If guest spawns child .exe via CreateProcessW/A,<br/>hook propagates APC injection to child PID automatically!
Key Loader Capabilities
- 30-DLL Routing Table (
DllRoutingTable): Redirects console and GDK DLL loads to OpenScarlett's shim directory while keepingSystem32-firstKnownDLLresolution for genuine Windows OS DLLs. Supports runtime overrides viaOPENSCARLETT_DLL_ROUTING. - Child-Process Hook Propagation: Hooks
CreateProcessWandCreateProcessAinside the guest so multi-process launchers (verified live on real multi-process UE/Unity launchers such as Pizza House Simulator and 3-generation House Flipper 2 child trees) automatically receiveopenscarlett_hook.dllwith per-PID telemetry (OPENSCARLETT_CHILD_TELEMETRY_PER_PID). - Kahn Topological DLL Initialization: Resolves inter-DLL dependency graphs deterministically in topological order (
test_gdk_extended_loader). - TLS Slot 0 Console State: Initializes and manages Thread-Local Storage slot 0 state (
OPENSCARLETT_TLS_SLOT0_STATE) for console runtime/CRT expectations (test_s12_os_loader_gameinput). - PE Validation Hardening: Handles RVA-0 relocation entries, bounded export name scanning, fault-free section protection transitions, and
.xdataUWOP_ALLOC_LARGE+ version 2/3 chained SEH unwind records (test_s7_pe_gdk_runtime). - Store Bootstrapper Diagnostics: Detects when a user accidentally launches a Microsoft Store / Gaming Services bootstrapper stub rather than the unpacked game binary and prints an actionable diagnostic.
2. PE Forwarder & Mixed-Case API-Set Resolution
Source: include/openscarlett/loader/pe_forwarder.h, src/loader/pe_forwarder.cpp
Xbox and Windows GDK binaries frequently import symbols that forward across mixed-case DLL names, ordinal exports, and api-ms-win-* / ext-ms-win-* API-Set contracts. PeForwarderResolver provides:
- Case-normalized DLL stem parsing while preserving exact export symbol case (or
#ordinalreferences). - Recursive forwarder chain resolution with cycle detection (
CycleError) and depth-limit guards (DepthLimitError). - Classification of every import into
OpenScarlettShim,WindowsSystemDll,ApiSetRedirected,NativeGuestDll, orUnresolved. - Preflight reporting via
openscarlett probe <exe|dir|xvd> [--json](ready_to_launchboolean + full chain breakdown).
3. Package Config (MicrosoftGame.Config) & ConsoleLsaPolicy
Source: src/loader/game_config.cpp, src/kernel/console_lsa_policy.cpp
When pointed at a package directory or .mgc / MicrosoftGame.Config XML file, OpenScarlett automatically resolves:
- Target executable path (
ExecutableList), display name, and working directory Identity(Name,Publisher,Version) → deterministic Package Family Name (PFN) derivationTitleId(hex),MSAAppId,StoreId, andSandboxId- Console Local Security Authority (LSA) identity & offline profile policies consumed by
xgameruntime.dll,XCurl.dll, andXSAPI
4. Clean-Room 12 KiB XVD / XVC Header Inspector
Source: include/openscarlett/loader/xvd_inspector.h, src/loader/xvd_inspector.cpp
openscarlett probe <file.xvd|file.xvc> performs strictly read-only metadata inspection of the public 12 KiB (0x3000 byte) Xbox Virtual Disk header (msft-xvd magic at offset 0x200):
- Reports disk type (
Fixed/Dynamic), content type (Title,Data,Application, etc.), drive size, page/block geometry (4 KiBpages,680 KiBdefault block), format version, sandbox ID, product ID, package version, and XVC region descriptors. - Detects whether encryption flags / ODK keyslots are active (
is_encrypted). - DRM Policy: OpenScarlett never attempts to decrypt encrypted
.xvd/.xvcvolumes or extract keys. Encrypted containers reportready_to_launch: falsewith an explicit policy notice.
5. Virtual Filesystem (G:\, T:\, S:\) & Copy-on-Write Overlay
Source: include/openscarlett/loader/vfs_mounts.h, src/loader/vfs_mounts.cpp
Xbox Series X|S titles expect fixed console drive letters. OpenScarlett intercepts both Win32 (CreateFileW/A, GetFileAttributes*, FindFirstFile*, DeleteFile*, MoveFile*) and Native NT (NtCreateFile / NtOpenFile) path APIs and maps them safely onto host directories:
| Virtual Drive | Console Role | Host Behavior | Override Flag / Env Var |
|---|---|---|---|
G:\ / GAME:\ |
Read-only game package root | Strictly read-only base; writes redirect transparently to a Copy-on-Write (CoW) overlay with whiteout deletion tracking so original game files are never modified. Supports nested read-only sub-mounts (e.g., G:\DLC\Pack1) via OPENSCARLETT_VFS_G_SUBMOUNTS. |
--vfs-g, --vfs-g-overlay / OPENSCARLETT_VFS_G, OPENSCARLETT_VFS_G_OVERLAY |
T:\ |
Title scratch / temporary cache | Writable per-title scratch directory | --vfs-t / OPENSCARLETT_VFS_T |
S:\ |
Persistent user save data (XGameSave) |
Persistent save root directory | --vfs-s / OPENSCARLETT_VFS_S, OPENSCARLETT_SAVE_ROOT |
Safety & Isolation Guarantees
- Path Traversal Protection: Any
..escape attempt above a mount root returnsVfsTranslateStatus::RejectedTraversal. - Zero
C:\Leakage:ResolveDefaultWorkDirW()resolves writable VFS and telemetry roots relative toOPENSCARLETT_WORK_DIRor the executable directory (.tmp/openscarlett_runor.openscarlett_tmp), falling back to%TEMP%only if the launch directory is read-only. SettingOPENSCARLETT_FORBID_SYSTEM_DRIVE_WRITES=1actively rejects mutating operations targetingC:\/%SystemDrive%.
6. First-Boot Probe Mode & VEH Crash Diagnostics
Source: include/openscarlett/loader/probe_veh.h, src/loader/probe_veh.cpp
When bringing up a brand-new binary for the first time, launch with --probe-unknown-imports (or enable First-Boot Probe Mode in OpenScarlettLauncher.exe):
- Dynamic x64
E_NOTIMPLTrampoline Pool: Any unresolved import from a shimmed or missing DLL is bound to a dynamically generated x64 stub that logs the exactmodule!symbolcall toCallTelemetryand returnsE_NOTIMPLcleanly instead of crashing at load time. - Win32 Vectored Exception Handler (VEH): Captures unhandled exceptions with register state, faulting module/offset, and a 50-call API ring buffer showing the last 50 shimmed calls leading up to the fault — with all local paths and usernames sanitized for safe sharing.
Related Pages
OpenScarlett Wiki
User & Build Guides
Architecture & Subsystems
- Architecture Overview
- Loader & Virtual Filesystem
- Graphics: D3D12 & Vulkan 1.4
- RDNA2 Lifter & Ray Tracing
- Memory, Streaming & Storage
- Audio, Video & Input
Reference & Diagnostics
Community
OpenScarlett — Clean-room MIT Xbox Series X|S translation layer for Windows 10 & 11 x64 · Repository · Dashboard · Discord · Strictly no retail DRM decryption or key extraction.