Function at 0x14000bd60
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.14000a140
nop
lea rcx, str.TEMP
call fcn.140026be4
mov rsi, rax
mov qword [rsp + 0x110], reloc.WS2_32.dll_ntohs
xor ebx, ebx
mov qword [rsp + 0x108], rbx
mov byte [rsp + 0xf8], bl
lea r8d, [rbx + 0xc]
lea rdx, str.upgrader.exe
lea rcx, [rsp + 0xf8]
call fcn.1400109f0
nop
mov qword [rsp + 0xe8], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0xe0], rbx
mov byte [rsp + 0xd0], bl
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rsi
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, rsi
lea rcx, [rsp + 0xd0]
call fcn.1400109f0
nop
lea r8, [0x14004d62c]
lea rdx, [rsp + 0xd0]
lea rcx, [rsp + 0x170]
call fcn.140012010
nop
lea r8, [rsp + 0xf8]
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.140012080
nop
cmp qword [rsp + 0x188], 0x10
jb 0x14000be5b
mov rcx, qword [rsp + 0x170]
call fcn.140023d50
mov qword [rsp + 0x188], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x180], rbx
mov byte [rsp + 0x170], 0
cmp qword [rsp + 0xe8], 0x10
jb 0x14000be8f
mov rcx, qword [rsp + 0xd0]
call fcn.140023d50
mov qword [rsp + 0xe8], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0xe0], rbx
mov byte [rsp + 0xd0], 0
cmp qword [rsp + 0x110], 0x10
jb 0x14000bec3
mov rcx, qword [rsp + 0xf8]
call fcn.140023d50
mov qword [rsp + 0x110], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x108], rbx
mov byte [rsp + 0xf8], 0
mov qword [rsp + 0x48], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x40], rbx
mov byte [rsp + 0x30], 0
xor r8d, r8d
mov edx, 0x104
lea rcx, [rsp + 0x30]
call fcn.140004420
nop
lea rdx, [rsp + 0x30]
cmp qword [rsp + 0x48], 0x10
cmovae rdx, qword [rsp + 0x30]
xor ecx, ecx
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea rdx, [rsp + 0x58]
mov rdi, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x70]
cmp rbx, 0x10
cmovae rdx, rdi
lea rcx, [rsp + 0x30]
mov r12, qword [rsp + 0x30]
mov r13, qword [rsp + 0x48]
cmp r13, 0x10
cmovae rcx, r12
mov r14, qword [rsp + 0x68]
mov r8, r14
mov r15, qword [rsp + 0x40]
cmp r15, r14
cmovb r8, r15
call fcn.1400287c0
movsxd rcx, eax
test eax, eax
jne 0x14000bf86
cmp r15, r14
jae 0x14000bf7c
or ecx, 0xffffffff
jmp 0x14000bf86
xor eax, eax
cmp r15, r14
setne al
mov ecx, eax
test ecx, ecx
sete al
test al, al
sete al
test al, al
je 0x14000c691
lea rcx, [rsp + 0x58]
cmp rbx, 0x10
cmovae rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x14000bfd1
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 + 0x2b0]
call fcn.14000e9d0
nop
mov r8d, 0x20
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x1a0]
call fcn.14000f5d0
nop
mov rax, qword [rsp + 0x2b0]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + rcx + 0x2b0]
test byte [rax + 0x10], 6
mov r14d, 0
cmovne rax, r14
test rax, rax
je 0x14000c5a1
mov rdx, qword [rsp + 0x1a0]
movsxd rax, dword [rdx + 4]
lea rcx, [rsp + rax + 0x1a0]
test byte [rcx + 0x10], 6
cmovne rcx, r14
test rcx, rcx
je 0x14000c5a9
lea rdx, [rsp + 0x2c0]
lea rcx, [rsp + 0x1a0]
call fcn.14000c9c0
lea rcx, [rsp + 0x2c0]
call fcn.140004040
test rax, rax
jne 0x14000c09f
mov rax, qword [rsp + 0x2b0]
movsxd rcx, dword [rax + 4]
lea rcx, [rsp + rcx + 0x2b0]
mov edx, dword [rcx + 0x10]
or edx, 2
cmp qword [rcx + 0x48], r14
jne 0x14000c097
or edx, 4
xor r8d, r8d
call fcn.140002ee0
lea rcx, [rsp + 0x1a8]
call fcn.140004040
test rax, rax
jne 0x14000c0dc
mov rax, qword [rsp + 0x1a0]
movsxd rcx, dword [rax + 4]
lea rcx, [rsp + rcx + 0x1a0]
mov edx, dword [rcx + 0x10]
or edx, 2
cmp qword [rcx + 0x48], r14
jne 0x14000c0d4
or edx, 4
xor r8d, r8d
call fcn.140002ee0
lea rcx, [rsp + 0x148]
call fcn.14000ba00
mov rbx, rax
mov qword [rsp + 0xc0], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0xb8], r14
mov byte [rsp + 0xa8], 0
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rsi
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, rsi
lea rcx, [rsp + 0xa8]
call fcn.1400109f0
nop
lea r8, [0x14004d664]
lea rdx, [rsp + 0xa8]
lea rcx, [rsp + 0x120]
call fcn.140012010
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rsp + 0x80]
call fcn.140012080
nop
cmp qword [rsp + 0x138], 0x10
jb 0x14000c174
mov rcx, qword [rsp + 0x120]
call fcn.140023d50
mov qword [rsp + 0x138], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x130], r14
mov byte [rsp + 0x120], 0
cmp qword [rsp + 0xc0], 0x10
jb 0x14000c1a8
mov rcx, qword [rsp + 0xa8]
call fcn.140023d50
mov qword [rsp + 0xc0], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0xb8], r14
mov byte [rsp + 0xa8], 0
cmp qword [rsp + 0x160], 0x10
jb 0x14000c1dc
mov rcx, qword [rsp + 0x148]
call fcn.140023d50
mov qword [rsp + 0x160], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x158], r14
mov byte [rsp + 0x148], 0
mov r12d, 4
mov r8d, r12d
lea rdx, str..bat
lea rcx, [rsp + 0x80]
call fcn.1400108b0
lea r8d, [r12 - 2]
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x3c0]
call fcn.14000f5d0
nop
mov rax, qword [rsp + 0x3c0]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + rcx + 0x3c0]
test byte [rax + 0x10], 6
cmovne rax, r14
test rax, rax
je 0x14000c57b
lea rdx, str._echo_off
lea rcx, [rsp + 0x3c0]
call fcn.140011b80
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000cc50
mov ebx, r14d
mov rcx, qword [rdi]
movsxd rcx, dword [rcx + 4]
test byte [rcx + rdi + 0x10], 6
jne 0x14000c299
mov rcx, qword [rcx + rdi + 0x48]
mov rax, qword [rcx]
call qword [rax + 0x68]
cmp eax, 0xffffffff
cmove ebx, r12d
mov rax, qword [rdi]
movsxd rcx, dword [rax + 4]
add rcx, rdi
test ebx, ebx
je 0x14000c2be
mov edx, dword [rcx + 0x10]
or edx, ebx
cmp qword [rcx + 0x48], 0
jne 0x14000c2b6
or edx, 4
xor r8d, r8d
call fcn.140002ee0
lea rdx, str.timeout_3___NUL
lea rcx, [rsp + 0x3c0]
call fcn.140011b80
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000cc50
mov ebx, r14d
mov rcx, qword [rdi]
movsxd rcx, dword [rcx + 4]
test byte [rcx + rdi + 0x10], 6
jne 0x14000c302
mov rcx, qword [rcx + rdi + 0x48]
mov rax, qword [rcx]
call qword [rax + 0x68]
cmp eax, 0xffffffff
cmove ebx, r12d
mov rax, qword [rdi]
movsxd rcx, dword [rax + 4]
add rcx, rdi
test ebx, ebx
je 0x14000c327
mov edx, dword [rcx + 0x10]
or edx, ebx
cmp qword [rcx + 0x48], 0
jne 0x14000c31f
or edx, 4
xor r8d, r8d
call fcn.140002ee0
lea rdx, str.START_____
lea rcx, [rsp + 0x3c0]
call fcn.140011b80
lea rdx, [rsp + 0x58]
mov rcx, rax
call fcn.140012100
lea rdx, [0x14004d674]
mov rcx, rax
call fcn.140011b80
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000cc50
mov ebx, r14d
mov rcx, qword [rdi]
movsxd rcx, dword [rcx + 4]
test byte [rcx + rdi + 0x10], 6
jne 0x14000c387
mov rcx, qword [rcx + rdi + 0x48]
mov rax, qword [rcx]
call qword [rax + 0x68]
cmp eax, 0xffffffff
cmove ebx, r12d
mov rax, qword [rdi]
movsxd rcx, dword [rax + 4]
add rcx, rdi
test ebx, ebx
je 0x14000c3ac
mov edx, dword [rcx + 0x10]
or edx, ebx
cmp qword [rcx + 0x48], 0
jne 0x14000c3a4
or edx, 4
xor r8d, r8d
call fcn.140002ee0
lea rdx, [0x14004d7a4]
lea rcx, [rsp + 0x3c0]
call fcn.140011b80
mov rdx, rsi
mov rcx, rax
call fcn.140011b80
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000cc50
mov ebx, r14d
mov rcx, qword [rdi]
movsxd rcx, dword [rcx + 4]
test byte [rcx + rdi + 0x10], 6
jne 0x14000c3fb
mov rcx, qword [rcx + rdi + 0x48]
mov rax, qword [rcx]
call qword [rax + 0x68]
cmp eax, 0xffffffff
cmove ebx, r12d
mov rax, qword [rdi]
movsxd rcx, dword [rax + 4]
add rcx, rdi
test ebx, ebx
je 0x14000c420
mov edx, dword [rcx + 0x10]
or edx, ebx
cmp qword [rcx + 0x48], 0
jne 0x14000c418
or edx, 4
xor r8d, r8d
call fcn.140002ee0
lea rdi, [rsp + 0x80]
cmp qword [rsp + 0x98], 0x10
cmovae rdi, qword [rsp + 0x80]
lea rdx, str.DEL__
lea rcx, [rsp + 0x3c0]
call fcn.140011b80
mov rbx, rax
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
mov rdx, rax
mov rcx, rbx
call fcn.140011b80
lea rdx, str.___f__q
mov rcx, rax
call fcn.140011b80
mov rdi, rax
mov dl, 0xa
mov rcx, rax
call fcn.14000cc50
mov ebx, r14d
mov rcx, qword [rdi]
movsxd rcx, dword [rcx + 4]
test byte [rcx + rdi + 0x10], 6
jne 0x14000c4a4
mov rcx, qword [rcx + rdi + 0x48]
mov rax, qword [rcx]
call qword [rax + 0x68]
cmp eax, 0xffffffff
cmove ebx, r12d
mov rax, qword [rdi]
movsxd rcx, dword [rax + 4]
add rcx, rdi
test ebx, ebx
je 0x14000c4c9
mov edx, dword [rcx + 0x10]
or edx, ebx
cmp qword [rcx + 0x48], 0
jne 0x14000c4c1
or edx, 4
xor r8d, r8d
call fcn.140002ee0
lea rcx, [rsp + 0x3c8]
call fcn.140004040
test rax, rax
jne 0x14000c507
mov rax, qword [rsp + 0x3c0]
movsxd rcx, dword [rax + 4]
lea rcx, [rsp + rcx + 0x3c0]
mov edx, dword [rcx + 0x10]
or edx, 2
cmp qword [rcx + 0x48], 0
jne 0x14000c4ff
or edx, 4
xor r8d, r8d
call fcn.140002ee0
lea r8, [rsp + 0x80]
cmp qword [rsp + 0x98], 0x10
cmovae r8, qword [rsp + 0x80]
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x20], r14
xor r9d, r9d
lea rdx, str.open
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_ShellExecuteA]
cmp byte [0x1400691ef], 0
jne 0x14000c569
mov r9d, gethostname
lea r8, [0x14004daf8]
lea rdx, [0x14004da78]
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxW]
mov byte [0x1400691ef], 1
call fcn.14000a8f0
call fcn.14000b8d0
xor ecx, ecx
call fcn.140026fb0
nop
lea rcx, [rsp + 0x3c0]
call fcn.14000c770
nop
cmp qword [rsp + 0x98], 0x10
jb 0x14000c5a1
mov rcx, qword [rsp + 0x80]
call fcn.140023d50
mov rdx, qword [rsp + 0x1a0]
lea rax, [rsp + 0x248]
mov qword [rsp + 0x500], rax
movsxd rax, dword [rdx + 4]
lea rcx, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rax + 0x1a0], rcx
lea rcx, [rsp + 0x1a8]
call fcn.14000eb20
nop
mov rax, qword [rsp + 0x1a0]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x1a0], rax
lea rdi, vtable.std::ios_base.0
mov qword [rsp + 0x248], rdi
lea rcx, [rsp + 0x248]
call fcn.14003e0b0
nop
lea rax, [rsp + 0x360]
mov qword [rsp + 0x500], rax
mov rax, qword [rsp + 0x2b0]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x2b0], rax
lea rcx, [rsp + 0x2c0]
call fcn.14000eb20
nop
mov rax, qword [rsp + 0x2b0]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x2b0], rax
mov qword [rsp + 0x360], rdi
lea rcx, [rsp + 0x360]
call fcn.14003e0b0
mov rbx, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x58]
mov r13, qword [rsp + 0x48]
mov r12, qword [rsp + 0x30]
jmp 0x14000c694
xor r14d, r14d
cmp r13, 0x10
jb 0x14000c6ac
mov rcx, r12
call fcn.140023d50
mov rbx, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x58]
mov qword [rsp + 0x48], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x40], r14
mov byte [rsp + 0x30], 0
cmp rbx, 0x10
jb 0x14000c6ce
mov rcx, rdi
call fcn.140023d50
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.14000a140