Function at 0x470450
Capabilities:
Get file size
Parse pe header
Read file on windows
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x70
push edi
mov edi, dword [esp + 0x78]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
je 0x47046e
mov eax, 0x1000000
pop edi
add esp, 0x70
ret
lea eax, [esp + 0x40]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x470488
mov eax, 0x200
pop edi
add esp, 0x70
ret
push ebp
push esi
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea edx, [esp + 0x38]
push edx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov esi, dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x2c]
push ecx
call esi
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x3c]
push eax
call esi
mov eax, dword [esp + 0x20]
sub eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x24]
sbb ecx, dword [esp + 0x1c]
sub dword [esp + 0x5c], eax
sbb dword [esp + 0x60], ecx
sub dword [esp + 0x54], eax
sbb dword [esp + 0x58], ecx
sub dword [esp + 0x4c], eax
sbb dword [esp + 0x50], ecx
mov ecx, dword [esp + 0x48]
mov eax, ecx
xor ebp, ebp
and eax, 1
je 0x4704f8
mov ebp, 1
test cl, 2
je 0x470500
or ebp, 2
test cl, 4
je 0x470508
or ebp, 4
mov edx, ecx
and edx, 0x10
je 0x470512
or ebp, 0x10
test cl, 0x20
je 0x47051a
or ebp, 0x20
test edx, edx
je 0x470526
or ebp, 0x40000000
jmp 0x47052c
or ebp, 0x80000000
or ebp, 0x1000000
test eax, eax
jne 0x47053c
or ebp, 0x800000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp + 0x10], eax
cmp eax, 0x28
jbe 0x4705ec
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
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 0x4705eb
mov eax, dword [esp + 0x1c]
lea ecx, [eax + 0x34]
cmp dword [esp + 0x14], ecx
jbe 0x4705eb
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 0x4705e5
cmp eax, 0x454e
je 0x4705e5
cmp eax, 0x454c
je 0x4705e5
cmp eax, 0x4550
jne 0x4705eb
or ebp, 0x400000
pop ebx
mov eax, dword [esp + 0x84]
test eax, eax
je 0x4705f9
mov dword [eax], ebp
mov eax, dword [esp + 0x88]
test eax, eax
je 0x47060a
mov ecx, dword [esp + 0x10]
mov dword [eax], ecx
mov esi, dword [esp + 0x8c]
test esi, esi
je 0x47064d
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x54]
push edx
push eax
call fcn.004703a0
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x64]
push ecx
push edx
mov dword [esi], eax
call fcn.004703a0
mov ecx, dword [esp + 0x5c]
mov dword [esi + 4], eax
mov eax, dword [esp + 0x60]
push eax
push ecx
call fcn.004703a0
add esp, 0x18
mov dword [esi + 8], eax
mov esi, dword [esp + 0x90]
test esi, esi
je 0x47067e
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x64]
push ecx
call dword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
movzx edx, word [esp + 0xc]
movzx eax, word [esp + 0x10]
shl edx, 0x10
or edx, eax
mov dword [esi], edx
pop esi
pop ebp
xor eax, eax
pop edi
add esp, 0x70
ret