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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffec0
push ebx
push esi
push edi
mov ebx, edx
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
call fcn.0040529c
xor eax, eax
push ebp
push 0x556e62
push dword fs:[eax]
mov dword fs:[eax], esp
push ebp
push 0x556e2b
push dword fs:[0]
mov dword fs:[0], esp
mov byte [ebp - 5], 3
mov byte [ebx], 0
mov dword [ebp - 0xc], 0xffffffff
call fcn.00513268
mov dword [ebp - 0x18], eax
push 0
push 0
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp - 4]
call fcn.00404ee4
push eax
call sub.kernel32.dll_CreateFileW
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x556e21
push 0
lea eax, [ebp - 0x10]
push eax
push 0x40
lea eax, [ebp - 0x58]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_ReadFile_1
cmp word [ebp - 0x58], 0x5a4d
jne 0x556e18
push 0
push 0
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_SetFilePointer_1
push 0
lea eax, [ebp - 0x10]
push eax
push 0xe8
lea eax, [ebp - 0x140]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_ReadFile_1
cmp dword [ebp - 0x10], 0xe8
jne 0x556e18
cmp dword [ebp - 0x140], 0x4550
jne 0x556e18
mov ax, word [ebp - 0x128]
sub ax, 0x200
je 0x556ce2
sub ax, 0xb
jne 0x556ce8
mov byte [ebp - 5], 1
jmp 0x556cec
mov byte [ebp - 5], 2
jmp 0x556cec
mov byte [ebp - 5], 0
cmp dword [ebp - 0x118], 0
je 0x556d1d
cmp dword [ebp - 0x114], 0
je 0x556d1d
mov edx, dword [ebp - 0x114]
mov ecx, edx
add ecx, dword [ebp - 0x124]
mov eax, dword [ebp - 0x118]
cmp ecx, eax
jb 0x556d1a
cmp edx, eax
jbe 0x556d1d
mov byte [ebx], 1
cmp byte [ebx], 0
jne 0x556e18
cmp byte [ebp - 5], 1
jne 0x556d47
push 0
push 0
mov eax, dword [ebp - 0x1c]
add eax, 0xf8
add eax, 0x10
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_SetFilePointer_1
jmp 0x556d86
cmp byte [ebp - 5], 0
jne 0x556d68
push 0
push 0
mov eax, dword [ebp - 0x1c]
add eax, 0xe8
add eax, 0x10
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_SetFilePointer_1
jmp 0x556d86
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0x18]
call fcn.00513280
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x556e4c
movzx eax, word [ebp - 0x13a]
shl eax, 3
lea eax, [eax + eax*4]
call fcn.00402790
mov esi, eax
push 0
lea eax, [ebp - 0x10]
push eax
movzx eax, word [ebp - 0x13a]
shl eax, 3
lea eax, [eax + eax*4]
push eax
push esi
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_ReadFile_1
mov ecx, esi
movzx esi, word [ebp - 0x13a]
dec esi
test esi, esi
jl 0x556e18
inc esi
test byte [ecx + 0x27], 0x20
je 0x556e12
cmp dword [ecx + 8], 0
je 0x556e12
mov edi, dword [ecx + 8]
test edi, 0xfff
je 0x556dea
and edi, 0xfffff000
add edi, 0x1000
mov eax, edi
cdq
push edx
push eax
mov eax, dword [ecx + 0x10]
xor edx, edx
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
cmp edx, 0
jne 0x556e0b
cmp eax, 0x1000
jbe 0x556e12
jmp 0x556e0d
jle 0x556e12
mov byte [ebx], 1
jmp 0x556e18
add ecx, 0x28
dec esi
jne 0x556dc7
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x556e44
mov eax, dword [ebp - 0x18]
call fcn.00513280
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x556e69
lea eax, [ebp - 4]
call fcn.00404d54
ret