Verify the archeticture.
| 233 | |
| 234 | // Verify the archeticture. |
| 235 | BOOL cobf::verify_machine(PIMAGE_NT_HEADERS nt_hdrs) |
| 236 | { |
| 237 | // Verify the machine. |
| 238 | #ifdef _M_IX86 |
| 239 | return nt_hdrs->FileHeader.Machine == IMAGE_FILE_MACHINE_I386; |
| 240 | #else |
| 241 | return nt_hdrs->FileHeader.Machine == IMAGE_FILE_MACHINE_AMD64 || |
| 242 | nt_hdrs->FileHeader.Machine == IMAGE_FILE_MACHINE_IA64; |
| 243 | #endif |
| 244 | }; |
| 245 | |
| 246 | // Verify the sections. |
| 247 | BOOL cobf::verify_sections(PIMAGE_DOS_HEADER dos_hdr, PIMAGE_NT_HEADERS nt_hdrs) |