nx_pe_writer.nx
buildroot/runtime/nx_pe_writer.nx
about
dependencies 2 imports · 41 importers
diagram shows first 10 each side; +0 more imports, +31 more importers in the complete lists below.
imports: nx_syscalls.nxnx_hal.nx
imported by: nx_pe_compile_win.nxnx_pe_compile_win_call.nxnx_pe_compile_win_dll.nxnx_pe_compile_win_fread.nxnx_pe_compile_win_gui.nxnx_pe_compile_win_halloc.nxnx_pe_compile_win_httpd.nxnx_pe_compile_win_index.nxnx_pe_compile_win_io.nxnx_pe_compile_win_iotcli.nxnx_pe_compile_win_mmap.nxnx_pe_compile_win_nishi.nxnx_pe_compile_win_organ.nxnx_pe_compile_win_sw.nxnx_pe_compile_win_table.nxnx_pe_compile_win_uiserve.nxnx_pe_compile_win_write.nxnx_pe_compile_win_wsa.nxnx_pe_container_datachar.nxnx_pe_container_gen.nxnx_pe_container_httpd.nxnx_pe_container_sdserver.nxnx_pe_container_uiserve.nxnx_pe_container_win.nxnx_pe_container_win_io.nxnx_pe_container_win_ping.nxnx_pe_container_win_sup.nxnx_pe_dll_com_device.nxnx_pe_dll_d3d11.nxnx_pe_dll_d3d11ctx.nxnx_pe_dll_d3d11draw.nxnx_pe_dll_d3d11shade.nxnx_pe_dll_d3d11tex.nxnx_pe_dll_id3d11.nxnx_pe_hello_test.nxnx_pe_job_limit_test.nxnx_pe_job_run_test.nxnx_pe_job_self_test.nxnx_pe_natbw.nxnx_pe_spawn_test.nxnx_pe_writer_test.nx
structs
| none |
consts
| 91 | const PE_FILE_SIZE: i64 = 0x600 |
| 92 | const PE_MACHINE_AMD64: i64 = 0x8664 |
| 93 | const PE_OH_MAGIC_PEPLUS: i64 = 0x020B |
| 94 | const PE_SUBSYSTEM_CONSOLE: i64 = 3 |
| 95 | const PE_CHAR_EXEC: i64 = 0x0002 |
| 96 | const PE_CHAR_LARGE_ADDR: i64 = 0x0020 |
| 97 | const PE_SECT_CODE_X_R: i64 = 0x60000020 |
| 98 | const PE_SECT_DATA_R: i64 = 0x40000040 |
| 99 | const PE_SECT_DATA_RW: i64 = 0xC0000040 // INITIALIZED_DATA | READ | WRITE |
| 102 | const FOFF_PE_SIG: i64 = 0x80 |
| 103 | const FOFF_COFF: i64 = 0x84 |
| 104 | const FOFF_OPT: i64 = 0x98 |
| 105 | const FOFF_SECT_TBL: i64 = 0x188 |
| 106 | const FOFF_TEXT: i64 = 0x200 |
| 107 | const FOFF_IDATA: i64 = 0x400 |
| 110 | const RVA_TEXT: i64 = 0x1000 |
| 111 | const RVA_IDATA: i64 = 0x2000 |
| 112 | const RVA_IMP_DESC: i64 = 0x2000 |
| 113 | const RVA_INT: i64 = 0x2028 |
| 114 | const RVA_IAT: i64 = 0x2038 |
| 115 | const RVA_IMP_NAME: i64 = 0x2048 |
| 116 | const RVA_DLL_STR: i64 = 0x2056 |
| 119 | const IMG_BASE_LO: i64 = 0x40000000 |
| 120 | const IMG_BASE_HI: i64 = 0x1 |
| 123 | const NX_PE_OK: i64 = 0 |
| 124 | const NX_PE_BAD_INPUT: i64 = 1 |
| 125 | const NX_PE_FAULT: i64 = 2 |
| 126 | const NX_PE_N_VERDICTS: i64 = 3 |
| 332 | const PE_HELLO_FILE_SIZE: i64 = 0x800 // 2048 bytes |
| 333 | const PE_HELLO_FOFF_TEXT: i64 = 0x200 |
| 334 | const PE_HELLO_FOFF_RDATA: i64 = 0x400 |
| 335 | const PE_HELLO_FOFF_IDATA: i64 = 0x600 |
| 336 | const PE_HELLO_RVA_TEXT: i64 = 0x1000 |
| 337 | const PE_HELLO_RVA_RDATA: i64 = 0x2000 |
| 338 | const PE_HELLO_RVA_IDATA: i64 = 0x3000 |
| 600 | const PE_SPAWN_FILE_SIZE: i64 = 0x800 |
functions
| 67 | func _w8(buf: *u8, off: i64, v: i64) -> i64 |
| 71 | func _w16(buf: *u8, off: i64, v: i64) -> i64 |
| 76 | func _w32(buf: *u8, off: i64, v: i64) -> i64 |
| 83 | func _w64(buf: *u8, off: i64, lo32: i64, hi32: i64) -> i64 |
| 128 | func nx_pe_verdict_is_valid(v: i64) -> i64 |
| 135 | func _emit_section_header(buf: *u8, off: i64, name0: i64, name1: i64, name2: i64, name3: i64, name4: i64, name5: i64, name6: i64, name7: i64, vsize: i64, vaddr: i64, rawsize: i64, rawptr: i64, chars: i64) -> i64 called by 41: nxpcw_emit_penxc_emit_pepcwd_emit_dllfr_emit_pegi_emit_penxh_emit_pe+35 calls 3: _w8_w32_w16 |
| 159 | func nx_pe_emit_exit42(buf: *u8) -> i64 |
| 340 | func nx_pe_emit_hello(buf: *u8) -> i64 |
| 602 | func nx_pe_emit_spawn42(buf: *u8) -> i64 |
| 942 | func nx_pe_write_to_file(path: *u8, buf: *u8, n_bytes: i64) -> i64 |