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

Disassembly:
mov rax, rsp
push r13
push r14
push r15
sub rsp, 0x4d0
mov qword [rsp + 0x198], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
call fcn.14000b100
nop
call fcn.14000b100
lea rcx, str.TEMP
call fcn.140052820
mov r13, rax
call fcn.14000b100
mov esi, reloc.WS2_32.dll_ntohs
mov qword [rsp + 0xe8], rsi
xor ebx, ebx
mov qword [rsp + 0xe0], rbx
mov byte [rsp + 0xd0], bl
lea r8d, [rsi - 3]
lea rdx, str.upgrader.exe
lea rcx, [rsp + 0xd0]
call fcn.14000e9a0
nop
mov qword [rsp + 0x98], rsi
mov qword [rsp + 0x90], rbx
mov byte [rsp + 0x80], 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 + 0x80]
call fcn.14000e9a0
nop
lea r8, [0x140096350]
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x148]
call fcn.14000f450
nop
lea r8, [rsp + 0xd0]
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.14000f4b0
nop
cmp qword [rsp + 0x160], 0x10
jb 0x14000b82f
mov rcx, qword [rsp + 0x148]
call fcn.14004fa30
mov qword [rsp + 0x160], rsi
mov qword [rsp + 0x158], rbx
mov byte [rsp + 0x148], bl
cmp qword [rsp + 0x98], 0x10
jb 0x14000b85e
mov rcx, qword [rsp + 0x80]
call fcn.14004fa30
mov qword [rsp + 0x98], rsi
mov qword [rsp + 0x90], rbx
mov byte [rsp + 0x80], bl
cmp qword [rsp + 0xe8], 0x10
jb 0x14000b88d
mov rcx, qword [rsp + 0xd0]
call fcn.14004fa30
mov qword [rsp + 0xe8], rsi
mov qword [rsp + 0xe0], rbx
mov byte [rsp + 0xd0], 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.140005dc4
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]
call fcn.14000b100
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.1400554a0
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 0x14000bd1b
lea rcx, [rsp + 0x58]
cmp r12, 0x10
cmovae rcx, rsi
call qword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x14000b99a
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.14000b100
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x3c0]
call fcn.14000ceb4
nop
mov r8d, 0x20
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x2b0]
call fcn.14000d9a4
nop
call fcn.14000b100
mov rdx, qword [rsp + 0x3c0]
movsxd rax, dword [rdx + 4]
lea rcx, [rsp + rax + 0x3c0]
mov r12b, 6
test byte [rcx + 0x10], r12b
cmovne rcx, rdi
test rcx, rcx
je 0x14000bcec
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 0x14000bcec
lea rdx, [rsp + 0x3d0]
lea rcx, [rsp + 0x2b0]
call fcn.14000c184
lea rcx, [rsp + 0x3c0]
call fcn.140005690
lea rcx, [rsp + 0x2b0]
call fcn.14000dafc
lea rcx, [rsp + 0x120]
call fcn.14000b578
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.14000e9a0
nop
lea r8, [0x140096354]
lea rdx, [rsp + 0xa8]
lea rcx, [rsp + 0x170]
call fcn.14000f450
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rsp + 0xf8]
call fcn.14000f4b0
nop
cmp qword [rsp + 0x188], 0x10
jb 0x14000bae5
mov rcx, qword [rsp + 0x170]
call fcn.14004fa30
mov qword [rsp + 0x188], rsi
xor edi, edi
mov qword [rsp + 0x180], rdi
mov byte [rsp + 0x170], dil
cmp qword [rsp + 0xc0], 0x10
jb 0x14000bb17
mov rcx, qword [rsp + 0xa8]
call fcn.14004fa30
mov qword [rsp + 0xc0], rsi
mov qword [rsp + 0xb8], rdi
mov byte [rsp + 0xa8], dil
cmp qword [rsp + 0x138], 0x10
jb 0x14000bb47
mov rcx, qword [rsp + 0x120]
call fcn.14004fa30
mov qword [rsp + 0x138], rsi
mov qword [rsp + 0x130], rdi
mov byte [rsp + 0x120], dil
mov r8d, 4
lea rdx, str..bat
lea rcx, [rsp + 0xf8]
call fcn.14000e874
mov r8d, 2
lea rdx, [rsp + 0xf8]
lea rcx, [rsp + 0x1a0]
call fcn.14000d9a4
nop
mov rax, qword [rsp + 0x1a0]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + rcx + 0x1a0]
test byte [rax + 0x10], r12b
cmovne rax, rdi
test rax, rax
je 0x14000bcc5
lea rdx, str._echo_off
lea rcx, [rsp + 0x1a0]
call fcn.14000efec
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000c340
mov rcx, rdi
call fcn.1400053a4
lea rdx, str.timeout_3___NUL
lea rcx, [rsp + 0x1a0]
call fcn.14000efec
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000c340
mov rcx, rdi
call fcn.1400053a4
lea rdx, str.START_____
lea rcx, [rsp + 0x1a0]
call fcn.14000efec
lea rdx, [rsp + 0x58]
mov rcx, rax
call fcn.14000f5b8
lea rdx, [0x14009636c]
mov rcx, rax
call fcn.14000efec
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000c340
mov rcx, rdi
call fcn.1400053a4
lea rcx, [rsp + 0x1a0]
call fcn.14000dafc
call fcn.14000b100
lea r8, [rsp + 0xf8]
cmp qword [rsp + 0x110], 0x10
cmovae r8, qword [rsp + 0xf8]
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]
call fcn.14000b100
xor ecx, ecx
call fcn.1400524b8
mov rcx, rax
call fcn.140052518
call fcn.14000b100
call fcn.14000b4a4
call fcn.14000b100
xor ecx, ecx
call fcn.140052e60
nop
lea rcx, [rsp + 0x1a0]
call fcn.14000bdfc
nop
cmp qword [rsp + 0x110], 0x10
jb 0x14000bcec
mov rcx, qword [rsp + 0xf8]
call fcn.14004fa30
nop
lea rcx, [rsp + 0x2b0]
call fcn.14000bdfc
nop
lea rcx, [rsp + 0x3c0]
call fcn.14000bd7c
mov r12, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x58]
mov r15, qword [rsp + 0x48]
mov r14, qword [rsp + 0x30]
cmp r15, 0x10
jb 0x14000bd33
mov rcx, r14
call fcn.14004fa30
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 0x14000bd55
mov rcx, rsi
call fcn.14004fa30
nop
lea r11, [rsp + 0x4d0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r13
jmp fcn.14000b100