Files
WT-Offline/exe-patches/startup/skip-resource-archive-signature-check/patch.json
T
N0VAN0M4LY 8fa50b7804 Add the executable patch engine and local archive compatibility
Keep patch definitions and dependencies separate from the patch engine.
Resolve all patches before writing, verify expected bytes, and refuse to
overwrite the input executable. Include a read-only check command for
comparing definitions with their assembly source.

Allow locally rebuilt script archives to load in the offline client.
Verify the patch against the 2.61.0.37 executable and confirm that the
patched copy remains readable as PE.
2026-11-23 13:32:36 +08:00

42 lines
2.2 KiB
JSON

{
"id": "startup/skip-resource-archive-signature-check",
"title": "让资源包签名校验直接返回通过",
"program_behaviour": {
"stock": "挂载 .vromfs.bin 资源包时,程序调用一个函数校验包尾的 256 字节签名。返回 0(不合法)时,调用方跳到失败分支,这个包不会被挂载。",
"patched": "这个校验函数一进去就返回「通过」,不再读取签名。"
},
"derivation": {
"requirement": "功能清单 A「离线启动」。我们必须把适配层放进界面脚本包,这就要重新打包 gui.vromfs.bin。",
"cause": "签名用 Gaijin 的私钥生成,我们无法为重新打包的内容生成有效签名。校验失败是运行时的硬拦截,不是只写日志的断言。",
"lighter_options_ruled_out": [
"原生自带:不行。校验在挂载路径上无条件执行,没有开关。",
"适配层:不行。适配层是脚本,要先被加载才能运行,而脚本就在这个被拒绝的包里——循环依赖。",
"订阅引擎事件:不适用,这是加载资源的环节,不是对局事件。",
"后端:不适用,程序加载本地资源时不会问后端。",
"客户端脚本:同适配层,脚本此时还没有被加载。"
],
"conclusion": "只能改 exe。",
"if_not_applied": "重新打包的界面脚本包不会被挂载,适配层根本不会运行,游戏进不去。"
},
"why_this_site": [
"校验函数的返回值直接控制流程:调用方是 call、test al,al、je 失败分支。让函数立即返回 1,就等于「签名通过」。",
"改函数入口只需要 3 字节、一个位置;改调用点要动 3 个位置(implementation notes 附录第 2 节列出的 3 处)。改一处更小、更稳。",
"打了补丁后这个函数不再调用任何东西,是个立即返回的叶子函数,所以不需要补异常展开信息。"
],
"features": ["A-离线启动"],
"requires": [],
"evidence": ["implementation notes#2-资源包校验是运行时硬拦截"],
"verified_on": ["2.61.0.37"],
"edit": {
"offset": 0,
"asm": ["mov al, 1", "ret"],
"bytes": "b001c3",
"expect_original": "415741"
}
}