Read the child program's DOS header and validate it is a MZ executable
| 220 | |
| 221 | // Read the child program's DOS header and validate it is a MZ executable |
| 222 | type IMAGE_DOS_HEADER struct { |
| 223 | Magic uint16 // USHORT Magic number |
| 224 | Cblp uint16 // USHORT Bytes on last page of file |
| 225 | Cp uint16 // USHORT Pages in file |
| 226 | Crlc uint16 // USHORT Relocations |
| 227 | Cparhdr uint16 // USHORT Size of header in paragraphs |
| 228 | MinAlloc uint16 // USHORT Minimum extra paragraphs needed |
| 229 | MaxAlloc uint16 // USHORT Maximum extra paragraphs needed |
| 230 | SS uint16 // USHORT Initial (relative) SS value |
| 231 | SP uint16 // USHORT Initial SP value |
| 232 | CSum uint16 // USHORT Checksum |
| 233 | IP uint16 // USHORT Initial IP value |
| 234 | CS uint16 // USHORT Initial (relative) CS value |
| 235 | LfaRlc uint16 // USHORT File address of relocation table |
| 236 | Ovno uint16 // USHORT Overlay number |
| 237 | Res [4]uint16 // USHORT Reserved words |
| 238 | OEMID uint16 // USHORT OEM identifier (for e_oeminfo) |
| 239 | OEMInfo uint16 // USHORT OEM information; e_oemid specific |
| 240 | Res2 [10]uint16 // USHORT Reserved words |
| 241 | LfaNew int32 // LONG File address of new exe header |
| 242 | } |
| 243 | |
| 244 | |
| 245 |
nothing calls this directly
no outgoing calls
no test coverage detected