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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x28], 0x51af2c
mov dword [esp], eax
call fcn.0042d9b0
test al, al
je 0x422fd0
mov eax, dword [ebp - 0x28]
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]
sub esp, 0x1c
cmp eax, 0xffffffff
mov ebx, eax
je 0x422fd0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
sub esp, 8
test eax, eax
mov edi, eax
jne 0x422fd4
xor edi, edi
xor esi, esi
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
sub esp, 4
mov eax, dword [ebp - 0x28]
lea ebx, [eax - 0xc]
cmp ebx, 0x51af20
jne 0x4230ea
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
xor esi, esi
jmp 0x422faf
lea eax, [eax + 1]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
test eax, eax
mov esi, eax
je 0x423030
lea eax, [ebp - 0x24]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x423011
cmp dword [ebp - 0x24], edi
je 0x422f9e
test byte [0x551030], 0x80
jne 0x423123
mov dword [esp], esi
call fcn.004b0fa0
jmp 0x422f9a
test byte [0x551030], 0x80
je 0x422f9a
call fcn.0042bec0
cmp eax, 2
jg 0x422f9a
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.0042cf00
mov ecx, edi
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], 0x91
mov dword [esp], str.system_core_adb_sysdeps_win32.cpp
call fcn.0042bf90
mov ecx, edi
sub esp, 0x14
call fcn.0042c110
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.0050a5a0
mov ecx, edi
call fcn.0042c1a0
mov ecx, dword [ebp - 0x1c]
mov dword [esp], edi
xor edi, edi
sub ecx, 0xc
call fcn.004df670
mov edx, dword [ebp - 0x30]
push ecx
call edx
mov edx, dword [ebp - 0x2c]
mov dword [eax], edx
jmp 0x422f9e
cmp dword [0x5152a8], 0
jne 0x423119
mov edx, dword [eax - 4]
lea ecx, [edx - 1]
mov dword [eax - 4], ecx
mov eax, edx
test eax, eax
jg 0x422fc1
lea eax, [ebp - 0x1c]
mov ecx, ebx
mov dword [esp], eax
call fcn.004d5c60
push eax
jmp 0x422fc1
sub eax, 4
call fcn.00513000
jmp 0x4230fe
call fcn.0042bec0
cmp eax, 2
nop
lea esi, [esi]
jg 0x42301e
mov edx, dword [sym.imp.msvcrt.dll__errno]
mov dword [ebp - 0x30], edx
call edx
mov ecx, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp + 0xc], ecx
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
lea eax, [ebp - 0x1c]
mov dword [esp], eax
call fcn.0042cf00
mov ecx, edi
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], 0x99
mov dword [esp], str.system_core_adb_sysdeps_win32.cpp
call fcn.0042bf90
mov ecx, edi
sub esp, 0x14
call fcn.0042c110
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.0050a5a0
mov ecx, edi
call fcn.0042c1a0
mov ecx, dword [ebp - 0x1c]
mov dword [esp], edi
sub ecx, 0xc
call fcn.004df670
push edx
mov edx, dword [ebp - 0x30]
call edx
mov edx, dword [ebp - 0x2c]
mov dword [eax], edx
jmp 0x42301e