Function at 0x402f50
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffd64
push ebx
push esi
push edi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00402240
mov eax, dword [ebp - 8]
call fcn.004029f4
xor eax, eax
push ebp
push 0x403238
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 9], 0
xor eax, eax
push ebp
push 0x4031f2
push dword fs:[eax]
mov dword fs:[eax], esp
mov esi, dword [ebp - 8]
mov edx, esi
lea eax, [ebp - 0x5c]
mov ecx, 0x40
call fcn.00402f48
cmp word [ebp - 0x5c], 0x5a4d
jne 0x4031e2
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x20]
lea edx, [eax + edx]
lea eax, [ebp - 0x154]
mov ecx, 0xf8
call fcn.00402f48
cmp dword [ebp - 0x154], 0x4550
jne 0x4031e2
lea eax, [ebp - 0x1d0]
xor ecx, ecx
mov edx, 0x44
call fcn.0040184c
lea eax, [ebp - 0x18c]
xor ecx, ecx
mov edx, 0x10
call fcn.0040184c
mov dword [ebp - 0x1d0], 0x44
push 0x40324c
call fcn.00402d54
mov ebx, eax
push 0x40325c
push ebx
call fcn.00402d24
mov dword [0x4076a4], eax
lea eax, [ebp - 0x18c]
push eax
lea eax, [ebp - 0x1d0]
push eax
push 0
push 0
push 4
push 0
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.00402250
push eax
push 0
call dword [0x4076a4]
test eax, eax
je 0x4031e2
mov dword [ebp - 0x29c], 0x10007
lea eax, [ebp - 0x29c]
push eax
mov eax, dword [ebp - 0x188]
push eax
call fcn.00402d3c
test eax, eax
je 0x4031e2
lea eax, [ebp - 0x14]
push eax
push 4
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x1f8]
add eax, 8
push eax
mov eax, dword [ebp - 0x18c]
push eax
call fcn.00402d7c
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x18c]
push eax
call fcn.00402f40
push 4
push 0x3000
mov eax, dword [ebp - 0x104]
push eax
mov eax, dword [ebp - 0x120]
push eax
mov eax, dword [ebp - 0x18c]
push eax
call fcn.00402dac
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x100]
push eax
push esi
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x18c]
push eax
call fcn.00402dc4
mov eax, dword [ebp - 0x20]
add eax, 0xf8
mov dword [ebp - 0x1c], eax
movzx esi, word [ebp - 0x14e]
dec esi
test esi, esi
jl 0x403190
inc esi
xor edi, edi
mov eax, dword [ebp - 0x1c]
xor edx, edx
push edx
push eax
mov eax, edi
shl eax, 3
lea eax, [eax + eax*4]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov edx, dword [ebp - 8]
add edx, eax
lea eax, [ebp - 0x17c]
mov ecx, 0x28
call fcn.00402f48
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x16c]
push eax
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x168]
add eax, edx
push eax
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 0x170]
push eax
mov eax, dword [ebp - 0x18c]
push eax
call fcn.00402dc4
lea eax, [ebp - 0x18]
push eax
push 0x40
mov eax, dword [ebp - 0x174]
push eax
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 0x170]
push eax
mov eax, dword [ebp - 0x18c]
push eax
call fcn.00402db4
inc edi
dec esi
jne 0x403109
lea eax, [ebp - 0x14]
push eax
push 4
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x1f8]
add eax, 8
push eax
mov eax, dword [ebp - 0x18c]
push eax
call fcn.00402dc4
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 0x12c]
mov dword [ebp - 0x1ec], eax
lea eax, [ebp - 0x29c]
push eax
mov eax, dword [ebp - 0x188]
push eax
call fcn.00402d94
mov eax, dword [ebp - 0x188]
push eax
call fcn.00402d84
mov byte [ebp - 9], 1
push ebx
call fcn.00402cf4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x403214
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40323f
lea eax, [ebp - 8]
mov edx, dword [0x402efc]
call fcn.00402990
lea eax, [ebp - 4]
call fcn.00401f1c
ret