Files
BT411/reference/decomp/archive_2025export/run.out
T
Joe DiPrimaandClaude Fable 5 f44be87ab2 #60 PART 2: the RE-EXPORT -- dark code 90KB -> 41KB, coverage 87.3% -> 93.5%
Installed JDK 21 + Ghidra 12.1.2 (no admin, %LOCALAPPDATA%\bt411-tools beside
DXSDK/cmake; runner uses 8.3 SHORT paths because Ghidra's .bat expands
%JAVA_HOME% unquoted and the profile has a space).

New tooling: reference/ghidra_scripts/ExportGaps.java -- ExportAll's exact
output contract PLUS a gap-fill pass (force disassembly + createFunction at
E8 call targets outside functions, data->code pointers at a plausible
prologue, and the census's discovered starts; iterated to a fixpoint,
logged to gapfill_report.tsv).  tools/ghidra_reexport.sh (headless runner,
'reprocess' mode) and tools/gapdiff.py (score two censused exports);
gapcensus.py now censuses any export dir.

Results: 6267 -> 6472 functions (+205 created in 2 rounds: 195 census
starts, 6 call targets, 4 data pointers; 56.1KB newly covered), ZERO
decompile failures.  Dark real code 90.4 -> 40.8 KB (54.8% recovered);
game-side dark 53.1 -> 21.1 KB; regions 428 -> 321.  EVERY historically
dark function now has pseudocode -- including @0x4c05c4 VehicleDead, the
absence that opened this issue.

VALIDATION: the new pseudocode confirms this week's hand reconstruction of
the crouch field-for-field (mapPosture/duckState/squatCapable/myomerEff/
novice gate/SetLegAnimation/ForceUpdate/stability alarm) -- and exposed one
branch the raw pass missed: AIRBORNE AUTO-RISE (mode 3|4 && legState 1 ->
forced squ), now implemented in mech4.cpp and re-benched un-regressed.

PROMOTION: the re-export is canonical reference/decomp/; the previous export
is preserved at reference/decomp/archive_2025export/ so old
`part_0NN.c:LINE` citations still resolve (addresses are stable across both;
line/shard membership is NOT -- cite @ADDR).

New lead recorded: @0x4c0904 is the MASTER BTPlayer Performance (team
resolution, EndMission console post, score heartbeat) -- our @0x4c083c
PlayerSimulation attribution needs a re-check.  KB: source-completeness,
gotcha #20 (the rule is cheap now -- look it up), CLAUDE.md router/layout.
Log: phases/phase-04-gap-census.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 11:11:26 -05:00

180 lines
14 KiB
Plaintext

