Repository navigation
Description
Before submitting
- I searched open and closed issues/PRs (
RT_STRING,RT_VERSION,VERSIONINFO,string table,PE resources); feat(artifacts): inspect PE resource identities and payload ranges #1254 and [Bug] inspect-pe-resources rejects stock Windows resource images at the default entry budget #1702 cover the resource inventory, not payload decoding. - I understand the contribution scope must be reviewed before integration.
- No credentials, private samples or sensitive data.
Area
Evidence, artifacts, or reconstruction
Current limitation
inspect-pe-resources (6.4.0) returns RT_STRING (type 6) and RT_VERSION (type 16) payloads as opaque bytes ("payloads other than RT_GROUP_ICON remain opaque"). Both formats are fixed and documented by Microsoft, and they answer two first questions of any Windows investigation: which build is this (FileVersion, ProductVersion, CompanyName, translation table) and which user-visible messages does it contain (string tables; Delphi resourcestring and RTL/VCL messages live there).
$ rea inspect-pe-resources /abs/AUTORIZADOR.exe --json
# 53 entries of type 6 (RT_STRING), 1 entry of type 16 (RT_VERSION, lang 1046, 808 bytes, sha256 b2950ffb…8e2c) – all opaque
Environment: macOS 27.0.1 arm64, Node 24.13.0, [email protected] local install.
Proposed outcome
Static payload decoders inside inspect_pe_resources (or a sibling operation):
RT_VERSION:VS_FIXEDFILEINFO(file/product version, flags, OS, type) plusStringFileInfotables per language/code page andVarFileInfo\Translation, with offsets.RT_STRING: expand each block (name id N) into its 16 strings with id(N-1)*16 + i, UTF-16LE text, original byte ranges; empty slots kept explicitly.- Malformed lengths or padding become explicit unknowns per payload, not inventory failures.
Use cases
- Identify a build without running it (here the version changed from 6.6.2.0 to 6.6.3.0 while the installer name changed too, so file identity alone is not enough).
- Catalog user-facing error messages for behavior reconstruction and diffing between builds.
Minimal public repro
ftp://arpoador.datasus.gov.br/siasus/autorizador/AUTORIZADOR_SETUP.exe (sha256 226e68e4e5c2ef3d8749bdc788481f80eb79d5ac13dc51c89ecdc1cf96082aaa) → innoextract -e → app/AUTORIZADOR.exe (sha256 708b974938d3028f158d78162636ab0a25dcc3a06540fae2aaea02670ec22f4f). Any stock Windows DLL also exercises both formats.
Suggested approach
Reuse the bounded resource snapshot; both decoders are small, deterministic and need no provider.
Activity
feat(native): decode RT_STRING and RT_VERSION payloads in PE resources
feat(native): decode RT_STRING and RT_VERSION payloads in PE resources
feat(native): decode RT_STRING and RT_VERSION payloads in PE resources