1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| for (n_index = 0, cur_section_header = m_section_header; n_index < number_of_sections; ++n_index, ++cur_section_header) { raw_data_size = cur_section_header->SizeOfRawData; raw_data_offset = cur_section_header->PointerToRawData; virtual_address = cur_section_header->VirtualAddress; virtual_size = cur_section_header->Misc.VirtualSize; SetFilePointer(file, raw_data_offset, NULL, FILE_BEGIN); ReadFile(file, &m_image_base[virtual_address], raw_data_size, &number_of_bytes, NULL); } ACTF("基本数据读取完毕");
if (is_save_data) { map_of_data_size = file_size - (cur_section_header->PointerToRawData + cur_section_header->SizeOfRawData); if (map_of_data_size > 0) { map_of_data = new char[map_of_data_size]; memset(map_of_data, 0, map_of_data_size); ReadFile(file, map_of_data, map_of_data_size, &number_of_bytes, NULL); ACTF("额外数据读取完毕。"); } else { ACTF("无额外数据。"); } } else { WARNF("不保存额外数据。"); }
|