From de9ba52b8500c24b62441df2b9fe8137e0d3e795 Mon Sep 17 00:00:00 2001 From: N0VAN0M4LY <224130499+N0VAN0M4LY@users.noreply.github.com> Date: Wed, 2 Dec 2026 10:18:54 +0800 Subject: [PATCH] fix(isolation): skip package validation and block official launcher spawns Add -skip_pkg_validation to the shared offline launch arguments so aces.exe skips the startup content/warthunder.blk file-size check, and add the isolation/never-launch-official-launcher exe patch to NOP the os_shell_execute call in the official launcher spawner while preserving its exit logging and ExitProcess(1). --- README.md | 6 ++- .../src/shared/offline-game-arguments.json | 1 + .../patch.jsonc | 40 +++++++++++++++++++ 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 patches/exe/isolation/never-launch-official-launcher/patch.jsonc diff --git a/README.md b/README.md index 30829bc..ff00f89 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ AI 的驾驶、寻路和战术使用游戏自带的 AI,目前仍有明显不 - **服务地址**:`config/network.blk`(`char.vromfs.bin`)和 `config/settings.blk`(`aces.vromfs.bin`)中所有 Gaijin 地址改写为 `127.0.0.1:<端口>`。端口在构建时写入,因此服务器必须使用相同的端口。 - **配置表**:开启离线需要的功能开关,放出隐藏载具,写入贴花索引,为本地商店的礼包登记 GUID。 -- **exe 补丁**:`patches/exe/` 下共 12 项,见下表。 +- **exe 补丁**:`patches/exe/` 下共 13 项,见下表。 - **界面脚本补丁**:`patches/gui/` 下共 40 项,用于本地账号注册、本地对局的开局与结算、本地商店的购买回执,以及库存签名公钥等。 - **网络钩子库**:exe 的导入表把 `WS2_32.dll` 改为同长度的 `wto_ws.dll`。该库转发系统 `ws2_32.dll` 的全部导出,并用 MinHook 挂钩域名解析(`getaddrinfo` 等)、连接(`connect`、`ConnectEx` 等)和 UDP 发送,把所有外部连接重定向到本地服务器端口。端口从 exe 旁的 `wto_ws.cfg` 读取。 @@ -84,6 +84,7 @@ AI 的驾驶、寻路和战术使用游戏自带的 AI,目前仍有明显不 | `isolation/registry-key` | 注册表位置改为 `Software\WTOffline` | | `isolation/never-load-battleye` | 不加载 BattlEye | | `isolation/never-upload-crash-reports` | 不上传崩溃报告 | +| `isolation/never-launch-official-launcher` | 不拉起官方启动器 `launcher.exe` | | `online/network-hook-library` | 加载 `wto_ws.dll` 代替 `WS2_32.dll` | | `online/accept-local-tls-certificate` | 让 libcurl 接受本地服务器的自签名证书 | | `online/matching-server-public-key` | 匹配服务器公钥替换为本地服务器的公钥,用于解出会话密钥 | @@ -333,7 +334,7 @@ Static data such as vehicles, tech trees, prices, and reward factors is extracte - **Service addresses**: every Gaijin address in `config/network.blk` (`char.vromfs.bin`) and `config/settings.blk` (`aces.vromfs.bin`) is rewritten to `127.0.0.1:`. The port is written at build time, so the server must use the same port. - **Config tables**: enables feature flags the offline copy needs, reveals hidden vehicles, adds a decal index, and registers GUIDs for local store packs. -- **exe patches**: 12 patches under `patches/exe/`, listed below. +- **exe patches**: 13 patches under `patches/exe/`, listed below. - **UI script patches**: 40 patches under `patches/gui/`, covering local account registration, battle start and settlement, store purchase receipts, and the inventory signing key. - **Network hook library**: the import table entry `WS2_32.dll` is renamed to `wto_ws.dll`, which has the same length. The library forwards every export of the system `ws2_32.dll` and uses MinHook to hook name resolution (`getaddrinfo` and others), connections (`connect`, `ConnectEx`, and others), and UDP sends, redirecting every external connection to the local server port. The port is read from `wto_ws.cfg` next to the exe. @@ -344,6 +345,7 @@ Static data such as vehicles, tech trees, prices, and reward factors is extracte | `isolation/registry-key` | Moves registry settings to `Software\WTOffline` | | `isolation/never-load-battleye` | Never loads BattlEye | | `isolation/never-upload-crash-reports` | Never uploads crash reports | +| `isolation/never-launch-official-launcher` | Never launches the official `launcher.exe` | | `online/network-hook-library` | Loads `wto_ws.dll` instead of `WS2_32.dll` | | `online/accept-local-tls-certificate` | Makes libcurl accept the local server's self-signed certificate | | `online/matching-server-public-key` | Replaces the matching server public key with the local server's, so it can decrypt the session key | diff --git a/apps/launcher/src/shared/offline-game-arguments.json b/apps/launcher/src/shared/offline-game-arguments.json index ed8153b..13e2859 100644 --- a/apps/launcher/src/shared/offline-game-arguments.json +++ b/apps/launcher/src/shared/offline-game-arguments.json @@ -1,5 +1,6 @@ [ "-forcestart", + "-skip_pkg_validation", "-nobeac", "-crashpad-disable-upload", "--nosteam" diff --git a/patches/exe/isolation/never-launch-official-launcher/patch.jsonc b/patches/exe/isolation/never-launch-official-launcher/patch.jsonc new file mode 100644 index 0000000..f1cecec --- /dev/null +++ b/patches/exe/isolation/never-launch-official-launcher/patch.jsonc @@ -0,0 +1,40 @@ +// Never invoke the official launcher.exe from the helper that spawns "\..\launcher.exe" and exits. +// Why the executable: the startup package-size check ignores -forcestart, and fatal file read errors (0x81110007) +// bypass config.blk noLauncher too; no local service can intercept a direct ShellExecute call. +// Without it: any content/warthunder.blk size mismatch or file read error spawns launcher.exe -fullcheck, +// which connects to Gaijin and overwrites the patched offline files back to the online build. +{ + "id": "isolation/never-launch-official-launcher", + "title": "禁止游戏拉起官方启动器 launcher.exe(保留退出日志和退出码)", + "features": [ + "A-Isolation from the official game", + "A-No Gaijin connections" + ], + "requires": [], + "variants": [ + // Tail of the official launcher spawner from the "-fullcheck" argument setup through ExitProcess(1), 106 bytes; + // rip-relative displacements and relative call targets are wildcards. + // 2.61.0.37: unique hit at 0xeedd07 (function 0xeedc70-0xeedd72), os_shell_execute call at +64 (0xeedd47). + // 2.61.0.43: unique hit at 0xef1d37 (function 0xef1ca0-0xef1da2), os_shell_execute call at +64 (0xef1d77). + { + "written_for": "2.61.0.37", + "locate": { + "method": "signature", + "section": ".text", + "pattern": "4c 8d 05 ?? ?? ?? ?? 48 85 f6 48 8d 15 ?? ?? ?? ?? 48 0f 45 d6 31 c0 84 db 4c 0f 44 c0 c6 44 24 20 01 48 8d 35 ?? ?? ?? ?? 48 8d 05 ?? ?? ?? ?? 48 8d 3d ?? ?? ?? ?? 48 0f 45 f8 31 c9 45 31 c9 e8 ?? ?? ?? ?? b9 4d 41 49 4e 48 89 f2 e8 ?? ?? ?? ?? 48 89 f9 e8 ?? ?? ?? ?? e8 ?? ?? ?? ?? b9 01 00 00 00 ff 15 ?? ?? ?? ??" + }, + "edit": { + "offset": 64, + "asm": [ + "nop", + "nop", + "nop", + "nop", + "nop" + ], + "bytes": "90 90 90 90 90", + "expect_original": "e8 ?? ?? ?? ??" + } + } + ] +}