Function at 0x1805866e0
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rdi
mov qword [rsp + 0x20], r14
push rbp
lea rbp, [rsp - 0x380]
sub rsp, 0x480
lea rcx, [0x1805884a0]
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rbx, 0xffffffffffffffff
mov r8, rbx
inc r8
cmp byte [rax + r8], 0
jne 0x180586716
mov rdx, rax
call fcn.180585310
mov rcx, qword [0x18058b048]
test rcx, rcx
je 0x1805867b2
mov rdx, qword [0x18058b050]
lea r8, [0x18058b038]
mov r9, qword [0x18058b038]
cmp rdx, 0x10
mov rax, r8
cmovae rax, r9
cmp byte [rcx + rax - 1], 0x5c
je 0x1805867b2
cmp rdx, 0x10
mov rax, r8
cmovae rax, r9
cmp byte [rcx + rax - 1], 0x2f
je 0x1805867b2
mov rax, rdx
sub rax, rcx
cmp rax, 1
jb 0x180586795
cmp rdx, 0x10
lea rax, [rcx + 1]
mov qword [0x18058b048], rax
cmovae r8, r9
mov word [r8 + rcx], 0x5c
jmp 0x1805867b2
lea r9, [0x1805884ac]
mov qword [rsp + 0x20], 1
mov edx, 1
mov rcx, r8
call fcn.180585860
call fcn.180586d50
xor r14d, r14d
mov qword [rsp + 0x48], 7
lea r9, str.OfStransferL.dll
mov qword [rsp + 0x30], r14
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x40], r14
lea edx, [r14 + 0x10]
call fcn.180585570
xor edx, edx
lea rcx, [rsp + 0x70]
mov r8d, 0x410
call sub.VCRUNTIME140.dll_memset
mov r8d, 0x208
lea rdx, [rsp + 0x70]
lea rcx, str.USERPROFILE
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ecx, 0x208
lea rax, [rsp + 0x70]
cmp word [rax], r14w
je 0x180586826
add rax, 2
sub rcx, 1
jne 0x180586816
mov eax, 0x208
sub rax, rcx
test rcx, rcx
cmove rax, r14
je 0x18058688e
mov r8d, 0x208
lea rcx, [rsp + 0x70]
lea rcx, [rcx + rax*2]
sub r8, rax
je 0x18058687f
lea r9, [0x180588540]
mov eax, 0x7ffffffe
sub r9, rcx
nop word [rax + rax]
test rax, rax
je 0x18058687f
movzx edx, word [r9 + rcx]
test dx, dx
je 0x18058687f
mov word [rcx], dx
dec rax
add rcx, 2
sub r8, 1
jne 0x180586860
test r8, r8
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], r14w
cmp qword [rsp + 0x48], 8
lea r8, [rsp + 0x30]
mov edx, 0x208
mov qword [rsp + 0x490], rsi
cmovae r8, qword [rsp + 0x30]
lea rcx, [rsp + 0x70]
call fcn.180584280
mov r10, qword [rsp + 0x48]
lea rdi, [rsp + 0x30]
mov rax, qword [rsp + 0x40]
cmp r10, 8
cmovae rdi, qword [rsp + 0x30]
cmp rax, 4
jb 0x180586a18
lea r11, [rax - 3]
mov rcx, rdi
lea r11, [rdi + r11*2]
lea rsi, str..dll
nop dword [rax + rax]
mov rax, r11
sub rax, rcx
sar rax, 1
je 0x180586a18
nop
cmp word [rcx], 0x2e
je 0x180586915
add rcx, 2
sub rax, 1
jne 0x180586900
jmp 0x180586a18
test rcx, rcx
je 0x180586a18
mov r9, rcx
mov r8d, 4
sub r9, rsi
mov rdx, rsi
nop dword [rax]
movzx eax, word [rdx]
cmp word [rdx + r9], ax
jne 0x1805869a2
add rdx, 2
sub r8, 1
jne 0x180586930
sub rcx, rdi
sar rcx, 1
cmp rcx, rbx
je 0x180586a18
mov qword [rsp + 0x50], r14
lea rax, [rsp + 0x70]
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x68], 7
nop dword [rax + rax]
inc rbx
cmp word [rax + rbx*2], r14w
jne 0x180586970
lea rcx, [rsp + 0x50]
cmp rbx, 7
ja 0x1805869ab
mov qword [rsp + 0x60], rbx
lea rdx, [rsp + 0x70]
add rbx, rbx
mov r8, rbx
call sub.VCRUNTIME140.dll_memmove
mov word [rsp + rbx + 0x50], r14w
jmp 0x1805869b8
add rcx, 2
jmp 0x1805868f0
lea r9, [rsp + 0x70]
mov rdx, rbx
call fcn.180585570
cmp qword [rsp + 0x68], 8
lea rcx, [rsp + 0x50]
cmovae rcx, qword [rsp + 0x50]
call fcn.180586a80
mov rdx, qword [rsp + 0x68]
cmp rdx, 8
jb 0x180586a13
mov rcx, qword [rsp + 0x50]
lea rdx, [rdx*2 + 2]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180586a0e
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180586a0e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180585df4
mov r10, qword [rsp + 0x48]
cmp r10, 8
jb 0x180586a58
mov rcx, qword [rsp + 0x30]
lea rdx, [r10*2 + 2]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180586a53
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180586a53
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180585df4
mov rsi, qword [rsp + 0x490]
lea r11, [rsp + 0x480]
mov rbx, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov r14, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret