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

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x6d8
mov edi, dword [ecx + 4]
mov esi, dword [ecx]
mov ebx, dword [edi + 4]
test ebx, ebx
je 0x403acb
cmp word [ebx], 0x2d
jne 0x403acb
movzx eax, word [ebx + 2]
sub eax, 0x64
cmp ax, 0x12
ja case.0x403d72.1
movzx eax, ax
jmp dword [eax*4 + 0x4064c4]
inc dword [0x405108]
mov ebx, edi
lea esi, [esi]
nop
lea edi, [ebx + 4]
mov ebx, dword [ebx + 8]
dec esi
test ebx, ebx
jne 0x403a93
cmp esi, 2
jle case.0x403d72.1
cmp word [ebx], 0
je case.0x403d72.1
cmp word [ebx + 2], 0
je 0x403c70
lea esi, [esi]
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
mov ebx, 1
call sym._wine_dbg_printf
lea esp, [ebp - 0x10]
mov eax, ebx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov dword [esp + 8], 0xa
lea ebx, [edi + 4]
dec esi
mov dword [esp + 4], 0
mov eax, dword [edi + 8]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [0x405104], eax
jmp 0x403ac0
mov dword [0x405100], 1
mov ebx, edi
jmp 0x403ac0
mov dword [0x4050fc], 1
mov ebx, edi
jmp 0x403ac0
mov dword [esp + 4], str.none
mov eax, dword [edi + 8]
dec esi
lea ebx, [edi + 4]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
jne 0x403c40
mov dword [0x4050f0], 0
jmp 0x403ac0
mov dword [esp + 8], 0xa
lea ebx, [edi + 4]
dec esi
mov dword [esp + 4], 0
mov eax, dword [edi + 8]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [0x4050e8], eax
jmp 0x403ac0
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 sym._wine_dbg_printf
lea esp, [ebp - 0x10]
mov eax, ebx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov dword [esp + 8], 0xa
lea ebx, [edi + 4]
dec esi
mov dword [esp + 4], 0
mov eax, dword [edi + 8]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [0x4050ec], eax
cmp eax, 0xc34f
jg 0x403ac0
mov dword [esp], str.cabarc:_Cabinet_size_must_be_at_least_50000_n
mov ebx, 1
call sym._wine_dbg_printf
jmp 0x403af9
mov dword [esp + 4], str.mszip
mov eax, dword [edi + 8]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
jne 0x4043ef
mov dword [0x4050f0], 1
jmp 0x403ac0
mov edx, dword [edi + 8]
xor eax, eax
call sym._strdupWtoA
mov dword [esp + 4], 0x104
mov edx, eax
mov dword [ebp - 0x68c], eax
lea eax, [ebp - 0x680]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x670]
mov dword [esp + 8], eax
mov dword [esp], edx
call dword [sym.imp.kernel32.dll_GetFullPathNameA]
sub esp, 0x10
test eax, eax
je 0x4040ea
mov edx, dword [ebp - 0x680]
test edx, edx
je 0x4040ea
mov dword [esp + 4], edx
lea eax, [edi + 8]
mov dword [ebp - 0x694], edx
lea edx, [ebp - 0x56c]
mov dword [esp], edx
mov edx, dword [sym.imp.ucrtbase.dll_strcpy]
mov dword [ebp - 0x698], eax
lea eax, [esi - 2]
mov dword [ebp - 0x69c], edx
mov dword [ebp - 0x690], eax
call edx
mov edx, dword [ebp - 0x694]
lea eax, [edi + 0xc]
cmp dword [ebp - 0x690], 1
mov dword [ebp - 0x694], eax
mov ecx, eax
lea edi, [edi + esi*4]
mov byte [edx], 0
je 0x403d49
lea esi, [esi]
nop
mov eax, dword [ecx]
movzx edx, word [eax]
test dx, dx
je 0x403d42
lea esi, [esi]
cmp dx, 0x2f
jne 0x403d36
mov edx, 0x5c
mov word [eax], dx
movzx edx, word [eax + 2]
add eax, 2
test dx, dx
jne 0x403d28
add ecx, 4
cmp edi, ecx
jne 0x403d18
mov eax, dword [ebp - 0x694]
mov dword [0x4050f8], eax
lea eax, [ebp - 0x56c]
mov dword [0x4050e4], eax
movzx eax, word [ebx]
sub eax, 0x4c
cmp ax, 0x2c
ja case.0x403d72.1
movzx eax, ax
jmp dword [eax*4 + 0x406510]
cmp dword [ebp - 0x690], 1
je 0x403db8
mov eax, dword [ebp - 0x698]
mov edx, dword [eax + esi*4 - 0xc]
cmp word [edx], 0
je 0x403db8
mov eax, edx
add eax, 2
cmp word [eax], 0
jne 0x403d94
cmp word [eax - 2], 0x5c
jne 0x403db8
mov eax, dword [ebp - 0x698]
mov dword [0x4050f4], edx
mov dword [eax + esi*4 - 0xc], 0
test byte [section..data], 8
jne 0x404478
lea eax, [ebp - 0x33c]
mov dword [esp + 0x1c], 0xffffffff
xor ebx, ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], sym._fdi_lseek
mov dword [esp + 0x14], sym._fdi_close
mov dword [esp + 0x10], sym._fdi_write
mov dword [esp + 0xc], sym._fdi_read
mov dword [esp + 8], sym._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 - 0x670]
mov dword [esp + 0x14], 0
mov dword [esp + 8], eax
mov eax, dword [0x4050e4]
mov dword [esp + 0x10], sym._extract_notify
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
mov dword [esp], esi
call sym._FDICopy
test eax, eax
jne 0x403e6c
mov eax, dword fs:[0x18]
mov ebx, dword [eax + 0x34]
test byte [section..data], 4
jne 0x4045af
mov dword [esp], esi
call sym._FDIDestroy
jmp 0x403af9
mov eax, dword [0x4050ec]
lea ebx, [ebp - 0x11a]
mov dword [ebp - 0x338], 0x7fffffff
lea esi, [ebp - 0x33c]
mov dword [esp], ebx
mov dword [ebp - 0x33c], eax
mov eax, dword [0x405104]
mov dword [ebp - 0x330], 0
mov dword [ebp - 0x334], eax
mov eax, dword [0x4050e8]
mov dword [ebp - 0x32c], 0
mov word [ebp - 0x31c], ax
lea eax, [ebp - 0x670]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x69c]
mov dword [ebp - 0x328], 0
mov dword [ebp - 0x324], 0
mov byte [ebp - 0x31a], 0
call eax
mov dword [esp], ebx
call sym._strlen
mov ecx, 0x5c
mov edx, 1
mov word [ebp + eax - 0x11a], cx
lea ecx, [ebp - 0x56c]
lea eax, [ebp - 0x21a]
call sym._format_cab_name
lea eax, [ebp - 0x67c]
mov dword [esp + 0x2c], esi
xor esi, esi
mov dword [esp + 0x30], 0
mov dword [esp + 0x28], sym._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], sym._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 [0x4050f8]
mov edi, dword [sym.imp.kernel32.dll_lstrcmpW]
mov dword [ebp - 0x68c], eax
mov eax, dword [ebx]
test eax, eax
jne 0x403fdc
jmp 0x40402f
mov eax, dword [ebp - 0x68c]
mov dword [esp + 8], sym._fci_status
mov dword [esp + 4], sym._fci_get_next_cab
mov dword [esp], eax
call sym._FCIFlushFolder
mov eax, dword [ebx + 4]
add ebx, 4
test eax, eax
je 0x40453a
mov dword [esp + 4], 0x406402
mov dword [esp], eax
call edi
sub esp, 8
test eax, eax
je 0x403fb0
mov esi, dword [ebx]
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
je 0x4042e7
test al, 0x10
je 0x404242
mov eax, dword [0x405100]
test eax, eax
je 0x404134
mov eax, dword [ebp - 0x68c]
mov edx, esi
call sym._add_directory
mov esi, eax
test esi, esi
jne 0x403fce
mov ebx, 1
mov eax, dword [ebp - 0x68c]
mov dword [esp], eax
call sym._FCIDestroy
jmp 0x403af9
lea eax, [ebp - 0x33c]
mov dword [esp + 0x1c], 0xffffffff
xor ebx, ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], sym._fdi_lseek
mov dword [esp + 0x14], sym._fdi_close
mov dword [esp + 0x10], sym._fdi_write
mov dword [esp + 0xc], sym._fdi_read
mov dword [esp + 8], sym._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 - 0x670]
mov dword [esp + 0x14], 0
mov dword [esp + 8], eax
mov eax, dword [0x4050e4]
mov dword [esp + 0x10], sym._list_notify
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
mov dword [esp], esi
call sym._FDICopy
test eax, eax
jne 0x403e6c
mov eax, dword fs:[0x18]
mov ebx, dword [eax + 0x34]
jmp 0x403e6c
mov ebx, 1
test byte [section..data], 2
je 0x403af9
mov eax, dword [ebp - 0x68c]
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], 0x405000
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x403af9
test esi, esi
je 0x4044b0
mov eax, esi
shr eax, 0x10
je 0x404445
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, str._invalid_
sub esp, 8
test eax, eax
jne 0x404228
cmp word [esi], 0
je 0x404591
mov ecx, eax
lea eax, [eax + 1]
cmp word [esi + ecx*2 + 2], 0
jne 0x404172
mov eax, 0x224c
lea edx, [ebp - 0x466]
lea edi, [ebp - 0x346]
mov word [ebp - 0x468], ax
jmp 0x4041c6
cmp ax, 9
je 0x404267
cmp ax, 0xa
jne 0x404285
mov eax, 0x6e5c
add edx, 2
mov word [edx - 2], ax
lea eax, [ecx - 1]
test ecx, ecx
jle 0x4041fa
cmp edx, edi
ja 0x4041fa
mov ecx, eax
movzx eax, word [esi]
add esi, 2
cmp ax, 0xd
je 0x404256
jbe 0x404199
cmp ax, 0x22
je 0x4042d6
cmp ax, 0x5c
jne 0x404278
mov ebx, 0x5c5c
add edx, 2
mov word [edx - 2], bx
jmp 0x4041b9
mov byte [edx], 0x22
test eax, eax
jle 0x4045a7
mov ecx, 0x2e2e
mov byte [edx + 3], 0x2e
lea eax, [edx + 4]
mov word [edx + 1], cx
mov byte [eax], 0
lea eax, [ebp - 0x468]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov edx, eax
mov dword [esp + 4], edx
mov ebx, 1
mov dword [esp], str.cabarc:_Cannot_add__s__its_a_directory__use__r_for_recursive_add__n
call sym._wine_dbg_printf
jmp 0x404034
mov eax, dword [ebp - 0x68c]
mov edx, esi
call sym._add_file
mov esi, eax
jmp 0x40402b
mov eax, 0x725c
add edx, 2
mov word [edx - 2], ax
jmp 0x4041b9
mov eax, 0x745c
add edx, 2
mov word [edx - 2], ax
jmp 0x4041b9
lea ebx, [eax - 0x20]
cmp bx, 0x5e
jbe 0x40445f
mov ebx, eax
mov byte [edx], 0x5c
add edx, 5
shr bx, 0xc
movzx ebx, bx
movzx ebx, byte [ebx + str.0123456789abcdefGCC:__GNU__10.3.0]
mov byte [edx - 4], bl
mov ebx, eax
shr bx, 8
and ebx, 0xf
movzx ebx, byte [ebx + str.0123456789abcdefGCC:__GNU__10.3.0]
mov byte [edx - 3], bl
mov ebx, eax
and eax, 0xf
shr bx, 4
movzx eax, byte [eax + str.0123456789abcdefGCC:__GNU__10.3.0]
and ebx, 0xf
movzx ebx, byte [ebx + str.0123456789abcdefGCC:__GNU__10.3.0]
mov byte [edx - 1], al
mov byte [edx - 2], bl
jmp 0x4041b9
mov eax, 0x225c
add edx, 2
mov word [edx - 2], ax
jmp 0x4041b9
test esi, esi
je 0x404614
mov eax, esi
shr eax, 0x10
je 0x4045fc
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 0x4043d5
cmp word [esi], 0
je 0x404628
mov ecx, edx
lea edx, [edx + 1]
cmp word [esi + ecx*2 + 2], 0
jne 0x404327
mov word [ebp - 0x468], 0x224c
lea eax, [ebp - 0x466]
lea edi, [ebp - 0x346]
jmp 0x404378
cmp dx, 9
je 0x4044ba
cmp dx, 0xa
jne 0x4044d8
mov edx, 0x6e5c
add eax, 2
mov word [eax - 2], dx
lea edx, [ecx - 1]
test ecx, ecx
jle 0x4043ac
cmp eax, edi
ja 0x4043ac
mov ecx, edx
movzx edx, word [esi]
add esi, 2
cmp dx, 0xd
je 0x404467
jbe 0x40434b
cmp dx, 0x22
je 0x404529
cmp dx, 0x5c
jne 0x4044cb
mov edx, 0x5c5c
add eax, 2
mov word [eax - 2], dx
jmp 0x40436b
mov byte [eax], 0x22
test edx, edx
jle 0x40463e
mov word [eax + 1], 0x2e2e
lea edx, [eax + 4]
mov byte [eax + 3], 0x2e
lea eax, [ebp - 0x468]
mov byte [edx], 0
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov dword [esp + 4], eax
mov ebx, 1
mov dword [esp], str.cannot_open__s_n
call sym._wine_dbg_printf
jmp 0x404034
mov ebx, dword [edi + 8]
test ebx, ebx
je 0x40461e
mov eax, ebx
shr eax, 0x10
je 0x4045e4
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 0x40442b
mov eax, ebx
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [esp + 4], eax
mov ebx, 1
mov dword [esp], str.cabarc:_Unknown_compression_type__s_n
call sym._wine_dbg_printf
jmp 0x403af9
movzx esi, si
mov dword [esp], str._04x
mov dword [esp + 4], esi
call sym._wine_dbg_sprintf.constprop.0
mov edx, eax
jmp 0x404228
mov byte [edx], al
inc edx
jmp 0x4041b9
mov ebx, 0x725c
add eax, 2
mov word [eax - 2], bx
jmp 0x40436b
mov eax, dword [ebp - 0x68c]
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], 0x405000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x403dc5
mov edx, str._null_
jmp 0x404228
mov edx, 0x745c
add eax, 2
mov word [eax - 2], dx
jmp 0x40436b
lea ebx, [edx - 0x20]
cmp bx, 0x5e
jbe 0x4045dc
mov ebx, edx
mov byte [eax], 0x5c
add eax, 5
shr bx, 0xc
movzx ebx, bx
movzx ebx, byte [ebx + str.0123456789abcdefGCC:__GNU__10.3.0]
mov byte [eax - 4], bl
mov ebx, edx
shr bx, 8
and ebx, 0xf
movzx ebx, byte [ebx + str.0123456789abcdefGCC:__GNU__10.3.0]
mov byte [eax - 3], bl
mov ebx, edx
and edx, 0xf
shr bx, 4
movzx edx, byte [edx + str.0123456789abcdefGCC:__GNU__10.3.0]
and ebx, 0xf
movzx ebx, byte [ebx + str.0123456789abcdefGCC:__GNU__10.3.0]
mov byte [eax - 1], dl
mov byte [eax - 2], bl
jmp 0x40436b
mov ebx, 0x225c
add eax, 2
mov word [eax - 2], bx
jmp 0x40436b
test esi, esi
je 0x40402f
mov eax, dword [ebp - 0x68c]
mov dword [esp + 0xc], sym._fci_status
xor ebx, ebx
mov dword [esp + 8], sym._fci_get_next_cab
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._FCIFlushCabinet
test eax, eax
jne 0x404034
mov eax, dword [0x4050e4]
call sym._wine_dbgstr_an.constprop.0
mov dword [esp], str.cabarc:_Failed_to_create_cabinet__s_n
mov dword [esp + 4], eax
call sym._wine_dbg_printf
jmp 0x40402f
mov word [ebp - 0x468], 0x224c
lea edx, [ebp - 0x466]
mov byte [ebp - 0x466], 0x22
lea eax, [edx + 1]
jmp 0x404215
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], 0x405000
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x403e6c
mov byte [eax], dl
inc eax
jmp 0x40436b
movzx ebx, bx
mov dword [esp], str._04x
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf.constprop.0
jmp 0x40442b
movzx esi, si
mov dword [esp], str._04x
mov dword [esp + 4], esi
call sym._wine_dbg_sprintf.constprop.0
jmp 0x4043d5
mov eax, str._null_
jmp 0x4043d5
mov eax, str._null_
jmp 0x40442b
mov word [ebp - 0x468], 0x224c
lea eax, [ebp - 0x466]
mov byte [ebp - 0x466], 0x22
lea edx, [eax + 1]
jmp 0x4043c4