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

Disassembly:
mov rax, rsp
push r13
push r14
push r15
sub rsp, 0x460
mov qword [rsp + 0x120], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
lea rcx, str.TEMP
call fcn.140025068
mov r13, rax
mov esi, reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x70], rsi
xor ebx, ebx
mov qword [rsp + 0x68], rbx
mov byte [rsp + 0x58], bl
lea r8d, [rsi - 3]
lea rdx, str.upgrader.exe
lea rcx, [rsp + 0x58]
call fcn.14000b1f8
nop
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x40], rbx
mov byte [rsp + 0x30], 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 + 0x30]
call fcn.14000b1f8
nop
lea r8, [0x140041d44]
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0xd0]
call fcn.14000da94
nop
lea r8, [rsp + 0x58]
mov rdx, rax
lea rcx, [rsp + 0xa8]
call fcn.14000daf4
nop
cmp qword [rsp + 0xe8], 0x10
jb 0x14000ef90
mov rcx, qword [rsp + 0xd0]
call fcn.140020df4
mov qword [rsp + 0xe8], rsi
mov qword [rsp + 0xe0], rbx
mov byte [rsp + 0xd0], bl
cmp qword [rsp + 0x48], 0x10
jb 0x14000efb9
mov rcx, qword [rsp + 0x30]
call fcn.140020df4
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x40], rbx
mov byte [rsp + 0x30], bl
cmp qword [rsp + 0x70], 0x10
jb 0x14000efd9
mov rcx, qword [rsp + 0x58]
call fcn.140020df4
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x68], rbx
mov byte [rsp + 0x58], bl
mov qword [rsp + 0x98], rsi
mov qword [rsp + 0x90], rbx
mov byte [rsp + 0x80], bl
xor r8d, r8d
mov edi, 0x104
mov edx, edi
lea rcx, [rsp + 0x80]
call fcn.14000409c
nop
lea rdx, [rsp + 0x80]
cmp qword [rsp + 0x98], 0x10
cmovae rdx, qword [rsp + 0x80]
mov r8d, edi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea rdx, [rsp + 0xa8]
mov rsi, qword [rsp + 0xa8]
mov r12, qword [rsp + 0xc0]
cmp r12, 0x10
cmovae rdx, rsi
lea rcx, [rsp + 0x80]
mov r15, qword [rsp + 0x80]
mov r14, qword [rsp + 0x98]
cmp r14, 0x10
cmovae rcx, r15
mov rbx, qword [rsp + 0xb8]
mov r8, rbx
mov rdi, qword [rsp + 0x90]
cmp rdi, rbx
cmovb r8, rdi
call fcn.1400220e0
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 0x14000f4fd
lea rcx, [rsp + 0xa8]
cmp r12, 0x10
cmovae rcx, rsi
call qword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x14000f111
lea rcx, [rsp + 0xa8]
cmp qword [rsp + 0xc0], 0x10
cmovae rcx, qword [rsp + 0xa8]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
mov r12d, 1
mov dword [rsp + 0x20], r12d
lea r14d, [r12 + 0x3f]
mov r9d, r14d
lea ebx, [r12 + 0x1f]
mov r8d, ebx
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x350]
call fcn.14000df7c
nop
mov dword [rsp + 0x20], r12d
mov r9d, r14d
mov r8d, ebx
lea rdx, [rsp + 0xa8]
lea rcx, [rsp + 0x240]
call fcn.14000d758
nop
mov rax, qword [rsp + 0x350]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + rcx + 0x350]
mov r15b, 6
test byte [rax + 0x10], r15b
cmovne rax, rdi
test rax, rax
je 0x14000f4c2
mov rax, qword [rsp + 0x240]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + rcx + 0x240]
test byte [rax + 0x10], r15b
cmovne rax, rdi
test rax, rax
je 0x14000f4c2
lea rdx, [rsp + 0x360]
lea rcx, [rsp + 0x240]
call fcn.14000c804
lea rcx, [rsp + 0x350]
call fcn.140004544
lea rcx, [rsp + 0x240]
call fcn.14000d870
lea rcx, [rsp + 0xf8]
call fcn.14000e0d0
mov rbx, rax
lea esi, [r12 + 0xe]
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x68], rdi
mov byte [rsp + 0x58], dil
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, r13
repne scasb al, byte [rdi]
not rcx
sub rcx, r12
mov r8, rcx
mov rdx, r13
lea rcx, [rsp + 0x58]
call fcn.14000b1f8
nop
lea r8, [0x140041d74]
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0xd0]
call fcn.14000da94
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rsp + 0x30]
call fcn.14000daf4
nop
cmp qword [rsp + 0xe8], 0x10
jb 0x14000f268
mov rcx, qword [rsp + 0xd0]
call fcn.140020df4
mov qword [rsp + 0xe8], rsi
xor edi, edi
mov qword [rsp + 0xe0], rdi
mov byte [rsp + 0xd0], dil
cmp qword [rsp + 0x70], 0x10
jb 0x14000f294
mov rcx, qword [rsp + 0x58]
call fcn.140020df4
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x68], rdi
mov byte [rsp + 0x58], dil
cmp qword [rsp + 0x110], 0x10
jb 0x14000f2bb
mov rcx, qword [rsp + 0xf8]
call fcn.140020df4
mov qword [rsp + 0x110], rsi
mov qword [rsp + 0x108], rdi
mov byte [rsp + 0xf8], dil
mov r8d, 4
lea rdx, [0x140041d88]
lea rcx, [rsp + 0x30]
call fcn.14000b0cc
mov dword [rsp + 0x20], r12d
mov r9d, r14d
mov r8d, 2
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x130]
call fcn.14000d758
nop
mov rax, qword [rsp + 0x130]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + rcx + 0x130]
test byte [rax + 0x10], r15b
cmovne rax, rdi
test rax, rax
je 0x14000f4a1
lea rdx, str._echo_off
lea rcx, [rsp + 0x130]
call fcn.14000c3d4
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000c9c0
mov rcx, rdi
call fcn.140003f64
lea rdx, str.timeout_3___NUL
lea rcx, [rsp + 0x130]
call fcn.14000c3d4
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000c9c0
mov rcx, rdi
call fcn.140003f64
lea rdx, str.START_____
lea rcx, [rsp + 0x130]
call fcn.14000c3d4
lea rdx, [rsp + 0xa8]
mov rcx, rax
call fcn.14000c5f4
lea rdx, [0x140041d9c]
mov rcx, rax
call fcn.14000c3d4
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000c9c0
mov rcx, rdi
call fcn.140003f64
lea rdx, [0x140041dbc]
lea rcx, [rsp + 0x130]
call fcn.14000c3d4
mov rdx, r13
mov rcx, rax
call fcn.14000c3d4
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000c9c0
mov rcx, rdi
call fcn.140003f64
lea rdi, [rsp + 0x30]
cmp qword [rsp + 0x48], 0x10
cmovae rdi, qword [rsp + 0x30]
lea rdx, str.DEL__
lea rcx, [rsp + 0x130]
call fcn.14000c3d4
mov rbx, rax
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
mov rdx, rax
mov rcx, rbx
call fcn.14000c3d4
lea rdx, str.___f__q
mov rcx, rax
call fcn.14000c3d4
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000c9c0
mov rcx, rdi
call fcn.140003f64
lea rcx, [rsp + 0x130]
call fcn.14000d870
lea r8, [rsp + 0x30]
cmp qword [rsp + 0x48], 0x10
cmovae r8, qword [rsp + 0x30]
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.140024f64
nop
lea rcx, [rsp + 0x130]
call fcn.14000dc00
nop
cmp qword [rsp + 0x48], 0x10
jb 0x14000f4c2
mov rcx, qword [rsp + 0x30]
call fcn.140020df4
nop
lea rcx, [rsp + 0x240]
call fcn.14000dc00
nop
lea rcx, [rsp + 0x350]
call fcn.14000e2dc
mov r12, qword [rsp + 0xc0]
mov rsi, qword [rsp + 0xa8]
mov r14, qword [rsp + 0x98]
mov r15, qword [rsp + 0x80]
cmp r14, 0x10
jb 0x14000f51b
mov rcx, r15
call fcn.140020df4
mov r12, qword [rsp + 0xc0]
mov rsi, qword [rsp + 0xa8]
mov qword [rsp + 0x98], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x90], rdi
mov byte [rsp + 0x80], dil
cmp r12, 0x10
jb 0x14000f546
mov rcx, rsi
call fcn.140020df4
nop
jmp 0x14000f54a
lea r11, [rsp + 0x460]
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
ret