Function at 0x4016c0
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, 0x708
mov ebx, dword [ebp + 0x10]
call dword [sym.imp.comctl32.dll_InitCommonControls]
xor ecx, ecx
mov word [ebp - 0x6ec], cx
test byte [section..data], 8
jne 0x401a40
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll__wcsdup]
mov edi, eax
movzx eax, byte [section..data]
mov byte [ebp - 0x6fc], al
test edi, edi
je 0x40197c
mov dword [esp], 0x44
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x6f4], eax
test eax, eax
je 0x401966
movzx esi, word [edi]
test si, si
je 0x401d1c
mov dword [ebp - 0x6f0], 0
mov eax, edi
xor ebx, ebx
mov edi, esi
mov dword [ebp - 0x6f8], 0x10
mov esi, eax
jmp 0x40176a
mov eax, esi
cmp ebx, 1
jne 0x40175e
xor edx, edx
xor ebx, ebx
mov word [esi], dx
movzx edi, word [eax + 2]
add esi, 2
test di, di
je 0x4017d0
movzx eax, di
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_iswspace]
test eax, eax
jne 0x401750
cmp di, 0x22
je 0x4018e0
test ebx, ebx
jne 0x401900
mov ebx, 1
mov eax, dword [ebp - 0x6f8]
mov edx, dword [ebp - 0x6f0]
sub eax, 1
cmp eax, edx
jle 0x401930
mov ecx, dword [ebp - 0x6f0]
mov eax, dword [ebp - 0x6f4]
lea edx, [ecx + 1]
mov dword [eax + ecx*4], esi
mov eax, esi
add esi, 2
movzx edi, word [eax + 2]
mov dword [ebp - 0x6f0], edx
test di, di
jne 0x40176a
nop
mov eax, dword [ebp - 0x6f4]
mov edx, dword [ebp - 0x6f0]
mov dword [eax + edx*4], 0
test byte [ebp - 0x6fc], 8
jne 0x401a78
mov edi, dword [ebp - 0x6f4]
test edi, edi
je 0x40196f
mov esi, dword [ebp - 0x6f0]
test esi, esi
je 0x4018ca
mov esi, dword [ebp - 0x6f4]
xor ebx, ebx
mov dword [ebp - 0x6fc], 0
mov word [ebp - 0x6f8], bx
xor ebx, ebx
mov edx, dword [esi + ebx*4]
lea edi, [ebx*4]
movzx eax, word [edx]
and eax, 0xfffffffd
cmp ax, 0x2d
je 0x4019b8
mov ecx, dword [ebp - 0x6fc]
test ecx, ecx
je 0x401cf8
cmp word [ebp - 0x6f8], 0x43
je 0x401b10
cmp word [ebp - 0x6f8], 0
jne 0x401c0e
cmp dword [ebp - 0x6f0], ebx
jg 0x401c50
lea ebx, [ebp - 0x6ec]
mov dword [esp], ebx
call dword [sym.imp.shlwapi.dll_PathAddBackslashW]
sub esp, 4
mov dword [section..bss], 1
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x4013a0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x6fc]
mov dword [esp], eax
call dword [sym.imp.setupapi.dll_SetupIterateCabinetW]
sub esp, 0x10
test eax, eax
jne 0x4018ca
test byte [section..data], 2
jne 0x401d46
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
cmp ebx, 1
je 0x401910
cmp ebx, 2
jne 0x401915
xor eax, eax
xor ebx, ebx
mov word [esi], ax
mov eax, esi
jmp 0x40175e
mov eax, esi
jmp 0x40175e
xor eax, eax
mov word [esi], ax
cmp word [esi + 2], 0
je 0x4017d0
add esi, 2
mov ebx, 2
jmp 0x401791
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 0x4017a8
mov edi, esi
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_free]
movzx eax, byte [section..data]
mov byte [ebp - 0x6fc], al
test byte [ebp - 0x6fc], 2
je 0x4018ca
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 fcn.00401340
jmp 0x4018ca
movzx eax, word [edx + 2]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_towupper]
cmp ax, 0x4c
je 0x401cab
ja 0x401a20
cmp ax, 0x41
je 0x401c75
lea edx, [eax - 0x43]
cmp dx, 2
ja 0x4018ca
cmp word [ebp - 0x6f8], 0
jne 0x4018ca
mov word [ebp - 0x6f8], ax
add ebx, 1
cmp dword [ebp - 0x6f0], ebx
jg 0x401827
mov edx, dword [ebp - 0x6fc]
test edx, edx
je 0x4018ca
jmp 0x40184f
cmp ax, 0x59
jne 0x4018ca
mov dword [0x406004], 1
jmp 0x4019fd
mov eax, ebx
call fcn.00401060
mov dword [esp + 0xc], str.cmdline:__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0x405170
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call fcn.00401340
jmp 0x4016eb
mov dword [esp], section..data
call fcn.00402740
test al, 8
je 0x4017f0
mov esi, dword [ebp - 0x6f0]
test esi, esi
je 0x401df4
mov edi, dword [ebp - 0x6f4]
xor ebx, ebx
jmp 0x401aaf
add ebx, 1
cmp esi, ebx
je 0x401af3
test byte [section..data], 8
je 0x401aa8
mov eax, dword [edi + ebx*4]
call fcn.00401060
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], 0x405170
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call fcn.00401340
cmp esi, ebx
jne 0x401aaf
mov eax, dword [ebp - 0x6f4]
test eax, eax
jne 0x40180c
jmp 0x40196f
lea eax, [ebx + 1]
cmp dword [ebp - 0x6f0], eax
jne 0x4018ca
mov dword [esp + 0xc], 0
lea esi, [ebp - 0x6ec]
mov dword [esp + 4], 0x104
mov dword [esp + 8], esi
mov eax, dword [ebp - 0x6f4]
mov eax, dword [eax + ebx*4]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFullPathNameW]
sub esp, 0x10
test eax, eax
je 0x4018ca
mov dword [esp], esi
call dword [sym.imp.shlwapi.dll_PathAddBackslashW]
sub esp, 4
mov dword [esp], esi
call dword [sym.imp.shlwapi.dll_PathIsDirectoryW]
sub esp, 4
test eax, eax
jne 0x401d7e
mov dword [esp], esi
call dword [sym.imp.shlwapi.dll_PathFileExistsW]
sub esp, 4
test eax, eax
je 0x401bde
mov eax, dword [0x406004]
test eax, eax
jne 0x401bde
lea ebx, [ebp - 0x2dc]
mov dword [esp + 0xc], esi
mov dword [esp + 8], str.Overwrite___s__
mov dword [esp + 4], 0x168
mov dword [esp], ebx
call fcn.00401290
mov dword [esp + 0xc], 0x34
mov dword [esp + 8], str.Extract
mov dword [esp + 4], ebx
mov dword [esp], 0
call dword [sym.imp.user32.dll_MessageBoxW]
sub esp, 0x10
cmp eax, 6
jne 0x4018ca
test byte [section..data], 8
jne 0x401daf
mov dword [esp + 8], 0
mov dword [esp + 4], esi
mov eax, dword [ebp - 0x6fc]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CopyFileW]
sub esp, 0xc
jmp 0x4018ca
cmp word [ebp - 0x6f8], 0x45
je 0x401c50
lea ebx, [ebp - 0x6ec]
mov dword [esp], ebx
call dword [sym.imp.shlwapi.dll_PathAddBackslashW]
movzx eax, word [ebp - 0x6f8]
sub esp, 4
cmp ax, 0x42
jbe 0x4018ca
cmp ax, 0x44
jne 0x4018ca
jmp 0x401889
cmp word [ebp - 0x6ec], 0
lea ebx, [ebp - 0x6ec]
je 0x401d03
mov dword [esp], ebx
call dword [sym.imp.shlwapi.dll_PathAddBackslashW]
sub esp, 4
jmp 0x401893
test byte [section..data], 1
je 0x4019fd
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 fcn.00401340
jmp 0x4019fd
add ebx, 1
cmp dword [ebp - 0x6f0], ebx
jle 0x4018ca
lea eax, [ebp - 0x6ec]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 0x104
mov eax, dword [esi + edi + 4]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFullPathNameW]
sub esp, 0x10
test eax, eax
jne 0x4019fd
jmp 0x4018ca
mov dword [ebp - 0x6fc], edx
jmp 0x4019fd
mov dword [esp + 4], ebx
mov dword [esp], 0x104
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
sub esp, 8
jmp 0x401c64
mov eax, dword [ebp - 0x6f4]
mov dword [eax], 0
test byte [ebp - 0x6fc], 8
je 0x4018ca
mov dword [esp], section..data
call fcn.00402740
jmp 0x4018ca
mov eax, dword [ebp - 0x6fc]
call fcn.00401060
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 fcn.00401340
jmp 0x4018ca
mov eax, dword [ebp - 0x6fc]
mov dword [esp], eax
call dword [sym.imp.shlwapi.dll_PathFindFileNameW]
sub esp, 4
mov dword [esp + 4], esi
lea esi, [ebp - 0x4e4]
mov dword [esp + 8], eax
mov dword [esp], esi
call dword [sym.imp.shlwapi.dll_PathCombineW]
sub esp, 0xc
jmp 0x401b76
mov eax, esi
call fcn.00401060
mov ebx, eax
mov eax, dword [ebp - 0x6fc]
call fcn.00401060
mov dword [esp + 0x14], ebx
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 fcn.00401340
jmp 0x401beb
mov eax, dword [ebp - 0x6f4]
test eax, eax
je 0x40196f
jmp 0x4018ca