Function at 0x402950
Capabilities:
Check if file exists
Create cabinet on windows
Extract cabinet on windows
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x59c
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov ebx, dword [edi + 4]
test ebx, ebx
je 0x4029a9
cmp word [ebx], 0x2d
jne 0x4029a9
movzx eax, word [ebx + 2]
sub eax, 0x64
cmp ax, 0x12
ja case.0x402c1d.1
movzx eax, ax
jmp dword [eax*4 + 0x4054c4]
mov dword [0x407018], 1
mov ebx, edi
lea edi, [ebx + 4]
mov ebx, dword [ebx + 8]
sub esi, 1
test ebx, ebx
jne 0x402969
cmp esi, 2
jle case.0x402c1d.1
cmp word [ebx], 0
je case.0x402c1d.1
cmp word [ebx + 2], 0
je 0x402b20
nop
mov dword [esp], str.Usage:_cabarc__options__command_file.cab__files...___dest_dir__n_nCommands:_n___L___List_the_contents_of_the_cabinet_n___N___Create_a_new_cabinet_n___X___Extract_files_from_the_cabinet_into_dest_dir_n_nOptions:_n___d_size__Set_maximum_disk_size_n___h_______Display_this_help_n___i_id____Set_cabinet_id_n___m_type__Set_compression_type__mszipnone__n___p_______Preserve_directory_names_n___r_______Recurse_into_directories_n___s_size__Reserve_space_in_the_cabinet_header_n___v_______More_verbose_output_n
call dbg.wine_dbg_printf
mov ebx, 1
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
add dword [0x40700c], 1
jmp 0x40299a
mov dword [esp + 8], 0xa
lea ebx, [edi + 4]
sub esi, 1
mov dword [esp + 4], 0
mov eax, dword [edi + 8]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [0x407010], eax
jmp 0x40299c
mov dword [0x407014], 1
jmp 0x40299a
mov dword [esp + 4], str.none
mov eax, dword [edi + 8]
mov ebx, dword [sym.imp.ucrtbase.dll_wcscmp]
mov dword [esp], eax
call ebx
test eax, eax
jne 0x402af8
mov dword [section..data], eax
lea ebx, [edi + 4]
sub esi, 1
jmp 0x40299c
mov dword [esp + 8], 0xa
lea ebx, [edi + 4]
sub esi, 1
mov dword [esp + 4], 0
mov eax, dword [edi + 8]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [0x40701c], eax
jmp 0x40299c
mov dword [esp], str.Usage:_cabarc__options__command_file.cab__files...___dest_dir__n_nCommands:_n___L___List_the_contents_of_the_cabinet_n___N___Create_a_new_cabinet_n___X___Extract_files_from_the_cabinet_into_dest_dir_n_nOptions:_n___d_size__Set_maximum_disk_size_n___h_______Display_this_help_n___i_id____Set_cabinet_id_n___m_type__Set_compression_type__mszipnone__n___p_______Preserve_directory_names_n___r_______Recurse_into_directories_n___s_size__Reserve_space_in_the_cabinet_header_n___v_______More_verbose_output_n
xor ebx, ebx
call dbg.wine_dbg_printf
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], 0xa
lea ebx, [edi + 4]
sub esi, 1
mov dword [esp + 4], 0
mov eax, dword [edi + 8]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [0x404004], eax
cmp eax, 0xc34f
jg 0x40299c
mov dword [esp], str.cabarc:_Cabinet_size_must_be_at_least_50000_n
call dbg.wine_dbg_printf
jmp 0x4029cc
mov dword [esp + 4], str.mszip
mov eax, dword [edi + 8]
mov dword [esp], eax
call ebx
test eax, eax
jne 0x403060
mov eax, 1
jmp 0x402a4e
mov edx, dword [edi + 8]
xor eax, eax
call dbg.strdupWtoA
mov dword [ebp - 0x55c], eax
mov ecx, eax
lea eax, [ebp - 0x554]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x544]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x104
mov dword [esp], ecx
call dword [sym.imp.kernel32.dll_GetFullPathNameA]
sub esp, 0x10
test eax, eax
je 0x402f6f
mov edx, dword [ebp - 0x554]
test edx, edx
je 0x402f6f
lea eax, [esi - 2]
lea ecx, [ebp - 0x440]
mov dword [ebp - 0x560], eax
mov dword [esp + 4], edx
mov dword [ebp - 0x564], edx
mov dword [esp], ecx
mov ecx, dword [sym.imp.ucrtbase.dll_strcpy]
mov dword [ebp - 0x568], ecx
call ecx
mov edx, dword [ebp - 0x564]
cmp dword [ebp - 0x560], 1
lea eax, [edi + 0xc]
mov byte [edx], 0
je 0x402bfa
mov dword [ebp - 0x564], ebx
lea edx, [edi + esi*4]
mov ecx, eax
mov dword [ebp + 8], esi
mov esi, edx
nop
mov edx, dword [ecx]
movzx ebx, word [edx]
test bx, bx
je 0x402bea
lea esi, [esi]
cmp bx, 0x2f
jne 0x402bde
mov ebx, 0x5c
mov word [edx], bx
movzx ebx, word [edx + 2]
add edx, 2
test bx, bx
jne 0x402bd0
add ecx, 4
cmp ecx, esi
jne 0x402bc0
mov ebx, dword [ebp - 0x564]
mov esi, dword [ebp + 8]
mov dword [section..bss], eax
lea eax, [ebp - 0x440]
mov dword [0x407008], eax
movzx eax, word [ebx]
sub eax, 0x4c
cmp ax, 0x2c
ja case.0x402c1d.1
movzx eax, ax
jmp dword [eax*4 + 0x405510]
cmp dword [ebp - 0x560], 1
je 0x402c58
add edi, 8
mov edx, dword [edi + esi*4 - 0xc]
cmp word [edx], 0
je 0x402c58
mov eax, edx
add eax, 2
cmp word [eax], 0
jne 0x402c3c
cmp word [eax - 2], 0x5c
jne 0x402c58
xor eax, eax
mov dword [0x407004], edx
mov dword [edi + esi*4 - 0xc], eax
test byte [0x404008], 8
jne 0x4030d3
lea eax, [ebp - 0x33c]
mov dword [esp + 0x1c], 0xffffffff
xor ebx, ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], dbg.fdi_lseek
mov dword [esp + 0x14], dbg.fdi_close
mov dword [esp + 0x10], dbg.fdi_write
mov dword [esp + 0xc], dbg.fdi_read
mov dword [esp + 8], dbg.fdi_open
mov dword [esp + 4], sym._cab_free
mov dword [esp], sym._cab_alloc
call sym._FDICreate
mov dword [esp + 0x18], 0
mov esi, eax
lea eax, [ebp - 0x544]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], dbg.extract_notify
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov eax, dword [0x407008]
mov dword [esp], esi
mov dword [esp + 4], eax
call sym._FDICopy
test eax, eax
jne 0x402d0c
mov eax, dword fs:[0x18]
mov ebx, dword [eax + 0x34]
test byte [0x404008], 4
jne 0x403123
mov dword [esp], esi
call sym._FDIDestroy
jmp 0x4029d1
mov eax, dword [0x404004]
lea esi, [ebp - 0x11a]
xor edi, edi
mov dword [ebp - 0x338], 0x7fffffff
mov dword [ebp - 0x330], 0
lea ebx, [ebp - 0x33c]
mov dword [ebp - 0x33c], eax
mov eax, dword [0x407010]
mov dword [ebp - 0x32c], 0
mov dword [ebp - 0x334], eax
mov eax, dword [0x40701c]
mov dword [ebp - 0x328], 0
mov word [ebp - 0x31c], ax
lea eax, [ebp - 0x544]
mov dword [ebp - 0x324], 0
mov byte [ebp - 0x31a], 0
mov dword [esp], esi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x568]
call eax
mov dword [esp], esi
call sym._strlen
mov ecx, 0x5c
mov edx, 1
mov word [ebp + eax - 0x11a], cx
lea ecx, [ebp - 0x440]
lea eax, [ebp - 0x21a]
call dbg.format_cab_name
lea eax, [ebp - 0x550]
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], 0
mov dword [esp + 0x28], dbg.fci_get_temp
mov dword [esp + 0x24], sym._fci_delete
mov dword [esp + 0x20], sym._fci_lseek
mov dword [esp + 0x1c], sym._fci_close
mov dword [esp + 0x18], sym._fci_write
mov dword [esp + 0x14], sym._fci_read
mov dword [esp + 0x10], dbg.fci_open
mov dword [esp + 0xc], sym._cab_free
mov dword [esp + 8], sym._cab_alloc
mov dword [esp + 4], sym._fci_file_placed
mov dword [esp], eax
call sym._FCICreate
mov ebx, dword [section..bss]
mov esi, eax
mov edx, dword [ebx]
test edx, edx
jne 0x402e66
jmp 0x402eba
mov dword [esp + 8], dbg.fci_status
mov dword [esp + 4], dbg.fci_get_next_cab
mov dword [esp], esi
call sym._FCIFlushFolder
mov edx, dword [ebx + 4]
add ebx, 4
test edx, edx
je 0x40317c
mov dword [esp + 4], 0x405402
mov dword [esp], edx
call dword [sym.imp.kernel32.dll_lstrcmpW]
sub esp, 8
test eax, eax
je 0x402e40
mov edi, dword [ebx]
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
je 0x403012
test al, 0x10
je 0x403002
mov edx, dword [0x407018]
test edx, edx
je 0x402fb4
mov edx, edi
mov eax, esi
call dbg.add_directory
mov edi, eax
test edi, edi
jne 0x402e58
mov ebx, 1
mov dword [esp], esi
call sym._FCIDestroy
jmp 0x4029d1
lea eax, [ebp - 0x33c]
mov dword [esp + 0x1c], 0xffffffff
xor ebx, ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], dbg.fdi_lseek
mov dword [esp + 0x14], dbg.fdi_close
mov dword [esp + 0x10], dbg.fdi_write
mov dword [esp + 0xc], dbg.fdi_read
mov dword [esp + 8], dbg.fdi_open
mov dword [esp + 4], sym._cab_free
mov dword [esp], sym._cab_alloc
call sym._FDICreate
mov dword [esp + 0x18], 0
mov esi, eax
lea eax, [ebp - 0x544]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], sym._list_notify
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov eax, dword [0x407008]
mov dword [esp], esi
mov dword [esp + 4], eax
call sym._FDICopy
test eax, eax
jne 0x402d0c
mov eax, dword fs:[0x18]
mov ebx, dword [eax + 0x34]
jmp 0x402d0c
test byte [0x404008], 2
je 0x4029cc
mov eax, dword [ebp - 0x55c]
call sym._wine_dbgstr_an.constprop.0
mov dword [esp + 0xc], str.cannot_get_full_name_for__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.wmain
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x4029cc
test edi, edi
je 0x4030c9
mov eax, edi
shr eax, 0x10
je 0x4030b1
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, str._invalid_
test ecx, ecx
jne 0x402fed
mov eax, edi
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [esp + 4], eax
mov dword [esp], str.cabarc:_Cannot_add__s__its_a_directory__use__r_for_recursive_add__n
call dbg.wine_dbg_printf
jmp 0x402eba
mov edx, edi
mov eax, esi
call dbg.add_file
mov edi, eax
jmp 0x402eb6
test edi, edi
je 0x403168
mov eax, edi
shr eax, 0x10
je 0x403150
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, str._invalid_
test ecx, ecx
jne 0x40304b
mov eax, edi
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [esp + 4], eax
mov dword [esp], str.cannot_open__s_n
call dbg.wine_dbg_printf
jmp 0x402eba
mov ebx, dword [edi + 8]
test ebx, ebx
je 0x403172
mov eax, ebx
shr eax, 0x10
je 0x40310b
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x40309c
mov eax, ebx
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [esp + 4], eax
mov dword [esp], str.cabarc:_Unknown_compression_type__s_n
call dbg.wine_dbg_printf
jmp 0x4029cc
movzx edx, di
mov dword [esp], str._04x
mov dword [esp + 4], edx
call sym._wine_dbg_sprintf.constprop.0
jmp 0x402fed
mov eax, str._null_
jmp 0x402fed
mov eax, dword [ebp - 0x55c]
call sym._wine_dbgstr_an.constprop.0
mov dword [esp + 0xc], str.Extracting_file_s__from_cabinet__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.wmain
mov dword [esp + 4], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x402c65
movzx ebx, bx
mov dword [esp], str._04x
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf.constprop.0
jmp 0x40309c
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], str.FDICopy___failed:_code__u_n
mov dword [esp + 8], str.extract_cabinet
mov dword [esp + 4], global___dbch
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x402d0c
movzx edx, di
mov dword [esp], str._04x
mov dword [esp + 4], edx
call sym._wine_dbg_sprintf.constprop.0
jmp 0x40304b
mov eax, str._null_
jmp 0x40304b
mov eax, str._null_
jmp 0x40309c
test edi, edi
je 0x402eba
mov dword [esp + 0xc], dbg.fci_status
xor ebx, ebx
mov dword [esp + 8], dbg.fci_get_next_cab
mov dword [esp + 4], 0
mov dword [esp], esi
call sym._FCIFlushCabinet
test eax, eax
jne 0x402ebf
mov eax, dword [0x407008]
call sym._wine_dbgstr_an.constprop.0
mov dword [esp], str.cabarc:_Failed_to_create_cabinet__s_n
mov dword [esp + 4], eax
call dbg.wine_dbg_printf
jmp 0x402eba