Function at 0x14000a200
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.1400240a0
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.14000e3f0
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.14000e3f0
nop
lea rdx, [rsp + 0xd0]
lea rcx, [rsp + 0x170]
call fcn.14000f278
nop
lea r8, [rsp + 0xf8]
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.14000f2ac
nop
cmp qword [rsp + 0x188], 0x10
jb 0x14000a2eb
mov rcx, qword [rsp + 0x170]
call fcn.140020ec0
mov qword [rsp + 0x188], rsi
mov qword [rsp + 0x180], rbx
mov byte [rsp + 0x170], bl
cmp qword [rsp + 0xe8], 0x10
jb 0x14000a31a
mov rcx, qword [rsp + 0xd0]
call fcn.140020ec0
mov qword [rsp + 0xe8], rsi
mov qword [rsp + 0xe0], rbx
mov byte [rsp + 0xd0], bl
cmp qword [rsp + 0x110], 0x10
jb 0x14000a349
mov rcx, qword [rsp + 0xf8]
call fcn.140020ec0
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.140003f6c
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.140025c80
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 0x14000a893
lea rcx, [rsp + 0x58]
cmp r13, 0x10
cmovae rcx, rsi
call qword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x14000a451
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.14000c980
nop
mov r8d, 0x20
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x3c0]
call fcn.14000d410
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 0x14000a801
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 0x14000a801
lea rdx, [rsp + 0x1b0]
lea rcx, [rsp + 0x3c0]
call fcn.14000acf4
lea rcx, [rsp + 0x1a0]
call fcn.140003b24
lea rcx, [rsp + 0x3c0]
call fcn.14000d5bc
lea rcx, [rsp + 0x148]
call fcn.140009df0
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.14000e3f0
nop
lea rdx, [rsp + 0xa8]
lea rcx, [rsp + 0x120]
call fcn.14000f278
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rsp + 0x80]
call fcn.14000f2ac
nop
cmp qword [rsp + 0x138], 0x10
jb 0x14000a58b
mov rcx, qword [rsp + 0x120]
call fcn.140020ec0
mov qword [rsp + 0x138], rsi
xor edi, edi
mov qword [rsp + 0x130], rdi
mov byte [rsp + 0x120], dil
cmp qword [rsp + 0xc0], 0x10
jb 0x14000a5bd
mov rcx, qword [rsp + 0xa8]
call fcn.140020ec0
mov qword [rsp + 0xc0], rsi
mov qword [rsp + 0xb8], rdi
mov byte [rsp + 0xa8], dil
cmp qword [rsp + 0x160], 0x10
jb 0x14000a5ed
mov rcx, qword [rsp + 0x148]
call fcn.140020ec0
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.14000db68
mov r8d, 2
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x2b0]
call fcn.14000d410
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 0x14000a7da
lea rdx, str._echo_off
lea rcx, [rsp + 0x2b0]
call fcn.14000f30c
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000aeb0
mov rcx, rdi
call fcn.1400039fc
lea rdx, str.timeout_3___NUL
lea rcx, [rsp + 0x2b0]
call fcn.14000f30c
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000aeb0
mov rcx, rdi
call fcn.1400039fc
lea rdx, str.START_____
lea rcx, [rsp + 0x2b0]
call fcn.14000f30c
lea rdx, [rsp + 0x58]
mov rcx, rax
call fcn.14000f52c
lea rdx, [0x14004b750]
mov rcx, rax
call fcn.14000f30c
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000aeb0
mov rcx, rdi
call fcn.1400039fc
lea rdx, [0x14004b764]
lea rcx, [rsp + 0x2b0]
call fcn.14000f30c
mov rdx, r12
mov rcx, rax
call fcn.14000f30c
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000aeb0
mov rcx, rdi
call fcn.1400039fc
lea rdi, [rsp + 0x80]
cmp qword [rsp + 0x98], 0x10
cmovae rdi, qword [rsp + 0x80]
lea rdx, str.DEL__
lea rcx, [rsp + 0x2b0]
call fcn.14000f30c
mov rbx, rax
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
mov rdx, rax
mov rcx, rbx
call fcn.14000f30c
lea rdx, str.___f__q
mov rcx, rax
call fcn.14000f30c
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000aeb0
mov rcx, rdi
call fcn.1400039fc
lea rcx, [rsp + 0x2b0]
call fcn.14000d5bc
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.14002446c
nop
lea rcx, [rsp + 0x2b0]
call fcn.14000a96c
nop
cmp qword [rsp + 0x98], 0x10
jb 0x14000a801
mov rcx, qword [rsp + 0x80]
call fcn.140020ec0
nop
lea rcx, [rsp + 0x3c0]
call fcn.14000a96c
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.14000caa0
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.14003b24c
mov r13, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x58]
mov r15, qword [rsp + 0x48]
mov r14, qword [rsp + 0x30]
cmp r15, 0x10
jb 0x14000a8ab
mov rcx, r14
call fcn.140020ec0
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 0x14000a8cd
mov rcx, rsi
call fcn.140020ec0
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