Function at 0x416cd0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [ebp + 8]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
sub esp, 0x1c
cmp eax, 0xffffffff
mov edi, eax
je 0x416e73
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
sub esp, 8
test eax, eax
mov ebx, eax
jne 0x416d60
xor ebx, ebx
xor esi, esi
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0xc]
mov dword [eax], ebx
mov eax, esi
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [eax + 1]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
test eax, eax
mov esi, eax
je 0x416db4
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x416d9d
cmp dword [ebp - 0x1c], ebx
je 0x416d41
test byte [0x4ee060], 0x80
jne 0x416e80
mov dword [esp], esi
call fcn.0049e1d0
jmp 0x416d3d
test byte [0x4ee060], 0x80
je 0x416d3d
mov ecx, dword [sym.imp.msvcrt.dll__errno]
mov dword [ebp - 0x34], ecx
call ecx
mov eax, dword [eax]
mov dword [esp], 0x4ee068
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0x30], eax
call sub.msvcrt.dll__getpid
mov ecx, dword [ebp - 0x30]
mov dword [esp + 8], str.load_file
mov dword [esp + 4], 0x4b2138
mov dword [esp + 0x10], ecx
mov ecx, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 0xc], eax
lea eax, [ecx + 0x40]
mov dword [esp], eax
call fcn.0049e490
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x30], ecx
call ecx
mov edx, dword [ebp - 0x2c]
mov dword [eax], edx
mov ecx, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], ebx
xor ebx, ebx
mov dword [esp + 4], str.load_file:_could_not_allocate__ld_bytes_n
lea eax, [ecx + 0x40]
mov dword [esp], eax
call fcn.0049e490
mov ecx, dword [sym.imp.msvcrt.dll__iob]
lea eax, [ecx + 0x40]
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0x30]
sub esp, 4
call ecx
mov edx, dword [ebp - 0x2c]
mov dword [eax], edx
jmp 0x416d41
xor eax, eax
jmp 0x416d54
mov ecx, dword [sym.imp.msvcrt.dll__errno]
mov dword [ebp - 0x34], ecx
call ecx
mov eax, dword [eax]
mov dword [esp], 0x4ee068
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0x30], eax
call sub.msvcrt.dll__getpid
mov ecx, dword [ebp - 0x30]
mov dword [esp + 8], str.load_file
mov dword [esp + 4], 0x4b2138
mov dword [esp + 0x10], ecx
mov ecx, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 0xc], eax
lea eax, [ecx + 0x40]
mov dword [esp], eax
call fcn.0049e490
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x30], ecx
call ecx
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp + 8]
mov dword [eax], edx
mov dword [esp + 0xc], ecx
mov ecx, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], ebx
mov dword [esp + 4], str.load_file:_could_not_read__ld_bytes_from__s_n
lea eax, [ecx + 0x40]
mov dword [esp], eax
call fcn.0049e490
mov ecx, dword [sym.imp.msvcrt.dll__iob]
lea eax, [ecx + 0x40]
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0x30]
sub esp, 4
call ecx
mov edx, dword [ebp - 0x2c]
mov dword [eax], edx
jmp 0x416daa