Function at 0x401690
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 esi, dword [ecx + 8]
call sym._InitCommonControls_0
xor eax, eax
mov word [ebp - 0x6f8], ax
test byte [section..data], 8
jne 0x401aa0
cmp word [esi], 0
je 0x401ad9
mov eax, esi
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x4016d8
sub eax, esi
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 edi, eax
test eax, eax
je 0x4019c4
xor eax, eax
lea esi, [esi]
movzx ecx, word [esi + eax]
mov word [edi + eax], cx
add eax, 2
test cx, cx
jne 0x401720
mov dword [ebp - 0x6fc], ecx
mov eax, dword fs:[0x18]
mov dword [ebp - 0x708], eax
mov dword [esp + 8], 0x44
mov dword [esp + 4], 0
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov dword [ebp - 0x700], eax
sub esp, 0xc
test eax, eax
je 0x401e24
movzx ebx, word [edi]
mov ecx, dword [ebp - 0x6fc]
test bx, bx
je 0x401dfa
mov dword [ebp - 0x704], 0x10
xor esi, esi
mov dword [ebp - 0x6fc], 0
mov word [ebp - 0x70a], cx
lea esi, [esi]
movzx eax, bx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_iswspace]
test eax, eax
je 0x4018d0
cmp dword [ebp - 0x6fc], 1
je 0x4018b0
mov ebx, edi
lea edi, [ebx + 2]
movzx ebx, word [ebx + 2]
test bx, bx
jne 0x4017a0
mov eax, dword [ebp - 0x700]
movzx ecx, word [ebp - 0x70a]
mov dword [eax + esi*4], 0
test byte [section..data], 8
jne 0x401ae8
mov edi, dword [ebp - 0x700]
test edi, edi
je 0x4019c4
test esi, esi
jle 0x401898
mov dword [ebp - 0x6fc], 0
xor edi, edi
mov word [ebp - 0x704], cx
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 0x401a00
mov ebx, dword [ebp - 0x6fc]
test ebx, ebx
je 0x401dd6
movzx ecx, word [ebp - 0x704]
cmp cx, 0x43
je 0x401b90
test cx, cx
je 0x401c90
cmp cx, 0x45
je 0x401d28
lea ebx, [ebp - 0x6f8]
mov dword [ebp - 0x700], ecx
mov dword [esp], ebx
call sym._PathAddBackslashW_4
mov ecx, dword [ebp - 0x700]
sub esp, 4
cmp cx, 0x42
jbe 0x401898
cmp cx, 0x44
je 0x401ca9
lea esp, [ebp - 0x10]
xor eax, eax
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x10
mov dword [ebp - 0x6fc], 0
xor eax, eax
mov ebx, edi
mov word [edi], ax
jmp 0x4017c3
cmp bx, 0x22
je 0x401910
mov eax, dword [ebp - 0x6fc]
mov ebx, edi
test eax, eax
jne 0x4017c3
mov dword [ebp - 0x6fc], 1
mov eax, dword [ebp - 0x704]
sub eax, 1
cmp esi, eax
jge 0x401951
mov eax, dword [ebp - 0x700]
mov dword [eax + esi*4], ebx
add esi, 1
jmp 0x4017c3
mov eax, dword [ebp - 0x6fc]
cmp eax, 1
je 0x401a70
cmp eax, 2
je 0x4018b0
test eax, eax
jne 0x4017c1
cmp word [edi + 2], 0
je 0x4017cf
mov eax, dword [ebp - 0x704]
lea ebx, [edi + 2]
mov dword [ebp - 0x6fc], 2
sub eax, 1
cmp esi, eax
jl 0x4018fd
shl dword [ebp - 0x704], 1
mov eax, dword [ebp - 0x704]
lea eax, [eax*4 + 4]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x700]
mov dword [esp + 4], 0
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 0x4018fd
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
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_HeapFree]
sub esp, 0xc
test byte [section..data], 2
je 0x401898
mov dword [esp + 0xc], str.Command_line_parsing_failed_n
mov dword [esp + 8], global___FUNCTION__.0
mov dword [esp + 4], 0x403000
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x401898
movzx eax, word [ecx + 2]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_towupper]
cmp ax, 0x4c
je 0x401d50
ja 0x401a80
cmp ax, 0x41
je 0x401da0
lea ecx, [eax - 0x43]
cmp cx, 2
ja 0x401898
cmp word [ebp - 0x704], 0
jne 0x401898
mov word [ebp - 0x704], ax
add edi, 1
cmp edi, esi
jl 0x401819
mov edx, dword [ebp - 0x6fc]
movzx ecx, word [ebp - 0x704]
test edx, edx
je 0x401898
jmp 0x40184e
xor eax, eax
mov word [edi], ax
jmp 0x40192c
cmp ax, 0x59
jne 0x401898
mov dword [0x405004], 1
jmp 0x401a45
mov eax, esi
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 [esi], 0
jne 0x4016cf
mov eax, 2
jmp 0x4016e6
mov dword [ebp - 0x6fc], ecx
mov dword [esp], section..data
call sym.___wine_dbg_get_channel_flags
mov ecx, dword [ebp - 0x6fc]
test al, 8
je 0x4017f0
test esi, esi
jle 0x401ea1
mov word [ebp - 0x6fc], cx
mov edi, dword [ebp - 0x700]
xor ebx, ebx
jmp 0x401b2f
add ebx, 1
cmp esi, ebx
je 0x401b73
test byte [section..data], 8
je 0x401b28
mov eax, dword [edi + ebx*4]
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0x10], ebx
add ebx, 1
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 esi, ebx
jne 0x401b2f
mov eax, dword [ebp - 0x700]
movzx ecx, word [ebp - 0x6fc]
test eax, eax
jne 0x401806
jmp 0x4019c4
lea eax, [edi + 1]
cmp eax, esi
jne 0x401898
lea ebx, [ebp - 0x6f8]
mov dword [esp + 0xc], 0
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x104
mov eax, dword [ebp - 0x700]
mov eax, dword [eax + edi*4]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFullPathNameW]
sub esp, 0x10
test eax, eax
je 0x401898
mov dword [esp], ebx
call sym._PathAddBackslashW_4
sub esp, 4
mov dword [esp], ebx
call sym._PathIsDirectoryW_4
sub esp, 4
test eax, eax
jne 0x401e2d
mov dword [esp], ebx
call sym._PathFileExistsW_4
sub esp, 4
test eax, eax
je 0x401c56
mov eax, dword [0x405004]
test eax, eax
jne 0x401c56
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 sym._MessageBoxW_16
sub esp, 0x10
cmp eax, 6
jne 0x401898
test byte [section..data], 8
jne 0x401e5c
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x6fc]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CopyFileW]
sub esp, 0xc
jmp 0x401898
cmp edi, esi
jl 0x401d28
lea ebx, [ebp - 0x6f8]
mov dword [esp], ebx
call sym._PathAddBackslashW_4
sub esp, 4
mov dword [section..bss], 1
mov dword [esp + 0xc], ebx
mov dword [esp + 8], dbg.ExtCabCallback
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x6fc]
mov dword [esp], eax
call sym._SetupIterateCabinetW_16
sub esp, 0x10
test eax, eax
jne 0x401898
test byte [section..data], 2
je 0x401898
mov eax, dword [ebp - 0x6fc]
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 0x401898
cmp word [ebp - 0x6f8], 0
lea ebx, [ebp - 0x6f8]
je 0x401de1
mov dword [esp], ebx
call sym._PathAddBackslashW_4
sub esp, 4
jmp 0x401cb3
add edi, 1
cmp edi, esi
jge 0x401898
lea eax, [ebp - 0x6f8]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 0x104
mov eax, dword [ebp - 0x700]
mov eax, dword [eax + ebx + 4]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFullPathNameW]
sub esp, 0x10
test eax, eax
jne 0x401a45
jmp 0x401898
test byte [section..data], 1
je 0x401a45
mov dword [esp + 0xc], str._A_not_implemented_n
mov dword [esp + 8], global___FUNCTION__.0
mov dword [esp + 4], 0x403000
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x401a45
mov dword [ebp - 0x6fc], ecx
jmp 0x401a45
mov dword [esp + 4], ebx
mov dword [esp], 0x104
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
sub esp, 8
jmp 0x401d3c
mov eax, dword [ebp - 0x700]
mov dword [eax], 0
test byte [section..data], 8
je 0x401898
mov dword [esp], section..data
call sym.___wine_dbg_get_channel_flags
jmp 0x401898
mov dword [esp + 8], edi
jmp 0x4019a4
mov eax, dword [ebp - 0x6fc]
mov dword [esp], eax
call sym._PathFindFileNameW_4
sub esp, 4
mov dword [esp + 4], ebx
lea ebx, [ebp - 0x4f0]
mov dword [esp + 8], eax
mov dword [esp], ebx
call sym._PathCombineW_12
sub esp, 0xc
jmp 0x401bf0
mov eax, ebx
call sym._wine_dbgstr_wn.constprop.0
mov esi, eax
mov eax, dword [ebp - 0x6fc]
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 0x401c63
cmp dword [ebp - 0x700], 0
je 0x4019c4
jmp 0x401898