Function at 0x14000a36c
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
call fcn.1400086e0
nop
call fcn.1400086e0
lea rcx, str.TEMP
call fcn.140024014
mov r13, 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.14000e468
nop
mov qword [rsp + 0xe8], rsi
mov qword [rsp + 0xe0], rbx
mov byte [rsp + 0xd0], bl
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, r13
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, r13
lea rcx, [rsp + 0xd0]
call fcn.14000e468
nop
lea r8, [0x14004a62c]
lea rdx, [rsp + 0xd0]
lea rcx, [rsp + 0x170]
call fcn.14000f744
nop
lea r8, [rsp + 0xf8]
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.14000f774
nop
cmp qword [rsp + 0x188], 0x10
jb 0x14000a469
mov rcx, qword [rsp + 0x170]
call fcn.140021180
mov qword [rsp + 0x188], rsi
mov qword [rsp + 0x180], rbx
mov byte [rsp + 0x170], bl
cmp qword [rsp + 0xe8], 0x10
jb 0x14000a498
mov rcx, qword [rsp + 0xd0]
call fcn.140021180
mov qword [rsp + 0xe8], rsi
mov qword [rsp + 0xe0], rbx
mov byte [rsp + 0xd0], bl
cmp qword [rsp + 0x110], 0x10
jb 0x14000a4c7
mov rcx, qword [rsp + 0xf8]
call fcn.140021180
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.1400040a0
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 r12, qword [rsp + 0x70]
cmp r12, 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.140025bf0
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 0x14000aa5b
lea rcx, [rsp + 0x58]
cmp r12, 0x10
cmovae rcx, rsi
call qword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x14000a5cf
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]
call fcn.1400086e0
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x1a0]
call fcn.14000c9a4
nop
mov r8d, 0x20
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x3c0]
call fcn.14000d458
nop
mov rax, qword [rsp + 0x1a0]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + rcx + 0x1a0]
mov r12b, 6
test byte [rax + 0x10], r12b
cmovne rax, rdi
test rax, rax
je 0x14000a9c9
mov rax, qword [rsp + 0x3c0]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + rcx + 0x3c0]
test byte [rax + 0x10], r12b
cmovne rax, rdi
test rax, rax
je 0x14000a9c9
lea rdx, [rsp + 0x1b0]
lea rcx, [rsp + 0x3c0]
call fcn.14000ad38
lea rcx, [rsp + 0x1a0]
call fcn.140003c58
lea rcx, [rsp + 0x3c0]
call fcn.14000d5a8
lea rcx, [rsp + 0x148]
call fcn.140009f50
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, r13
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, r13
lea rcx, [rsp + 0xa8]
call fcn.14000e468
nop
lea r8, [0x14004a664]
lea rdx, [rsp + 0xa8]
lea rcx, [rsp + 0x120]
call fcn.14000f744
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rsp + 0x80]
call fcn.14000f774
nop
cmp qword [rsp + 0x138], 0x10
jb 0x14000a715
mov rcx, qword [rsp + 0x120]
call fcn.140021180
mov qword [rsp + 0x138], rsi
xor edi, edi
mov qword [rsp + 0x130], rdi
mov byte [rsp + 0x120], dil
cmp qword [rsp + 0xc0], 0x10
jb 0x14000a747
mov rcx, qword [rsp + 0xa8]
call fcn.140021180
mov qword [rsp + 0xc0], rsi
mov qword [rsp + 0xb8], rdi
mov byte [rsp + 0xa8], dil
cmp qword [rsp + 0x160], 0x10
jb 0x14000a777
mov rcx, qword [rsp + 0x148]
call fcn.140021180
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.14000db18
mov r8d, 2
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x2b0]
call fcn.14000d458
nop
mov rax, qword [rsp + 0x2b0]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + rcx + 0x2b0]
test byte [rax + 0x10], r12b
cmovne rax, rdi
test rax, rax
je 0x14000a9a2
lea rdx, str._echo_off
lea rcx, [rsp + 0x2b0]
call fcn.14000f2f4
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000aef4
mov rcx, rdi
call fcn.140003b30
lea rdx, str.timeout_3___NUL
lea rcx, [rsp + 0x2b0]
call fcn.14000f2f4
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000aef4
mov rcx, rdi
call fcn.140003b30
lea rdx, str.START_____
lea rcx, [rsp + 0x2b0]
call fcn.14000f2f4
lea rdx, [rsp + 0x58]
mov rcx, rax
call fcn.14000f7d4
lea rdx, [0x14004a674]
mov rcx, rax
call fcn.14000f2f4
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000aef4
mov rcx, rdi
call fcn.140003b30
lea rdx, [0x14004a7a4]
lea rcx, [rsp + 0x2b0]
call fcn.14000f2f4
mov rdx, r13
mov rcx, rax
call fcn.14000f2f4
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000aef4
mov rcx, rdi
call fcn.140003b30
lea rdi, [rsp + 0x80]
cmp qword [rsp + 0x98], 0x10
cmovae rdi, qword [rsp + 0x80]
lea rdx, str.DEL__
lea rcx, [rsp + 0x2b0]
call fcn.14000f2f4
mov rbx, rax
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
mov rdx, rax
mov rcx, rbx
call fcn.14000f2f4
lea rdx, str.___f__q
mov rcx, rax
call fcn.14000f2f4
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000aef4
mov rcx, rdi
call fcn.140003b30
lea rcx, [rsp + 0x2b0]
call fcn.14000d5a8
call fcn.1400086e0
lea r8, [rsp + 0x80]
cmp qword [rsp + 0x98], 0x10
cmovae r8, qword [rsp + 0x80]
xor edi, edi
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rdi
xor r9d, r9d
lea rdx, str.open
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_ShellExecuteA]
cmp byte [0x1400661ef], dil
jne 0x14000a98b
lea r9d, [rdi + 0x35]
lea r8, [0x14004aaf8]
lea rdx, [0x14004aa78]
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxW]
mov byte [0x1400661ef], 1
call fcn.1400086e0
call fcn.140008f1c
call fcn.140009e40
xor ecx, ecx
call fcn.1400243e0
nop
lea rcx, [rsp + 0x2b0]
call fcn.14000ab38
nop
cmp qword [rsp + 0x98], 0x10
jb 0x14000a9c9
mov rcx, qword [rsp + 0x80]
call fcn.140021180
nop
lea rcx, [rsp + 0x3c0]
call fcn.14000ab38
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.14000cae8
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.14003b4a8
mov r12, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x58]
mov r15, qword [rsp + 0x48]
mov r14, qword [rsp + 0x30]
cmp r15, 0x10
jb 0x14000aa73
mov rcx, r14
call fcn.140021180
mov r12, 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 r12, 0x10
jb 0x14000aa95
mov rcx, rsi
call fcn.140021180
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
jmp fcn.1400086e0