NAME=PE: corkami cm01.exe - open
FILE=bins/pe/cm01.exe
CMDS=q!
EXPECT=<<EOF
EOF
RUN

NAME=PE: corkami cm01.exe - sections
FILE=bins/pe/cm01.exe
ARGS=-n
CMDS=!rz-bin -S bins/pe/cm01.exe
EXPECT=<<EOF
[Sections]

nth paddr         size vaddr        vsize perm name
---------------------------------------------------
0   0x00000600   0x600 0x00401000  0x1000 -r-x CODE
1   0x00000c00   0x200 0x00402000  0x1000 -rw- DATA
2   0x00000e00   0x800 0x00403000  0x1000 -rw- .idata
3   0x00001600   0x200 0x00404000  0x1000 -r-- .edata
4   0x00001800   0x200 0x00405000  0x1000 sr-- .reloc
5   0x00001a00  0x1400 0x00406000  0x2000 sr-- .rsrc

EOF
RUN

NAME=PE: corkami cm01.exe - section seek 1
FILE=bins/pe/cm01.exe
CMDS=<<EOF
s 0x00401000
om.~[8]
EOF
EXPECT=<<EOF
fmap.CODE
EOF
RUN

NAME=PE: corkami cm01.exe - section seek 2
FILE=bins/pe/cm01.exe
CMDS=<<EOF
s 0x00402000
om.~[8]
EOF
EXPECT=<<EOF
fmap.DATA
EOF
RUN

NAME=PE: corkami cm01.exe - section seek 3
FILE=bins/pe/cm01.exe
CMDS=<<EOF
s 0x00403000
om.~[8]
EOF
EXPECT=<<EOF
fmap..idata
EOF
RUN

NAME=PE: corkami cm01.exe - section seek 4
FILE=bins/pe/cm01.exe
CMDS=<<EOF
s 0x00404000
om.~[8]
EOF
EXPECT=<<EOF
fmap..edata
EOF
RUN

NAME=PE: corkami cm01.exe - section seek 5
FILE=bins/pe/cm01.exe
CMDS=<<EOF
s 0x00405000
om.~[8]
EOF
EXPECT=<<EOF
fmap..reloc
EOF
RUN

NAME=PE: corkami cm01.exe - section seek 6
FILE=bins/pe/cm01.exe
CMDS=<<EOF
s 0x00406000
om.~[8]
EOF
EXPECT=<<EOF
fmap..rsrc
EOF
RUN

NAME=PE: corkami cm01.exe - section refs 1
FILE=bins/pe/cm01.exe
CMDS=<<EOF
e analysis.strings=true
aaa
pi 2 @ 0x004010b7
EOF
EXPECT=<<EOF
push str.CrackMe_v1.0
push str.No_need_to_disasm_the_code
EOF
RUN

NAME=PE: corkami cm01.exe - section refs 2
FILE=bins/pe/cm01.exe
CMDS=<<EOF
e analysis.strings=true
aaa
pi 2 @ 0x0040136b
EOF
EXPECT=<<EOF
push str.No_luck
push str.No_luck_there__mate
EOF
RUN

NAME=PE: corkami cm01.exe - section refs 3
FILE=bins/pe/cm01.exe
CMDS=<<EOF
e analysis.strings=true
aaa
pi 2 @ 0x004013af
EOF
EXPECT=<<EOF
push str.No_luck
push str.No_luck_there__mate
EOF
RUN

NAME=PE: corkami cm01.exe - section refs 4
FILE=bins/pe/cm01.exe
CMDS=<<EOF
e analysis.strings=true
aaa
pi 2 @ 0x0040134f
EOF
EXPECT=<<EOF
push str.Good_work
push str.Great_work__mate__Now_try_the_next_CrackMe
EOF
RUN
