Function at 0x4016d0
Capabilities:
Check if file exists
Copy file
Get common file path
Get process heap flags
Get process heap force flags

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, 0x728
mov edi, dword [ecx + 8]
call dword [sym.imp.comctl32.dll_InitCommonControls]
xor eax, eax
mov word [ebp - 0x6f8], ax
test byte [section..data], 8
jne 0x401b78
cmp word [edi], 0
je 0x401bb1
mov eax, edi
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x401718
sub eax, edi
add eax, 2
mov dword [esp + 8], eax
mov ebx, dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [esp + 4], 0
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
sub esp, 0xc
mov ecx, eax
test eax, eax
je 0x401a30
xor eax, eax
lea esi, [esi]
movzx esi, word [edi + eax]
mov word [ecx + eax], si
add eax, 2
test si, si
jne 0x401760
mov dword [esp + 8], 0x44
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [ebp - 0x708], eax
mov eax, dword [eax + 0x30]
mov dword [ebp - 0x6fc], ecx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov ecx, dword [ebp - 0x6fc]
sub esp, 0xc
test eax, eax
mov dword [ebp - 0x700], eax
je 0x401f1f
movzx edi, word [ecx]
test di, di
je 0x401e47
mov word [ebp - 0x70a], si
xor ebx, ebx
mov esi, ecx
mov dword [ebp - 0x704], 0x10
mov dword [ebp - 0x6fc], 0
jmp 0x401803
cmp dword [ebp - 0x6fc], 1
mov edi, esi
je 0x401960
lea esi, [edi + 2]
movzx edi, word [edi + 2]
test di, di
je 0x401860
movzx eax, di
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_iswspace]
test eax, eax
jne 0x4017e8
cmp di, 0x22
je 0x401a70
mov edi, esi
mov esi, dword [ebp - 0x6fc]
test esi, esi
jne 0x4017f7
mov dword [ebp - 0x6fc], 1
mov eax, dword [ebp - 0x704]
dec eax
cmp eax, ebx
jle 0x4019bd
mov eax, dword [ebp - 0x700]
lea esi, [edi + 2]
mov dword [eax + ebx*4], edi
movzx edi, word [edi + 2]
inc ebx
test di, di
jne 0x401803
lea esi, [esi]
nop
mov eax, dword [ebp - 0x700]
movzx esi, word [ebp - 0x70a]
mov dword [eax + ebx*4], 0
test byte [section..data], 8
jne 0x401bc0
test ebx, ebx
jle 0x40194a
mov dword [ebp - 0x704], 0
xor edi, edi
mov dword [ebp - 0x6fc], ebx
mov eax, dword [ebp - 0x700]
lea ebx, [edi*4]
mov ecx, dword [eax + edi*4]
movzx eax, word [ecx]
and eax, 0xfffffffd
cmp ax, 0x2d
je 0x401ad0
mov ebx, dword [ebp - 0x704]
test ebx, ebx
je 0x401df8
mov ebx, dword [ebp - 0x6fc]
cmp si, 0x43
je 0x401c80
test si, si
je 0x401d80
lea ebx, [ebp - 0x6f8]
cmp si, 0x45
je 0x401e1a
mov dword [esp], ebx
call dword [sym.imp.shlwapi.dll_PathAddBackslashW]
sub esp, 4
cmp si, 0x42
jbe 0x40194a
cmp si, 0x44
jne 0x40194a
mov dword [section..bss], 1
mov eax, dword [ebp - 0x704]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], sym._ExtCabCallback_16
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._SetupIterateCabinetW_16
sub esp, 0x10
test eax, eax
jne 0x40194a
test byte [section..data], 2
jne 0x401e71
lea esp, [ebp - 0x10]
xor eax, eax
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x10
lea edi, [esi + 2]
xor eax, eax
mov word [edi - 2], ax
movzx esi, word [esi + 2]
test si, si
je 0x401860
movzx eax, si
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_iswspace]
test eax, eax
jne 0x401ac0
cmp si, 0x22
jne 0x401829
mov esi, edi
cmp word [esi + 2], 0
lea edi, [esi + 2]
je 0x401860
mov dword [ebp - 0x6fc], 2
mov eax, dword [ebp - 0x704]
dec eax
cmp eax, ebx
jg 0x401842
shl dword [ebp - 0x704], 1
mov eax, dword [ebp - 0x704]
mov dword [esp + 4], 0
lea eax, [eax*4 + 4]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x700]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x708]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapReAlloc]
mov dword [ebp - 0x700], eax
sub esp, 0x10
test eax, eax
jne 0x401842
mov dword [esp + 8], edi
mov eax, dword [ebp - 0x708]
mov dword [esp + 4], 0
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
test byte [section..data], 2
je 0x40194a
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 0x40194a
mov eax, dword [ebp - 0x6fc]
cmp eax, 1
jne 0x401a88
xor edi, edi
mov word [esi], di
jmp 0x401996
cmp eax, 2
jne 0x401996
movzx edx, word [esi + 2]
xor eax, eax
mov word [esi], ax
test dx, dx
je 0x401860
movzx eax, dx
mov dword [ebp - 0x6fc], edx
lea edi, [esi + 2]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_iswspace]
test eax, eax
je 0x401b60
mov dword [ebp - 0x6fc], 0
jmp 0x4017f7
movzx eax, word [ecx + 2]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_towupper]
cmp ax, 0x4c
je 0x401da9
ja 0x401b40
cmp ax, 0x41
je 0x401c48
lea ecx, [eax - 0x43]
cmp cx, 2
ja 0x40194a
test si, si
jne 0x40194a
mov esi, eax
inc edi
cmp edi, dword [ebp - 0x6fc]
jl 0x40189b
mov edx, dword [ebp - 0x704]
mov ebx, dword [ebp - 0x6fc]
test edx, edx
jne 0x4018cf
lea esp, [ebp - 0x10]
xor eax, eax
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x10
cmp ax, 0x59
jne 0x40194a
mov dword [0x406004], 1
jmp 0x401b0b
mov edx, dword [ebp - 0x6fc]
cmp dx, 0x22
jne 0x401829
jmp 0x401994
mov eax, edi
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0xc], str.cmdline:__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0x404170
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
cmp word [edi], 0
jne 0x401710
mov eax, 2
jmp 0x401726
mov dword [esp], section..data
call sym.___wine_dbg_get_channel_flags
test al, 8
je 0x401881
test ebx, ebx
jle 0x40194a
mov word [ebp - 0x6fc], si
xor edi, edi
mov esi, ebx
mov ebx, dword [ebp - 0x700]
jmp 0x401bf5
inc edi
cmp edi, esi
je 0x401c37
test byte [section..data], 8
je 0x401bf0
mov eax, dword [ebx + edi*4]
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0x10], edi
inc edi
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], str.arg__d:__s_n
mov dword [esp + 8], 0x404170
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
cmp edi, esi
jne 0x401bf5
mov ebx, esi
movzx esi, word [ebp - 0x6fc]
jmp 0x401889
test byte [section..data], 1
je 0x401b0b
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 0x401b0b
lea eax, [edi + 1]
cmp eax, ebx
jne 0x40194a
mov eax, dword [ebp - 0x700]
lea ebx, [ebp - 0x6f8]
mov dword [esp + 0xc], 0
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x104
mov eax, dword [eax + edi*4]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFullPathNameW]
sub esp, 0x10
test eax, eax
je 0x40194a
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 0x401ea9
mov dword [esp], ebx
call dword [sym.imp.shlwapi.dll_PathFileExistsW]
sub esp, 4
test eax, eax
je 0x401d4a
mov eax, dword [0x406004]
test eax, eax
jne 0x401d4a
lea esi, [ebp - 0x2e8]
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 0x40194a
test byte [section..data], 8
jne 0x401eda
mov eax, dword [ebp - 0x704]
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 0x40194a
cmp ebx, edi
jle 0x401e03
cmp word [ebp - 0x6f8], 0
je 0x401e28
lea ebx, [ebp - 0x6f8]
mov dword [esp], ebx
call dword [sym.imp.shlwapi.dll_PathAddBackslashW]
sub esp, 4
jmp 0x401914
inc edi
cmp edi, dword [ebp - 0x6fc]
jge 0x40194a
lea eax, [ebp - 0x6f8]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x700]
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 0x401b0b
jmp 0x40194a
mov dword [ebp - 0x704], ecx
jmp 0x401b0b
lea ebx, [ebp - 0x6f8]
mov dword [esp], ebx
call dword [sym.imp.shlwapi.dll_PathAddBackslashW]
sub esp, 4
jmp 0x40190a
cmp word [ebp - 0x6f8], 0
jne 0x401d98
lea ebx, [ebp - 0x6f8]
mov dword [esp], 0x104
mov dword [esp + 4], ebx
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
sub esp, 8
jmp 0x401d98
mov eax, dword [ebp - 0x700]
mov dword [eax], 0
test byte [section..data], 8
je 0x40194a
mov dword [esp], section..data
call sym.___wine_dbg_get_channel_flags
jmp 0x40194a
mov eax, dword [ebp - 0x704]
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 0x40194a
mov eax, dword [ebp - 0x704]
mov dword [esp], eax
call dword [sym.imp.shlwapi.dll_PathFindFileNameW]
sub esp, 4
mov dword [esp + 4], ebx
lea ebx, [ebp - 0x4f0]
mov dword [esp + 8], eax
mov dword [esp], ebx
call dword [sym.imp.shlwapi.dll_PathCombineW]
sub esp, 0xc
jmp 0x401ce2
mov eax, ebx
call sym._wine_dbgstr_wn.constprop.0
mov esi, eax
mov eax, dword [ebp - 0x704]
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 0x401d57
mov dword [esp + 8], ecx
jmp 0x401a10