Function at 0x18004208c
Capabilities:
Check if file exists
Encode data using xor
Get file attributes
Query environment variable

Disassembly:
mov rax, rsp
push rbp
push rdi
push r14
lea rbp, [rax - 0x7e8]
sub rsp, 0x8d0
mov qword [rbp - 0x60], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x20], rsi
mov rsi, rcx
xor r14d, r14d
mov word [rbp - 0x30], r14w
xor edx, edx
mov r8d, 0x7fe
lea rcx, [rbp - 0x2e]
call sub.VCRUNTIME140.dll_memset
mov ecx, dword [0x180195f94]
mov rax, qword gs:[0x58]
mov edx, 4
mov rax, qword [rax + rcx*8]
lea edi, [r14 + 1]
mov eax, dword [rdx + rax]
cmp dword [0x18019bfb4], eax
jle 0x18004242a
lea rcx, [0x18019bfb4]
call fcn.180157af0
or rbx, 0xffffffffffffffff
cmp dword [0x18019bfb4], ebx
jne 0x18004242a
lea rax, [rbp - 0x80]
mov qword [rbp + 0x7f8], rax
mov dword [rsp + 0x30], 0x53
mov eax, dword [rsp + 0x30]
xor al, 0x45
mov byte [rsp + 0x34], al
mov eax, dword [rsp + 0x30]
add al, dil
xor al, 0x78
mov byte [rsp + 0x35], al
mov eax, dword [rsp + 0x30]
add al, 2
xor al, 0x70
mov byte [rsp + 0x36], al
mov eax, dword [rsp + 0x30]
add al, 3
xor al, 0x61
mov byte [rsp + 0x37], al
mov eax, dword [rsp + 0x30]
add al, 4
xor al, 0x6e
mov byte [rsp + 0x38], al
mov eax, dword [rsp + 0x30]
add al, 5
xor al, 0x64
mov byte [rsp + 0x39], al
mov eax, dword [rsp + 0x30]
add al, 6
xor al, 0x45
mov byte [rsp + 0x3a], al
mov eax, dword [rsp + 0x30]
add al, 7
xor al, 0x6e
mov byte [rsp + 0x3b], al
mov eax, dword [rsp + 0x30]
add al, 8
xor al, 0x76
mov byte [rsp + 0x3c], al
mov eax, dword [rsp + 0x30]
add al, 9
xor al, 0x69
mov byte [rsp + 0x3d], al
mov eax, dword [rsp + 0x30]
add al, 0xa
xor al, 0x72
mov byte [rsp + 0x3e], al
mov eax, dword [rsp + 0x30]
add al, 0xb
xor al, 0x6f
mov byte [rsp + 0x3f], al
mov eax, dword [rsp + 0x30]
add al, 0xc
xor al, 0x6e
mov byte [rsp + 0x40], al
mov eax, dword [rsp + 0x30]
add al, 0xd
xor al, 0x6d
mov byte [rsp + 0x41], al
mov eax, dword [rsp + 0x30]
add al, 0xe
xor al, 0x65
mov byte [rsp + 0x42], al
mov eax, dword [rsp + 0x30]
add al, 0xf
xor al, 0x6e
mov byte [rsp + 0x43], al
mov eax, dword [rsp + 0x30]
add al, 0x10
xor al, 0x74
mov byte [rsp + 0x44], al
mov eax, dword [rsp + 0x30]
add al, 0x11
xor al, 0x53
mov byte [rsp + 0x45], al
mov eax, dword [rsp + 0x30]
add al, 0x12
xor al, 0x74
mov byte [rsp + 0x46], al
mov eax, dword [rsp + 0x30]
add al, 0x13
xor al, 0x72
mov byte [rsp + 0x47], al
mov eax, dword [rsp + 0x30]
add al, 0x14
xor al, 0x69
mov byte [rsp + 0x48], al
mov eax, dword [rsp + 0x30]
add al, 0x15
xor al, 0x6e
mov byte [rsp + 0x49], al
mov eax, dword [rsp + 0x30]
add al, 0x16
xor al, 0x67
mov byte [rsp + 0x4a], al
mov eax, dword [rsp + 0x30]
add al, 0x17
xor al, 0x73
mov byte [rsp + 0x4b], al
mov eax, dword [rsp + 0x30]
add al, 0x18
xor al, 0x57
mov byte [rsp + 0x4c], al
xor eax, eax
mov byte [rsp + 0x4d], al
mov al, byte [rsp + 0x34]
mov edx, r14d
mov al, byte [rsp + rdx + 0x34]
mov ecx, dword [rsp + 0x30]
add cl, dl
xor cl, al
mov byte [rsp + rdx + 0x34], cl
add rdx, rdi
cmp rdx, 0x19
jb 0x18004225f
mov byte [rsp + 0x4d], r14b
xorps xmm0, xmm0
movups xmmword [rbp - 0x80], xmm0
mov qword [rbp - 0x70], r14
mov qword [rbp - 0x68], r14
lea rax, [rsp + 0x34]
mov r8, rbx
inc r8
cmp byte [rax + r8], r14b
jne 0x180042294
lea rdx, [rsp + 0x34]
lea rcx, [rbp - 0x80]
call fcn.18000c7ac
nop
mov dword [rsp + 0x50], 0x32
mov eax, dword [rsp + 0x50]
xor al, 0x6b
mov byte [rsp + 0x54], al
mov eax, dword [rsp + 0x50]
add al, dil
xor al, 0x65
mov byte [rsp + 0x55], al
mov eax, dword [rsp + 0x50]
add al, 2
xor al, 0x72
mov byte [rsp + 0x56], al
mov eax, dword [rsp + 0x50]
add al, 3
xor al, 0x6e
mov byte [rsp + 0x57], al
mov eax, dword [rsp + 0x50]
add al, 4
xor al, 0x65
mov byte [rsp + 0x58], al
mov eax, dword [rsp + 0x50]
add al, 5
xor al, 0x6c
mov byte [rsp + 0x59], al
mov eax, dword [rsp + 0x50]
add al, 6
xor al, 0x33
mov byte [rsp + 0x5a], al
mov eax, dword [rsp + 0x50]
add al, 7
xor al, 0x32
mov byte [rsp + 0x5b], al
xor eax, eax
mov byte [rsp + 0x5c], al
mov al, byte [rsp + 0x54]
mov rdx, r14
mov al, byte [rsp + rdx + 0x54]
mov ecx, dword [rsp + 0x50]
add cl, dl
xor cl, al
mov byte [rsp + rdx + 0x54], cl
add rdx, rdi
cmp rdx, 8
jb 0x180042320
mov byte [rsp + 0x5c], r14b
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x70], xmm1
lea rax, [rsp + 0x54]
inc rbx
cmp byte [rax + rbx], r14b
jne 0x180042354
mov r8, rbx
lea rdx, [rsp + 0x54]
lea rcx, [rsp + 0x60]
call fcn.18000c7ac
nop
lea rdx, [rsp + 0x60]
lea rcx, [rbp - 0x58]
call fcn.1800ceb58
nop
mov qword [rsp + 0x20], r14
mov r9b, dil
lea r8, [rbp - 0x80]
mov rdx, rax
lea rcx, [0x18019b610]
call fcn.18005f83c
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, 0x10
jb 0x1800423db
inc rdx
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800423d6
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1800423d6
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180157a14
movdqa xmm0, xmmword [0x180165930]
movdqu xmmword [rsp + 0x70], xmm0
mov byte [rsp + 0x60], r14b
xor edx, edx
lea r8d, [rdx + 9]
lea rcx, [rsp + 0x54]
call qword [sym.imp.VCRUNTIME140.dll_memset]
nop
xor edx, edx
lea r8d, [rdx + 0x1a]
lea rcx, [rsp + 0x34]
call qword [sym.imp.VCRUNTIME140.dll_memset]
lea rcx, [0x180163158]
call fcn.1801579fc
nop
lea rcx, [0x18019bfb4]
call fcn.180157a84
cmp qword [rsi + 0x18], 8
jb 0x180042434
mov rsi, qword [rsi]
mov r8d, 0x400
lea rdx, [rbp - 0x30]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea rcx, [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x18004245a
test al, 0x10
je 0x18004245d
mov dil, r14b
mov al, dil
lea r11, [rsp + 0x8d0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret