Verify the sections.
| 245 | |
| 246 | // Verify the sections. |
| 247 | BOOL cobf::verify_sections(PIMAGE_DOS_HEADER dos_hdr, PIMAGE_NT_HEADERS nt_hdrs) |
| 248 | { |
| 249 | // Verify the sections header. |
| 250 | return dos_hdr->e_lfanew + sizeof(*nt_hdrs) + nt_hdrs->FileHeader.NumberOfSections |
| 251 | * sizeof(IMAGE_SECTION_HEADER) <= this->pe_rawf.size() && |
| 252 | nt_hdrs->FileHeader.NumberOfSections; |
| 253 | }; |
| 254 | |
| 255 | // Parse the imported symbols. |
| 256 | BOOL cobf::parse_imports(PIMAGE_IMPORT_DESCRIPTOR p_imports, size_t imports_size) |