Function at 0x414f20
Capabilities:
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x188
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
push 0x40
lea eax, [ebp - 0x7c]
mov byte [ebp - 0x175], dl
mov edi, ecx
push 0
push eax
mov dword [ebp - 0x184], edi
call fcn.0042a4e0
xor ebx, ebx
mov dword [ebp - 0x10], 0xafbc7a37
xorps xmm0, xmm0
mov dword [ebp - 0x180], ebx
add esp, 0xc
movq qword [ebp - 0x18], xmm0
xor esi, esi
mov dword [ebp - 0x17c], ebx
mov dword [0x457638], ebx
mov word [ebp - 0xc], 0x1c27
movups xmmword [ebp - 0x38], xmm0
movups xmmword [ebp - 0x28], xmm0
test edi, edi
je 0x41518e
cmp edi, 0xffffffff
je 0x41518e
push esi
lea eax, [ebp - 0x17c]
push eax
push 0x40
lea eax, [ebp - 0x7c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x415107
cmp dword [ebp - 0x17c], 0x40
jb 0x415107
mov eax, 0x5a4d
cmp word [ebp - 0x7c], ax
jne 0x415107
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x415107
push esi
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [ebp - 0x40]
jne 0x415107
push esi
lea eax, [ebp - 0x17c]
push eax
push 0x40
lea eax, [ebp - 0x174]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x415039
cmp dword [ebp - 0x17c], 0x40
jb 0x415039
cmp dword [ebp - 0x174], 0x4550
jne 0x415039
cmp byte [ebp - 0x175], bl
je 0x415043
mov eax, dword [ebp - 0x15e]
test al, 2
je 0x415039
test eax, 0x2000
je 0x415043
push 0xbf
jmp 0x41510c
cmp word [ebp - 0x16e], bx
jne 0x415056
push 0x714
jmp 0x415190
movzx eax, word [ebp - 0x160]
push 1
push 0
sub eax, 0x28
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x415112
xor eax, eax
xor edi, edi
cmp ax, word [ebp - 0x16e]
jae 0x4150d8
push 0
lea eax, [ebp - 0x17c]
push eax
push 0x28
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x184]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x415112
cmp dword [ebp - 0x17c], 0x28
jb 0x415112
mov ecx, dword [ebp - 0x24]
cmp ecx, ebx
jbe 0x4150cc
mov esi, dword [ebp - 0x28]
mov eax, dword [ebp - 0x30]
test esi, esi
je 0x4150bf
cmp esi, eax
jb 0x4150c1
mov esi, eax
mov ebx, ecx
lea eax, [esi + ebx]
mov dword [ebp - 0x180], eax
movzx ecx, word [ebp - 0x16e]
inc edi
cmp edi, ecx
jb 0x415082
mov ecx, dword [ebp - 0x138]
xor edx, edx
mov eax, esi
div ecx
mov eax, dword [ebp - 0x180]
test edx, edx
je 0x415198
sub ecx, edx
add eax, ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00428cd6
mov esp, ebp
pop ebp
ret
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov al, byte [ebp + 8]
test al, 1
je 0x41513f
xor eax, eax
lea ecx, [ebp - 0x7c]
cmp dword [ecx], 0x4643534d
sete al
mov dword [0x457638], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00428cd6
mov esp, ebp
pop ebp
ret
test al, 2
je 0x415196
lea ecx, [ebp - 0x7c]
mov eax, dword [ecx]
lea edx, [ebp - 0x10]
cmp eax, dword [edx]
jne 0x415176
movzx eax, word [ecx + 4]
cmp ax, word [edx + 4]
jne 0x415176
mov eax, 1
mov dword [0x457638], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00428cd6
mov esp, ebp
pop ebp
ret
xor eax, eax
mov dword [0x457638], eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00428cd6
mov esp, ebp
pop ebp
ret
push 6
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00428cd6
mov esp, ebp
pop ebp
ret