Function at 0x4028f0
Capabilities:
Get common file path
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
cmp eax, 2
jle 0x40290d
mov edx, dword [ebx + 4]
cmp word [edx], 0x2d
je 0x402930
mov dword [esp], str.Usage:_winemsibuilder__OPTION___MSIFILE__..._nOptions:_n___i_package.msi_table1.idt__table2.idt_..._____Import_one_or_more_tables_into_the_database._n___a_package.msi_stream_file____________________Add_stream_to_storage_with_contents_of_file._n_nExisting_tables_or_streams_will_be_overwritten._If_package.msi_does_not_exist_a_new_file_nwill_be_created_with_an_empty_database._n
mov esi, 1
call sym._wine_dbg_printf.constprop.3
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
movzx edx, word [edx + 2]
cmp dx, 0x61
je 0x402a70
cmp dx, 0x69
je 0x402973
test byte [0x405004], 4
je 0x40290d
mov dword [esp + 0xc], str.unknown_option_n
mov dword [esp + 8], str.wmain
mov dword [esp + 4], 0x405004
mov dword [esp], 2
call sym._wine_dbg_log.constprop.2
jmp 0x40290d
cmp eax, 3
je 0x40290d
mov eax, dword [ebx + 8]
lea edx, [ebp - 0x1c]
mov esi, 1
call dbg.open_database
test eax, eax
jne 0x40291e
mov dword [esp + 4], 0
mov dword [esp], 0
call sym._GetCurrentDirectoryW_8
lea edx, [eax + 1]
sub esp, 8
lea ecx, [edx + edx]
mov dword [esp + 4], 0
mov dword [esp + 8], ecx
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov dword [ebp - 0x2c], edx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sym._HeapAlloc_12
mov edx, dword [ebp - 0x2c]
sub esp, 0xc
test eax, eax
mov edi, eax
je 0x402a5c
mov dword [esp + 4], eax
mov dword [esp], edx
call sym._GetCurrentDirectoryW_8
mov eax, dword [ebx + 0xc]
sub esp, 8
test eax, eax
je 0x402a8e
add ebx, 0xc
jmp 0x402a0d
add ebx, 4
mov eax, dword [ebx]
test eax, eax
je 0x402a8e
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], edi
mov dword [esp], eax
call sym._MsiDatabaseImportW_12
sub esp, 0xc
test eax, eax
je 0x402a00
mov esi, 1
test byte [0x405004], 2
jne 0x402add
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sym._HeapFree_12
sub esp, 0xc
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._MsiCloseHandle_4
sub esp, 4
jmp 0x40291e
cmp eax, 4
jle 0x40290d
mov ecx, dword [ebx + 0x10]
mov edx, dword [ebx + 0xc]
mov eax, dword [ebx + 8]
call dbg.add_stream
mov esi, eax
jmp 0x40291e
mov eax, dword [ebp - 0x1c]
xor esi, esi
mov dword [esp], eax
call sym._MsiDatabaseCommit_4
sub esp, 4
test eax, eax
je 0x402a39
mov esi, 1
test byte [0x405004], 2
je 0x402a39
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.failed_to_commit_changes___u__n
mov dword [esp + 8], str.import_tables
mov dword [esp + 4], 0x405004
mov dword [esp], 1
call sym._wine_dbg_log.constprop.2
jmp 0x402a39
mov dword [ebp - 0x2c], eax
mov eax, dword [ebx]
call sym._wine_dbgstr_wn.constprop.1
mov edx, dword [ebp - 0x2c]
mov dword [esp + 0xc], str.failed_to_import_table__s___u__n
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
mov dword [esp + 8], str.import_tables
mov dword [esp + 4], 0x405004
mov dword [esp], 1
call sym._wine_dbg_log.constprop.2
jmp 0x402a39