Function at 0x40274c
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
call fcn.00401a54
xor eax, eax
push ebp
push 0x402a0e
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
lea eax, [ebp - 0x38]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
call fcn.004016b4
mov eax, dword [ebp - 0x38]
call fcn.004016fc
cdq
push edx
push eax
mov eax, dword [ebp - 0x14]
xor edx, edx
cmp edx, dword [esp + 4]
jne 0x4027a8
cmp eax, dword [esp]
pop edx
pop eax
jbe 0x4027bb
jmp 0x4027ac
pop edx
pop eax
jle 0x4027bb
push 0x7530
call fcn.0040229c
jmp 0x4029f0
lea eax, [ebp - 0x38]
call fcn.00401754
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
cmp word [eax], 0x5a4d
jne 0x4029f0
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x3c]
add eax, dword [ebp - 0x10]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
cmp dword [eax], 0x4550
jne 0x4029f0
push 0x40
push 0x3000
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x50]
add eax, eax
push eax
push 0
call fcn.004022a4
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x4029f0
lea edx, [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x50]
add eax, dword [ebp - 0x34]
mov ecx, 4
call fcn.004022b4
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x50]
add eax, dword [ebp - 0x34]
add eax, 4
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
call fcn.004022b4
mov eax, dword [ebp - 0xc]
call fcn.004019b8
inc eax
add eax, eax
push eax
mov eax, dword [ebp - 0xc]
call fcn.004019a8
mov edx, eax
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x50]
add eax, dword [ebp - 0x34]
add eax, 4
add eax, dword [ebp - 0x14]
pop ecx
call fcn.004022b4
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 0x54]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x34]
call fcn.004022b4
mov eax, dword [ebp - 0x1c]
movzx ebx, word [eax + 6]
dec ebx
test ebx, ebx
jl 0x4028cf
inc ebx
xor esi, esi
mov edx, dword [ebp - 0x18]
mov edx, dword [edx + 0x3c]
mov eax, dword [ebp - 0x10]
add edx, eax
add edx, 0xf8
mov ecx, esi
shl ecx, 3
lea ecx, [ecx + ecx*4]
add edx, ecx
mov dword [ebp - 0x20], edx
mov edx, dword [ebp - 0x20]
mov ecx, dword [edx + 0x10]
mov edx, dword [ebp - 0x20]
mov edx, dword [edx + 0x14]
add edx, eax
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xc]
add eax, dword [ebp - 0x34]
call fcn.004022b4
inc esi
dec ebx
jne 0x402891
mov edx, dword [ebp - 0x1c]
mov edx, dword [edx + 0x34]
mov eax, dword [ebp - 0x34]
cmp edx, eax
je 0x40290b
sub eax, edx
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x34]
push eax
call fcn.00402688
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x34]
mov dword [eax + 0x34], edx
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x3c]
add eax, dword [ebp - 0x34]
mov ecx, 0xf8
mov edx, dword [ebp - 0x1c]
call fcn.004022b4
mov eax, dword [ebp - 0x34]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x1c]
add eax, 0x80
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
cmp dword [eax + 4], 0
jbe 0x4029d0
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x80]
add eax, dword [ebp - 4]
mov dword [ebp - 0x28], eax
jmp 0x4029c2
add edi, dword [ebp - 4]
push edi
call fcn.0040227c
mov ebx, eax
test ebx, ebx
je 0x4029c2
mov eax, dword [ebp - 0x28]
cmp dword [eax], 0
je 0x402961
mov eax, dword [ebp - 0x28]
mov eax, dword [eax]
add eax, dword [ebp - 4]
mov dword [ebp - 0x2c], eax
jmp 0x40296d
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x10]
add eax, dword [ebp - 4]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x10]
add eax, dword [ebp - 4]
mov dword [ebp - 0x30], eax
jmp 0x4029b6
mov eax, dword [ebp - 0x2c]
mov esi, dword [eax]
test esi, 0x80000000
je 0x40299c
and esi, 0xffff
push esi
push ebx
call fcn.00402274
mov edx, dword [ebp - 0x30]
mov dword [edx], eax
jmp 0x4029ae
add esi, dword [ebp - 4]
add esi, 2
push esi
push ebx
call fcn.00402274
mov edx, dword [ebp - 0x30]
mov dword [edx], eax
add dword [ebp - 0x2c], 4
add dword [ebp - 0x30], 4
mov eax, dword [ebp - 0x2c]
cmp dword [eax], 0
jne 0x40297b
add dword [ebp - 0x28], 0x14
mov eax, dword [ebp - 0x28]
mov edi, dword [eax + 0xc]
test edi, edi
jne 0x40293d
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x28]
add eax, dword [ebp - 4]
mov dword [ebp - 8], eax
mov bl, 1
xor eax, eax
push eax
push 1
push dword [ebp - 4]
call dword [ebp - 8]
push 0xffffffffffffffff
call fcn.0040229c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x402a15
lea eax, [ebp - 0x38]
call fcn.004015c8
lea eax, [ebp - 0xc]
call fcn.00401830
ret