Function at 0x422a20
Capabilities:
Get file size
Parse pe header
Read file on windows

Disassembly:
sub esp, 0x78
push ebx
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
je 0x422a3e
mov eax, 0x1000000
pop esi
pop ebp
pop ebx
add esp, 0x78
ret
lea eax, [esp + 0x4c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x422a5a
mov eax, 0x200
pop esi
pop ebp
pop ebx
add esp, 0x78
ret
lea ecx, [esp + 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea edx, [esp + 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov esi, dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x30]
push ecx
call esi
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x40]
push eax
call esi
mov eax, dword [esp + 0x24]
sub eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x28]
sbb ecx, dword [esp + 0x20]
sub dword [esp + 0x60], eax
sbb dword [esp + 0x64], ecx
sub dword [esp + 0x58], eax
sbb dword [esp + 0x5c], ecx
sub dword [esp + 0x50], eax
sbb dword [esp + 0x54], ecx
mov ecx, dword [esp + 0x4c]
mov eax, ecx
xor ebp, ebp
and eax, 1
je 0x422ac8
mov ebp, 1
test cl, 2
je 0x422ad0
or ebp, 2
test cl, 4
je 0x422ad8
or ebp, 4
mov edx, ecx
and edx, 0x10
je 0x422ae2
or ebp, 0x10
test cl, 0x20
je 0x422aea
or ebp, 0x20
test edx, edx
je 0x422af6
or ebp, 0x40000000
jmp 0x422afc
or ebp, 0x80000000
or ebp, 0x1000000
test eax, eax
jne 0x422b0c
or ebp, 0x800000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp + 0x14], eax
cmp eax, 0x28
jbe 0x422bba
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push 0
push edi
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea ecx, [esp + 0x1c]
push ecx
push 2
lea edx, [esp + 0x1c]
push edx
push edi
call ebx
push 0
push 0
push 0x24
push edi
call esi
push 0
lea eax, [esp + 0x1c]
push eax
push 4
lea ecx, [esp + 0x28]
push ecx
push edi
call ebx
mov edx, 0x54ad
cmp word [esp + 0x10], dx
jne 0x422bba
mov eax, dword [esp + 0x1c]
lea ecx, [eax + 0x34]
cmp dword [esp + 0x14], ecx
jbe 0x422bba
push 0
push 0
push eax
push edi
call esi
push 0
lea edx, [esp + 0x1c]
push edx
push 4
lea eax, [esp + 0x30]
push eax
push edi
call ebx
mov eax, dword [esp + 0x24]
cmp eax, 0x5a4d
je 0x422bb4
cmp eax, 0x454e
je 0x422bb4
cmp eax, 0x454c
je 0x422bb4
cmp eax, 0x4550
jne 0x422bba
or ebp, 0x400000
mov eax, dword [esp + 0x88]
test eax, eax
je 0x422bc7
mov dword [eax], ebp
mov eax, dword [esp + 0x8c]
test eax, eax
je 0x422bd8
mov ecx, dword [esp + 0x14]
mov dword [eax], ecx
mov esi, dword [esp + 0x90]
test esi, esi
je 0x422c1b
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x58]
push edx
push eax
call fcn.00422970
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0x68]
push ecx
push edx
mov dword [esi], eax
call fcn.00422970
mov ecx, dword [esp + 0x60]
mov dword [esi + 4], eax
mov eax, dword [esp + 0x64]
push eax
push ecx
call fcn.00422970
add esp, 0x18
mov dword [esi + 8], eax
mov esi, dword [esp + 0x94]
test esi, esi
je 0x422c4c
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x68]
push ecx
call dword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
movzx edx, word [esp + 0x10]
movzx eax, word [esp + 0x14]
shl edx, 0x10
or edx, eax
mov dword [esi], edx
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x78
ret