Function at 0x407964
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
push ebx
push esi
push edi
push 0x48
lea eax, [ebp - 0x5c]
push 0
push eax
call fcn.00422ac0
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
push 2
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x5c]
push esi
push eax
mov dword [ebp - 0x4c], esi
call fcn.00407cbf
add esp, 0x18
or ebx, 0xffffffff
test eax, eax
je 0x4079a9
mov eax, 0x5a4d
cmp word [esi], ax
je 0x4079a9
mov dword [ebp - 0x5c], ebx
push 4
add esi, 0x3c
lea eax, [ebp - 0x5c]
push esi
push eax
call fcn.00407cbf
add esp, 0xc
test eax, eax
je 0x4079d3
mov ecx, dword [esi]
test cl, 3
je 0x4079cb
mov dword [ebp - 0x5c], ebx
jmp 0x4079d3
mov eax, dword [ebp - 0x4c]
add eax, ecx
mov dword [ebp - 0x48], eax
push 4
push dword [ebp - 0x48]
lea eax, [ebp - 0x5c]
push eax
call fcn.00407cbf
add esp, 0xc
test eax, eax
mov eax, dword [ebp - 0x48]
je 0x4079f6
cmp dword [eax], 0x4550
je 0x4079f6
mov dword [ebp - 0x5c], ebx
add eax, 0x14
push 2
push eax
lea eax, [ebp - 0x5c]
push eax
call fcn.00407cbf
add esp, 0xc
test eax, eax
je 0x407c0e
mov ecx, dword [ebp - 0x48]
movzx eax, word [ecx + 6]
movzx edx, word [ecx + 0x14]
mov dword [ebp - 0x34], eax
test eax, eax
je 0x407c0b
test dl, 3
jne 0x407c0b
cmp edx, 0xe0
jb 0x407c0b
movzx esi, word [ecx + 0x18]
mov edi, 0x10b
mov eax, 0x20b
cmp si, di
je 0x407a57
cmp si, ax
jne 0x407c0b
cmp si, ax
jne 0x407a68
cmp edx, 0xf0
jb 0x407c0b
lea eax, [ecx + 0x18]
add eax, edx
mov dword [ebp - 0x40], eax
lea eax, [ecx + 0x60]
cmp si, di
jne 0x407a9a
push 0x98
push eax
lea eax, [ebp - 0x5c]
push eax
call fcn.00407cbf
mov ecx, dword [ebp - 0x48]
add esp, 0xc
test eax, eax
je 0x407ac8
cmp dword [ecx + 0x74], 0x10
lea eax, [ecx + 0x78]
jmp 0x407ac0
push 0xa8
push eax
lea eax, [ebp - 0x5c]
push eax
call fcn.00407cbf
mov ecx, dword [ebp - 0x48]
add esp, 0xc
test eax, eax
je 0x407ac8
cmp dword [ecx + 0x84], 0x10
lea eax, [ecx + 0x88]
mov dword [ebp - 0x44], eax
jae 0x407ac8
mov dword [ebp - 0x5c], ebx
cmp dword [ebp - 0x5c], 0
jne 0x407c0e
mov ebx, dword [ecx + 0x3c]
mov edx, 0x80000000
mov ecx, dword [ecx + 0x38]
xor esi, esi
mov dword [ebp - 0x3c], ebx
mov edi, edx
mov dword [ebp - 0x38], ecx
mov eax, edi
and eax, ebx
neg eax
sbb eax, eax
neg eax
add esi, eax
shr edi, 1
jne 0x407ae7
cmp esi, 1
jne 0x407b44
lea eax, [ebx - 4]
cmp eax, 0x3ffc
ja 0x407b44
xor esi, esi
mov eax, edx
and eax, ecx
neg eax
sbb eax, eax
neg eax
add esi, eax
shr edx, 1
jne 0x407b08
cmp esi, 1
jne 0x407b44
cmp ecx, 4
jb 0x407b44
cmp ecx, 0x4000
ja 0x407b44
imul eax, dword [ebp - 0x34], 0x28
push 0x28
add eax, dword [ebp - 0x40]
push eax
lea eax, [ebp - 0x5c]
push eax
call fcn.00407cbf
add esp, 0xc
test eax, eax
jne 0x407b4d
or dword [ebp - 0x5c], 0xffffffff
jmp 0x407c0e
mov eax, dword [ebp - 0x44]
and dword [ebp + 8], 0
mov edx, dword [ebp - 0x34]
mov esi, edx
mov dword [ebp - 0x30], esi
mov ecx, dword [eax + 0x14]
neg ecx
sbb ecx, ecx
xor edi, edi
and ecx, dword [eax + 0x10]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x2c], ecx
test edx, edx
je 0x407bf9
mov ebx, dword [ebp - 0x40]
add ebx, 0x14
mov dword [ebp - 0xc], ebx
mov ecx, dword [ebx - 4]
mov edx, dword [ebx]
mov ebx, dword [ebx - 8]
mov dword [ebp - 8], edx
add edx, ecx
mov dword [ebp - 4], ebx
add ebx, ecx
cmp edx, dword [ebp - 8]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x10]
mov dword [ebp + 0xc], edx
mov edx, dword [ebp - 0x34]
jb 0x407bb5
cmp dword [ebp + 0xc], 0xffffffff
ja 0x407bb5
cmp ebx, dword [ebp - 4]
jb 0x407bb5
cmp ebx, 0xffffffff
jbe 0x407bb9
or dword [ebp - 0x5c], 0xffffffff
cmp ebx, dword [ebp + 8]
jbe 0x407bc1
mov dword [ebp + 8], ebx
mov ebx, dword [ebp + 0xc]
cmp ebx, eax
jbe 0x407bca
mov eax, ebx
test ecx, ecx
je 0x407be1
cmp dword [ebp - 4], ecx
jne 0x407be1
mov ebx, dword [ebp - 8]
mov esi, edi
mov dword [ebp - 0x28], ebx
mov ebx, dword [ebp - 0x14]
mov dword [ebp - 0x24], ebx
mov ebx, dword [ebp - 0xc]
inc edi
add ebx, 0x28
mov dword [ebp - 0xc], ebx
cmp edi, edx
jb 0x407b82
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x30], esi
cmp esi, edx
jne 0x407c0e
mov ecx, dword [ebp + 8]
and dword [ebp - 0x24], 0
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], eax
jmp 0x407c0e
mov dword [ebp - 0x5c], ebx
mov edi, dword [ebp + 0x10]
lea esi, [ebp - 0x5c]
push 0x12
pop ecx
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret