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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, edx
push ebx
sub esp, 0x34
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], ecx
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], edx
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
cmp eax, 0xffffffff
je 0x1000b830
mov ebx, eax
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileSize]
sub esp, 8
mov edi, eax
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x10], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
test eax, eax
jne 0x1000b860
test byte [0x1000d04c], 4
jne 0x1000b980
mov eax, dword fs:[0x18]
mov edi, dword [eax + 0x34]
mov esi, dword [sym.imp.ucrtbase.dll_free]
movzx eax, di
mov edx, edi
or eax, 0x80070000
test edi, edi
cmovg edx, eax
mov edi, edx
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call esi
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, edi
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [0x1000d04c], 4
jne 0x1000b910
mov eax, dword fs:[0x18]
mov edi, dword [eax + 0x34]
movzx eax, di
or eax, 0x80070000
test edi, edi
cmovg edi, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
mov eax, edi
pop edi
pop ebp
ret
mov dword [esp + 0xc], edi
mov ecx, dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp], 0
mov dword [ebp - 0x1c], ecx
call ecx
sub esp, 0x18
lea edx, [eax + 1]
mov dword [ebp - 0x24], eax
mov dword [esp], edx
mov dword [esp + 4], 2
mov dword [ebp - 0x20], edx
call dword [sym.imp.ucrtbase.dll_calloc]
mov edx, dword [ebp - 0x20]
mov dword [esp + 0xc], edi
mov esi, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp], 0
mov ecx, dword [ebp - 0x1c]
call ecx
mov ecx, dword [ebp - 0x24]
xor eax, eax
mov edx, esi
sub esp, 0x18
mov word [esi + ecx*2], ax
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
call sym._string_register
mov dword [esp], esi
mov esi, dword [sym.imp.ucrtbase.dll_free]
mov edi, eax
call esi
jmp 0x1000b80f
test esi, esi
je 0x1000ba20
mov eax, esi
shr eax, 0x10
je 0x1000b9f0
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x1000b94e
mov edx, 0xffffffff
mov eax, esi
call sym._wine_dbgstr_wn.part.0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Could_not_open_file__s_n
mov dword [esp + 8], str.file_register
mov dword [esp + 4], 0x1000d04c
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_3
jmp 0x1000b83d
test esi, esi
je 0x1000ba30
mov eax, esi
shr eax, 0x10
je 0x1000ba08
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x1000b9ba
mov edx, 0xffffffff
mov eax, esi
call sym._wine_dbgstr_wn.part.0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Failed_to_read_file__s_n
mov dword [esp + 8], str.file_register
mov dword [esp + 4], 0x1000d04c
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_3
jmp 0x1000b7ef
mov dword [esp + 4], esi
mov dword [esp], str._04x
call sym._wine_dbg_sprintf_3
jmp 0x1000b94e
mov dword [esp + 4], esi
mov dword [esp], str._04x
call sym._wine_dbg_sprintf_3
jmp 0x1000b9ba
mov eax, str._null_
jmp 0x1000b94e
mov eax, str._null_
jmp 0x1000b9ba