Function at 0x4021b0
Capabilities:
Check if file exists
Copy file
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x704
mov ebx, dword [ebp + 0x10]
call dword [sym.imp.comctl32.dll_InitCommonControls]
xor eax, eax
mov word [ebp - 0x6ec], ax
test byte [section..data], 8
jne 0x402578
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll__wcsdup]
mov esi, eax
test eax, eax
je 0x40243a
mov dword [esp], 0x44
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x6f4], eax
test eax, eax
je 0x40291c
movzx edi, word [esi]
test di, di
je 0x402844
mov dword [ebp - 0x6f8], 0x10
mov eax, edi
xor ebx, ebx
mov edi, esi
mov dword [ebp - 0x6f0], 0
mov esi, eax
jmp 0x402253
cmp dword [ebp - 0x6f0], 1
mov esi, edi
je 0x4023a0
lea edi, [esi + 2]
movzx esi, word [esi + 2]
test si, si
je 0x4022b0
movzx eax, si
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_iswspace]
test eax, eax
jne 0x402238
cmp si, 0x22
je 0x402470
mov esi, edi
mov edi, dword [ebp - 0x6f0]
test edi, edi
jne 0x402247
mov dword [ebp - 0x6f0], 1
mov eax, dword [ebp - 0x6f8]
dec eax
cmp ebx, eax
jge 0x4023fd
mov eax, dword [ebp - 0x6f4]
lea edi, [esi + 2]
mov dword [eax + ebx*4], esi
movzx esi, word [esi + 2]
inc ebx
test si, si
jne 0x402253
lea esi, cs:[esi]
mov eax, dword [ebp - 0x6f4]
mov dword [eax + ebx*4], 0
test byte [section..data], 8
jne 0x4025b0
test ebx, ebx
jle 0x40238c
mov dword [ebp - 0x6f8], 0
xor edi, edi
xor esi, esi
mov dword [ebp - 0x6f0], ebx
mov eax, dword [ebp - 0x6f4]
lea ebx, [esi*4]
mov ecx, dword [eax + esi*4]
movzx eax, word [ecx]
and eax, 0xfffffffd
cmp ax, 0x2d
je 0x4024d0
mov ebx, dword [ebp - 0x6f8]
test ebx, ebx
je 0x4027f8
mov ebx, dword [ebp - 0x6f0]
cmp di, 0x43
je 0x402670
test di, di
jne 0x40276a
cmp esi, ebx
jge 0x402803
cmp word [ebp - 0x6ec], 0
je 0x402825
lea ebx, [ebp - 0x6ec]
mov dword [esp], ebx
call dword [sym.imp.shlwapi.dll_PathAddBackslashW]
sub esp, 4
mov eax, dword [ebp - 0x6f8]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], sym._ExtCabCallback_16
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.setupapi.dll_SetupIterateCabinetW]
sub esp, 0x10
test eax, eax
jne 0x40238c
test byte [section..data], 2
jne 0x40286e
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
lea esi, [edi + 2]
xor eax, eax
mov word [esi - 2], ax
movzx edi, word [edi + 2]
test di, di
je 0x4022b0
movzx eax, di
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_iswspace]
test eax, eax
jne 0x4024c0
cmp di, 0x22
jne 0x402279
mov edi, esi
cmp word [edi + 2], 0
lea esi, [edi + 2]
je 0x4022b0
mov dword [ebp - 0x6f0], 2
mov eax, dword [ebp - 0x6f8]
dec eax
cmp ebx, eax
jl 0x402292
shl dword [ebp - 0x6f8], 1
mov eax, dword [ebp - 0x6f8]
lea eax, [eax*4 + 4]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x6f4]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_realloc]
mov dword [ebp - 0x6f4], eax
test eax, eax
jne 0x402292
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_free]
test byte [section..data], 2
je 0x40238c
mov dword [esp + 0xc], str.Command_line_parsing_failed_n
mov dword [esp + 8], str.wWinMain
mov dword [esp + 4], 0x403000
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x40238c
mov eax, dword [ebp - 0x6f0]
cmp eax, 1
jne 0x402488
xor eax, eax
mov word [edi], ax
jmp 0x4023d6
cmp eax, 2
jne 0x4023d6
movzx edx, word [edi + 2]
xor eax, eax
mov word [edi], ax
test dx, dx
je 0x4022b0
movzx eax, dx
mov dword [ebp - 0x6f0], edx
lea esi, [edi + 2]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_iswspace]
test eax, eax
je 0x402560
mov dword [ebp - 0x6f0], 0
jmp 0x402247
movzx eax, word [ecx + 2]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_towupper]
cmp ax, 0x4c
je 0x4027a9
ja 0x402540
cmp ax, 0x41
je 0x402630
lea ecx, [eax - 0x43]
cmp cx, 2
ja 0x40238c
test di, di
jne 0x40238c
mov edi, eax
inc esi
cmp dword [ebp - 0x6f0], esi
jg 0x4022e6
mov edx, dword [ebp - 0x6f8]
mov ebx, dword [ebp - 0x6f0]
test edx, edx
jne 0x40231a
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
cmp ax, 0x59
jne 0x40238c
mov dword [0x403048], 1
jmp 0x40250b
mov edx, dword [ebp - 0x6f0]
cmp dx, 0x22
jne 0x402279
jmp 0x4023d4
mov eax, ebx
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0xc], str.cmdline:__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.get_extrac_args
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x4021db
mov dword [esp], section..data
call sym.___wine_dbg_get_channel_flags
test al, 8
je 0x4022ca
test ebx, ebx
jle 0x40238c
mov edi, dword [ebp - 0x6f4]
xor esi, esi
jmp 0x4025e9
inc esi
cmp ebx, esi
je 0x4022d2
test byte [section..data], 8
je 0x4025e0
mov eax, dword [edi + esi*4]
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], str.arg__d:__s_n
mov dword [esp + 8], str.get_extrac_args
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x4025e0
test byte [section..data], 1
je 0x40250b
mov dword [esp + 0xc], str._A_not_implemented_n
mov dword [esp + 8], str.wWinMain
mov dword [esp + 4], 0x403000
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x40250b
lea eax, [esi + 1]
cmp eax, ebx
jne 0x40238c
mov eax, dword [ebp - 0x6f4]
lea ebx, [ebp - 0x6ec]
mov dword [esp + 0xc], 0
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x104
mov eax, dword [eax + esi*4]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFullPathNameW]
sub esp, 0x10
test eax, eax
je 0x40238c
mov dword [esp], ebx
call dword [sym.imp.shlwapi.dll_PathAddBackslashW]
sub esp, 4
mov dword [esp], ebx
call dword [sym.imp.shlwapi.dll_PathIsDirectoryW]
sub esp, 4
test eax, eax
jne 0x4028a6
mov dword [esp], ebx
call dword [sym.imp.shlwapi.dll_PathFileExistsW]
sub esp, 4
test eax, eax
je 0x40273a
mov eax, dword [0x403048]
test eax, eax
jne 0x40273a
lea esi, [ebp - 0x2dc]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], str.Overwrite___s__
mov dword [esp + 4], 0x168
mov dword [esp], esi
call sym._swprintf.constprop.0
mov dword [esp + 0xc], 0x34
mov dword [esp + 8], str.Extract
mov dword [esp + 4], esi
mov dword [esp], 0
call dword [sym.imp.user32.dll_MessageBoxW]
sub esp, 0x10
cmp eax, 6
jne 0x40238c
test byte [section..data], 8
jne 0x4028d7
mov eax, dword [ebp - 0x6f8]
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CopyFileW]
sub esp, 0xc
jmp 0x40238c
lea ebx, [ebp - 0x6ec]
cmp di, 0x45
je 0x402817
mov dword [esp], ebx
call dword [sym.imp.shlwapi.dll_PathAddBackslashW]
sub esp, 4
cmp di, 0x42
jbe 0x40238c
cmp di, 0x44
jne 0x40238c
mov dword [0x403100], 1
jmp 0x402355
inc esi
cmp esi, dword [ebp - 0x6f0]
jge 0x40238c
lea eax, [ebp - 0x6ec]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x6f4]
mov dword [esp + 4], 0x104
mov eax, dword [eax + ebx + 4]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFullPathNameW]
sub esp, 0x10
test eax, eax
jne 0x40250b
jmp 0x40238c
mov dword [ebp - 0x6f8], ecx
jmp 0x40250b
lea ebx, [ebp - 0x6ec]
mov dword [esp], ebx
call dword [sym.imp.shlwapi.dll_PathAddBackslashW]
sub esp, 4
jmp 0x40279a
cmp word [ebp - 0x6ec], 0
jne 0x402349
lea ebx, [ebp - 0x6ec]
mov dword [esp], 0x104
mov dword [esp + 4], ebx
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
sub esp, 8
jmp 0x402349
mov eax, dword [ebp - 0x6f4]
mov dword [eax], 0
test byte [section..data], 8
je 0x40238c
mov dword [esp], section..data
call sym.___wine_dbg_get_channel_flags
jmp 0x40238c
mov eax, dword [ebp - 0x6f8]
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0xc], str.Could_not_extract_cab_file__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.extract
mov dword [esp + 4], 0x403000
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x40238c
mov eax, dword [ebp - 0x6f8]
mov dword [esp], eax
call dword [sym.imp.shlwapi.dll_PathFindFileNameW]
sub esp, 4
mov dword [esp + 4], ebx
lea ebx, [ebp - 0x4e4]
mov dword [esp + 8], eax
mov dword [esp], ebx
call dword [sym.imp.shlwapi.dll_PathCombineW]
sub esp, 0xc
jmp 0x4026d2
mov eax, ebx
call sym._wine_dbgstr_wn.constprop.0
mov esi, eax
mov eax, dword [ebp - 0x6f8]
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.copying__s_to__s_n
mov dword [esp + 8], str.copy_file
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x402747
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x40243a