Function at 0x4012d0
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 sym.___main
cmp esi, 2
jle 0x401536
cmp esi, 3
jne 0x40142f
mov edx, dword [ebx + 4]
movzx eax, byte [edx]
and al, 0xfd
cmp al, 0x2d
je 0x40156d
mov dword [esp + 0xc], 0
lea esi, [ebp - 0x428]
mov dword [esp + 8], esi
mov dword [esp + 4], 0x104
mov eax, dword [ebx + 4]
mov dword [esp], eax
mov edx, dword [sym.imp.kernel32.dll_GetFullPathNameA]
mov dword [ebp - 0x54c], edx
call edx
lea eax, [ebp - 0x53c]
sub esp, 0x10
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x220]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x104
mov dword [esp + 4], eax
mov dword [esp], esi
call sym._SetupGetFileCompressionInfoExA_28
mov edx, dword [ebp - 0x54c]
sub esp, 0x1c
test eax, eax
je 0x4015d3
mov ecx, dword [ebx + 4]
movzx eax, byte [ecx]
and al, 0xfd
cmp al, 0x2d
jne 0x4014ad
mov dword [esp + 4], 0x40202b
inc ecx
mov edi, dword [sym.imp.kernel32.dll_lstrcmpA]
mov dword [esp], ecx
mov dword [ebp - 0x54c], edx
call edi
push edx
test eax, eax
push edx
mov edx, dword [ebp - 0x54c]
je 0x4013fb
mov ecx, dword [ebx + 4]
movzx eax, byte [ecx]
and al, 0xfd
cmp al, 0x2d
jne 0x4014ad
mov dword [esp + 4], 0x40202d
inc ecx
mov dword [esp], ecx
mov dword [ebp - 0x54c], edx
call edi
mov edx, dword [ebp - 0x54c]
push edi
test eax, eax
push edi
jne 0x4014ad
mov eax, dword [ebp - 0x53c]
cmp eax, 1
je 0x40170f
cmp eax, 2
je 0x40172e
mov eax, dword [ebx]
mov dword [esp], str._s:_cant_determine_original_n
mov dword [esp + 4], eax
call sym._myprintf
mov eax, 1
jmp 0x40152a
mov dword [esp + 0xc], 0
lea esi, [ebp - 0x428]
mov edx, dword [sym.imp.kernel32.dll_GetFullPathNameA]
mov dword [esp + 8], esi
mov dword [esp + 4], 0x104
mov eax, dword [ebx + 4]
mov dword [ebp - 0x54c], edx
mov dword [esp], eax
call edx
lea eax, [ebp - 0x53c]
sub esp, 0x10
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x220]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x104
mov dword [esp + 4], eax
mov dword [esp], esi
call sym._SetupGetFileCompressionInfoExA_28
mov edx, dword [ebp - 0x54c]
sub esp, 0x1c
test eax, eax
je 0x4015d3
mov dword [esp + 0xc], 0
lea edi, [ebp - 0x324]
mov dword [esp + 8], edi
mov dword [esp + 4], 0x104
mov eax, dword [ebx + 8]
mov dword [esp], eax
call edx
sub esp, 0x10
mov dword [esp + 4], edi
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_lstrcmpiA]
push edx
test eax, eax
push edx
je 0x4016d7
mov eax, dword [ebp - 0x53c]
cmp eax, 1
je 0x4015f3
cmp eax, 2
jne 0x40169b
mov dword [esp + 0xc], edi
mov dword [esp + 8], sym._extract_callback_16
mov dword [esp + 4], 0
mov dword [esp], esi
call sym._SetupIterateCabinetA_16
sub esp, 0x10
test eax, eax
je 0x4016f3
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], str.Usage:_n
call sym._myprintf
mov eax, dword [ebx]
mov dword [esp], str._t_s_infile_outfile_n
mov dword [esp + 4], eax
call sym._myprintf
mov eax, dword [ebx]
mov dword [esp], str._t_s__r_infile_n
mov dword [esp + 4], eax
call sym._myprintf
mov eax, 1
jmp 0x40152a
mov dword [esp + 4], 0x40202b
inc edx
mov esi, dword [sym.imp.kernel32.dll_lstrcmpA]
mov dword [esp], edx
call esi
push edi
test eax, eax
push edi
je 0x4015b1
mov eax, dword [ebx + 4]
movzx edx, byte [eax]
and dl, 0xfd
cmp dl, 0x2d
jne 0x401313
mov dword [esp + 4], 0x40202d
inc eax
mov dword [esp], eax
call esi
push ecx
test eax, eax
push ecx
jne 0x401313
lea esi, [ebp - 0x428]
mov dword [esp + 0xc], 0
mov dword [esp + 8], esi
mov dword [esp + 4], 0x104
mov eax, dword [ebx + 8]
jmp 0x401330
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 sym._myprintf
mov eax, 1
jmp 0x40152a
mov dword [esp + 8], 0
lea eax, [ebp - 0x538]
mov dword [esp + 4], eax
mov dword [esp], esi
call sym._LZOpenFileA_12
sub esp, 0xc
test eax, eax
js 0x4017b3
mov dword [ebp - 0x54c], eax
lea eax, [ebp - 0x4b0]
mov dword [esp + 8], 0x1001
mov dword [esp + 4], eax
mov dword [esp], edi
call sym._LZOpenFileA_12
mov edx, dword [ebp - 0x54c]
sub esp, 0xc
test eax, eax
mov esi, eax
js 0x4017ce
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [ebp - 0x54c], edx
call sym._LZCopy_8
push edx
mov edi, eax
push edx
mov edx, dword [ebp - 0x54c]
mov dword [esp], edx
call sym._LZClose_4
push ecx
mov dword [esp], esi
call sym._LZClose_4
xor eax, eax
test edi, edi
push esi
jns 0x40152a
mov dword [esp + 8], edi
mov eax, dword [ebx]
mov dword [esp], str._s:_LZCopy_failed__error_is__d_n
mov dword [esp + 4], eax
call sym._myprintf
jmp 0x4016cd
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_CopyFileA]
sub esp, 0xc
test eax, eax
jne 0x401528
mov eax, dword [ebx]
mov dword [esp], str._s:_CopyFileA_failed_n
mov dword [esp + 4], eax
call sym._myprintf
mov eax, 1
jmp 0x40152a
mov eax, dword [ebx]
mov dword [esp], str._s:_cant_expand_file_to_itself_n
mov dword [esp + 4], eax
call sym._myprintf
mov eax, 1
jmp 0x40152a
mov eax, dword [ebx]
mov dword [esp], str._s:_cabinet_extraction_failed_n
mov dword [esp + 4], eax
call sym._myprintf
mov eax, 1
jmp 0x40152a
mov dword [esp], esi
lea eax, [ebp - 0x11c]
mov dword [esp + 4], eax
lea edi, [ebp - 0x324]
call sym._GetExpandedNameA_8
push ecx
push ecx
jmp 0x4014d2
mov dword [esp + 8], sym._set_outfile_16
lea eax, [ebp - 0x11c]
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0
mov dword [esp], esi
mov dword [ebp - 0x54c], edx
mov byte [ebp - 0x11c], 0
call sym._SetupIterateCabinetA_16
mov edx, dword [ebp - 0x54c]
sub esp, 0x10
test eax, eax
je 0x4017f2
mov dword [esp], esi
lea eax, [ebp - 0x540]
mov dword [esp + 0xc], eax
lea edi, [ebp - 0x324]
mov dword [esp + 8], edi
mov dword [esp + 4], 0x104
call edx
mov eax, dword [ebp - 0x540]
mov byte [eax], 0
lea eax, [ebp - 0x11c]
sub esp, 0x10
mov dword [esp + 4], eax
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_strcat]
jmp 0x4014d2
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 sym._myprintf
jmp 0x4016cd
mov dword [esp], edx
call sym._LZClose_4
push eax
mov dword [esp + 8], edi
mov eax, dword [ebx]
mov dword [esp], str._s:_cant_open_output_file__s_n
mov dword [esp + 4], eax
call sym._myprintf
jmp 0x4016cd
mov eax, dword [ebx]
mov dword [esp], str._s:_cant_determine_original_name_n
mov dword [esp + 4], eax
call sym._myprintf
mov eax, 1
jmp 0x40152a