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

Disassembly:
sub esp, 0x60
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x3c]
mov dword [esp + 0x20], edx
mov ebp, ecx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x4a0a6a
mov eax, 0x200
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
mov ebx, dword [esp + 0x3c]
mov edi, 0x41000000
mov esi, ebx
mov eax, ebx
and esi, 1
mov ecx, esi
or ecx, 2
and al, 2
mov eax, ebx
cmove ecx, esi
mov edx, ecx
or edx, 4
and al, 4
cmove edx, ecx
mov ecx, ebx
and ecx, 0x10
mov eax, edx
or eax, 0x10
mov dword [esp + 0x10], ecx
test ecx, ecx
cmove eax, edx
mov edx, 0x81000000
mov ecx, eax
or ecx, 0x20
and bl, 0x20
cmove ecx, eax
mov eax, dword [esp + 0x10]
test eax, eax
cmove edi, edx
or edi, ecx
test esi, esi
jne 0x4a0ad3
test eax, eax
mov edi, 0x41800000
mov edx, 0x81800000
cmove edi, edx
or edi, ecx
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0x28
jbe 0x4a0b83
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push 0
push ebp
call ebx
push 0
lea eax, [esp + 0x18]
push eax
push 2
lea eax, [esp + 0x1c]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
push 0
push 0x24
push ebp
call ebx
push 0
lea eax, [esp + 0x18]
push eax
push 4
lea eax, [esp + 0x24]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, 0x54ad
cmp word [esp + 0x10], ax
jne 0x4a0b83
mov ecx, dword [esp + 0x18]
lea eax, [ecx + 0x34]
cmp esi, eax
jbe 0x4a0b83
push 0
push 0
push ecx
push ebp
call ebx
push 0
lea eax, [esp + 0x18]
push eax
push 4
lea eax, [esp + 0x28]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x1c]
cmp eax, 0x5a4d
je 0x4a0b7d
cmp eax, 0x454e
je 0x4a0b7d
cmp eax, 0x454c
je 0x4a0b7d
cmp eax, 0x4550
jne 0x4a0b83
or edi, 0x400000
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4a0b8d
mov dword [eax], edi
mov eax, dword [esp + 0x74]
test eax, eax
je 0x4a0b97
mov dword [eax], esi
mov esi, dword [esp + 0x78]
mov edi, dword [esp + 0x54]
mov ebx, dword [esp + 0x50]
test esi, esi
je 0x4a0c17
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x4c]
sub ecx, 0xd53e8000
push 0
push 0x989680
sbb eax, 0x19db1de
push eax
push ecx
call fcn.004bed40
mov dword [esi], eax
mov ecx, ebx
sub ecx, 0xd53e8000
mov dword [esi + 4], edx
push 0
mov eax, edi
push 0x989680
sbb eax, 0x19db1de
push eax
push ecx
call fcn.004bed40
mov ecx, dword [esp + 0x40]
mov dword [esi + 8], eax
sub ecx, 0xd53e8000
mov eax, dword [esp + 0x44]
push 0
push 0x989680
sbb eax, 0x19db1de
mov dword [esi + 0xc], edx
push eax
push ecx
call fcn.004bed40
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], edx
mov esi, dword [esp + 0x7c]
test esi, esi
je 0x4a0c81
lea eax, [esp + 0x2c]
mov dword [esp + 0x20], ebx
push eax
lea eax, [esp + 0x24]
mov dword [esp + 0x28], edi
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x2e]
and eax, 0xf
lea ecx, [ecx - 0x3c]
shl ecx, 4
or ecx, eax
mov eax, dword [esp + 0x32]
shl ecx, 5
and eax, 0x1f
movzx edx, cx
mov ecx, dword [esp + 0x36]
or edx, eax
mov eax, dword [esp + 0x34]
and ecx, 0x3f
shl eax, 6
or ecx, eax
shl edx, 0x10
shl ecx, 5
movzx eax, cx
or edx, eax
mov eax, dword [esp + 0x38]
add eax, eax
and eax, 0x1f
or edx, eax
mov dword [esi], edx
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x60
ret