Function at 0x140011724
Capabilities:
Check if file exists
Create process on windows
Delete file
Query environment variable
Self delete

Disassembly:
sub rsp, 0x628
mov qword [rsp + 0x4e0], 0xfffffffffffffffe
lea rcx, str.TEMP
call fcn.140031564
mov qword [rsp + 0x60], rax
lea rax, str.upgrader.exe
mov qword [rsp + 0x58], rax
mov rdx, qword [rsp + 0x58]
lea rcx, [rsp + 0x3f0]
call fcn.140012584
mov qword [rsp + 0x4e8], rax
mov rax, qword [rsp + 0x4e8]
mov qword [rsp + 0x4f0], rax
mov rdx, qword [rsp + 0x60]
lea rcx, [rsp + 0x418]
call fcn.140012584
mov qword [rsp + 0x4f8], rax
mov rax, qword [rsp + 0x4f8]
mov qword [rsp + 0x500], rax
lea r8, [0x140051414]
mov rdx, qword [rsp + 0x500]
lea rcx, [rsp + 0x440]
call fcn.14001a960
mov qword [rsp + 0x508], rax
mov rax, qword [rsp + 0x508]
mov qword [rsp + 0x510], rax
mov r8, qword [rsp + 0x4f0]
mov rdx, qword [rsp + 0x510]
lea rcx, [rsp + 0x68]
call fcn.14001a9b4
mov qword [rsp + 0x518], rax
lea rcx, [rsp + 0x440]
call fcn.140002fb8
nop
lea rcx, [rsp + 0x418]
call fcn.140002fb8
nop
lea rcx, [rsp + 0x3f0]
call fcn.140002fb8
xor r8d, r8d
mov edx, 0x104
lea rcx, [rsp + 0x30]
call fcn.14001aabc
mov qword [rsp + 0x520], rax
xor edx, edx
lea rcx, [rsp + 0x30]
call fcn.14001260c
mov qword [rsp + 0x528], rax
mov r8d, 0x104
mov rdx, qword [rsp + 0x528]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0x30]
call fcn.14001ab3c
mov byte [rsp + 0x530], al
movzx eax, byte [rsp + 0x530]
test eax, eax
je 0x140011d53
lea rcx, [rsp + 0x68]
call fcn.140002fec
mov qword [rsp + 0x538], rax
mov rcx, qword [rsp + 0x538]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x1400118e0
lea rcx, [rsp + 0x68]
call fcn.140002fec
mov qword [rsp + 0x540], rax
mov rcx, qword [rsp + 0x540]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
mov dword [rsp + 0x20], 1
mov r9d, 0x40
mov r8d, 0x20
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x90]
call fcn.1400154dc
mov qword [rsp + 0x548], rax
mov dword [rsp + 0x20], 1
mov r9d, 0x40
mov r8d, 0x20
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0x1a0]
call fcn.140016594
mov qword [rsp + 0x550], rax
mov rax, qword [rsp + 0x90]
movsxd rax, dword [rax + 4]
lea rax, [rsp + rax + 0x90]
mov rcx, rax
call fcn.140011d74
mov qword [rsp + 0x558], rax
cmp qword [rsp + 0x558], 0
je 0x140011d37
mov rax, qword [rsp + 0x1a0]
movsxd rax, dword [rax + 4]
lea rax, [rsp + rax + 0x1a0]
mov rcx, rax
call fcn.140011d74
mov qword [rsp + 0x560], rax
cmp qword [rsp + 0x560], 0
je 0x140011d37
lea rcx, [rsp + 0x90]
call fcn.140015654
mov qword [rsp + 0x568], rax
mov rdx, qword [rsp + 0x568]
lea rcx, [rsp + 0x1a0]
call fcn.14001264c
lea rcx, [rsp + 0x90]
call fcn.140005960
lea rcx, [rsp + 0x1a0]
call fcn.14001670c
lea rcx, [rsp + 0x468]
call fcn.140011498
mov qword [rsp + 0x570], rax
mov rax, qword [rsp + 0x570]
mov qword [rsp + 0x578], rax
mov rdx, qword [rsp + 0x60]
lea rcx, [rsp + 0x490]
call fcn.140012584
mov qword [rsp + 0x580], rax
mov rax, qword [rsp + 0x580]
mov qword [rsp + 0x588], rax
lea r8, [0x1400515cc]
mov rdx, qword [rsp + 0x588]
lea rcx, [rsp + 0x4b8]
call fcn.14001a960
mov qword [rsp + 0x590], rax
mov rax, qword [rsp + 0x590]
mov qword [rsp + 0x598], rax
mov r8, qword [rsp + 0x578]
mov rdx, qword [rsp + 0x598]
lea rcx, [rsp + 0x2b0]
call fcn.14001a9b4
mov qword [rsp + 0x5a0], rax
lea rcx, [rsp + 0x4b8]
call fcn.140002fb8
nop
lea rcx, [rsp + 0x490]
call fcn.140002fb8
nop
lea rcx, [rsp + 0x468]
call fcn.140002fb8
lea rdx, [0x1400519a0]
lea rcx, [rsp + 0x2b0]
call fcn.1400125e8
mov dword [rsp + 0x20], 1
mov r9d, 0x40
mov r8d, 2
lea rdx, [rsp + 0x2b0]
lea rcx, [rsp + 0x2e0]
call fcn.140016594
mov qword [rsp + 0x5a8], rax
mov rax, qword [rsp + 0x2e0]
movsxd rax, dword [rax + 4]
lea rax, [rsp + rax + 0x2e0]
mov rcx, rax
call fcn.140011d74
mov qword [rsp + 0x5b0], rax
cmp qword [rsp + 0x5b0], 0
je 0x140011d1b
lea rdx, str._echo_off
lea rcx, [rsp + 0x2e0]
call fcn.14001ab7c
mov qword [rsp + 0x5b8], rax
lea rdx, [0x140011db0]
mov rcx, qword [rsp + 0x5b8]
call fcn.140012630
lea rdx, str.timeout_3___NUL
lea rcx, [rsp + 0x2e0]
call fcn.14001ab7c
mov qword [rsp + 0x5c0], rax
lea rdx, [0x140011db0]
mov rcx, qword [rsp + 0x5c0]
call fcn.140012630
lea rdx, str.START_____
lea rcx, [rsp + 0x2e0]
call fcn.14001ab7c
mov qword [rsp + 0x5c8], rax
lea rdx, [rsp + 0x68]
mov rcx, qword [rsp + 0x5c8]
call fcn.14001af68
mov qword [rsp + 0x5d0], rax
lea rdx, [0x1400515dc]
mov rcx, qword [rsp + 0x5d0]
call fcn.14001ab7c
mov qword [rsp + 0x5d8], rax
lea rdx, [0x140011db0]
mov rcx, qword [rsp + 0x5d8]
call fcn.140012630
lea rdx, [0x14005167c]
lea rcx, [rsp + 0x2e0]
call fcn.14001ab7c
mov qword [rsp + 0x5e0], rax
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x5e0]
call fcn.14001ab7c
mov qword [rsp + 0x5e8], rax
lea rdx, [0x140011db0]
mov rcx, qword [rsp + 0x5e8]
call fcn.140012630
lea rcx, [rsp + 0x2b0]
call fcn.140002fec
mov qword [rsp + 0x5f0], rax
lea rdx, str.DEL__
lea rcx, [rsp + 0x2e0]
call fcn.14001ab7c
mov qword [rsp + 0x5f8], rax
mov rcx, qword [rsp + 0x5f0]
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
mov rdx, rax
mov rcx, qword [rsp + 0x5f8]
call fcn.14001ab7c
mov qword [rsp + 0x600], rax
lea rdx, str.___f__q
mov rcx, qword [rsp + 0x600]
call fcn.14001ab7c
mov qword [rsp + 0x608], rax
lea rdx, [0x140011db0]
mov rcx, qword [rsp + 0x608]
call fcn.140012630
lea rcx, [rsp + 0x2e0]
call fcn.14001670c
lea rcx, [rsp + 0x2b0]
call fcn.140002fec
mov qword [rsp + 0x610], rax
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
mov r8, qword [rsp + 0x610]
lea rdx, str.open
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_ShellExecuteA]
xor ecx, ecx
call fcn.140031460
nop
lea rcx, [rsp + 0x2e0]
call fcn.140011e10
nop
lea rcx, [rsp + 0x2b0]
call fcn.140002fb8
nop
lea rcx, [rsp + 0x1a0]
call fcn.140011e10
nop
lea rcx, [rsp + 0x90]
call fcn.140011ddc
nop
lea rcx, [rsp + 0x30]
call fcn.140002fb8
nop
lea rcx, [rsp + 0x68]
call fcn.140002fb8
nop
add rsp, 0x628
ret