Commit Graph

22 Commits

Author SHA1 Message Date
MechaCat02
771d401fb1 docs: update README with inspect imports, extract -r flag, and export DB
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 19:26:03 +02:00
MechaCat02
a951027aeb refactor: switch export database from markdown to JSON parsing
Add serde/serde_json for structured parsing of the export database,
replacing the hand-rolled markdown table parser with type-safe JSON
deserialization.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.8.1
2026-03-29 17:44:52 +02:00
MechaCat02
b6ee119824 Merge feature/m8-resolve-imports: Xenia-style import resolution v0.8.0 2026-03-29 17:36:03 +02:00
MechaCat02
2425e8177e feat: add import resolution with Xenia-style thunk stubs (M8)
- resolve_imports() rewrites PE import records in-place:
  - Variable slots: 0xD000BEEF | (ordinal & 0xFFF) << 16
  - Thunk stubs: li r3, 0 / li r4, <ordinal> / mtspr CTR, r11 / bctr
- New -r/--resolve-imports flag on the extract command
- Without the flag, extraction is unchanged (byte-for-byte identical)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 17:35:57 +02:00
MechaCat02
956f5e8ba8 Merge feature/m7-import-decode: export database and import record decoding v0.7.0 2026-03-29 17:32:54 +02:00
MechaCat02
0d42fc1b06 feat: add export database and import record decoding (M7)
- New src/exports.rs: embeds doc/xbox360_exports.md via include_str!
  and lazily parses it into a lookup table (OnceLock). Covers 2,913
  exports across xboxkrnl.exe, xam.xex, and xbdm.xex.
- New src/imports.rs: decodes import records from extracted PE images
  by reading the u32 at each import address, extracting record type
  (variable/thunk) and ordinal, and resolving against the export DB.
- inspect command now shows a full resolved imports table with names.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 17:32:49 +02:00
MechaCat02
dee636c09f docs: add Xbox 360 system exports reference
Auto-generated from Xenia Canary source. Covers 2,913 exports
across xboxkrnl.exe, xam.xex, and xbdm.xex with ordinals, names,
types, and implementation status.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 17:26:43 +02:00
MechaCat02
4ed8fadd4c feat: show decrypted session key in inspect output
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.6.1
2026-03-28 22:24:23 +01:00
MechaCat02
ee5e0b60f8 fix: include Cargo.lock changes from v0.6.0 version bump
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.6.0
2026-03-28 22:00:13 +01:00
MechaCat02
1e773e6cdc Merge feature/m6-extract-pe: PE verification and complete extraction 2026-03-28 21:51:57 +01:00
MechaCat02
475e1d555c feat: add PE verification and complete extraction pipeline (M6)
Add PE header verification (MZ signature, PE signature, POWERPCBE
machine type) to the extraction pipeline. Implement master key trial
with validation for encrypted files. Update CLI extract command to
show encryption/compression info. Update README with extract usage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-28 21:51:52 +01:00
MechaCat02
ba3b5a0ac3 Merge feature/m5-decompression: PE image decompression and extraction v0.5.0 2026-03-28 21:48:28 +01:00
MechaCat02
c665868b1b feat: add PE image decompression and extraction pipeline (M5)
Implement full decrypt + decompress pipeline for XEX2 PE extraction:
- decompress.rs: None, Basic (zero-fill), and Normal (LZX) decompression
- extract.rs: orchestrates decryption then decompression
- Wire up CLI extract command to write PE files
- LZX decompression via lzxd crate with per-frame chunk processing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-28 21:48:23 +01:00
MechaCat02
ac24488444 Merge feature/m4-decryption: AES-128-CBC decryption and clap CLI v0.4.0 2026-03-28 21:31:35 +01:00
MechaCat02
df26b028b6 feat: add AES-128-CBC decryption and clap CLI (M4)
Add session key derivation and payload decryption using AES-128-CBC
with well-known XEX2 master keys. Refactor CLI to use clap with
inspect/extract subcommands. Extend FileFormatInfo to parse
compression metadata (basic blocks, LZX window size/block chain).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-28 21:31:31 +01:00
MechaCat02
38d1cc1b6d Merge feature/m3-security-info: parse and display security info v0.3.0 2026-03-28 19:04:48 +01:00
MechaCat02
66e078363c feat: parse and display security info (M3)
Implement security info parsing including RSA signature, encrypted AES
key, image/region/media flags, load address, SHA-1 digests, and page
descriptors with section type classification. Add comprehensive unit
and integration tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-28 19:04:41 +01:00
MechaCat02
b1f90a55b6 Merge feature/m2-optional-headers: parse and display all optional headers v0.2.0 2026-03-28 18:59:47 +01:00
MechaCat02
a9436a3a7a feat: parse and display all optional headers (M2)
Implement parsing for all 15 optional header types found in XEX2 files:
inline values (entry point, base address, stack size, system flags),
fixed-size structures (execution info, file format, TLS, game ratings,
LAN key, checksum/timestamp), and variable-size structures (static
libraries, import libraries, resource info, original PE name, Xbox 360
logo). Add comprehensive unit and integration tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-28 18:59:41 +01:00
MechaCat02
a2e390a3fe Merge feature/m1-main-header: parse and display XEX2 main header v0.1.0 2026-03-28 18:52:49 +01:00
MechaCat02
b5f2abe09a feat: parse and display XEX2 main header (M1)
Implement XEX2 main header parsing with module flag decoding.
Add error handling, big-endian read utilities, CLI entry point,
and comprehensive unit + integration tests against a sample file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-28 18:52:15 +01:00
MechaCat02
abbd264e4c Initial project setup
Scaffold xex2tractor Rust project with cargo, add MIT license, README,
and XEX2 file format documentation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-28 18:05:25 +01:00