Function at 0x40ff20
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 + 8], 0xffffffff
mov dword [esp + 4], eax
lea eax, [ebp - 0x1c]
mov dword [esp], eax
call fcn.0040fe20
mov eax, dword [ebp - 0x1c]
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_CreateFileW]
mov esi, eax
mov eax, dword [ebp - 0x1c]
sub esp, 0x1c
lea ebx, [eax - 0xc]
cmp ebx, 0x516f20
jne 0x410191
cmp esi, 0xffffffff
je 0x4100e0
mov dword [esp + 4], 0
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
sub esp, 8
test eax, eax
mov edi, eax
jne 0x40ffd8
xor edi, edi
xor ebx, ebx
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
mov eax, ebx
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 ebx, eax
je 0x410030
lea eax, [ebp - 0x24]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x410015
cmp dword [ebp - 0x24], edi
je 0x40ffbd
test byte [0x561ee0], 0x80
jne 0x4100e7
mov dword [esp], ebx
call fcn.004ae080
jmp 0x40ffb9
test byte [0x561ee0], 0x80
je 0x40ffb9
mov edx, dword [sym.imp.msvcrt.dll__errno]
mov dword [ebp - 0x30], edx
call edx
mov eax, dword [eax]
mov dword [esp + 8], edi
lea edi, [ebp - 0x20]
mov dword [esp + 4], str.load_file:_could_not_allocate__ld_bytes
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x1c]
mov dword [esp], eax
call fcn.0042a1c0
mov ecx, edi
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], 0xa3
mov dword [esp], str.system_core_adb_sysdeps_win32.cpp
call fcn.0042a560
mov ecx, edi
sub esp, 0x14
call fcn.0042a6d0
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx - 0xc]
mov dword [esp + 4], ecx
mov dword [esp], eax
mov dword [esp + 8], edx
call fcn.00505c10
mov ecx, edi
call fcn.0042a790
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x30]
lea ecx, [eax - 0xc]
cmp ecx, 0x516f30
mov dword [ebp - 0x34], ecx
jne 0x4101ca
call edx
mov ecx, dword [ebp - 0x2c]
xor edi, edi
mov dword [eax], ecx
jmp 0x40ffbd
xor eax, eax
jmp 0x40ffd0
mov edx, dword [sym.imp.msvcrt.dll__errno]
mov dword [ebp - 0x30], edx
call edx
mov eax, dword [eax]
mov dword [esp + 8], edi
lea edi, [ebp - 0x20]
mov dword [esp + 4], str.load_file:_could_not_read__ld_bytes_from__s
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x1c]
mov dword [esp], eax
call fcn.0042a1c0
mov ecx, edi
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], 0xab
mov dword [esp], str.system_core_adb_sysdeps_win32.cpp
call fcn.0042a560
mov ecx, edi
sub esp, 0x14
call fcn.0042a6d0
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx - 0xc]
mov dword [esp + 4], ecx
mov dword [esp], eax
mov dword [esp + 8], edx
call fcn.00505c10
mov ecx, edi
call fcn.0042a790
mov eax, dword [ebp - 0x1c]
lea edx, [eax - 0xc]
cmp edx, 0x516f30
mov dword [ebp - 0x34], edx
mov edx, dword [ebp - 0x30]
jne 0x41020e
call edx
mov ecx, dword [ebp - 0x2c]
mov dword [eax], ecx
jmp 0x410022
cmp dword [0x5112ac], 0
jne 0x4101c0
mov ecx, dword [eax - 4]
lea edx, [ecx - 1]
mov dword [eax - 4], edx
mov eax, ecx
test eax, eax
jg 0x40ff96
lea eax, [ebp - 0x20]
mov ecx, ebx
mov dword [esp], eax
call fcn.004d2030
push ecx
jmp 0x40ff96
sub eax, 4
call fcn.0050df71
jmp 0x4101a5
cmp dword [0x5112ac], 0
lea ecx, [eax - 4]
jne 0x41024a
mov dword [ebp - 0x38], edx
mov edx, dword [eax - 4]
mov dword [ebp - 0x30], eax
lea eax, [edx - 1]
mov ecx, eax
mov eax, dword [ebp - 0x30]
mov dword [eax - 4], ecx
mov eax, edx
mov edx, dword [ebp - 0x38]
test eax, eax
jg 0x4100d0
mov ecx, dword [ebp - 0x34]
mov dword [esp], edi
mov dword [ebp - 0x30], edx
call fcn.004dba20
push edx
mov edx, dword [ebp - 0x30]
jmp 0x4100d0
cmp dword [0x5112ac], 0
lea ecx, [eax - 4]
jne 0x410256
mov ecx, eax
mov eax, dword [eax - 4]
mov dword [ebp - 0x30], eax
sub eax, 1
mov dword [ecx - 4], eax
mov eax, dword [ebp - 0x30]
test eax, eax
jg 0x410185
mov ecx, dword [ebp - 0x34]
mov dword [esp], edi
mov dword [ebp - 0x30], edx
call fcn.004dba20
mov edx, dword [ebp - 0x30]
push eax
jmp 0x410185
mov eax, ecx
call fcn.0050df71
mov edx, dword [ebp - 0x30]
jmp 0x4101ef
mov eax, ecx
call fcn.0050df71
mov edx, dword [ebp - 0x30]
jmp 0x41022b