Rizin
unix-like reverse engineering framework and cli tools
|
#include "pe.h"
Go to the source code of this file.
Classes | |
struct | checksum_ctx |
Macros | |
#define | HASCHR(x) (bin->nt_headers->file_header.Characteristics & (x)) |
int PE_() bin_pe_get_actual_checksum | ( | RzBinPEObj * | bin | ) |
Definition at line 249 of file pe_info.c.
References buf_fwd_checksum(), free(), i, malloc(), PE_, rz_buf_fwd_scan(), rz_buf_read8_at(), rz_buf_read_at(), shift(), autogen_x86imm::tmp, and ut64().
int PE_() bin_pe_get_claimed_checksum | ( | RzBinPEObj * | bin | ) |
Definition at line 233 of file pe_info.c.
References i, rz_read_at_ble32(), and ut64().
Referenced by bin_pe_get_actual_checksum().
struct rz_bin_pe_addr_t* PE_() check_mingw | ( | RzBinPEObj * | bin | ) |
Definition at line 822 of file pe_info.c.
References b, follow_offset(), free(), n, NULL, PE_, PFMT64x, rz_bin_pe_get_entrypoint(), rz_buf_read_at(), RZ_LOG_INFO, and ZERO_FILL.
Referenced by rz_bin_pe_get_main_vaddr().
struct rz_bin_pe_addr_t* PE_() check_msvcseh | ( | RzBinPEObj * | bin | ) |
Definition at line 623 of file pe_info.c.
References b, follow_offset(), free(), i, n, NULL, PE_, PFMT64x, read_and_follow_jump(), rz_bin_pe_get_entrypoint(), rz_buf_read_at(), RZ_LOG_INFO, rz_read_ble32(), rz_return_val_if_fail, and ZERO_FILL.
Referenced by rz_bin_pe_get_main_vaddr().
struct rz_bin_pe_addr_t* PE_() check_unknow | ( | RzBinPEObj * | bin | ) |
Definition at line 879 of file pe_info.c.
References b, follow_offset(), free(), i, NULL, PE_, PFMT64x, rz_bin_pe_get_entrypoint(), rz_buf_read_at(), RZ_LOG_INFO, and ZERO_FILL.
Referenced by rz_bin_pe_get_main_vaddr().
|
inlinestatic |
Definition at line 616 of file pe_info.c.
References b, len, read_and_follow_jump(), rz_read_ble32(), and st32.
Referenced by check_mingw(), check_msvcseh(), and check_unknow().
|
inlinestatic |
Definition at line 12 of file pe_info.c.
References PE_IMAGE_FILE_MACHINE_ARM, PE_IMAGE_FILE_MACHINE_ARM64, PE_IMAGE_FILE_MACHINE_ARMNT, and PE_IMAGE_FILE_MACHINE_THUMB.
Referenced by create(), run_basic_block_analysis(), rz_analysis_function_resize(), rz_analysis_vtable_begin(), rz_analysis_walkthrough_jmptbl(), rz_bin_pe_get_bits(), rz_bin_pe_get_cc(), rz_bin_pe_get_entrypoint(), and rz_core_bin_apply_symbols().
|
inlinestatic |
Definition at line 8 of file pe_info.c.
Referenced by rz_bin_pe_get_bits(), and rz_bin_pe_get_cc().
|
inlinestatic |
Definition at line 603 of file pe_info.c.
References b, len, rz_buf_read_at(), rz_read_ble32(), and st32.
Referenced by check_msvcseh(), and follow_offset().
char* PE_() rz_bin_pe_get_arch | ( | RzBinPEObj * | bin | ) |
Definition at line 114 of file pe_info.c.
References arch, PE_IMAGE_FILE_MACHINE_ALPHA, PE_IMAGE_FILE_MACHINE_ALPHA64, PE_IMAGE_FILE_MACHINE_ARM, PE_IMAGE_FILE_MACHINE_ARM64, PE_IMAGE_FILE_MACHINE_ARMNT, PE_IMAGE_FILE_MACHINE_EBC, PE_IMAGE_FILE_MACHINE_M68K, PE_IMAGE_FILE_MACHINE_MIPS16, PE_IMAGE_FILE_MACHINE_MIPSFPU, PE_IMAGE_FILE_MACHINE_MIPSFPU16, PE_IMAGE_FILE_MACHINE_POWERPC, PE_IMAGE_FILE_MACHINE_POWERPCFP, PE_IMAGE_FILE_MACHINE_RISCV128, PE_IMAGE_FILE_MACHINE_RISCV32, PE_IMAGE_FILE_MACHINE_RISCV64, PE_IMAGE_FILE_MACHINE_THUMB, PE_IMAGE_FILE_MACHINE_WCEMIPSV2, and strdup().
int PE_() rz_bin_pe_get_bits | ( | RzBinPEObj * | bin | ) |
Definition at line 306 of file pe_info.c.
References bits(), is_arm(), is_thumb(), PE_IMAGE_FILE_TYPE_PE32, and PE_IMAGE_FILE_TYPE_PE32PLUS.
char* PE_() rz_bin_pe_get_cc | ( | RzBinPEObj * | bin | ) |
Definition at line 201 of file pe_info.c.
References is_arm(), is_thumb(), NULL, PE_IMAGE_FILE_TYPE_PE32, PE_IMAGE_FILE_TYPE_PE32PLUS, and strdup().
char* PE_() rz_bin_pe_get_class | ( | RzBinPEObj * | bin | ) |
Definition at line 103 of file pe_info.c.
References NULL, PE_IMAGE_FILE_TYPE_PE32, PE_IMAGE_FILE_TYPE_PE32PLUS, and strdup().
struct rz_bin_pe_addr_t* PE_() rz_bin_pe_get_entrypoint | ( | RzBinPEObj * | bin | ) |
Definition at line 509 of file pe_info.c.
References bin_pe_rva_to_paddr(), bin_pe_rva_to_va(), debug, i, is_arm(), malloc(), NULL, rz_bin_pe_section_t::paddr, PE_, PE_DWord, PE_IMAGE_SCN_MEM_EXECUTE, PE_IMAGE_SCN_MEM_WRITE, rz_bin_pe_section_t::perm, rz_bin_pe_get_image_base(), RZ_LOG_INFO, RZ_MAX, rz_sys_perror, sections(), and ut64().
Referenced by check_mingw(), check_msvcseh(), check_unknow(), rz_bin_mdmp_pe_get_entrypoint(), and rz_bin_pe_check_sections().
ut64 PE_() rz_bin_pe_get_image_base | ( | RzBinPEObj * | bin | ) |
Definition at line 588 of file pe_info.c.
References ut64().
Referenced by bin_pe_rva_to_va(), bin_pe_va_to_rva(), rz_bin_pe_check_sections(), rz_bin_pe_get_entrypoint(), and rz_bin_pe_get_imports().
int PE_() rz_bin_pe_get_image_size | ( | RzBinPEObj * | bin | ) |
struct rz_bin_pe_lib_t* PE_() rz_bin_pe_get_libs | ( | RzBinPEObj * | bin | ) |
Definition at line 384 of file pe_info.c.
References bin_pe_rva_to_paddr(), calloc(), free(), rz_bin_pe_lib_t::last, len, libs(), NULL, off, PE_, PE_DWord, PE_STRING_LENGTH, r, read_image_delay_import_directory(), read_image_import_directory(), realloc(), rz_buf_read_at(), RZ_LOG_INFO, rz_str_case(), rz_sys_perror, sdb_ht_find(), sdb_ht_free(), sdb_ht_insert(), sdb_ht_new(), and ut64().
char* PE_() rz_bin_pe_get_machine | ( | RzBinPEObj * | bin | ) |
Definition at line 24 of file pe_info.c.
References NULL, PE_IMAGE_FILE_MACHINE_ALPHA, PE_IMAGE_FILE_MACHINE_ALPHA64, PE_IMAGE_FILE_MACHINE_AM33, PE_IMAGE_FILE_MACHINE_AMD64, PE_IMAGE_FILE_MACHINE_ARM, PE_IMAGE_FILE_MACHINE_ARM64, PE_IMAGE_FILE_MACHINE_ARMNT, PE_IMAGE_FILE_MACHINE_CEE, PE_IMAGE_FILE_MACHINE_CEF, PE_IMAGE_FILE_MACHINE_EBC, PE_IMAGE_FILE_MACHINE_I386, PE_IMAGE_FILE_MACHINE_IA64, PE_IMAGE_FILE_MACHINE_M32R, PE_IMAGE_FILE_MACHINE_M68K, PE_IMAGE_FILE_MACHINE_MIPS16, PE_IMAGE_FILE_MACHINE_MIPSFPU, PE_IMAGE_FILE_MACHINE_MIPSFPU16, PE_IMAGE_FILE_MACHINE_POWERPC, PE_IMAGE_FILE_MACHINE_POWERPCFP, PE_IMAGE_FILE_MACHINE_R10000, PE_IMAGE_FILE_MACHINE_R3000, PE_IMAGE_FILE_MACHINE_R4000, PE_IMAGE_FILE_MACHINE_RISCV128, PE_IMAGE_FILE_MACHINE_RISCV32, PE_IMAGE_FILE_MACHINE_RISCV64, PE_IMAGE_FILE_MACHINE_SH3, PE_IMAGE_FILE_MACHINE_SH3DSP, PE_IMAGE_FILE_MACHINE_SH3E, PE_IMAGE_FILE_MACHINE_SH4, PE_IMAGE_FILE_MACHINE_SH5, PE_IMAGE_FILE_MACHINE_THUMB, PE_IMAGE_FILE_MACHINE_TRICORE, PE_IMAGE_FILE_MACHINE_WCEMIPSV2, and strdup().
struct rz_bin_pe_addr_t* PE_() rz_bin_pe_get_main_vaddr | ( | RzBinPEObj * | bin | ) |
Definition at line 917 of file pe_info.c.
References check_mingw(), check_msvcseh(), check_unknow(), and PE_.
char* PE_() rz_bin_pe_get_os | ( | RzBinPEObj * | bin | ) |
Definition at line 69 of file pe_info.c.
References NULL, PE_IMAGE_SUBSYSTEM_EFI_APPLICATION, PE_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER, PE_IMAGE_SUBSYSTEM_EFI_ROM, PE_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER, PE_IMAGE_SUBSYSTEM_NATIVE, PE_IMAGE_SUBSYSTEM_POSIX_CUI, PE_IMAGE_SUBSYSTEM_WINDOWS_CE_GUI, PE_IMAGE_SUBSYSTEM_WINDOWS_CUI, PE_IMAGE_SUBSYSTEM_WINDOWS_GUI, PE_IMAGE_SUBSYSTEM_XBOX, and strdup().
char* PE_() rz_bin_pe_get_subsystem | ( | RzBinPEObj * | bin | ) |
Definition at line 159 of file pe_info.c.
References NULL, PE_IMAGE_SUBSYSTEM_EFI_APPLICATION, PE_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER, PE_IMAGE_SUBSYSTEM_EFI_ROM, PE_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER, PE_IMAGE_SUBSYSTEM_NATIVE, PE_IMAGE_SUBSYSTEM_POSIX_CUI, PE_IMAGE_SUBSYSTEM_WINDOWS_CE_GUI, PE_IMAGE_SUBSYSTEM_WINDOWS_CUI, PE_IMAGE_SUBSYSTEM_WINDOWS_GUI, PE_IMAGE_SUBSYSTEM_XBOX, and strdup().
int PE_() rz_bin_pe_is_big_endian | ( | RzBinPEObj * | bin | ) |
Definition at line 343 of file pe_info.c.
References arch, HASCHR, PE_IMAGE_FILE_BYTES_REVERSED_HI, PE_IMAGE_FILE_MACHINE_AMD64, and PE_IMAGE_FILE_MACHINE_I386.
Referenced by bin_pe_init().
int PE_() rz_bin_pe_is_dll | ( | RzBinPEObj * | bin | ) |
int PE_() rz_bin_pe_is_pie | ( | RzBinPEObj * | bin | ) |
Definition at line 331 of file pe_info.c.
References HASCHR, and IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE.
int PE_() rz_bin_pe_is_stripped_debug | ( | RzBinPEObj * | bin | ) |
int PE_() rz_bin_pe_is_stripped_line_nums | ( | RzBinPEObj * | bin | ) |
int PE_() rz_bin_pe_is_stripped_local_syms | ( | RzBinPEObj * | bin | ) |
Definition at line 370 of file pe_info.c.
References HASCHR, and PE_IMAGE_FILE_LOCAL_SYMS_STRIPPED.
int PE_() rz_bin_pe_is_stripped_relocs | ( | RzBinPEObj * | bin | ) |