code wiki / (root) / nx_pe_thunk_dump.nx

nx_pe_thunk_dump.nx

buildroot/runtime/nx_pe_thunk_dump.nx

2407 B63 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic pe
docsdependenciesstructsconstsfunctions

about

nx_pe_thunk_dump.nx -- SOVEREIGN PE troubleshooting organ (replaces the python oracle). Reads a built PE, locates the CreateFileA thunk by its `mov edx,0x80000000` signature (BA 00 00 00 80), and prints the emitted thunk bytes as hex -- so "is the emitted thunk what the organ intended" is one step, in Nishi.

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_pe_thunk_dump.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_write d_u32 d_u16 d_hexbyte d_putc sys_mmap ↻ sys_write ↻ d_putc ↻

structs

none

consts

none

functions

6func d_putc(ch: i64) -> i64 { let t: *u8 = sys_mmap(1); t[0] = ch as u8; sys_write(1, t, 1); return 0 }
called by 2: d_hexbytemain calls 2: sys_mmapsys_write
7func d_hexbyte(v: i64) -> i64
called by 1: main calls 1: d_putc
15func d_u16(b: *u8, o: i64) -> i64 { return (b[o] as i64) | ((b[o+1] as i64) << 8) }
called by 1: main
16func d_u32(b: *u8, o: i64) -> i64 { return (b[o] as i64) | ((b[o+1] as i64) << 8) | ((b[o+2] as i64) << 16) | ((b[o+3] as i64) << 24) }
called by 1: main
18func main() -> i64