Function at 0x4012e0
Capabilities:
Copy file

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, 0x568
mov esi, dword [ecx]
mov ebx, dword [ecx + 4]
call fcn.004011d0
cmp esi, 2
jle 0x4014e5
mov eax, dword [ebx + 4]
cmp esi, 3
je 0x401429
lea esi, [ebp - 0x428]
xor eax, eax
mov dword [esp + 4], 0x104
mov edi, dword [sym.imp.kernel32.dll_GetFullPathNameA]
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov eax, dword [ebx + 4]
mov dword [esp], eax
call edi
lea eax, [ebp - 0x53c]
xor edx, edx
sub esp, 0x10
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x220]
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x104
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.setupapi.dll_SetupGetFileCompressionInfoExA
sub esp, 0x1c
test eax, eax
je 0x40140c
lea eax, [ebp - 0x324]
xor ecx, ecx
mov dword [esp + 0xc], ecx
mov dword [ebp - 0x54c], eax
mov dword [esp + 8], eax
mov dword [esp + 4], 0x104
mov eax, dword [ebx + 8]
mov dword [esp], eax
call edi
sub esp, 0x10
mov eax, dword [ebp - 0x54c]
mov dword [esp], esi
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_lstrcmpiA]
push edx
push edx
test eax, eax
je 0x401651
mov eax, dword [ebp - 0x53c]
cmp eax, 1
je 0x4015ab
cmp eax, 2
je 0x40151a
xor edi, edi
mov dword [esp + 8], edi
mov eax, dword [ebp - 0x54c]
mov dword [esp], esi
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_CopyFileA]
sub esp, 0xc
test eax, eax
je 0x401710
xor eax, eax
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov dword [esp + 8], esi
mov eax, dword [ebx]
mov dword [esp], str._s:_cant_open_input_file__s_n
mov dword [esp + 4], eax
call fcn.00401110
mov eax, 1
jmp 0x401400
mov edx, 0x40202b
call fcn.004010e0
test eax, eax
je 0x40155c
lea esi, [ebp - 0x428]
xor eax, eax
mov dword [esp + 4], 0x104
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov eax, dword [ebx + 8]
mov edi, dword [sym.imp.kernel32.dll_GetFullPathNameA]
mov dword [esp], eax
call edi
lea eax, [ebp - 0x53c]
xor ecx, ecx
sub esp, 0x10
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x220]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 0x104
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.setupapi.dll_SetupGetFileCompressionInfoExA
sub esp, 0x1c
test eax, eax
je 0x40140c
mov eax, dword [ebx + 4]
mov edx, 0x40202b
call fcn.004010e0
test eax, eax
je 0x401591
mov eax, dword [ebp - 0x53c]
cmp eax, 1
je 0x4016eb
cmp eax, 2
je 0x401668
mov eax, dword [ebx]
mov dword [esp], str._s:_cant_determine_original_n
mov dword [esp + 4], eax
call fcn.00401110
jmp 0x401422
mov dword [esp], str.Usage:_n
call fcn.00401110
mov eax, dword [ebx]
mov dword [esp], str._t_s_infile_outfile_n
mov dword [esp + 4], eax
call fcn.00401110
mov eax, dword [ebx]
mov dword [esp], str._t_s__r_infile_n
mov dword [esp + 4], eax
call fcn.00401110
jmp 0x401422
mov eax, dword [ebp - 0x54c]
mov dword [esp + 8], 0x401000
mov dword [esp], esi
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 4], eax
call sub.setupapi.dll_SetupIterateCabinetA
sub esp, 0x10
test eax, eax
jne 0x4013fe
mov eax, dword [ebx]
mov dword [esp], str._s:_cabinet_extraction_failed_n
mov dword [esp + 4], eax
call fcn.00401110
jmp 0x401422
mov eax, dword [ebx + 4]
mov edx, 0x40202d
call fcn.004010e0
test eax, eax
jne 0x40143b
xor esi, esi
mov dword [esp + 4], 0x104
mov dword [esp + 0xc], esi
lea esi, [ebp - 0x428]
mov dword [esp + 8], esi
mov eax, dword [ebx + 4]
jmp 0x401456
mov eax, dword [ebx + 4]
mov edx, 0x40202d
call fcn.004010e0
test eax, eax
jne 0x4014b6
jmp 0x40137c
xor eax, eax
mov dword [esp], esi
mov dword [esp + 8], eax
lea eax, [ebp - 0x538]
mov dword [esp + 4], eax
call sub.kernel32.dll_LZOpenFileA
sub esp, 0xc
test eax, eax
mov edi, eax
js 0x40140c
lea eax, [ebp - 0x4b0]
mov dword [esp + 8], 0x1001
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x54c]
mov dword [esp], eax
call sub.kernel32.dll_LZOpenFileA
sub esp, 0xc
test eax, eax
mov esi, eax
js 0x40173e
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.kernel32.dll_LZCopy
push edx
push edx
mov dword [ebp - 0x54c], eax
mov dword [esp], edi
call sub.kernel32.dll_LZClose
push ecx
mov dword [esp], esi
call sub.kernel32.dll_LZClose
push esi
cmp dword [ebp - 0x54c], 0
jns 0x4013fe
mov eax, dword [ebp - 0x54c]
mov dword [esp + 8], eax
mov eax, dword [ebx]
mov dword [esp], str._s:_LZCopy_failed__error_is__d_n
mov dword [esp + 4], eax
call fcn.00401110
jmp 0x401422
mov eax, dword [ebx]
mov dword [esp], str._s:_cant_expand_file_to_itself_n
mov dword [esp + 4], eax
call fcn.00401110
jmp 0x401422
lea eax, [ebp - 0x11c]
mov byte [ebp - 0x11c], 0
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], 0x401040
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.setupapi.dll_SetupIterateCabinetA
sub esp, 0x10
test eax, eax
je 0x401727
lea eax, [ebp - 0x540]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x324]
mov dword [ebp - 0x54c], eax
mov dword [esp], esi
mov dword [esp + 8], eax
mov dword [esp + 4], 0x104
call edi
mov eax, dword [ebp - 0x540]
lea edx, [ebp - 0x11c]
sub esp, 0x10
mov byte [eax], 0
mov dword [esp + 4], edx
mov eax, dword [ebp - 0x54c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_strcat]
jmp 0x4013a5
lea eax, [ebp - 0x11c]
mov dword [esp], esi
mov dword [esp + 4], eax
call sub.kernel32.dll_GetExpandedNameA
lea eax, [ebp - 0x324]
push edi
push edi
mov dword [ebp - 0x54c], eax
jmp 0x4013a5
mov eax, dword [ebx]
mov dword [esp], str._s:_CopyFileA_failed_n
mov dword [esp + 4], eax
call fcn.00401110
jmp 0x401422
mov eax, dword [ebx]
mov dword [esp], str._s:_cant_determine_original_name_n
mov dword [esp + 4], eax
call fcn.00401110
jmp 0x401422
mov dword [esp], edi
call sub.kernel32.dll_LZClose
push edi
mov eax, dword [ebp - 0x54c]
mov dword [esp + 8], eax
mov eax, dword [ebx]
mov dword [esp], str._s:_cant_open_output_file__s_n
mov dword [esp + 4], eax
call fcn.00401110
jmp 0x401422