How iss4cf0ng/ironpe works
IronPE is a Windows command-line manual PE loader for x86 and x64 binaries. Its primary workflow reads a PE file, validates and parses its architecture-specific headers, maps headers and sections into memory, applies relocations, resolves imports, and starts execution at the original entry point. The README documents these loader capabilities; excerpts show the CLI dispatch, parsing and parts of both loading paths. Some loader implementation is omitted, so undocumented internal calls are not expanded.
Main entry points: main.rs Command dispatch · loader.rs x86 mapping · logger.rs Console logger · pe_structures.rs PE structures
Components 17
CLI and input
- Command dispatch
src/main.rs - File reader
src/main.rs - Console logger
src/logger.rs
PE format
- PE structures
src/pe_structures.rs - x86 parser
src/loader.rs - x64 parser
src/loader.rs
Manual loading
- x86 mapping
src/loader.rs - x64 mapping
src/loader.rs - Section mapping
src/loader.rs - Base relocations
src/loader.rs - Import resolution
src/loader.rs - Entry point transfer
src/loader.rs
Windows runtime
- Windows memory API
- Windows library API
- Windows thread API
Other components
- CLI user
- PE file
Connections 25
- CLI user → Command dispatch: selects mode
src/main.rs - Command dispatch → File reader: reads path
src/main.rs - File reader → PE file: loads bytes
src/main.rs - Command dispatch → x86 parser: parses x86
src/main.rs - Command dispatch → x64 parser: parses x64
src/main.rs - x86 parser → PE structures: reads structures
src/loader.rs - x64 parser → PE structures: reads structures
src/loader.rs - Command dispatch → x86 mapping: loads image
src/main.rs - Command dispatch → x64 mapping: loads image
src/main.rs - x86 mapping → Section mapping: maps sections
README.md - x64 mapping → Section mapping: maps sections
README.md - x86 mapping → Base relocations: applies relocations
src/loader.rs - x64 mapping → Base relocations: applies relocations
src/loader.rs - x86 mapping → Import resolution: resolves imports
src/loader.rs - x64 mapping → Import resolution: resolves imports
src/loader.rs - x86 mapping → Windows memory API: allocates memory
src/loader.rs - x64 mapping → Windows memory API: allocates memory
src/loader.rs - Import resolution → Windows library API: loads libraries
src/loader.rs - Import resolution → Windows library API: looks up symbols
src/loader.rs - x86 mapping → Entry point transfer: transfers execution
README.md - x64 mapping → Entry point transfer: transfers execution
README.md - Entry point transfer → Windows thread API: starts thread
src/loader.rs - Command dispatch → Console logger: reports status
src/main.rs - x86 mapping → Console logger: logs progress
src/loader.rs - x64 mapping → Console logger: logs progress
src/loader.rs