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

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x4d0
mov qword [rsp + 0x198], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
lea rcx, str.TEMP
call fcn.140024370
mov r12, rax
mov esi, reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x110], rsi
xor ebx, ebx
mov qword [rsp + 0x108], rbx
mov byte [rsp + 0xf8], bl
lea r8d, [rsi - 3]
lea rdx, str.upgrader.exe
lea rcx, [rsp + 0xf8]
call fcn.14000e6bc
nop
mov qword [rsp + 0xe8], rsi
mov qword [rsp + 0xe0], rbx
mov byte [rsp + 0xd0], bl
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, r12
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, r12
lea rcx, [rsp + 0xd0]
call fcn.14000e6bc
nop
lea rdx, [rsp + 0xd0]
lea rcx, [rsp + 0x170]
call fcn.14000f544
nop
lea r8, [rsp + 0xf8]
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.14000f578
nop
cmp qword [rsp + 0x188], 0x10
jb 0x14000a2af
mov rcx, qword [rsp + 0x170]
call fcn.140021190
mov qword [rsp + 0x188], rsi
mov qword [rsp + 0x180], rbx
mov byte [rsp + 0x170], bl
cmp qword [rsp + 0xe8], 0x10
jb 0x14000a2de
mov rcx, qword [rsp + 0xd0]
call fcn.140021190
mov qword [rsp + 0xe8], rsi
mov qword [rsp + 0xe0], rbx
mov byte [rsp + 0xd0], bl
cmp qword [rsp + 0x110], 0x10
jb 0x14000a30d
mov rcx, qword [rsp + 0xf8]
call fcn.140021190
mov qword [rsp + 0x110], rsi
mov qword [rsp + 0x108], rbx
mov byte [rsp + 0xf8], bl
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x40], rbx
mov byte [rsp + 0x30], bl
xor r8d, r8d
mov edi, 0x104
mov edx, edi
lea rcx, [rsp + 0x30]
call fcn.140003f2c
nop
lea rdx, [rsp + 0x30]
cmp qword [rsp + 0x48], 0x10
cmovae rdx, qword [rsp + 0x30]
mov r8d, edi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea rdx, [rsp + 0x58]
mov rsi, qword [rsp + 0x58]
mov r13, qword [rsp + 0x70]
cmp r13, 0x10
cmovae rdx, rsi
lea rcx, [rsp + 0x30]
mov r14, qword [rsp + 0x30]
mov r15, qword [rsp + 0x48]
cmp r15, 0x10
cmovae rcx, r14
mov rbx, qword [rsp + 0x68]
mov r8, rbx
mov rdi, qword [rsp + 0x40]
cmp rdi, rbx
cmovb r8, rdi
call fcn.140025f90
movsxd rcx, eax
xor eax, eax
cmp rdi, rbx
setne al
cmp rdi, rbx
mov rdx, 0xffffffffffffffff
cmovb eax, edx
xor edi, edi
test rcx, rcx
cmovne eax, ecx
test eax, eax
sete al
test al, al
sete al
test al, al
je 0x14000a857
lea rcx, [rsp + 0x58]
cmp r13, 0x10
cmovae rcx, rsi
call qword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x14000a415
lea rcx, [rsp + 0x58]
cmp qword [rsp + 0x70], 0x10
cmovae rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x1a0]
call fcn.14000cc4c
nop
mov r8d, 0x20
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x3c0]
call fcn.14000d6dc
nop
mov rax, qword [rsp + 0x1a0]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + rcx + 0x1a0]
mov r13b, 6
test byte [rax + 0x10], r13b
cmovne rax, rdi
test rax, rax
je 0x14000a7c5
mov rax, qword [rsp + 0x3c0]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + rcx + 0x3c0]
test byte [rax + 0x10], r13b
cmovne rax, rdi
test rax, rax
je 0x14000a7c5
lea rdx, [rsp + 0x1b0]
lea rcx, [rsp + 0x3c0]
call fcn.14000afc8
lea rcx, [rsp + 0x1a0]
call fcn.140003ae4
lea rcx, [rsp + 0x3c0]
call fcn.14000d888
lea rcx, [rsp + 0x148]
call fcn.140009db4
mov rbx, rax
mov esi, reloc.WS2_32.dll_ntohs
mov qword [rsp + 0xc0], rsi
mov qword [rsp + 0xb8], rdi
mov byte [rsp + 0xa8], dil
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, r12
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, r12
lea rcx, [rsp + 0xa8]
call fcn.14000e6bc
nop
lea rdx, [rsp + 0xa8]
lea rcx, [rsp + 0x120]
call fcn.14000f544
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rsp + 0x80]
call fcn.14000f578
nop
cmp qword [rsp + 0x138], 0x10
jb 0x14000a54f
mov rcx, qword [rsp + 0x120]
call fcn.140021190
mov qword [rsp + 0x138], rsi
xor edi, edi
mov qword [rsp + 0x130], rdi
mov byte [rsp + 0x120], dil
cmp qword [rsp + 0xc0], 0x10
jb 0x14000a581
mov rcx, qword [rsp + 0xa8]
call fcn.140021190
mov qword [rsp + 0xc0], rsi
mov qword [rsp + 0xb8], rdi
mov byte [rsp + 0xa8], dil
cmp qword [rsp + 0x160], 0x10
jb 0x14000a5b1
mov rcx, qword [rsp + 0x148]
call fcn.140021190
mov qword [rsp + 0x160], rsi
mov qword [rsp + 0x158], rdi
mov byte [rsp + 0x148], dil
lea rdx, str..bat
lea rcx, [rsp + 0x80]
call fcn.14000de34
mov r8d, 2
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x2b0]
call fcn.14000d6dc
nop
mov rax, qword [rsp + 0x2b0]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + rcx + 0x2b0]
test byte [rax + 0x10], r13b
cmovne rax, rdi
test rax, rax
je 0x14000a79e
lea rdx, str._echo_off
lea rcx, [rsp + 0x2b0]
call fcn.14000f5d8
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000b184
mov rcx, rdi
call fcn.1400039bc
lea rdx, str.timeout_3___NUL
lea rcx, [rsp + 0x2b0]
call fcn.14000f5d8
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000b184
mov rcx, rdi
call fcn.1400039bc
lea rdx, str.START_____
lea rcx, [rsp + 0x2b0]
call fcn.14000f5d8
lea rdx, [rsp + 0x58]
mov rcx, rax
call fcn.14000f7f8
lea rdx, [0x14004b740]
mov rcx, rax
call fcn.14000f5d8
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000b184
mov rcx, rdi
call fcn.1400039bc
lea rdx, [0x14004b754]
lea rcx, [rsp + 0x2b0]
call fcn.14000f5d8
mov rdx, r12
mov rcx, rax
call fcn.14000f5d8
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000b184
mov rcx, rdi
call fcn.1400039bc
lea rdi, [rsp + 0x80]
cmp qword [rsp + 0x98], 0x10
cmovae rdi, qword [rsp + 0x80]
lea rdx, str.DEL__
lea rcx, [rsp + 0x2b0]
call fcn.14000f5d8
mov rbx, rax
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
mov rdx, rax
mov rcx, rbx
call fcn.14000f5d8
lea rdx, str.___f__q
mov rcx, rax
call fcn.14000f5d8
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000b184
mov rcx, rdi
call fcn.1400039bc
lea rcx, [rsp + 0x2b0]
call fcn.14000d888
lea r8, [rsp + 0x80]
cmp qword [rsp + 0x98], 0x10
cmovae r8, qword [rsp + 0x80]
xor eax, eax
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea rdx, str.open
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_ShellExecuteA]
xor ecx, ecx
call fcn.14002473c
nop
lea rcx, [rsp + 0x2b0]
call fcn.14000a930
nop
cmp qword [rsp + 0x98], 0x10
jb 0x14000a7c5
mov rcx, qword [rsp + 0x80]
call fcn.140021190
nop
lea rcx, [rsp + 0x3c0]
call fcn.14000a930
nop
lea rax, [rsp + 0x250]
mov qword [rsp + 0x500], rax
mov rax, qword [rsp + 0x1a0]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x1a0], rax
lea rcx, [rsp + 0x1b0]
call fcn.14000cd6c
nop
mov rax, qword [rsp + 0x1a0]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x1a0], rax
lea rax, vtable.std::ios_base.0
mov qword [rsp + 0x250], rax
lea rcx, [rsp + 0x250]
call fcn.14003b59c
mov r13, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x58]
mov r15, qword [rsp + 0x48]
mov r14, qword [rsp + 0x30]
cmp r15, 0x10
jb 0x14000a86f
mov rcx, r14
call fcn.140021190
mov r13, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x58]
mov qword [rsp + 0x48], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x40], rdi
mov byte [rsp + 0x30], dil
cmp r13, 0x10
jb 0x14000a891
mov rcx, rsi
call fcn.140021190
nop
lea r11, [rsp + 0x4d0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret