Function at 0x418cb0
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 esi, eax
je 0x418ee7
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 0x418d40
xor ebx, ebx
xor edi, edi
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0xc]
mov dword [eax], ebx
mov eax, edi
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 edi, eax
je 0x418d94
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x418d7d
cmp dword [ebp - 0x1c], ebx
je 0x418d21
test byte [0x504120], 0x80
jne 0x418e40
mov dword [esp], edi
call sub.msvcrt.dll_free
jmp 0x418d1d
test byte [0x504120], 0x80
je 0x418d1d
mov ecx, dword [sym.imp.msvcrt.dll__errno]
mov dword [ebp - 0x30], ecx
call ecx
mov eax, dword [eax]
mov dword [esp], 0x504108
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [sym.imp.msvcrt.dll__iob]
lea eax, [ecx + 0x40]
sub esp, 4
mov dword [esp + 0xc], str.load_file
mov dword [esp + 8], str.system_core_adb_sysdeps_win32.c
mov dword [esp + 4], str._s::_s__:
mov dword [esp], eax
call fcn.00416fa0
mov ecx, dword [ebp - 0x30]
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.00416fa0
mov ecx, dword [sym.imp.msvcrt.dll__iob]
lea eax, [ecx + 0x40]
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x504108
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 0x418d21
mov ecx, dword [sym.imp.msvcrt.dll__errno]
mov dword [ebp - 0x30], ecx
call ecx
mov eax, dword [eax]
mov dword [esp], 0x504108
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [sym.imp.msvcrt.dll__iob]
lea eax, [ecx + 0x40]
sub esp, 4
mov dword [esp + 0xc], str.load_file
mov dword [esp + 8], str.system_core_adb_sysdeps_win32.c
mov dword [esp + 4], str._s::_s__:
mov dword [esp], eax
call fcn.00416fa0
mov ecx, dword [ebp - 0x30]
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.00416fa0
mov ecx, dword [sym.imp.msvcrt.dll__iob]
lea eax, [ecx + 0x40]
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x504108
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 0x418d8a
xor eax, eax
jmp 0x418d34