Function at 0x40161a
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
call 0x40161a
imul esp, dword [ebp + 0x72], 0x6e
insb byte es:[edi], dx
xor esi, dword [edx]
insb byte es:[edi], dx
insb byte es:[edi], dx
add byte [edi + 0xde8dc45], cl
add byte [eax], al
add byte [esi + 0x69], dl
jb 0x40169a
jne 0x401689
insb byte es:[edi], dx
inc ecx
insb byte es:[edi], dx
insb byte es:[edi], dx
outsd dx, dword [esi]
arpl word [eax], ax
pop dword [ebp - 0x28]
push dword [ebp - 0x24]
call fcn.0040129c
mov dword [ebp - 0x2c], eax
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
call fcn.004012e6
mov dword [ebp - 0x30], eax
cmp dword [ebp + 8], 0
jne 0x401658
xor eax, eax
jmp 0x40182c
mov eax, dword [ebp + 8]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
movzx eax, word [eax]
cmp eax, 0x5a4d
je 0x401672
xor eax, eax
jmp 0x40182c
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp - 0xc]
cmp dword [eax], 0x4550
je 0x401690
xor eax, eax
jmp 0x40182c
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 4]
cmp eax, 0x14c
add byte [eax], al
je 0x4016a5
xor eax, eax
jmp 0x40182c
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 0x16]
and eax, 2
jne 0x4016b8
xor eax, eax
jmp 0x40182c
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 0x14]
cmp eax, 0xe0
jae 0x4016cd
xor eax, eax
jmp 0x40182c
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 0x14]
sub eax, 0xe0
mov word [ebp - 8], ax
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + 0x3c]
movzx eax, word [ebp - 8]
lea eax, [ecx + eax + 0xf8]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x50]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x40170a
xor eax, eax
jmp 0x40182c
push 0x40
push 0x3000
push dword [ebp - 0x1c]
push 0
call dword [ebp - 0x30]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x401729
xor eax, eax
jmp 0x40182c
xor eax, eax
mov word [ebp - 4], ax
jmp 0x40173d
mov ax, word [ebp - 4]
add ax, 1
mov word [ebp - 4], ax
movzx eax, word [ebp - 4]
mov ecx, dword [ebp - 0xc]
movzx ecx, word [ecx + 6]
cmp eax, ecx
jge 0x4017d0
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + 0x3c]
movzx eax, word [ebp - 8]
lea eax, [ecx + eax + 0xf8]
movzx ecx, word [ebp - 4]
imul ecx, ecx, 0x28
add eax, ecx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
movzx eax, word [eax]
test eax, eax
jne 0x401797
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0x14], 0
je 0x401797
mov eax, dword [ebp - 0x14]
push dword [eax + 0x14]
push dword [ebp + 8]
push dword [ebp - 0x10]
call fcn.00401832
add esp, 0xc
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0x10], 0
je 0x4017cb
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0xc], 0
je 0x4017cb
mov eax, dword [ebp - 0x14]
push dword [eax + 0x10]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + 0x14]
push ecx
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
add ecx, dword [eax + 0xc]
push ecx
call fcn.00401832
add esp, 0xc
jmp 0x401731
push dword [ebp - 0x10]
call fcn.004013e3
pop ecx
push dword [ebp - 0x10]
call fcn.0040146e
pop ecx
test eax, eax
jne 0x4017ea
xor eax, eax
jmp 0x40182c
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 0x16]
and eax, 0x2000
je 0x401829
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x28], 0
je 0x401829
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x10]
add ecx, dword [eax + 0x28]
mov dword [ebp - 0x20], ecx
push 0
push 1
push dword [ebp - 0x10]
call dword [ebp - 0x20]
test eax, eax
jne 0x401829
push 0
push 0
push dword [ebp - 0x10]
call dword [ebp - 0x20]
xor eax, eax
jmp 0x40182c
mov eax, dword [ebp - 0x10]
mov esp, ebp
pop ebp
ret 4