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

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
lea rbp, [rax - 0x828]
sub rsp, 0x910
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r13
mov rdi, rdx
mov rbx, rcx
xor r14d, r14d
mov rcx, rdx
cmp qword [rdx + 0x18], 8
jb 0x180188768
mov rcx, qword [rdx]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x180188787
test al, 0x10
jne 0x180188787
mov rdx, rdi
mov rcx, rbx
call fcn.18007a534
jmp 0x180188afc
xor edx, edx
mov r8d, 0x800
lea rcx, [rbp + 0x10]
call sub.VCRUNTIME140.dll_memset
mov edx, 0x28
mov word [rsp + 0x20], dx
lea eax, [rdx + 0x2e]
mov word [rsp + 0x22], ax
lea r13d, [rdx + 0x54]
mov word [rsp + 0x24], r13w
lea eax, [rdx + 0x4e]
mov word [rsp + 0x26], ax
lea ecx, [rdx + 0x4f]
mov word [rsp + 0x28], cx
lea eax, [rdx + 0x40]
mov word [rsp + 0x2a], ax
lea eax, [rdx + 0x48]
mov word [rsp + 0x2c], ax
lea eax, [rdx + 0x2d]
mov word [rsp + 0x2e], ax
lea eax, [rdx + 0x4a]
mov word [rsp + 0x30], ax
mov word [rsp + 0x32], ax
mov word [rsp + 0x34], cx
mov word [rsp + 0x36], dx
mov word [rsp + 0x38], r14w
movzx eax, word [rsp + 0x20]
mov rcx, r14
movzx eax, word [rsp + rcx*2 + 0x20]
sub ax, 3
mov word [rsp + rcx*2 + 0x20], ax
inc rcx
cmp rcx, 0xc
jb 0x180188801
xorps xmm0, xmm0
movups xmmword [rsp + 0x58], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x68], xmm1
lea rax, [rsp + 0x20]
or rsi, 0xffffffffffffffff
mov r8, rsi
inc r8
cmp word [rax + r8*2], r14w
jne 0x180188835
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x58]
call fcn.18007b5dc
lea rcx, [rsp + 0x58]
cmp qword [rsp + 0x70], 8
cmovae rcx, qword [rsp + 0x58]
mov r8d, 0x400
lea rdx, [rbp + 0x10]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov r15d, 0x1000
mov rdx, qword [rsp + 0x70]
cmp rdx, 8
jb 0x1801888b6
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x58]
mov rax, rcx
cmp rdx, r15
jb 0x1801888b1
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1801888b1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180269534
movdqa xmm0, xmmword [0x180280dd0]
movdqu xmmword [rsp + 0x68], xmm0
mov word [rsp + 0x58], r14w
xor edx, edx
lea r8d, [rdx + 0x1a]
lea rcx, [rsp + 0x20]
call qword [sym.imp.VCRUNTIME140.dll_memset]
mov dword [rsp + 0x3c], 8
mov ecx, 0x54
mov word [rsp + 0x40], cx
lea eax, [rcx + 7]
mov word [rsp + 0x42], ax
lea eax, [rcx + 0x1d]
mov word [rsp + 0x44], ax
lea eax, [rcx + 0x27]
mov word [rsp + 0x46], ax
mov word [rsp + 0x48], r13w
lea eax, [rcx + 0x19]
mov word [rsp + 0x4a], ax
lea eax, [rcx + 0x11]
mov word [rsp + 0x4c], ax
lea eax, [rcx - 0x19]
mov word [rsp + 0x4e], ax
lea eax, [rcx - 0x1a]
mov word [rsp + 0x50], ax
mov word [rsp + 0x52], cx
xor eax, eax
mov word [rsp + 0x54], ax
movzx eax, word [rsp + 0x40]
mov rdx, r14
movzx eax, word [rsp + rdx*2 + 0x40]
mov ecx, dword [rsp + 0x3c]
xor cx, ax
mov word [rsp + rdx*2 + 0x40], cx
inc rdx
cmp rdx, 0xa
jb 0x18018893f
mov word [rsp + 0x54], r14w
xorps xmm0, xmm0
movups xmmword [rbp - 0x60], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x50], xmm1
lea rax, [rsp + 0x40]
mov r8, rsi
inc r8
cmp word [rax + r8*2], r14w
jne 0x180188976
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x60]
call fcn.18007b5dc
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x80], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x70], xmm1
lea rax, [rbp + 0x10]
inc rsi
cmp word [rax + rsi*2], r14w
jne 0x1801889a2
mov r8, rsi
lea rdx, [rbp + 0x10]
lea rcx, [rbp - 0x80]
call fcn.18007b5dc
nop
lea r9, [rbp - 0x60]
lea r8, [rbp - 0x80]
lea rcx, [rbp - 0x18]
call fcn.18014feb4
nop
mov r8, rdi
lea rdx, [rbp - 0x18]
lea rcx, [rbp - 0x40]
call fcn.1801369a8
nop
lea rcx, [rbp - 0x18]
call fcn.18007a444
nop
mov rdx, qword [rbp - 0x68]
cmp rdx, 8
jb 0x180188a29
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x80]
mov rax, rcx
cmp rdx, r15
jb 0x180188a24
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180188a24
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180269534
movdqa xmm0, xmmword [0x180280dd0]
movdqu xmmword [rbp - 0x70], xmm0
mov word [rbp - 0x80], r14w
mov rdx, qword [rbp - 0x48]
cmp rdx, 8
jb 0x180188a7a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x60]
mov rax, rcx
cmp rdx, r15
jb 0x180188a75
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180188a75
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180269534
movdqa xmm0, xmmword [0x180280dd0]
movdqu xmmword [rbp - 0x50], xmm0
mov word [rbp - 0x60], r14w
xor edx, edx
lea r8d, [rdx + 0x16]
lea rcx, [rsp + 0x40]
call qword [sym.imp.VCRUNTIME140.dll_memset]
lea rcx, [rbp - 0x40]
cmp qword [rbp - 0x28], 8
cmovae rcx, qword [rbp - 0x40]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x180188add
test al, 0x10
jne 0x180188add
xorps xmm0, xmm0
movups xmmword [rbx], xmm0
mov qword [rbx + 0x10], r14
mov qword [rbx + 0x18], r14
mov r8d, 0x20
lea rdx, [rbp - 0x40]
mov rcx, rbx
call qword [sym.imp.VCRUNTIME140.dll_memcpy]
jmp 0x180188afc
xorps xmm0, xmm0
movups xmmword [rbx], xmm0
mov qword [rbx + 0x10], r14
mov qword [rbx + 0x18], 7
mov word [rbx], r14w
lea rcx, [rbp - 0x40]
call fcn.18007a444
mov rax, rbx
lea r11, [rsp + 0x910]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r13, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret