Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Macros | |
#define | align32(x) x = (((x)&0x3) == 0) ? (x) : ((x) & ~0x3) + 0x4; |
#define | EXIT_ON_OVERFLOW(S) |
#define EXIT_ON_OVERFLOW | ( | S | ) |
|
static |
|
static |
|
static |
Definition at line 1357 of file pe_rsrc.c.
References _resource_lang_str(), _resource_type_str(), align32, bin_pe_rva_to_paddr(), calloc(), counter, free(), free_VS_VERSIONINFO(), i, key, len, NULL, Pe_image_resource_directory::NumberOfIdEntries, Pe_image_resource_directory::NumberOfNamedEntries, off, Pe_image_resource_data_entry::OffsetToData, PE_, PE_DWord, Pe_r_bin_pe_parse_version_info(), Pe_r_bin_store_resource_version_info(), PE_RESOURCE_ENTRY_VERSION, r, read_image_resource_data_entry(), read_image_resource_directory(), read_image_resource_directory_entry(), rs, rz_buf_read_at(), RZ_FREE, rz_list_append(), RZ_LOG_ERROR, RZ_LOG_INFO, RZ_NEW0, RZ_PE_MAX_RESOURCES, rz_read_le16(), rz_str_newf(), rz_time_dos_time_stamp_to_posix(), rz_time_stamp_is_dos_format(), rz_time_stamp_to_str(), sdb_free(), sdb_new0(), sdb_ns_set(), sdb_num_get(), Pe_image_resource_data_entry::Size, snprintf, strdup(), Pe_image_resource_directory::TimeDateStamp, type, ut64(), and PE_VS_VERSIONINFO::wLength.
Referenced by bin_pe_parse_resource().
|
static |
|
static |
Definition at line 1250 of file pe_rsrc.c.
References rz_str_newf(), strdup(), and type.
Referenced by _parse_resource_directory().
|
static |
Definition at line 1494 of file pe_rsrc.c.
References bin_pe_rva_to_va(), key, PE_, rs, sdb_fmt(), sdb_new0(), sdb_ns_set(), sdb_num_set(), sdb_set(), and ut64().
Referenced by bin_pe_parse_resource().
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().
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().
|
static |
Definition at line 96 of file pe_rsrc.c.
References free(), String::szKey, and String::Value.
Referenced by free_StringTable(), and Pe_r_bin_pe_parse_string().
|
static |
Definition at line 118 of file pe_rsrc.c.
References StringFileInfo::Children, free(), free_StringTable(), StringFileInfo::numOfChildren, and StringFileInfo::szKey.
Referenced by free_VS_VERSIONINFO(), and Pe_r_bin_pe_parse_string_file_info().
|
static |
Definition at line 104 of file pe_rsrc.c.
References StringTable::Children, free(), free_String(), StringTable::numOfChildren, and StringTable::szKey.
Referenced by free_StringFileInfo(), and Pe_r_bin_pe_parse_string_table().
|
static |
Definition at line 74 of file pe_rsrc.c.
References free(), Var::szKey, and Var::Value.
Referenced by free_VarFileInfo(), and Pe_r_bin_pe_parse_var().
|
static |
Definition at line 82 of file pe_rsrc.c.
References VarFileInfo::Children, free(), free_Var(), VarFileInfo::numOfChildren, and VarFileInfo::szKey.
Referenced by free_VS_VERSIONINFO(), and Pe_r_bin_pe_parse_var_file_info().
|
static |
Definition at line 134 of file pe_rsrc.c.
References free(), free_StringFileInfo(), free_VarFileInfo(), PE_VS_VERSIONINFO::stringFileInfo, PE_VS_VERSIONINFO::szKey, PE_VS_VERSIONINFO::Value, and PE_VS_VERSIONINFO::varFileInfo.
Referenced by _parse_resource_directory(), and Pe_r_bin_pe_parse_version_info().
|
static |
Definition at line 295 of file pe_rsrc.c.
References align32, calloc(), free_String(), i, NULL, PE_DWord, realloc(), rz_buf_read_at(), rz_buf_read_le16_at, RZ_LOG_INFO, RZ_MIN, String::szKey, String::Value, String::wLength, String::wType, and String::wValueLength.
Referenced by Pe_r_bin_pe_parse_string_table().
|
static |
Definition at line 462 of file pe_rsrc.c.
References align32, calloc(), StringFileInfo::Children, free_StringFileInfo(), malloc(), NULL, StringFileInfo::numOfChildren, PE_DWord, Pe_r_bin_pe_parse_string_table(), realloc(), rz_buf_read_at(), rz_buf_read_le16_at, RZ_LOG_INFO, STRINGFILEINFO_UTF_16, STRINGFILEINFO_UTF_16_LEN, StringFileInfo::szKey, autogen_x86imm::tmp, UT16_ALIGN, StringFileInfo::wLength, StringFileInfo::wType, and StringFileInfo::wValueLength.
Referenced by Pe_r_bin_pe_parse_version_info().
|
static |
Definition at line 383 of file pe_rsrc.c.
References align32, calloc(), StringTable::Children, EIGHT_HEX_DIG_UTF_16_LEN, free_StringTable(), malloc(), NULL, StringTable::numOfChildren, PE_DWord, Pe_r_bin_pe_parse_string(), realloc(), rz_buf_read_at(), rz_buf_read_le16_at, RZ_LOG_INFO, StringTable::szKey, autogen_x86imm::tmp, UT16_ALIGN, StringTable::wLength, StringTable::wType, and StringTable::wValueLength.
Referenced by Pe_r_bin_pe_parse_string_file_info().
|
static |
Definition at line 148 of file pe_rsrc.c.
References align32, calloc(), free_Var(), malloc(), NULL, Var::numOfValues, rz_buf_read_at(), rz_buf_read_le16_at, RZ_LOG_INFO, Var::szKey, TRANSLATION_UTF_16, TRANSLATION_UTF_16_LEN, UT16_ALIGN, Var::Value, Var::wLength, Var::wType, and Var::wValueLength.
Referenced by Pe_r_bin_pe_parse_var_file_info().
|
static |
Definition at line 217 of file pe_rsrc.c.
References align32, calloc(), VarFileInfo::Children, free_VarFileInfo(), malloc(), NULL, VarFileInfo::numOfChildren, PE_DWord, Pe_r_bin_pe_parse_var(), realloc(), rz_buf_read_at(), rz_buf_read_le16_at, RZ_LOG_INFO, VarFileInfo::szKey, autogen_x86imm::tmp, UT16_ALIGN, VARFILEINFO_UTF_16, VARFILEINFO_UTF_16_LEN, VarFileInfo::wLength, VarFileInfo::wType, and VarFileInfo::wValueLength.
Referenced by Pe_r_bin_pe_parse_version_info().
|
static |
Definition at line 556 of file pe_rsrc.c.
References align32, calloc(), PE_VS_FIXEDFILEINFO::dwFileDateLS, PE_VS_FIXEDFILEINFO::dwFileDateMS, PE_VS_FIXEDFILEINFO::dwFileFlags, PE_VS_FIXEDFILEINFO::dwFileFlagsMask, PE_VS_FIXEDFILEINFO::dwFileOS, PE_VS_FIXEDFILEINFO::dwFileSubtype, PE_VS_FIXEDFILEINFO::dwFileType, PE_VS_FIXEDFILEINFO::dwFileVersionLS, PE_VS_FIXEDFILEINFO::dwFileVersionMS, PE_VS_FIXEDFILEINFO::dwProductVersionLS, PE_VS_FIXEDFILEINFO::dwProductVersionMS, PE_VS_FIXEDFILEINFO::dwSignature, PE_VS_FIXEDFILEINFO::dwStrucVersion, EXIT_ON_OVERFLOW, free_VS_VERSIONINFO(), malloc(), NULL, PE_DWord, Pe_r_bin_pe_parse_string_file_info(), Pe_r_bin_pe_parse_var_file_info(), rz_buf_read_at(), rz_buf_read_le16_at, rz_buf_read_le32_at, RZ_LOG_INFO, PE_VS_VERSIONINFO::stringFileInfo, PE_VS_VERSIONINFO::szKey, UT16_ALIGN, ut64(), PE_VS_VERSIONINFO::Value, PE_VS_VERSIONINFO::varFileInfo, VS_VERSION_INFO_UTF_16, VS_VERSION_INFO_UTF_16_LEN, PE_VS_VERSIONINFO::wLength, PE_VS_VERSIONINFO::wType, and PE_VS_VERSIONINFO::wValueLength.
Referenced by _parse_resource_directory().
|
static |
Definition at line 803 of file pe_rsrc.c.
References PE_VS_FIXEDFILEINFO::dwFileDateLS, PE_VS_FIXEDFILEINFO::dwFileDateMS, PE_VS_FIXEDFILEINFO::dwFileFlags, PE_VS_FIXEDFILEINFO::dwFileFlagsMask, PE_VS_FIXEDFILEINFO::dwFileOS, PE_VS_FIXEDFILEINFO::dwFileSubtype, PE_VS_FIXEDFILEINFO::dwFileType, PE_VS_FIXEDFILEINFO::dwFileVersionLS, PE_VS_FIXEDFILEINFO::dwFileVersionMS, PE_VS_FIXEDFILEINFO::dwProductVersionLS, PE_VS_FIXEDFILEINFO::dwProductVersionMS, PE_VS_FIXEDFILEINFO::dwSignature, PE_VS_FIXEDFILEINFO::dwStrucVersion, NULL, sdb_new0(), and sdb_num_set().
Referenced by Pe_r_bin_store_resource_version_info().
|
static |
Definition at line 828 of file pe_rsrc.c.
References NULL, Pe_r_bin_store_fixed_file_info(), Pe_r_bin_store_string_file_info(), Pe_r_bin_store_var_file_info(), sdb_new0(), sdb_ns_set(), PE_VS_VERSIONINFO::stringFileInfo, PE_VS_VERSIONINFO::Value, and PE_VS_VERSIONINFO::varFileInfo.
Referenced by _parse_resource_directory().
Definition at line 731 of file pe_rsrc.c.
References free(), NULL, sdb_encode(), sdb_free(), sdb_new0(), sdb_set(), String::szKey, String::Value, String::wKeyLen, and String::wValueLength.
Referenced by Pe_r_bin_store_string_table().
|
static |
Definition at line 785 of file pe_rsrc.c.
References StringFileInfo::Children, i, key, NULL, StringFileInfo::numOfChildren, Pe_r_bin_store_string_table(), sdb_new0(), sdb_ns_set(), and snprintf.
Referenced by Pe_r_bin_store_resource_version_info().
|
static |
Definition at line 759 of file pe_rsrc.c.
References StringTable::Children, EIGHT_HEX_DIG_UTF_16_LEN, free(), i, key, NULL, StringTable::numOfChildren, Pe_r_bin_store_string(), sdb_encode(), sdb_free(), sdb_new0(), sdb_ns_set(), sdb_set(), snprintf, and StringTable::szKey.
Referenced by Pe_r_bin_store_string_file_info().
Definition at line 698 of file pe_rsrc.c.
References i, key, NULL, Var::numOfValues, sdb_new0(), sdb_num_set(), snprintf, and Var::Value.
Referenced by Pe_r_bin_store_var_file_info().
|
static |
Definition at line 714 of file pe_rsrc.c.
References VarFileInfo::Children, i, key, NULL, VarFileInfo::numOfChildren, Pe_r_bin_store_var(), sdb_new0(), sdb_ns_set(), and snprintf.
Referenced by Pe_r_bin_store_resource_version_info().
|
static |
Definition at line 1342 of file pe_rsrc.c.
References addr, b, PE_READ_STRUCT_FIELD, RZ_BUF_CUR, rz_buf_read(), rz_buf_seek(), RZ_BUF_SET, and st64.
Referenced by _parse_resource_directory().
|
static |
Definition at line 29 of file pe_rsrc.c.
References addr, b, read_image_resource_directory_aux(), RZ_BUF_CUR, rz_buf_seek(), RZ_BUF_SET, st64, and autogen_x86imm::tmp.
Referenced by _parse_resource_directory(), bin_pe_init_resource(), and bin_pe_parse_resource().
|
static |
Definition at line 20 of file pe_rsrc.c.
References b, Pe_image_resource_directory::Characteristics, Pe_image_resource_directory::MajorVersion, Pe_image_resource_directory::MinorVersion, Pe_image_resource_directory::NumberOfIdEntries, Pe_image_resource_directory::NumberOfNamedEntries, rz_buf_read_le16, rz_buf_read_le32, and Pe_image_resource_directory::TimeDateStamp.
Referenced by read_image_resource_directory().
|
static |
Definition at line 1321 of file pe_rsrc.c.
References addr, b, RZ_BUF_CUR, rz_buf_read_le32, rz_buf_seek(), RZ_BUF_SET, st64, and autogen_x86imm::tmp.
Referenced by _parse_resource_directory(), and bin_pe_parse_resource().