Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_types.h>
#include <rz_util.h>
#include <rz_lib.h>
#include <rz_bin.h>
#include "pe_specs.h"
#include "dotnet.h"
Go to the source code of this file.
Classes | |
struct | rz_bin_pe_addr_t |
struct | rz_bin_pe_section_t |
struct | rz_bin_pe_import_t |
struct | rz_bin_pe_export_t |
struct | rz_bin_pe_string_t |
struct | rz_bin_pe_lib_t |
struct | _PE_RESOURCE |
struct | SDebugInfo |
Typedefs | |
typedef struct _PE_RESOURCE | rz_pe_resource |
typedef struct SDebugInfo | SDebugInfo |
#define RZ_BIN_PE_SCN_IS_EXECUTABLE | ( | x | ) | x &PE_IMAGE_SCN_MEM_EXECUTE |
#define RZ_BIN_PE_SCN_IS_READABLE | ( | x | ) | x &PE_IMAGE_SCN_MEM_READ |
#define RZ_BIN_PE_SCN_IS_SHAREABLE | ( | x | ) | x &PE_IMAGE_SCN_MEM_SHARED |
#define RZ_BIN_PE_SCN_IS_WRITABLE | ( | x | ) | x &PE_IMAGE_SCN_MEM_WRITE |
typedef struct _PE_RESOURCE rz_pe_resource |
typedef struct SDebugInfo SDebugInfo |
char* PE_() bin_pe_compute_authentihash | ( | RzBinPEObj * | bin | ) |
Definition at line 21 of file pe_security.c.
References buf_fwd_hash(), free(), benchmark::md, NULL, PE_, PE_DWord, PE_IMAGE_DIRECTORY_ENTRY_SECURITY, rz_buf_fwd_scan(), rz_buf_size(), rz_hash_cfg_final(), rz_hash_cfg_free(), rz_hash_cfg_get_result(), rz_hex_bin2strdup(), rz_str_replace_char(), and strdup().
Referenced by bin_pe_get_authentihash().
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().
const char* PE_() bin_pe_get_authentihash | ( | RzBinPEObj * | bin | ) |
Definition at line 60 of file pe_security.c.
References bin_pe_compute_authentihash(), and PE_.
Referenced by bin_pe_init_security().
int PE_() bin_pe_get_claimed_checksum | ( | RzBinPEObj * | bin | ) |
int PE_() bin_pe_get_overlay | ( | RzBinPEObj * | bin, |
ut64 * | size | ||
) |
Definition at line 16 of file pe_overlay.c.
References bin_pe_rva_to_paddr(), computeOverlayOffset(), i, rz_bin_pe_section_t::last, rz_bin_pe_section_t::paddr, PE_, PE_IMAGE_DIRECTORY_ENTRIES, PE_IMAGE_DIRECTORY_ENTRY_SECURITY, and ut64().
Referenced by bin_pe_init_overlay().
int PE_() bin_pe_init_clr | ( | RzBinPEObj * | bin | ) |
Definition at line 122 of file pe_clr.c.
References bin_pe_dotnet_init_clr(), bin_pe_dotnet_init_metadata(), bin_pe_rva_to_paddr(), Pe_image_clr::header, Pe_image_clr_header::MetaDataDirectoryAddress, PE_, PE_DWord, PE_IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR, and RZ_NEW0.
Referenced by bin_pe_init().
int PE_() bin_pe_init_exports | ( | RzBinPEObj * | bin | ) |
Definition at line 140 of file pe_exports.c.
References bin_pe_rva_to_paddr(), malloc(), PE_, PE_DWord, PE_IMAGE_DIRECTORY_ENTRY_EXPORT, read_image_export_directory(), RZ_FREE, RZ_LOG_INFO, and rz_sys_perror.
Referenced by bin_pe_init().
int PE_() bin_pe_init_hdr | ( | RzBinPEObj * | bin | ) |
Definition at line 124 of file pe_hdr.c.
References if(), malloc(), PE_, read_dos_header(), read_nt_headers(), RZ_LOG_INFO, rz_sys_perror, rz_time_stamp_to_str(), sdb_num_set(), sdb_set(), and sdb_set_owned().
Referenced by bin_pe_init().
int PE_() bin_pe_init_imports | ( | RzBinPEObj * | bin | ) |
HACK to modify import size because of begin 0.. this may report wrong info con corkami tests
Definition at line 325 of file pe_imports.c.
References bin_pe_rva_to_paddr(), count, fail, free(), indx(), NULL, off, PE_, PE_DWord, PE_IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT, PE_IMAGE_DIRECTORY_ENTRY_IMPORT, read_image_delay_import_directory(), read_image_import_directory(), realloc(), rz_buf_size(), RZ_FREE, RZ_LOG_INFO, RZ_MIN, rz_sys_perror, and ut64().
Referenced by bin_pe_init().
int PE_() bin_pe_init_overlay | ( | RzBinPEObj * | bin | ) |
Definition at line 67 of file pe_overlay.c.
References bin_pe_get_overlay(), PE_, sdb_num_set(), and ut64().
Referenced by bin_pe_init().
int PE_() bin_pe_init_resource | ( | RzBinPEObj * | bin | ) |
Definition at line 50 of file pe_rsrc.c.
References _free_resource(), bin_pe_rva_to_paddr(), malloc(), PE_, PE_DWord, PE_IMAGE_DIRECTORY_ENTRY_RESOURCE, read_image_resource_directory(), RZ_FREE, rz_list_newf(), RZ_LOG_INFO, and rz_sys_perror.
Referenced by bin_pe_init().
void PE_() bin_pe_init_rich_info | ( | RzBinPEObj * | bin | ) |
Definition at line 1101 of file pe_rsrc.c.
References _known_product_ids(), free(), mask, off, rz_buf_read_le32_at, rz_list_append(), rz_list_newf(), RZ_NEW0, autogen_x86imm::tmp, and ut64().
Referenced by bin_pe_init().
int PE_() bin_pe_init_sections | ( | RzBinPEObj * | bin | ) |
Definition at line 333 of file pe_section.c.
References a, bit, Ch, test_evm::end, h, i, if(), in, malloc(), name, names, num, rz_bin_pe_section_t::paddr, PE_, read_image_section_header(), RZ_FREE, RZ_LOG_INFO, rz_sys_perror, stored(), TABLE, true, type, ut64(), and value.
Referenced by bin_pe_init().
int PE_() bin_pe_init_security | ( | RzBinPEObj * | bin | ) |
Definition at line 71 of file pe_security.c.
References Pe_certificate::bCertificate, bin_pe_get_authentihash(), bin_pe_get_claimed_authentihash(), Pe_image_security_directory::certificates, Pe_certificate::dwLength, free(), Pe_image_security_directory::length, malloc(), NULL, PE_, PE_DWord, PE_IMAGE_DIRECTORY_ENTRY_SECURITY, PE_WIN_CERT_TYPE_PKCS_SIGNED_DATA, realloc(), rz_buf_read_at(), rz_buf_read_le16_at, rz_buf_read_le32_at, RZ_FREE, RZ_LOG_ERROR, RZ_LOG_INFO, RZ_NEW0, rz_pkcs7_parse_cms(), rz_pkcs7_parse_spcinfo(), autogen_x86imm::tmp, Pe_certificate::wCertificateType, and Pe_certificate::wRevision.
Referenced by bin_pe_init().
int PE_() bin_pe_init_tls | ( | RzBinPEObj * | bin | ) |
Definition at line 71 of file pe_tls.c.
References bin_pe_rva_to_paddr(), bin_pe_store_tls_callbacks(), bin_pe_va_to_rva(), free(), PE_, PE_DWord, PE_IMAGE_DIRECTORY_ENTRY_TLS, read_tls_directory(), RZ_LOG_INFO, and RZ_NEW0.
Referenced by bin_pe_init().
int PE_() bin_pe_is_authhash_valid | ( | RzBinPEObj * | bin | ) |
Definition at line 67 of file pe_security.c.
RZ_API void PE_() bin_pe_parse_resource | ( | RzBinPEObj * | bin | ) |
Definition at line 1523 of file pe_rsrc.c.
References _parse_resource_directory(), _store_resource_sdb(), len, Pe_image_resource_directory_entry::Name, NULL, Pe_image_resource_directory::NumberOfIdEntries, Pe_image_resource_directory::NumberOfNamedEntries, off, Pe_image_resource_directory_entry::OffsetToData, read_image_resource_directory(), read_image_resource_directory_entry(), RZ_LOG_ERROR, RZ_PE_MAX_RESOURCES, Pe_image_resource_directory_entry::u1, Pe_image_resource_directory_entry::u2, and ut64().
Referenced by bin_pe_init().
PE_DWord PE_() bin_pe_rva_to_paddr | ( | RzBinPEObj * | bin, |
PE_DWord | rva | ||
) |
Definition at line 15 of file pe.c.
References i, PE_DWord, and rva().
Referenced by _parse_resource_directory(), bin_pe_get_overlay(), bin_pe_init_clr(), bin_pe_init_exports(), bin_pe_init_imports(), bin_pe_init_resource(), bin_pe_init_tls(), bin_pe_parse_imports(), bin_pe_store_tls_callbacks(), rz_bin_pe_get_clr_methoddef_offset(), rz_bin_pe_get_clr_symbols(), rz_bin_pe_get_debug_data(), rz_bin_pe_get_entrypoint(), rz_bin_pe_get_exports(), rz_bin_pe_get_imports(), and rz_bin_pe_get_libs().
PE_DWord PE_() bin_pe_rva_to_va | ( | RzBinPEObj * | bin, |
PE_DWord | rva | ||
) |
Definition at line 28 of file pe.c.
References PE_, rva(), and rz_bin_pe_get_image_base().
Referenced by _store_resource_sdb(), bin_pe_parse_imports(), parse_symbol_table(), rz_bin_pe_get_clr_methoddef_offset(), rz_bin_pe_get_clr_symbols(), rz_bin_pe_get_entrypoint(), and rz_bin_pe_get_exports().
PE_DWord PE_() bin_pe_va_to_rva | ( | RzBinPEObj * | bin, |
PE_DWord | va | ||
) |
Definition at line 32 of file pe.c.
References PE_, rz_bin_pe_get_image_base(), and ut64().
Referenced by bin_pe_init_tls(), and bin_pe_store_tls_callbacks().
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().
void PE_() free_security_directory | ( | Pe_image_security_directory * | security_directory | ) |
struct PE_ | ( | rz_bin_pe_obj_t | ) |
Definition at line 1 of file pe.h.
int PE_() read_image_delay_import_directory | ( | RzBuffer * | b, |
ut64 | addr, | ||
PE_(image_delay_import_directory) * | directory | ||
) |
Definition at line 24 of file pe_imports.c.
References addr, b, regress::directory, PE_, PE_READ_STRUCT_FIELD, RZ_BUF_CUR, rz_buf_read(), rz_buf_seek(), RZ_BUF_SET, and st64.
Referenced by bin_pe_init_imports(), rz_bin_pe_get_imports(), and rz_bin_pe_get_libs().
int PE_() read_image_import_directory | ( | RzBuffer * | b, |
ut64 | addr, | ||
PE_(image_import_directory) * | import_dir | ||
) |
Definition at line 8 of file pe_imports.c.
References addr, b, PE_, PE_READ_STRUCT_FIELD, RZ_BUF_CUR, rz_buf_read(), rz_buf_seek(), RZ_BUF_SET, and st64.
Referenced by bin_pe_init_imports(), rz_bin_pe_get_imports(), and rz_bin_pe_get_libs().
void PE_() rz_bin_pe_check_sections | ( | RzBinPEObj * | bin, |
struct rz_bin_pe_section_t ** | sects | ||
) |
Definition at line 10 of file pe_section.c.
References free(), i, rz_bin_pe_addr_t::paddr, PE_, PE_IMAGE_SCN_MEM_EXECUTE, PE_IMAGE_SCN_MEM_READ, PE_IMAGE_SCN_MEM_WRITE, realloc(), rz_bin_pe_get_entrypoint(), rz_bin_pe_get_image_base(), RZ_LOG_ERROR, sections(), ut64(), and rz_bin_pe_addr_t::vaddr.
Referenced by rz_bin_mdmp_pe_get_sections().
void* PE_() rz_bin_pe_free | ( | RzBinPEObj * | bin | ) |
Definition at line 88 of file pe.c.
References bin_pe_dotnet_destroy_clr(), free(), free_security_directory(), NULL, PE_, rz_buf_free(), rz_hash_free(), rz_list_free(), rz_pkcs7_free_cms(), and rz_pkcs7_free_spcinfo().
Referenced by rz_bin_pe_new_buf(), rz_bin_pemixed_free(), rz_bin_pemixed_from_bytes_new(), and rz_bin_pemixed_init_dos().
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().
ut64 PE_() rz_bin_pe_get_clr_methoddef_offset | ( | RzBinPEObj * | bin, |
Pe_image_metadata_methoddef * | methoddef | ||
) |
Definition at line 104 of file pe_clr.c.
References bin_pe_dotnet_read_method_header(), bin_pe_rva_to_paddr(), bin_pe_rva_to_va(), rz_bin_symbol_t::paddr, PE_, UT64_MAX, and rz_bin_symbol_t::vaddr.
RZ_OWN RzList* PE_() rz_bin_pe_get_clr_symbols | ( | RzBinPEObj * | bin | ) |
Definition at line 8 of file pe_clr.c.
References bin_pe_dotnet_read_method_header(), bin_pe_rva_to_paddr(), bin_pe_rva_to_va(), rz_list_iter_t::data, free(), i, Pe_image_metadata_methoddef::implflags, rz_list_iter_t::n, Pe_image_metadata_methoddef::name, Pe_image_metadata_typedef::name, rz_bin_symbol_t::name, NULL, rz_bin_symbol_t::paddr, PE_, Pe_image_metadata_methoddef::rva, rz_bin_symbol_free(), RZ_BIN_TYPE_FUNC_STR, rz_buf_get_string(), rz_list_append(), rz_list_iterator(), rz_list_newf(), RZ_NEW0, rz_pvector_foreach, rz_pvector_len(), rz_str_newf(), rz_bin_symbol_t::type, and rz_bin_symbol_t::vaddr.
int PE_() rz_bin_pe_get_debug_data | ( | RzBinPEObj * | bin, |
SDebugInfo * | res | ||
) |
Definition at line 158 of file pe_debug.c.
References bin_pe_rva_to_paddr(), calloc(), get_debug_info(), NULL, PE_, PE_DWord, read_image_debug_directory_entry(), rz_buf_read_at(), rz_buf_size(), RZ_FREE, and RZ_MIN.
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().
struct rz_bin_pe_export_t* PE_() rz_bin_pe_get_exports | ( | RzBinPEObj * | bin | ) |
Definition at line 162 of file pe_exports.c.
References bin_pe_rva_to_paddr(), bin_pe_rva_to_va(), rz_bin_pe_export_t::forwarder, free(), i, rz_bin_pe_export_t::last, rz_bin_pe_export_t::libname, malloc(), memcpy(), n, rz_bin_pe_export_t::name, NULL, rz_bin_pe_export_t::ordinal, rz_bin_pe_export_t::paddr, parse_symbol_table(), PE_, PE_IMAGE_DIRECTORY_ENTRY_EXPORT, PE_NAME_LENGTH, PE_VWord, PE_Word, r, rz_buf_read_at(), rz_buf_read_le32_at, RZ_LOG_INFO, rz_read_at_ble16(), rz_read_at_ble32(), rz_return_val_if_fail, snprintf, st64, and rz_bin_pe_export_t::vaddr.
Referenced by rz_bin_mdmp_pe_get_symbols().
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_import_t* PE_() rz_bin_pe_get_imports | ( | RzBinPEObj * | bin | ) |
Definition at line 198 of file pe_imports.c.
References bin_pe_parse_imports(), bin_pe_rva_to_paddr(), free(), imports(), rz_bin_pe_import_t::last, NULL, off, rz_bin_pe_import_t::paddr, PE_, PE_DWord, PE_NAME_LENGTH, r, read_image_delay_import_directory(), read_image_import_directory(), realloc(), rz_bin_pe_get_image_base(), rz_buf_read_at(), RZ_LOG_INFO, rz_sys_perror, and ut64().
Referenced by rz_bin_mdmp_pe_get_imports(), and rz_bin_mdmp_pe_get_symbols().
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().
struct rz_bin_pe_section_t* PE_() rz_bin_pe_get_sections | ( | RzBinPEObj * | bin | ) |
Definition at line 243 of file pe_section.c.
References calloc(), COFF_SYMBOL_SIZE, free(), i, setup::idx, memcpy(), NULL, off, PE_, PE_IMAGE_SIZEOF_SHORT_NAME, RZ_ARRAY_SIZE, rz_buf_read_at(), RZ_LOG_INFO, rz_str_newf(), rz_sys_perror, sections(), st64, ut64(), and rz_bin_pe_section_t::vaddr.
Referenced by bin_pe_init().
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_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 | ) |
RzBinPEObj* PE_() rz_bin_pe_new | ( | const char * | file, |
bool | verbose | ||
) |
RzBinPEObj* PE_() rz_bin_pe_new_buf | ( | RzBuffer * | buf, |
bool | verbose | ||
) |
Definition at line 116 of file pe.c.
References bin_pe_init(), NULL, PE_, rz_bin_pe_free(), rz_buf_ref(), rz_buf_size(), rz_hash_new(), RZ_NEW0, RzBinPEObj, sdb_new0(), and verbose.
Referenced by rz_bin_pemixed_from_bytes_new().
Definition at line 2378 of file mach0.c.
References IMAGE_SCN_ALIGN_1024BYTES, IMAGE_SCN_ALIGN_128BYTES, IMAGE_SCN_ALIGN_16BYTES, IMAGE_SCN_ALIGN_1BYTES, IMAGE_SCN_ALIGN_2048BYTES, IMAGE_SCN_ALIGN_256BYTES, IMAGE_SCN_ALIGN_2BYTES, IMAGE_SCN_ALIGN_32BYTES, IMAGE_SCN_ALIGN_4096BYTES, IMAGE_SCN_ALIGN_4BYTES, IMAGE_SCN_ALIGN_512BYTES, IMAGE_SCN_ALIGN_64BYTES, IMAGE_SCN_ALIGN_8192BYTES, IMAGE_SCN_ALIGN_8BYTES, IMAGE_SCN_CNT_CODE, IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_CNT_UNINITIALIZED_DATA, IMAGE_SCN_GPREL, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_NRELOC_OVFL, IMAGE_SCN_LNK_OTHER, IMAGE_SCN_LNK_REMOVE, IMAGE_SCN_MEM_16BIT, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_LOCKED, IMAGE_SCN_MEM_NOT_CACHED, IMAGE_SCN_MEM_NOT_PAGED, IMAGE_SCN_MEM_PRELOAD, IMAGE_SCN_MEM_PURGEABLE, IMAGE_SCN_TYPE_NO_PAD, PE_SCN_ALIGN_MASK, rz_list_append(), rz_list_new(), S_ATTR_DEBUG, S_ATTR_EXT_RELOC, S_ATTR_LIVE_SUPPORT, S_ATTR_NO_DEAD_STRIP, S_ATTR_NO_TOC, S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SELF_MODIFYING_CODE, S_ATTR_SOME_INSTRUCTIONS, and S_ATTR_STRIP_STATIC_SYMS.