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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push eax
mov eax, 0x1068
call fcn.00402878
sub esp, eax
mov edi, edx
lea edx, [ebp - 0x102c]
mov eax, dword [esp + eax]
mov dword [ebp - 0x1048], ecx
mov dword [ebp - 0x1024], 0
mov ebx, eax
call dbg.open_database
test eax, eax
je 0x401520
lea esp, [ebp - 0xc]
mov ebx, 1
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x102c]
mov dword [esp], eax
call sym._MsiCloseHandle_4
lea eax, [ebp - 0x1028]
sub esp, 4
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x10012
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [sym.imp.ole32.dll_StgOpenStorage]
sub esp, 0x18
mov esi, eax
test eax, eax
jne 0x4016a8
movzx ebx, word [edi]
mov eax, edi
test bx, bx
je 0x401770
nop
add eax, 2
cmp word [eax], 0
jne 0x401580
sub eax, edi
cmp eax, 0x3e
ja 0x4016f0
mov esi, eax
add eax, 4
mov dword [esp], eax
sar esi, 1
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x1040], eax
test eax, eax
je 0x4016f0
mov dword [ebp - 0x103c], edi
mov edx, dword [ebp - 0x1040]
mov dword [ebp - 0x104c], edi
lea esi, [esi]
mov eax, dword [ebp - 0x103c]
lea ecx, [eax + 2]
movzx eax, bx
test eax, eax
je 0x40178d
cmp eax, 0x7f
ja 0x401680
lea edi, [eax - 0x30]
cmp edi, 9
jbe 0x401760
lea edi, [eax - 0x41]
cmp edi, 0x19
jbe 0x4017f8
lea edi, [eax - 0x61]
cmp edi, 0x19
jbe 0x401810
cmp bx, 0x2e
je 0x401b08
mov edi, 0x483f
cmp eax, 0x5f
jne 0x401680
mov eax, dword [ebp - 0x103c]
movzx eax, word [eax + 2]
lea ebx, [eax - 1]
cmp ebx, 0x7e
ja 0x401758
lea ebx, [eax - 0x30]
cmp ebx, 9
jbe 0x4019d8
lea ebx, [eax - 0x41]
cmp ebx, 0x19
jbe 0x401a48
lea ebx, [eax - 0x61]
cmp ebx, 0x19
jbe 0x401aa8
cmp eax, 0x2e
je 0x401b80
mov ebx, 0xffffffc0
cmp eax, 0x5f
jne 0x401758
mov ecx, dword [ebp - 0x103c]
add ebx, edi
add ecx, 4
lea esi, [esi]
add edx, 2
mov word [edx - 2], bx
cmp esi, 0xffffffff
je 0x4019b8
mov dword [ebp - 0x103c], ecx
movzx ebx, word [ecx]
sub esi, 1
jmp 0x4015c8
test byte [0x403000], 4
je 0x401509
mov eax, ebx
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.failed_to_open_storage__s__0x_08lx__n
mov dword [esp + 8], global___func__.0
mov dword [esp + 4], global___dbch
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x401509
mov esi, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x1040], 0
mov ebx, 1
test byte [0x403000], 4
jne 0x401a0e
lea esi, [esi]
mov eax, dword [ebp - 0x1040]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x1024]
test eax, eax
je 0x401738
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov eax, dword [ebp - 0x1028]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov eax, ebx
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, edi
jmp 0x401680
lea edi, [eax + 0x47d0]
jmp 0x40161d
mov dword [esp], 4
call dword [sym.imp.ucrtbase.dll_malloc]
mov edx, eax
test eax, eax
je 0x4016f0
mov dword [ebp - 0x1040], eax
mov eax, dword [ebp - 0x1028]
xor ecx, ecx
mov word [edx], cx
lea ecx, [ebp - 0x1024]
mov edx, dword [eax]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x1011
mov esi, dword [ebp - 0x1040]
mov dword [esp], eax
mov dword [esp + 4], esi
call dword [edx + 0xc]
sub esp, 0x18
mov ebx, eax
test eax, eax
je 0x401818
test byte [0x403000], 4
jne 0x401a68
mov esi, dword [sym.imp.ucrtbase.dll_free]
mov ebx, 1
jmp 0x401718
sub eax, 0x37
test eax, eax
js 0x401680
lea edi, [eax + 0x4800]
jmp 0x40161d
sub eax, 0x3d
jmp 0x4017fb
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 eax, dword [ebp - 0x1048]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
mov edi, eax
cmp eax, 0xffffffff
je 0x401ab0
lea eax, [ebp - 0x1020]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_GetFileSize]
sub esp, 8
cmp eax, 0xffffffff
je 0x4019f0
mov edx, dword [ebp - 0x1020]
test edx, edx
jne 0x4019f0
mov ecx, eax
mov eax, dword [ebp - 0x1024]
xor ebx, ebx
mov dword [ebp - 0x1048], ecx
mov edx, dword [eax]
mov dword [ebp - 0x1044], ebx
mov dword [esp + 4], ecx
mov dword [esp + 8], ebx
mov dword [esp], eax
call dword [edx + 0x18]
sub esp, 0xc
test eax, eax
jne 0x4017e2
lea esi, [ebp - 0x1018]
mov dword [ebp - 0x104c], eax
mov ebx, dword [ebp - 0x1048]
mov dword [ebp - 0x103c], esi
mov esi, dword [ebp - 0x1044]
jmp 0x401929
mov eax, dword [ebp - 0x101c]
test eax, eax
je 0x40195d
mov edx, dword [ebp - 0x1024]
mov ecx, dword [edx]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x103c]
mov dword [esp], edx
mov dword [esp + 4], eax
call dword [ecx + 0x10]
sub esp, 0x10
test eax, eax
jne 0x40195d
mov eax, dword [ebp - 0x101c]
xor edx, edx
sub ebx, eax
sbb esi, edx
lea eax, [ebp - 0x101c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1000
mov eax, dword [ebp - 0x103c]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
test eax, eax
jne 0x4018e8
mov dword [ebp - 0x1048], ebx
mov ebx, dword [ebp - 0x104c]
mov dword [ebp - 0x1044], esi
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [ebp - 0x1048]
mov esi, dword [ebp - 0x1044]
sub esp, 4
or esi, eax
jne 0x401b4a
mov eax, dword [ebp - 0x1028]
mov edx, dword [eax]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x24]
mov esi, dword [sym.imp.ucrtbase.dll_free]
sub esp, 8
jmp 0x401718
mov eax, dword [ebp - 0x1040]
mov edi, dword [ebp - 0x104c]
mov esi, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], eax
call esi
jmp 0x4016f6
lea ebx, [eax + 0x3ffff90]
shl ebx, 6
jmp 0x40166e
test byte [0x403000], 4
jne 0x401b12
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
jmp 0x4017e2
mov eax, edi
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0xc], str.failed_to_encode_stream_name__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], global___func__.0
mov dword [esp + 4], global___dbch
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x401718
sub eax, 0x37
cmp eax, 0xffffffff
je 0x401758
add eax, 0x3ffffc0
shl eax, 6
mov ebx, eax
jmp 0x40166e
mov eax, dword [ebp - 0x1040]
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.failed_to_create_stream__s__0x_08lx__n
mov dword [esp + 8], global___func__.0
mov dword [esp + 4], global___dbch
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x4017e2
sub eax, 0x3d
jmp 0x401a4b
test byte [0x403000], 4
je 0x4017e2
mov eax, dword fs:[0x18]
mov ebx, dword [eax + 0x34]
mov eax, dword [ebp - 0x1048]
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.failed_to_open_file__s___lu__n
mov dword [esp + 8], global___func__.0
mov dword [esp + 4], global___dbch
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x4017e2
mov edi, 0x483e
jmp 0x40161d
mov eax, dword [ebp - 0x1048]
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0xc], str.file__s_too_big_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], global___func__.0
mov dword [esp + 4], global___dbch
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x4019fd
test byte [0x403000], 4
je 0x4017e2
mov dword [esp + 0xc], str.failed_to_write_stream_contents_n
mov dword [esp + 8], global___func__.0
mov dword [esp + 4], global___dbch
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x4017e2
mov ebx, 0xffffff80
jmp 0x40166e