Function at 0x4036b0
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, 0x6b0
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov ebx, dword [edi + 4]
test ebx, ebx
je 0x40370b
cmp word [ebx], 0x2d
jne 0x40370b
movzx eax, word [ebx + 2]
sub eax, 0x64
cmp ax, 0x12
ja case.0x4039a2.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 0x4036c9
cmp esi, 2
jle case.0x4039a2.1
cmp word [ebx], 0
je case.0x4039a2.1
cmp word [ebx + 2], 0
je 0x4038a0
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 - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
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 0x403700
mov dword [0x405100], 1
mov ebx, edi
jmp 0x403700
mov dword [0x4050fc], 1
mov ebx, edi
jmp 0x403700
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 0x403870
mov dword [0x4050f0], 0
jmp 0x403700
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 0x403700
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 - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
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 0x403700
mov dword [esp], str.cabarc:_Cabinet_size_must_be_at_least_50000_n
mov ebx, 1
call sym._wine_dbg_printf
jmp 0x403739
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 0x40401f
mov dword [0x4050f0], 1
jmp 0x403700
mov edx, dword [edi + 8]
xor eax, eax
call sym._strdupWtoA
mov dword [esp + 4], 0x104
mov ecx, eax
mov dword [ebp - 0x678], eax
lea eax, [ebp - 0x674]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x664]
mov dword [esp + 8], eax
mov dword [esp], ecx
call dword [sym.imp.kernel32.dll_GetFullPathNameA]
sub esp, 0x10
test eax, eax
je 0x403d1a
mov edx, dword [ebp - 0x674]
test edx, edx
je 0x403d1a
lea ecx, [ebp - 0x560]
lea eax, [edi + 8]
mov dword [esp + 4], edx
mov dword [esp], ecx
mov ecx, dword [sym.imp.ucrtbase.dll_strcpy]
mov dword [ebp - 0x684], eax
lea eax, [esi - 2]
mov dword [ebp - 0x680], edx
mov dword [ebp - 0x688], ecx
mov dword [ebp - 0x67c], eax
call ecx
mov edx, dword [ebp - 0x680]
lea eax, [edi + 0xc]
cmp dword [ebp - 0x67c], 1
mov dword [ebp - 0x680], eax
mov ecx, eax
lea edi, [edi + esi*4]
mov byte [edx], 0
je 0x403979
lea esi, [esi]
nop
mov eax, dword [ecx]
movzx edx, word [eax]
test dx, dx
je 0x403972
lea esi, [esi]
cmp dx, 0x2f
jne 0x403966
mov edx, 0x5c
mov word [eax], dx
movzx edx, word [eax + 2]
add eax, 2
test dx, dx
jne 0x403958
add ecx, 4
cmp edi, ecx
jne 0x403948
mov eax, dword [ebp - 0x680]
mov dword [0x4050f8], eax
lea eax, [ebp - 0x560]
mov dword [0x4050e4], eax
movzx eax, word [ebx]
sub eax, 0x4c
cmp ax, 0x2c
ja case.0x4039a2.1
movzx eax, ax
jmp dword [eax*4 + 0x406510]
cmp dword [ebp - 0x67c], 1
je 0x4039e8
mov eax, dword [ebp - 0x684]
mov edx, dword [eax + esi*4 - 0xc]
cmp word [edx], 0
je 0x4039e8
mov eax, edx
add eax, 2
cmp word [eax], 0
jne 0x4039c4
cmp word [eax - 2], 0x5c
jne 0x4039e8
mov eax, dword [ebp - 0x684]
mov dword [0x4050f4], edx
mov dword [eax + esi*4 - 0xc], 0
test byte [section..data], 8
jne 0x4040a8
lea eax, [ebp - 0x330]
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 - 0x664]
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 0x403a9c
mov eax, dword fs:[0x18]
mov ebx, dword [eax + 0x34]
test byte [section..data], 4
jne 0x4041df
mov dword [esp], esi
call sym._FDIDestroy
jmp 0x403739
mov eax, dword [0x4050ec]
lea ebx, [ebp - 0x10e]
mov dword [ebp - 0x32c], 0x7fffffff
lea esi, [ebp - 0x330]
mov dword [esp], ebx
mov dword [ebp - 0x330], eax
mov eax, dword [0x405104]
mov dword [ebp - 0x324], 0
mov dword [ebp - 0x328], eax
mov eax, dword [0x4050e8]
mov dword [ebp - 0x320], 0
mov word [ebp - 0x310], ax
lea eax, [ebp - 0x664]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x688]
mov dword [ebp - 0x31c], 0
mov dword [ebp - 0x318], 0
mov byte [ebp - 0x30e], 0
call eax
mov dword [esp], ebx
call sym._strlen
mov ecx, 0x5c
mov edx, 1
mov word [ebp + eax - 0x10e], cx
lea ecx, [ebp - 0x560]
lea eax, [ebp - 0x20e]
call sym._format_cab_name
lea eax, [ebp - 0x670]
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 - 0x678], eax
mov eax, dword [ebx]
test eax, eax
jne 0x403c0c
jmp 0x403c5f
mov eax, dword [ebp - 0x678]
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 0x40416a
mov dword [esp + 4], 0x406402
mov dword [esp], eax
call edi
sub esp, 8
test eax, eax
je 0x403be0
mov esi, dword [ebx]
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
je 0x403f17
test al, 0x10
je 0x403e72
mov eax, dword [0x405100]
test eax, eax
je 0x403d64
mov eax, dword [ebp - 0x678]
mov edx, esi
call sym._add_directory
mov esi, eax
test esi, esi
jne 0x403bfe
mov ebx, 1
mov eax, dword [ebp - 0x678]
mov dword [esp], eax
call sym._FCIDestroy
jmp 0x403739
lea eax, [ebp - 0x330]
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 - 0x664]
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 0x403a9c
mov eax, dword fs:[0x18]
mov ebx, dword [eax + 0x34]
jmp 0x403a9c
mov ebx, 1
test byte [section..data], 2
je 0x403739
mov eax, dword [ebp - 0x678]
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 0x403739
test esi, esi
je 0x4040e0
mov eax, esi
shr eax, 0x10
je 0x404075
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 0x403e58
cmp word [esi], 0
je 0x4041c1
mov ecx, eax
lea eax, [eax + 1]
cmp word [esi + ecx*2 + 2], 0
jne 0x403da2
mov eax, 0x224c
lea edx, [ebp - 0x45a]
lea edi, [ebp - 0x33a]
mov word [ebp - 0x45c], ax
jmp 0x403df6
cmp ax, 9
je 0x403e97
cmp ax, 0xa
jne 0x403eb5
mov eax, 0x6e5c
add edx, 2
mov word [edx - 2], ax
lea eax, [ecx - 1]
test ecx, ecx
jle 0x403e2a
cmp edx, edi
ja 0x403e2a
mov ecx, eax
movzx eax, word [esi]
add esi, 2
cmp ax, 0xd
je 0x403e86
jbe 0x403dc9
cmp ax, 0x22
je 0x403f06
cmp ax, 0x5c
jne 0x403ea8
mov ebx, 0x5c5c
add edx, 2
mov word [edx - 2], bx
jmp 0x403de9
mov byte [edx], 0x22
test eax, eax
jle 0x4041d7
mov ecx, 0x2e2e
mov byte [edx + 3], 0x2e
lea eax, [edx + 4]
mov word [edx + 1], cx
mov byte [eax], 0
lea eax, [ebp - 0x45c]
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 0x403c64
mov eax, dword [ebp - 0x678]
mov edx, esi
call sym._add_file
mov esi, eax
jmp 0x403c5b
mov eax, 0x725c
add edx, 2
mov word [edx - 2], ax
jmp 0x403de9
mov eax, 0x745c
add edx, 2
mov word [edx - 2], ax
jmp 0x403de9
lea ebx, [eax - 0x20]
cmp bx, 0x5e
jbe 0x40408f
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 0x403de9
mov eax, 0x225c
add edx, 2
mov word [edx - 2], ax
jmp 0x403de9
test esi, esi
je 0x404244
mov eax, esi
shr eax, 0x10
je 0x40422c
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 0x404005
cmp word [esi], 0
je 0x404258
mov ecx, edx
lea edx, [edx + 1]
cmp word [esi + ecx*2 + 2], 0
jne 0x403f57
mov word [ebp - 0x45c], 0x224c
lea eax, [ebp - 0x45a]
lea edi, [ebp - 0x33a]
jmp 0x403fa8
cmp dx, 9
je 0x4040ea
cmp dx, 0xa
jne 0x404108
mov edx, 0x6e5c
add eax, 2
mov word [eax - 2], dx
lea edx, [ecx - 1]
test ecx, ecx
jle 0x403fdc
cmp eax, edi
ja 0x403fdc
mov ecx, edx
movzx edx, word [esi]
add esi, 2
cmp dx, 0xd
je 0x404097
jbe 0x403f7b
cmp dx, 0x22
je 0x404159
cmp dx, 0x5c
jne 0x4040fb
mov edx, 0x5c5c
add eax, 2
mov word [eax - 2], dx
jmp 0x403f9b
mov byte [eax], 0x22
test edx, edx
jle 0x40426e
mov word [eax + 1], 0x2e2e
lea edx, [eax + 4]
mov byte [eax + 3], 0x2e
lea eax, [ebp - 0x45c]
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 0x403c64
mov ebx, dword [edi + 8]
test ebx, ebx
je 0x40424e
mov eax, ebx
shr eax, 0x10
je 0x404214
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 0x40405b
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 0x403739
movzx esi, si
mov dword [esp], str._04x
mov dword [esp + 4], esi
call sym._wine_dbg_sprintf.constprop.0
mov edx, eax
jmp 0x403e58
mov byte [edx], al
inc edx
jmp 0x403de9
mov ebx, 0x725c
add eax, 2
mov word [eax - 2], bx
jmp 0x403f9b
mov eax, dword [ebp - 0x678]
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 0x4039f5
mov edx, str._null_
jmp 0x403e58
mov edx, 0x745c
add eax, 2
mov word [eax - 2], dx
jmp 0x403f9b
lea ebx, [edx - 0x20]
cmp bx, 0x5e
jbe 0x40420c
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 0x403f9b
mov ebx, 0x225c
add eax, 2
mov word [eax - 2], bx
jmp 0x403f9b
test esi, esi
je 0x403c5f
mov eax, dword [ebp - 0x678]
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 0x403c64
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 0x403c5f
mov word [ebp - 0x45c], 0x224c
lea edx, [ebp - 0x45a]
mov byte [ebp - 0x45a], 0x22
lea eax, [edx + 1]
jmp 0x403e45
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 0x403a9c
mov byte [eax], dl
inc eax
jmp 0x403f9b
movzx ebx, bx
mov dword [esp], str._04x
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf.constprop.0
jmp 0x40405b
movzx esi, si
mov dword [esp], str._04x
mov dword [esp + 4], esi
call sym._wine_dbg_sprintf.constprop.0
jmp 0x404005
mov eax, str._null_
jmp 0x404005
mov eax, str._null_
jmp 0x40405b
mov word [ebp - 0x45c], 0x224c
lea eax, [ebp - 0x45a]
mov byte [ebp - 0x45a], 0x22
lea edx, [eax + 1]
jmp 0x403ff4