Function at 0x58c766
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
cmp dword [ebp + 0xc], 0x200
jb 0x58c785
mov eax, dword [ebp + 8]
xor ecx, ecx
mov cx, word [eax]
cmp ecx, 0x5a4d
je 0x58c78c
xor eax, eax
jmp 0x58c97a
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x3c]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0x1000
jae 0x58c7b6
mov ecx, dword [ebp - 0x14]
add ecx, 0x200
cmp ecx, dword [ebp + 0xc]
ja 0x58c7b6
mov edx, dword [ebp - 0x14]
and edx, 7
test edx, edx
je 0x58c7bd
xor eax, eax
jmp 0x58c97a
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x14]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp dword [ecx], 0x4550
je 0x58c7d8
xor eax, eax
jmp 0x58c97a
mov edx, dword [ebp - 4]
add edx, 4
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
xor ecx, ecx
mov cx, word [eax]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x20], edx
cmp dword [ebp - 0x20], 0x200
ja 0x58c82b
cmp dword [ebp - 0x20], 0x200
je 0x58c889
mov eax, dword [ebp - 0x20]
sub eax, 0x14c
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x78
ja case.0x58c824.3
mov edx, dword [ebp - 0x20]
xor ecx, ecx
mov cl, byte [edx + 0x58c98e]
jmp dword [ecx*4 + 0x58c97e]
cmp dword [ebp - 0x20], 0x8664
ja 0x58c851
cmp dword [ebp - 0x20], 0x8664
je case.0x58c824.0
cmp dword [ebp - 0x20], 0x5032
je 0x58c880
cmp dword [ebp - 0x20], 0x5064
je 0x58c880
jmp case.0x58c824.3
cmp dword [ebp - 0x20], 0xaa64
je 0x58c865
jmp case.0x58c824.3
mov dword [ebp - 0xc], 0x3030103
jmp 0x58c899
mov dword [ebp - 0xc], 0xa
jmp 0x58c899
mov dword [ebp - 0xc], 0x3030501
jmp 0x58c899
mov dword [ebp - 0xc], 0x3030701
jmp 0x58c899
mov dword [ebp - 0xc], 0xb
jmp 0x58c899
mov dword [ebp - 0xc], 0x3030401
jmp 0x58c899
xor eax, eax
jmp 0x58c97a
mov eax, dword [ebp - 4]
xor ecx, ecx
mov cx, word [eax + 2]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 4]
xor eax, eax
mov ax, word [edx + 0x10]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x400
jbe 0x58c8c1
xor eax, eax
jmp 0x58c97a
mov ecx, dword [ebp - 4]
add ecx, 0x14
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
xor eax, eax
mov ax, word [edx]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0x10b
je 0x58c8e9
cmp dword [ebp - 0x24], 0x20b
je 0x58c8e9
jmp 0x58c8eb
jmp 0x58c8f2
xor eax, eax
jmp 0x58c97a
mov ecx, dword [ebp - 4]
sub ecx, dword [ebp + 8]
add ecx, dword [ebp - 8]
cmp ecx, dword [ebp + 0xc]
ja 0x58c96d
mov edx, dword [ebp - 4]
add edx, dword [ebp - 8]
mov dword [ebp - 4], edx
cmp dword [ebp - 0x18], 0x40
ja 0x58c96d
cmp dword [ebp - 0x10], 0x8664
jne 0x58c96d
mov dword [ebp - 0x1c], 0
jmp 0x58c933
mov eax, dword [ebp - 0x1c]
add eax, 1
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 4]
add ecx, 0x28
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 0x1c]
cmp edx, dword [ebp - 0x18]
jae 0x58c96d
mov eax, dword [ebp - 4]
sub eax, dword [ebp + 8]
add eax, 0x28
cmp eax, dword [ebp + 0xc]
jbe 0x58c94b
jmp 0x58c96d
push 8
push str..a64xrm
mov ecx, dword [ebp - 4]
push ecx
call fcn.006fb120
add esp, 0xc
test eax, eax
jne 0x58c96b
mov dword [ebp - 0xc], 0xa
jmp 0x58c96d
jmp 0x58c921
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0xc]
mov dword [edx], eax
mov eax, 1
mov esp, ebp
pop ebp
ret