Function at 0x401586
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
test ecx, ecx
jne 0x401594
xor eax, eax
leave
ret
or dword [ebp - 0x28], 0xffffffff
push edi
xor edi, edi
mov dword [ebp - 0x2c], 0x4219e8
push ecx
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], edi
call fcn.00403b18
test al, al
je 0x40180b
cmp dword [ebp - 0x28], 0xffffffff
push ebx
push esi
mov dword [ebp - 4], edi
je 0x401801
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x401801
mov esi, dword [ebp - 0x1c]
cmp esi, 0x40
jb 0x401801
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x401801
mov edx, dword [ecx + 0x3c]
lea eax, [edx + 0xf8]
cmp esi, eax
jb 0x401801
cmp dword [edx + ecx], 0x4550
jne 0x401801
movzx eax, word [edx + ecx + 4]
mov ebx, 0x8664
mov dword [ebp - 8], 0x14c
mov dword [ebp - 0x10], ebx
cmp ax, word [ebp - 8]
je 0x401637
cmp ax, bx
je 0x401801
add edx, 0x98
add edx, ecx
mov dword [ebp - 0xc], edx
mov eax, dword [edx]
test eax, eax
je 0x401801
add eax, 0xc
cmp esi, eax
jb 0x401801
test edx, edx
je 0x401801
mov ebx, dword [edx]
add ebx, ecx
lea edx, [ebx + 8]
test edx, edx
je 0x401801
add esi, ecx
lea eax, [edx + 4]
cmp eax, esi
jae 0x401801
cmp byte [ebx + 8], 0x30
jne 0x401801
cmp byte [edx + 1], 0x82
jne 0x401801
movzx ecx, byte [edx + 2]
movzx eax, byte [edx + 3]
shl ecx, 8
add eax, 0x13
add eax, ecx
test eax, 0xffffff8
je 0x401801
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x14], ebx
mov eax, dword [eax + 4]
mov dword [ebp - 0x18], eax
add eax, ebx
cmp eax, esi
ja 0x401801
lea eax, [ebp - 4]
push eax
push edi
push ebx
lea ecx, [ebp - 0x2c]
call fcn.00403be5
test al, al
je 0x401801
mov eax, dword [ebp - 4]
test eax, eax
je 0x401801
cmp eax, 0x10000
jae 0x401801
push 0x41fcb9
push eax
call fcn.00418a48
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x401801
cmp dword [ebp - 0x28], 0xffffffff
je 0x4017fa
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x4017fa
mov ebx, dword [ebp - 0x1c]
cmp ebx, 0x40
jb 0x4017fa
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x4017fa
mov edx, dword [ecx + 0x3c]
lea eax, [edx + 0xf8]
cmp ebx, eax
jb 0x4017fa
cmp dword [edx + ecx], 0x4550
jne 0x4017fa
movzx eax, word [edx + ecx + 4]
cmp ax, word [ebp - 8]
je 0x401765
cmp ax, word [ebp - 0x10]
je 0x4017fa
add edx, 0x98
add edx, ecx
mov dword [ebp - 0x10], edx
mov eax, dword [edx]
test eax, eax
je 0x4017fa
add eax, 0xc
cmp ebx, eax
jb 0x4017fa
test edx, edx
je 0x4017fa
mov edx, dword [edx]
add edx, ecx
lea ebx, [edx + 8]
test ebx, ebx
je 0x4017fa
add ecx, dword [ebp - 0x1c]
lea eax, [ebx + 4]
mov dword [ebp - 0xc], ecx
cmp eax, ecx
jae 0x4017fa
cmp byte [edx + 8], 0x30
jne 0x4017fa
cmp byte [ebx + 1], 0x82
jne 0x4017fa
movzx ecx, byte [ebx + 2]
movzx eax, byte [ebx + 3]
shl ecx, 8
add eax, 0x13
add eax, ecx
test eax, 0xffffff8
je 0x4017fa
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], edx
mov eax, dword [eax + 4]
mov dword [ebp - 0x18], eax
add eax, edx
cmp eax, dword [ebp - 0xc]
ja 0x4017fa
lea eax, [ebp - 4]
push eax
push esi
push edx
lea ecx, [ebp - 0x2c]
call fcn.00403be5
test al, al
je 0x4017fa
mov al, byte [esi]
mov ecx, esi
jmp 0x4017f2
cmp al, 0x22
je 0x4017fa
inc ecx
mov al, byte [ecx]
test al, al
jne 0x4017eb
mov edi, esi
jmp 0x401801
push esi
call fcn.0041885e
pop ecx
lea ecx, [ebp - 0x2c]
call fcn.00403ba7
pop esi
pop ebx
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0x4219e8
call fcn.00403ba7
mov eax, edi
pop edi
leave
ret