Rizin
unix-like reverse engineering framework and cli tools
|
#include "pe.h"
Go to the source code of this file.
Functions | |
void PE_() | rz_bin_pe_check_sections (RzBinPEObj *bin, struct rz_bin_pe_section_t **sects) |
RzList *PE_() | section_flag_to_rzlist (ut64 flag) |
bool PE_() | read_image_section_header (RzBuffer *b, ut64 addr, PE_(image_section_header) *section_header) |
void PE_() | write_image_section_header (RzBuffer *b, ut64 addr, PE_(image_section_header) *section_header) |
struct rz_bin_pe_section_t *PE_() | rz_bin_pe_get_sections (RzBinPEObj *bin) |
int PE_() | bin_pe_init_sections (RzBinPEObj *bin) |
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().
bool PE_() read_image_section_header | ( | RzBuffer * | b, |
ut64 | addr, | ||
PE_(image_section_header) * | section_header | ||
) |
Definition at line 212 of file pe_section.c.
References addr, b, memcpy(), PE_, PE_IMAGE_SIZEOF_SHORT_NAME, PE_READ_STRUCT_FIELD, and rz_buf_read_at().
Referenced by bin_pe_init_sections().
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().
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().
Definition at line 113 of file pe_section.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(), and rz_list_new().
void PE_() write_image_section_header | ( | RzBuffer * | b, |
ut64 | addr, | ||
PE_(image_section_header) * | section_header | ||
) |
Definition at line 228 of file pe_section.c.
References addr, b, memcpy(), PE_, PE_IMAGE_SIZEOF_SHORT_NAME, rz_buf_write_at(), rz_write_at_le16(), and rz_write_at_le32().