Function at 0x66586b
Capabilities:
Check if file exists
Copy file
Move file

Disassembly:
push 0x1c
mov eax, 0x69e517
call fcn.0049be25
and dword [ebp - 0x24], 0
xor ebx, ebx
inc ebx
call fcn.00474f38
push eax
lea ecx, [ebp - 0x20]
call fcn.00451c1b
and dword [ebp - 4], 0
lea eax, [ebp - 0x18]
push eax
call fcn.00670e3b
mov esi, eax
lea eax, [ebp - 0x28]
mov byte [ebp - 4], bl
push eax
lea eax, [ebp - 0x24]
push eax
push 0x23
pop edx
lea ecx, [ebp - 0x1c]
call fcn.0068a4ce
pop ecx
pop ecx
mov byte [ebp - 4], 2
mov ecx, eax
push dword [esi]
call fcn.0045156f
push eax
lea eax, [ebp - 0x20]
push 0x751814
push eax
call fcn.00452465
mov ecx, dword [ebp - 0x1c]
add esp, 0x10
lea ecx, [ecx - 0x10]
call fcn.0044ec01
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.0044ec01
push ecx
push ecx
call fcn.0066611d
mov esi, dword [ebp - 0x20]
mov edi, eax
push 0
push esi
push ecx
mov eax, esp
push ecx
push eax
call fcn.00670e20
lea ecx, [ebp - 0x24]
call fcn.00689b73
pop ecx
mov ecx, eax
call fcn.004513db
cmp eax, 0xffffffff
je 0x665921
mov byte [ebp - 0xd], bl
cmp edi, ebx
je 0x665925
mov byte [ebp - 0xd], 0
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx - 0x10]
call fcn.0044ec01
cmp byte [ebp - 0xd], 0
je 0x665b04
call fcn.00474f38
push eax
lea ecx, [ebp - 0x14]
call fcn.00451c1b
mov byte [ebp - 4], 3
call fcn.00474f38
push eax
lea ecx, [ebp - 0x24]
call fcn.00451c1b
mov byte [ebp - 4], 4
call fcn.00474f38
push eax
lea ecx, [ebp - 0x1c]
call fcn.00451c1b
mov byte [ebp - 4], 5
call fcn.00474f38
push eax
lea ecx, [ebp - 0x18]
call fcn.00451c1b
push 0x7af264
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 6
call fcn.00451d78
lea eax, [ebp - 0x28]
push eax
call fcn.00670dea
mov byte [ebp - 4], 7
mov edi, 0x751814
push dword [eax]
lea eax, [ebp - 0x14]
push dword [ebp - 0x18]
push edi
push eax
call fcn.00452465
mov byte [ebp - 4], 6
add esp, 0x10
mov ecx, dword [ebp - 0x28]
lea ecx, [ecx - 0x10]
call fcn.0044ec01
lea eax, [ebp - 0x28]
push eax
call fcn.00670dea
mov byte [ebp - 4], 8
push dword [eax]
lea eax, [ebp - 0x24]
push esi
push edi
push eax
call fcn.00452465
mov byte [ebp - 4], 6
add esp, 0x10
mov ecx, dword [ebp - 0x28]
lea ecx, [ecx - 0x10]
call fcn.0044ec01
push esi
lea eax, [ebp - 0x1c]
push str._sZAServiceTemp.exe
push eax
call fcn.00452465
mov esi, dword [ebp - 0x1c]
add esp, 0xc
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x665a32
push esi
call fcn.005120b1
pop ecx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push esi
push str.RunAsSvcHandler::UpdateSvcExeForNonAdminContext
push str._s_::_Remove_file___s__retcode__d___lasterror:_d
call fcn.00677869
add esp, 0x14
mov edi, dword [ebp - 0x24]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x665a6a
push esi
push edi
call fcn.00512407
pop ecx
pop ecx
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push esi
push edi
push str.RunAsSvcHandler::UpdateSvcExeForNonAdminContext
push str._s_::_Rename_src_s__dest_s____retcode__d___lasterror:_d
call fcn.00677869
xor ebx, ebx
add esp, 0x18
inc ebx
mov esi, dword [ebp - 0x14]
cmp dword [esi - 4], ebx
jle 0x665a80
push dword [esi - 0xc]
lea ecx, [ebp - 0x14]
call fcn.00451ca4
mov esi, dword [ebp - 0x14]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x665adb
cmp dword [esi - 4], ebx
jle 0x665a9e
push dword [esi - 0xc]
lea ecx, [ebp - 0x14]
call fcn.00451ca4
mov esi, dword [ebp - 0x14]
push ebx
xor dl, dl
mov ecx, esi
call fcn.0068a223
pop ecx
test al, al
je 0x665adb
push 0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push edi
push esi
push str.RunAsSvcHandler::UpdateSvcExeForNonAdminContext
push str._s_::_CopyFile_src_s__dest_s____retcode__d___lasterror:_d
call fcn.00677869
add esp, 0x18
cmp ebx, 1
sete bl
mov ecx, dword [ebp - 0x18]
lea ecx, [ecx - 0x10]
call fcn.0044ec01
mov ecx, dword [ebp - 0x1c]
lea ecx, [ecx - 0x10]
call fcn.0044ec01
lea ecx, [edi - 0x10]
call fcn.0044ec01
lea ecx, [esi - 0x10]
call fcn.0044ec01
mov esi, dword [ebp - 0x20]
lea ecx, [esi - 0x10]
call fcn.0044ec01
mov al, bl
call fcn.0049bdee
ret