Function at 0x417059
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x160
mov eax, dword [0x41f040]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x58], eax
mov eax, dword [ebp + 0xc]
push esi
mov esi, ecx
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp + 0x10]
lea ecx, [ebp - 0x15c]
push edi
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x60], eax
call fcn.0040380e
mov edx, dword [ebp - 0x78]
lea eax, [ebp - 0x3c]
mov ecx, dword [ebp - 0x15c]
push eax
push esi
call fcn.004064a5
call eax
test eax, eax
jne 0x4170b7
mov eax, 0x200
jmp 0x4172bb
mov ebx, dword [ebp - 0x3c]
mov edi, 0x41000000
mov esi, ebx
and esi, 1
mov ecx, esi
or ecx, 2
test bl, 2
cmove ecx, esi
mov edx, ecx
or edx, 4
test bl, 4
cmove edx, ecx
mov ecx, ebx
and ecx, 0x10
mov eax, edx
or eax, 0x10
mov dword [ebp - 0x40], ecx
test ecx, ecx
cmove eax, edx
mov edx, 0x81000000
mov ecx, eax
or ecx, 0x20
test bl, 0x20
cmove ecx, eax
mov eax, dword [ebp - 0x40]
test eax, eax
cmove edi, edx
or edi, ecx
test esi, esi
jne 0x41711b
test eax, eax
mov edi, 0x41800000
mov edx, 0x81800000
cmove edi, edx
or edi, ecx
mov ebx, dword [ebp - 0x44]
mov esi, dword [ebp - 0x15c]
mov ecx, esi
mov edx, dword [ebp - 0x12c]
push 0
push ebx
call fcn.004064a5
call eax
mov dword [ebp - 0x40], eax
cmp eax, 0x28
jbe 0x417214
mov edx, dword [ebp - 0xb8]
xor eax, eax
push eax
push eax
push eax
push ebx
mov ecx, esi
call fcn.004064a5
call eax
mov edx, dword [ebp - 0x128]
lea eax, [ebp - 0x48]
push 0
push eax
push 2
lea eax, [ebp - 0x44]
mov ecx, esi
push eax
push ebx
call fcn.004064a5
call eax
mov edx, dword [ebp - 0xb8]
mov ecx, esi
push 0
push 0
push 0x24
push ebx
call fcn.004064a5
call eax
mov edx, dword [ebp - 0x128]
lea eax, [ebp - 0x48]
push 0
push eax
push 4
lea eax, [ebp - 0x4c]
mov ecx, esi
push eax
push ebx
call fcn.004064a5
call eax
mov eax, 0x54ad
cmp word [ebp - 0x44], ax
jne 0x417211
mov ecx, dword [ebp - 0x4c]
lea eax, [ecx + 0x34]
cmp dword [ebp - 0x40], eax
jbe 0x417211
mov edx, dword [ebp - 0xb8]
push 0
push 0
push ecx
push ebx
mov ecx, esi
call fcn.004064a5
call eax
mov edx, dword [ebp - 0x128]
lea eax, [ebp - 0x48]
push 0
push eax
push 4
lea eax, [ebp - 0x50]
mov ecx, esi
push eax
push ebx
call fcn.004064a5
call eax
mov eax, dword [ebp - 0x50]
cmp eax, 0x5a4d
je 0x41720b
cmp eax, 0x454e
je 0x41720b
cmp eax, 0x454c
je 0x41720b
cmp eax, 0x4550
jne 0x417211
or edi, 0x400000
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x54]
test ecx, ecx
je 0x41721d
mov dword [ecx], edi
mov ecx, dword [ebp - 0x58]
test ecx, ecx
je 0x417226
mov dword [ecx], eax
mov ebx, dword [ebp - 0x5c]
test ebx, ebx
je 0x417290
mov ecx, dword [ebp - 0x30]
mov edi, 0x19db1de
mov eax, dword [ebp - 0x2c]
sub ecx, 0xd53e8000
push 0
mov esi, 0x989680
sbb eax, edi
push esi
push eax
push ecx
call fcn.004197c0
mov ecx, dword [ebp - 0x28]
mov dword [ebx], eax
sub ecx, 0xd53e8000
mov eax, dword [ebp - 0x24]
push 0
push esi
sbb eax, edi
mov dword [ebx + 4], edx
push eax
push ecx
call fcn.004197c0
mov ecx, dword [ebp - 0x38]
mov dword [ebx + 8], eax
sub ecx, 0xd53e8000
mov eax, dword [ebp - 0x34]
push 0
push esi
sbb eax, edi
mov dword [ebx + 0xc], edx
push eax
push ecx
call fcn.004197c0
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], edx
mov esi, dword [ebp - 0x60]
test esi, esi
je 0x4172b9
push dword [ebp - 0x24]
lea edx, [ebp - 0x40]
push dword [ebp - 0x28]
lea ecx, [ebp - 0x44]
call fcn.00416fd2
movzx eax, word [ebp - 0x40]
pop ecx
pop ecx
movzx ecx, word [ebp - 0x44]
shl ecx, 0x10
or ecx, eax
mov dword [esi], ecx
xor eax, eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00418755
leave
ret