Verify and get the nt headers.
| 223 | |
| 224 | // Verify and get the nt headers. |
| 225 | BOOL cobf::get_nt_headers(PIMAGE_DOS_HEADER dos_hdr, PIMAGE_NT_HEADERS& nt_hdrs) |
| 226 | { |
| 227 | // Verifing the nt headers. |
| 228 | nt_hdrs = (PIMAGE_NT_HEADERS)&this->pe_rawf[dos_hdr->e_lfanew]; |
| 229 | if (sizeof(*nt_hdrs) + dos_hdr->e_lfanew > this->pe_rawf.size() || |
| 230 | nt_hdrs->Signature != IMAGE_NT_SIGNATURE) return FALSE; |
| 231 | return TRUE; |
| 232 | }; |
| 233 | |
| 234 | // Verify the archeticture. |
| 235 | BOOL cobf::verify_machine(PIMAGE_NT_HEADERS nt_hdrs) |