-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdosheader.cul
More file actions
35 lines (29 loc) · 1.08 KB
/
Copy pathdosheader.cul
File metadata and controls
35 lines (29 loc) · 1.08 KB
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
28
29
30
31
32
33
34
35
( $Id: dosheader.cul,v 1.1 2018/10/11 12:47:15 albert Exp $ )
( Copyright{2004}: Albert van der Horst, HCC FIG Holland by GNU Public License)
\ Consult file for ciasdis. (See man 5 cul).
\ In behalf of analysing Windows exe files.
0 -ORG- \ Preliminary, to find out.
0 TARGET>HOST 2 "MZ" $= 0 = "Fatal, not an ex header!" ?ABORT
08 W@ 10 * NEGATE DUP -ORG-
DUP LABEL exHeaderStart
DUP LABEL exSignature 2 +
DUP LABEL exExtrabytes 2 +
DUP LABEL exPages 2 +
DUP LABEL exRelocItems 2 +
DUP LABEL exHeaderSize 2 +
DUP LABEL exMinAlloc 2 +
DUP LABEL exMaxAlloc 2 +
DUP LABEL exInitSS 2 +
DUP LABEL exInitSp 2 +
DUP LABEL exCheckSum 2 +
DUP LABEL exInitIP 2 +
DUP LABEL exInitCS 2 +
DUP LABEL exRelocTable 2 +
DUP LABEL exOverlay 2 +
LABEL exHeaderEnd
exHeaderStart exHeaderEnd -dw: exHeader
exInitIP W@ exInitCS W@ 10 * + LABEL exEntry
\ Crawl the exe header. In rare case it is ill-advised
\ to do it automatically.
\ : EXE-CRAWL coffHeaderStart CRAWL ;
\ EXE-CRAWL