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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push eax
mov eax, 0x1058
call fcn.00401060
sub esp, eax
mov eax, dword [esp + eax]
mov dword [ebp - 0x1040], edx
lea edx, [ebp - 0x102c]
mov dword [ebp - 0x1044], ecx
mov ebx, eax
mov dword [ebp - 0x1024], 0
call sym._open_database
test eax, eax
je 0x401510
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 0x4016a0
mov eax, dword [ebp - 0x1040]
movzx ebx, word [eax]
test bx, bx
je 0x401770
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x401578
sub eax, dword [ebp - 0x1040]
cmp eax, 0x3e
ja 0x4016e8
mov esi, eax
add eax, 4
mov dword [esp], eax
sar esi, 1
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x1048], eax
test eax, eax
je 0x4016e8
mov eax, dword [ebp - 0x1040]
mov edx, dword [ebp - 0x1048]
inc esi
mov dword [ebp - 0x103c], eax
lea esi, [esi]
mov eax, dword [ebp - 0x103c]
lea ecx, [eax + 2]
movzx eax, bx
test eax, eax
je 0x401791
cmp eax, 0x7f
ja 0x401680
lea edi, [eax - 0x30]
cmp edi, 9
jbe 0x401760
lea edi, [eax - 0x41]
cmp edi, 0x19
jbe 0x401838
lea edi, [eax - 0x61]
cmp edi, 0x19
jbe 0x401860
cmp bx, 0x2e
je 0x401af0
cmp eax, 0x5f
jne 0x401680
mov edi, 0x483f
mov eax, dword [ebp - 0x103c]
movzx eax, word [eax + 2]
lea ebx, [eax - 1]
cmp ebx, 0x7e
ja 0x401750
lea ebx, [eax - 0x30]
cmp ebx, 9
jbe 0x40184b
lea ebx, [eax - 0x41]
cmp ebx, 0x19
jbe 0x401848
lea ebx, [eax - 0x61]
cmp ebx, 0x19
jbe 0x401a80
cmp eax, 0x2e
je 0x401b83
mov ebx, 0xffffffc0
cmp eax, 0x5f
jne 0x401750
mov ecx, dword [ebp - 0x103c]
add ebx, edi
add ecx, 4
lea esi, [esi]
add edx, 2
mov word [edx - 2], bx
test esi, esi
je 0x4019f0
mov dword [ebp - 0x103c], ecx
movzx ebx, word [ecx]
dec esi
jmp 0x4015c8
test byte [0x403030], 4
je 0x4014fd
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], str.add_stream
mov dword [esp + 4], 0x403030
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x4014fd
mov edi, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x1048], 0
mov ebx, 1
test byte [0x403030], 4
jne 0x401a3f
lea esi, [esi]
mov eax, dword [ebp - 0x1048]
mov dword [esp], eax
call edi
mov eax, dword [ebp - 0x1024]
test eax, eax
je 0x401730
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 dword [ebp - 0x1048], eax
test eax, eax
je 0x4016e8
mov edx, dword [ebp - 0x1048]
mov eax, dword [ebp - 0x1028]
xor ecx, ecx
mov edi, dword [ebp - 0x1048]
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 dword [esp + 4], edi
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0x18
mov esi, eax
test eax, eax
je 0x401870
mov edi, dword [sym.imp.ucrtbase.dll_free]
mov ebx, 1
test byte [0x403030], 4
je 0x401710
mov eax, dword [ebp - 0x1048]
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.failed_to_create_stream__s__0x_08lx__n
mov dword [esp + 8], str.add_stream
mov dword [esp + 4], 0x403030
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x401710
lea edi, [eax + 0x47c9]
jmp 0x40161d
lea ebx, [eax - 0x37]
add ebx, 0x3ffffc0
shl ebx, 6
jmp 0x40166e
lea edi, [eax + 0x47c3]
jmp 0x40161d
mov eax, dword [ebp - 0x1044]
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]
mov dword [ebp - 0x103c], eax
sub esp, 0x1c
cmp eax, 0xffffffff
je 0x401a90
lea eax, [ebp - 0x1020]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x103c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileSize]
sub esp, 8
cmp eax, 0xffffffff
je 0x401a10
mov edx, dword [ebp - 0x1020]
test edx, edx
jne 0x401a10
mov esi, eax
mov eax, dword [ebp - 0x1024]
xor edi, edi
mov edx, dword [eax]
mov dword [esp + 4], esi
mov dword [esp + 8], edi
mov dword [esp], eax
call dword [edx + 0x18]
sub esp, 0xc
test eax, eax
jne 0x401afa
mov dword [ebp - 0x1040], eax
mov ebx, dword [ebp - 0x103c]
jmp 0x401971
mov eax, dword [ebp - 0x101c]
test eax, eax
je 0x4019a5
mov edx, dword [ebp - 0x1024]
mov ecx, dword [edx]
mov dword [esp + 8], eax
lea eax, [ebp - 0x1018]
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
mov dword [esp], edx
call dword [ecx + 0x10]
sub esp, 0x10
test eax, eax
jne 0x4019a5
mov eax, dword [ebp - 0x101c]
xor edx, edx
sub esi, eax
sbb edi, edx
lea eax, [ebp - 0x101c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x1018]
mov dword [esp + 8], 0x1000
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
test eax, eax
jne 0x401930
mov eax, dword [ebp - 0x103c]
mov ebx, dword [ebp - 0x1040]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, edi
sub esp, 4
or eax, esi
jne 0x401b42
mov eax, dword [ebp - 0x1028]
mov edx, dword [eax]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x24]
mov edi, dword [sym.imp.ucrtbase.dll_free]
sub esp, 8
jmp 0x401710
mov eax, dword [ebp - 0x1048]
mov edi, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], eax
call edi
jmp 0x4016ee
test byte [0x403030], 4
jne 0x401b0a
mov eax, dword [ebp - 0x103c]
mov ebx, 1
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
mov edi, dword [sym.imp.ucrtbase.dll_free]
sub esp, 4
jmp 0x401710
mov eax, dword [ebp - 0x1040]
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], str.add_stream
mov dword [esp + 4], 0x403030
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x401710
lea ebx, [eax - 0x3d]
jmp 0x40184b
mov edi, dword [sym.imp.ucrtbase.dll_free]
mov ebx, 1
test byte [0x403030], 4
je 0x401710
mov eax, dword fs:[0x18]
mov esi, dword [eax + 0x34]
mov eax, dword [ebp - 0x1044]
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_file__s___lu__n
mov dword [esp + 8], str.add_stream
mov dword [esp + 4], 0x403030
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x401710
mov edi, 0x483e
jmp 0x40161d
mov edi, dword [sym.imp.ucrtbase.dll_free]
mov ebx, 1
jmp 0x401710
mov eax, dword [ebp - 0x1044]
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], str.add_stream
mov dword [esp + 4], 0x403030
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x401a1d
mov edi, dword [sym.imp.ucrtbase.dll_free]
mov ebx, 1
test byte [0x403030], 4
je 0x401710
mov dword [esp + 0xc], str.failed_to_write_stream_contents_n
mov dword [esp + 8], str.add_stream
mov dword [esp + 4], 0x403030
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x401710
mov ebx, 0xffffff80
jmp 0x40166e