openjdk version "21.0.12" 2026-07-21 LTS
== analyzeHeadless: -import ==
INFO Using log config file: jar:file:/C:/Users/Joe%20Laptop/AppData/Local/bt411-tools/ghidra_12.1.2_PUBLIC/Ghidra/Framework/Generic/lib/Generic.jar!/generic.log4j.xml (LoggingInitialization)
INFO Using log file: C:\git\bt411\reference\decomp\reexport\headless.log (LoggingInitialization)
INFO Loading user preferences: C:\Users\Joe Laptop\AppData\Roaming\ghidra\ghidra_12.1.2_PUBLIC\preferences (Preferences)
INFO Searching for classes... (ClassSearcher)
INFO Class search complete (3903 ms) (ClassSearcher)
INFO Initializing SSL Context (DefaultSSLContextInitializer)
INFO Initializing Random Number Generator... (SecureRandomFactory)
INFO Random Number Generator initialization complete: SHA1PRNG (SecureRandomFactory)
INFO Trust manager disabled, cacerts have not been set (DefaultTrustManagerFactory)
INFO Starting cache cleanup: C:\Users\Joe Laptop\AppData\Local\ghidra\fscache2 (FileCacheMaintenanceDaemon)
INFO Finished cache cleanup, estimated storage used: 0 (FileCacheMaintenanceDaemon)
INFO Headless startup complete (22970 ms) (AnalyzeHeadless)
INFO Class searcher loaded 59 extension points (20 false positives) (ClassSearcher)
INFO HEADLESS Script Paths:
C:\Users\Joe Laptop\AppData\Local\bt411-tools\ghidra_12.1.2_PUBLIC\Ghidra\Features\FunctionID\ghidra_scripts
C:\Users\Joe Laptop\AppData\Local\bt411-tools\ghidra_12.1.2_PUBLIC\Ghidra\Features\WildcardAssembler\ghidra_scripts
C:\Users\Joe Laptop\AppData\Local\bt411-tools\ghidra_12.1.2_PUBLIC\Ghidra\Features\Decompiler\ghidra_scripts
C:\Users\Joe Laptop\AppData\Local\bt411-tools\ghidra_12.1.2_PUBLIC\Ghidra\Features\Base\ghidra_scripts
C:\Users\Joe Laptop\AppData\Local\bt411-tools\ghidra_12.1.2_PUBLIC\Ghidra\Features\MicrosoftCodeAnalyzer\ghidra_scripts
C:\Users\Joe Laptop\AppData\Local\bt411-tools\ghidra_12.1.2_PUBLIC\Ghidra\Features\PDB\ghidra_scripts
C:\Users\Joe Laptop\AppData\Local\bt411-tools\ghidra_12.1.2_PUBLIC\Ghidra\Features\SwiftDemangler\ghidra_scripts
C:\Users\Joe Laptop\AppData\Local\bt411-tools\ghidra_12.1.2_PUBLIC\Ghidra\Processors\DATA\ghidra_scripts
C:\git\bt411\reference\ghidra_scripts
C:\Users\Joe Laptop\AppData\Local\bt411-tools\ghidra_12.1.2_PUBLIC\Ghidra\Processors\PIC\ghidra_scripts
C:\Users\Joe Laptop\AppData\Local\bt411-tools\ghidra_12.1.2_PUBLIC\Ghidra\Features\FileFormats\ghidra_scripts
C:\Users\Joe Laptop\AppData\Local\bt411-tools\ghidra_12.1.2_PUBLIC\Ghidra\Features\PyGhidra\ghidra_scripts
C:\Users\Joe Laptop\AppData\Local\bt411-tools\ghidra_12.1.2_PUBLIC\Ghidra\Debug\Debugger-rmi-trace\ghidra_scripts
C:\Users\Joe Laptop\AppData\Local\bt411-tools\ghidra_12.1.2_PUBLIC\Ghidra\Processors\Atmel\ghidra_scripts
C:\Users\Joe Laptop\AppData\Local\bt411-tools\ghidra_12.1.2_PUBLIC\Ghidra\Features\BytePatterns\ghidra_scripts
C:\Users\Joe Laptop\AppData\Local\bt411-tools\ghidra_12.1.2_PUBLIC\Ghidra\Features\SystemEmulation\ghidra_scripts
C:\Users\Joe Laptop\AppData\Local\bt411-tools\ghidra_12.1.2_PUBLIC\Ghidra\Features\GnuDemangler\ghidra_scripts
C:\Users\Joe Laptop\AppData\Local\bt411-tools\ghidra_12.1.2_PUBLIC\Ghidra\Debug\Debugger\ghidra_scripts
C:\Users\Joe Laptop\AppData\Local\bt411-tools\ghidra_12.1.2_PUBLIC\Ghidra\Processors\8051\ghidra_scripts
C:\Users\Joe Laptop\AppData\Local\bt411-tools\ghidra_12.1.2_PUBLIC\Ghidra\Features\BSim\ghidra_scripts
C:\Users\Joe Laptop\AppData\Local\bt411-tools\ghidra_12.1.2_PUBLIC\Ghidra\Features\DecompilerDependent\ghidra_scripts
C:\Users\Joe Laptop\AppData\Local\bt411-tools\ghidra_12.1.2_PUBLIC\Ghidra\Features\VersionTracking\ghidra_scripts
C:\Users\Joe Laptop\AppData\Local\bt411-tools\ghidra_12.1.2_PUBLIC\Ghidra\Processors\JVM\ghidra_scripts (HeadlessAnalyzer)
INFO HEADLESS: execution starts (HeadlessAnalyzer)
INFO Creating project: C:\Users\JOELAP~1\AppData\Local\BT411-~1\ghidra_projects\BT411 (HeadlessAnalyzer)
INFO Creating project: C:\Users\JOELAP~1\AppData\Local\BT411-~1\ghidra_projects\BT411 (DefaultProject)
INFO REPORT: Processing input files: (HeadlessAnalyzer)
INFO project: C:\Users\JOELAP~1\AppData\Local\BT411-~1\ghidra_projects\BT411 (HeadlessAnalyzer)
INFO IMPORTING: file:///C:/git/bt411/content/BTL4OPT.EXE (HeadlessAnalyzer)
INFO Using Loader: Portable Executable (PE) (ProgramLoader)
INFO Using Language/Compiler: x86:LE:32:default:windows (ProgramLoader)
INFO Using Library Search Path: [., C:\WINDOWS\SysWOW64, C:\Users\JOELAP~1\AppData\Local\BT411-~1\JDK-21~1.12_\bin, C:\WINDOWS\Sun\Java\bin, C:\WINDOWS\system32, C:\WINDOWS, C:\Users\Joe Laptop\bin, C:\Program Files\Git\mingw64\bin, C:\Program Files\Git\usr\local\bin, C:\Program Files\Git\usr\bin, C:\WINDOWS\System32\Wbem, C:\WINDOWS\System32\WindowsPowerShell\v1.0, C:\WINDOWS\System32\OpenSSH, C:\Program Files\dotnet, C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL, C:\Program Files\Intel\Intel(R) Management Engine Components\DAL, C:\Program Files\Git\cmd, C:\Program Files\PuTTY, C:\Program Files\CMake\bin, C:\Users\Joe Laptop\AppData\Local\Programs\Python\Python311\Scripts, C:\Users\Joe Laptop\AppData\Local\Programs\Python\Python311, C:\Users\Joe Laptop\AppData\Local\Microsoft\WindowsApps, C:\Users\Joe Laptop\.local\bin, C:\Users\Joe Laptop\AppData\Local\bt411-tools\cmake-3.31.6-windows-x86_64\bin, C:\Users\Joe Laptop\AppData\Local\bt411-tools\dbg\Windows Kits\10\Debuggers\x86, C:\Users\Joe Laptop\AppData\Local\bt411-tools\bin, C:\Users\Joe Laptop\AppData\Local\Microsoft\WinGet\Packages\Gyan.FFmpeg_Microsoft.Winget.Source_8wekyb3d8bbwe\ffmpeg-8.1.2-full_build\bin, C:\Program Files\Git\usr\bin\vendor_perl, C:\Program Files\Git\usr\bin\core_perl] (ProgramLoader)
WARN Invalid or missing function at 69e9f8f8 (ExportDataDirectory)
INFO Additional info:
Loading file:///C:/git/bt411/content/BTL4OPT.EXE?MD5=a97075bcb5634d13263e9ad5a2b96fd0...
------------------------------------------------
Searching 26 paths for library KERNEL32.DLL...
Loading file:///C:/Windows/SysWOW64/kernel32.dll?MD5=0ce1f5f3d23f51b9ecfd453e34ca0af7...
Created exports file: C:\Users\Joe Laptop\AppData\Roaming\ghidra\ghidra_12.1.2_PUBLIC\symbols\win32\kernel32.exports
Library not saved to project.
------------------------------------------------
Searching 26 paths for library USER32.DLL...
Loading file:///C:/Windows/SysWOW64/user32.dll?MD5=0927ed96558e5b2392df6cf7582f2655...
[user32.dll]: failed to create WEVTResource at 69eb6a70: Failed to resolve data length for WEVTResource
Created exports file: C:\Users\Joe Laptop\AppData\Roaming\ghidra\ghidra_12.1.2_PUBLIC\symbols\win32\user32.exports
Library not saved to project.
------------------------------------------------
Applying cached symbols from KERNEL32.DLL
Applying cached symbols from USER32.DLL
Linking the External Programs of 'BTL4OPT.EXE' to imported libraries...
[KERNEL32.DLL] -> not found in project
[USER32.DLL] -> not found in project
------------------------------------------------
(ProgramLoader)
INFO IMPORTING: Loaded 0 additional files (HeadlessAnalyzer)
INFO ANALYZING all memory and code: file:///C:/git/bt411/content/BTL4OPT.EXE (HeadlessAnalyzer)
WARN Ignoring leading '_' chars on no-return name '___raise_securityfailure' specified in file: C:\Users\Joe Laptop\AppData\Local\bt411-tools\ghidra_12.1.2_PUBLIC\Ghidra\Features\Base\data\PEFunctionsThatDoNotReturn (NoReturnFunctionAnalyzer)
WARN Ignoring leading '_' chars on no-return name '___report_rangecheckfailure' specified in file: C:\Users\Joe Laptop\AppData\Local\bt411-tools\ghidra_12.1.2_PUBLIC\Ghidra\Features\Base\data\PEFunctionsThatDoNotReturn (NoReturnFunctionAnalyzer)
INFO Skipping PDB processing: missing PDB information in program metadata (PdbUniversalAnalyzer)
INFO hit non-returning function, restarting decompiler switch analyzer later (DecompilerSwitchAnalyzer)
INFO Packed database cache: C:\Users\Joe Laptop\AppData\Local\ghidra\packed-db-cache (PackedDatabaseCache)
INFO Applied data type archive: windows_vs12_32 (ApplyDataArchiveAnalyzer)
INFO -----------------------------------------------------
ASCII Strings 1.502 secs
Apply Data Archives 1.959 secs
Call Convention ID 0.096 secs
Call-Fixup Installer 0.369 secs
Create Address Tables 1.043 secs
Create Address Tables - One Time 1.493 secs
Create Function 3.694 secs
Data Reference 1.505 secs
Decompiler Parameter ID 46.048 secs
Decompiler Switch Analysis 23.274 secs
Decompiler Switch Analysis - One Time 0.000 secs
Demangler Microsoft 0.057 secs
Disassemble 15.567 secs
Disassemble Entry Points 0.163 secs
Disassemble Entry Points - One Time 0.005 secs
Embedded Media 0.066 secs
External Entry References 0.000 secs
Function ID 6.001 secs
Function Start Pre Search 0.110 secs
Function Start Search 0.509 secs
Function Start Search After Code 0.637 secs
Function Start Search After Data 0.421 secs
Non-Returning Functions - Discovered 1.607 secs
Non-Returning Functions - Known 0.030 secs
PDB Universal 0.004 secs
Reference 2.537 secs
Scalar Operand References 5.788 secs
Shared Return Calls 1.163 secs
Stack 26.351 secs
Subroutine References 1.439 secs
Subroutine References - One Time 0.000 secs
WindowsResourceReference 13.414 secs
X86 Function Callee Purge 4.715 secs
x86 Constant Reference Analyzer 22.977 secs
-----------------------------------------------------
Total Time 184 secs
-----------------------------------------------------
(AutoAnalysisManager)
INFO REPORT: Analysis succeeded for file: file:///C:/git/bt411/content/BTL4OPT.EXE (HeadlessAnalyzer)
INFO REPORT: Execute script: ExportGaps.java 'C:\git\bt411\reference\decomp\reexport' (HeadlessAnalyzer)
INFO SCRIPT: C:\git\bt411\reference\ghidra_scripts\ExportGaps.java (HeadlessAnalyzer)
INFO ExportGaps.java> functions after auto-analysis: 6309 (GhidraScript)
INFO ExportGaps.java> census starts loaded: 332 (GhidraScript)
INFO ExportGaps.java> data->code pointers: 2053 (GhidraScript)
INFO ExportGaps.java> round 1: call targets added 3093 (candidates 5478) (GhidraScript)
INFO ExportGaps.java> round 1: functions created 205 (GhidraScript)
INFO ExportGaps.java> round 2: call targets added 0 (candidates 5478) (GhidraScript)
INFO ExportGaps.java> round 2: functions created 0 (GhidraScript)
INFO ExportGaps.java> GAP FILL created 205 functions (6309 -> 6514) (GhidraScript)
INFO -----------------------------------------------------
Call Convention ID 0.010 secs
Call-Fixup Installer 0.005 secs
Data Reference 0.000 secs
Decompiler Parameter ID 7.926 secs
Decompiler Switch Analysis 0.571 secs
Function Start Search 0.004 secs
Function Start Search After Code 0.007 secs
Function Start Search After Data 0.001 secs
Non-Returning Functions - Discovered 0.032 secs
Reference 0.030 secs
Scalar Operand References 0.112 secs
Shared Return Calls 0.060 secs
Stack 1.714 secs
Subroutine References 0.032 secs
WindowsResourceReference 0.573 secs
X86 Function Callee Purge 0.036 secs
x86 Constant Reference Analyzer 0.356 secs
-----------------------------------------------------
Total Time 11 secs
-----------------------------------------------------
(AutoAnalysisManager)
INFO ExportGaps.java> attributed functions: 232 (GhidraScript)
INFO ExportGaps.java> vtables recovered: 162 (GhidraScript)
INFO ExportGaps.java> decompiled 500 ... (GhidraScript)
INFO ExportGaps.java> decompiled 1000 ... (GhidraScript)
INFO ExportGaps.java> decompiled 1500 ... (GhidraScript)
INFO ExportGaps.java> decompiled 2000 ... (GhidraScript)
INFO ExportGaps.java> decompiled 2500 ... (GhidraScript)
INFO ExportGaps.java> decompiled 3000 ... (GhidraScript)
INFO ExportGaps.java> decompiled 3500 ... (GhidraScript)
INFO ExportGaps.java> decompiled 4000 ... (GhidraScript)
INFO ExportGaps.java> decompiled 4500 ... (GhidraScript)
INFO ExportGaps.java> decompiled 5000 ... (GhidraScript)
INFO ExportGaps.java> decompiled 5500 ... (GhidraScript)
INFO ExportGaps.java> decompiled 6000 ... (GhidraScript)
INFO ExportGaps.java> DONE. functions: 6472 (shards 17, decompile failures 0) (GhidraScript)
INFO ANALYZING changes made by post scripts: file:///C:/git/bt411/content/BTL4OPT.EXE (HeadlessAnalyzer)
INFO REPORT: Post-analysis succeeded for file: file:///C:/git/bt411/content/BTL4OPT.EXE (HeadlessAnalyzer)
INFO /BTL4OPT.EXE: file created (JoeLaptop) (LocalFileSystem)
INFO REPORT: Save succeeded for: /BTL4OPT.EXE (BT411:/BTL4OPT.EXE) (HeadlessAnalyzer)
INFO REPORT: Import succeeded (HeadlessAnalyzer)
== done; scoring ==
text 892KB indexed 93.5% dark 321 regions/49KB unexported 0 fns/0KB
wrote C:\git\bt411\reference\decomp\reexport\GAP_CENSUS.md
wrote C:\git\bt411\reference\decomp\reexport\gap_census.tsv
EXIT=0