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

Disassembly:
sub rsp, 0x628
mov qword [rsp + 0x4e8], 0xfffffffffffffffe
lea rcx, str.TEMP
call fcn.140059638
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.140014cf0
mov qword [rsp + 0x4f0], rax
mov rax, qword [rsp + 0x4f0]
mov qword [rsp + 0x4f8], rax
mov rdx, qword [rsp + 0x60]
lea rcx, [rsp + 0x418]
call fcn.140014cf0
mov qword [rsp + 0x500], rax
mov rax, qword [rsp + 0x500]
mov qword [rsp + 0x508], rax
lea r8, [0x14008c2c4]
mov rdx, qword [rsp + 0x508]
lea rcx, [rsp + 0x440]
call fcn.14001a710
mov qword [rsp + 0x510], rax
mov rax, qword [rsp + 0x510]
mov qword [rsp + 0x518], rax
mov r8, qword [rsp + 0x4f8]
mov rdx, qword [rsp + 0x518]
lea rcx, [rsp + 0x68]
call fcn.14001a770
mov qword [rsp + 0x520], rax
lea rcx, [rsp + 0x440]
call fcn.140004070
nop
lea rcx, [rsp + 0x418]
call fcn.140004070
nop
lea rcx, [rsp + 0x3f0]
call fcn.140004070
xor r8d, r8d
mov edx, 0x104
lea rcx, [rsp + 0x30]
call fcn.14001a880
mov qword [rsp + 0x528], rax
xor edx, edx
lea rcx, [rsp + 0x30]
call fcn.140014d90
mov qword [rsp + 0x530], rax
mov r8d, 0x104
mov rdx, qword [rsp + 0x530]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0x30]
call fcn.14001a900
mov byte [rsp + 0x538], al
movzx eax, byte [rsp + 0x538]
test eax, eax
je 0x140014a6f
lea rcx, [rsp + 0x68]
call fcn.1400040b0
mov qword [rsp + 0x540], rax
mov rcx, qword [rsp + 0x540]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x1400145fc
lea rcx, [rsp + 0x68]
call fcn.1400040b0
mov qword [rsp + 0x548], rax
mov rcx, qword [rsp + 0x548]
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.140016980
mov qword [rsp + 0x550], rax
mov dword [rsp + 0x20], 1
mov r9d, 0x40
mov r8d, 0x20
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0x1a0]
call fcn.140017ae0
mov qword [rsp + 0x558], rax
mov rax, qword [rsp + 0x90]
movsxd rax, dword [rax + 4]
lea rax, [rsp + rax + 0x90]
mov rcx, rax
call fcn.140014aa0
mov qword [rsp + 0x560], rax
cmp qword [rsp + 0x560], 0
je 0x140014a53
mov rax, qword [rsp + 0x1a0]
movsxd rax, dword [rax + 4]
lea rax, [rsp + rax + 0x1a0]
mov rcx, rax
call fcn.140014aa0
mov qword [rsp + 0x568], rax
cmp qword [rsp + 0x568], 0
je 0x140014a53
lea rcx, [rsp + 0x90]
call fcn.140016b10
mov qword [rsp + 0x570], rax
mov rdx, qword [rsp + 0x570]
lea rcx, [rsp + 0x1a0]
call fcn.140015000
lea rcx, [rsp + 0x90]
call fcn.140006fc0
lea rcx, [rsp + 0x1a0]
call fcn.140017c70
lea rcx, [rsp + 0x468]
call fcn.1400137a0
mov qword [rsp + 0x578], rax
mov rax, qword [rsp + 0x578]
mov qword [rsp + 0x580], rax
mov rdx, qword [rsp + 0x60]
lea rcx, [rsp + 0x490]
call fcn.140014cf0
mov qword [rsp + 0x588], rax
mov rax, qword [rsp + 0x588]
mov qword [rsp + 0x590], rax
lea r8, [0x14008c2dc]
mov rdx, qword [rsp + 0x590]
lea rcx, [rsp + 0x4b8]
call fcn.14001a710
mov qword [rsp + 0x598], rax
mov rax, qword [rsp + 0x598]
mov qword [rsp + 0x5a0], rax
mov r8, qword [rsp + 0x580]
mov rdx, qword [rsp + 0x5a0]
lea rcx, [rsp + 0x2b0]
call fcn.14001a770
mov qword [rsp + 0x5a8], rax
lea rcx, [rsp + 0x4b8]
call fcn.140004070
nop
lea rcx, [rsp + 0x490]
call fcn.140004070
nop
lea rcx, [rsp + 0x468]
call fcn.140004070
lea rdx, str..bat
lea rcx, [rsp + 0x2b0]
call fcn.140014d60
mov dword [rsp + 0x20], 1
mov r9d, 0x40
mov r8d, 2
lea rdx, [rsp + 0x2b0]
lea rcx, [rsp + 0x2e0]
call fcn.140017ae0
mov qword [rsp + 0x5b0], rax
mov rax, qword [rsp + 0x2e0]
movsxd rax, dword [rax + 4]
lea rax, [rsp + rax + 0x2e0]
mov rcx, rax
call fcn.140014aa0
mov qword [rsp + 0x5b8], rax
cmp qword [rsp + 0x5b8], 0
je 0x140014a37
lea rdx, str._echo_off
lea rcx, [rsp + 0x2e0]
call fcn.14001a320
mov qword [rsp + 0x5c0], rax
lea rdx, [0x140013b90]
mov rcx, qword [rsp + 0x5c0]
call fcn.140014dc0
lea rdx, str.timeout_3___NUL
lea rcx, [rsp + 0x2e0]
call fcn.14001a320
mov qword [rsp + 0x5c8], rax
lea rdx, [0x140013b90]
mov rcx, qword [rsp + 0x5c8]
call fcn.140014dc0
lea rdx, str.START_____
lea rcx, [rsp + 0x2e0]
call fcn.14001a320
mov qword [rsp + 0x5d0], rax
lea rdx, [rsp + 0x68]
mov rcx, qword [rsp + 0x5d0]
call fcn.14001a940
mov qword [rsp + 0x5d8], rax
lea rdx, [0x14008c674]
mov rcx, qword [rsp + 0x5d8]
call fcn.14001a320
mov qword [rsp + 0x5e0], rax
lea rdx, [0x140013b90]
mov rcx, qword [rsp + 0x5e0]
call fcn.140014dc0
lea rdx, [0x14008c87c]
lea rcx, [rsp + 0x2e0]
call fcn.14001a320
mov qword [rsp + 0x5e8], rax
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x5e8]
call fcn.14001a320
mov qword [rsp + 0x5f0], rax
lea rdx, [0x140013b90]
mov rcx, qword [rsp + 0x5f0]
call fcn.140014dc0
lea rcx, [rsp + 0x2b0]
call fcn.1400040b0
mov qword [rsp + 0x5f8], rax
lea rdx, str.DEL__
lea rcx, [rsp + 0x2e0]
call fcn.14001a320
mov qword [rsp + 0x600], rax
mov rcx, qword [rsp + 0x5f8]
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
mov rdx, rax
mov rcx, qword [rsp + 0x600]
call fcn.14001a320
mov qword [rsp + 0x608], rax
lea rdx, str.___f__q
mov rcx, qword [rsp + 0x608]
call fcn.14001a320
mov qword [rsp + 0x610], rax
lea rdx, [0x140013b90]
mov rcx, qword [rsp + 0x610]
call fcn.140014dc0
lea rcx, [rsp + 0x2e0]
call fcn.140017c70
lea rcx, [rsp + 0x2b0]
call fcn.1400040b0
mov qword [rsp + 0x618], rax
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
mov r8, qword [rsp + 0x618]
lea rdx, str.open
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_ShellExecuteA]
xor ecx, ecx
call fcn.140059368
nop
lea rcx, [rsp + 0x2e0]
call fcn.140014b20
nop
lea rcx, [rsp + 0x2b0]
call fcn.140004070
nop
lea rcx, [rsp + 0x1a0]
call fcn.140014b20
nop
lea rcx, [rsp + 0x90]
call fcn.140014ae0
nop
lea rcx, [rsp + 0x30]
call fcn.140004070
nop
lea rcx, [rsp + 0x68]
call fcn.140004070
nop
jmp 0x140014a8e
add rsp, 0x628
ret