Function at 0x703cade0
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, 0x4c
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], 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 0x703caed0
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 [esp + 0x10], 0
mov dword [ebp - 0x1c], eax
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 0x703caf00
test byte [0x703cd038], 4
jne 0x703cb020
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 - 0x1c]
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 [0x703cd038], 4
jne 0x703cafb0
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 ecx, dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0xc], edi
mov dword [esp + 0x14], 0
mov dword [ebp - 0x30], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0
call ecx
sub esp, 0x18
lea edx, [eax + 1]
mov dword [ebp - 0x28], eax
mov dword [esp], edx
mov dword [ebp - 0x2c], edx
mov dword [esp + 4], 2
call dword [sym.imp.ucrtbase.dll_calloc]
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
mov dword [esp + 0xc], edi
mov esi, eax
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0x14], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0
call ecx
mov ecx, dword [ebp - 0x28]
xor eax, eax
mov edx, esi
sub esp, 0x18
mov word [esi + ecx*2], ax
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
call sym._string_register
mov dword [esp], esi
mov esi, dword [sym.imp.ucrtbase.dll_free]
mov edi, eax
call esi
jmp 0x703caeaf
test esi, esi
je 0x703cb0c8
mov eax, esi
shr eax, 0x10
je 0x703cb090
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 0x703cafee
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], 0x703cd038
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_2
jmp 0x703caedd
test esi, esi
je 0x703cb0d8
mov eax, esi
shr eax, 0x10
je 0x703cb0b0
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 0x703cb05e
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], 0x703cd038
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_2
jmp 0x703cae8f
movzx esi, si
mov dword [esp], str._04x
mov dword [esp + 4], esi
call sym._wine_dbg_sprintf_2
jmp 0x703cafee
movzx esi, si
mov dword [esp], str._04x
mov dword [esp + 4], esi
call sym._wine_dbg_sprintf_2
jmp 0x703cb05e
mov eax, str._null_
jmp 0x703cafee
mov eax, str._null_
jmp 0x703cb05e