Function at 0x4064a0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x415024]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
push esi
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x58], edx
call dword [0x41103c]
cmp eax, 1
je 0x4064ea
mov eax, 0x1000000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040738e
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x38]
push eax
push esi
call dword [0x411040]
test eax, eax
jne 0x40650f
mov eax, 0x200
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040738e
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x38]
mov edx, eax
xor edi, edi
and edx, 1
je 0x406525
mov dword [ebp - 0x3c], 1
mov edi, dword [ebp - 0x3c]
test al, 2
je 0x40652c
or edi, 2
test al, 4
je 0x406533
or edi, 4
mov ecx, eax
and ecx, 0x10
je 0x40653d
or edi, 0x10
test al, 0x20
je 0x406544
or edi, 0x20
test ecx, ecx
je 0x406550
or edi, 0x40000000
jmp 0x406556
or edi, 0x80000000
or edi, 0x1000000
mov dword [ebp - 0x3c], edi
test edx, edx
jne 0x40656c
or edi, 0x800000
mov dword [ebp - 0x3c], edi
push 0
push esi
call dword [0x41100c]
mov dword [ebp - 0x48], eax
cmp eax, 0x28
jbe 0x406616
mov edi, dword [0x411020]
push 0
push 0
push 0
push esi
call edi
mov ebx, dword [0x411014]
push 0
lea ecx, [ebp - 0x44]
push ecx
push 2
lea edx, [ebp - 0x40]
push edx
push esi
call ebx
push 0
push 0
push 0x24
push esi
call edi
push 0
lea eax, [ebp - 0x44]
push eax
push 4
lea ecx, [ebp - 0x50]
push ecx
push esi
call ebx
mov edx, 0x54ad
cmp word [ebp - 0x40], dx
jne 0x406610
mov eax, dword [ebp - 0x50]
lea ecx, [eax + 0x34]
cmp dword [ebp - 0x48], ecx
jbe 0x406610
push 0
push 0
push eax
push esi
call edi
push 0
lea edx, [ebp - 0x44]
push edx
push 4
lea eax, [ebp - 0x60]
push eax
push esi
call ebx
mov eax, dword [ebp - 0x60]
cmp eax, 0x5a4d
je 0x406609
cmp eax, 0x454e
je 0x406609
cmp eax, 0x454c
je 0x406609
cmp eax, 0x4550
jne 0x406610
or dword [ebp - 0x3c], 0x400000
mov ebx, dword [ebp - 0x4c]
mov edi, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x5c]
test eax, eax
je 0x40661f
mov dword [eax], edi
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x40662b
mov ecx, dword [ebp - 0x48]
mov dword [eax], ecx
test ebx, ebx
je 0x40666a
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x2c]
push edx
push eax
call fcn.004063f0
mov ecx, dword [ebp - 0x20]
mov dword [ebx + 4], edx
mov edx, dword [ebp - 0x24]
push ecx
push edx
mov dword [ebx], eax
call fcn.004063f0
mov ecx, dword [ebp - 0x34]
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x30]
push eax
push ecx
mov dword [ebx + 0xc], edx
call fcn.004063f0
add esp, 0x18
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], edx
mov esi, dword [ebp - 0x58]
test esi, esi
je 0x406692
lea edx, [ebp - 0x3c]
push edx
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x24]
push ecx
call dword [0x41101c]
movzx edx, word [ebp - 0x40]
movzx eax, word [ebp - 0x3c]
shl edx, 0x10
or edx, eax
mov dword [esi], edx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.0040738e
mov esp, ebp
pop ebp
ret