Function at 0x140018980
Capabilities:
Query environment variable

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x498
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x410], 0xfffffffffffffffe
mov rsi, rcx
lea rcx, [rbp - 0x60]
call fcn.140014b80
mov rax, qword [rbp - 0x60]
mov qword [rbp + 0x3f8], rax
test rax, rax
je 0x140018b07
mov qword [rbp + 0x3f0], rsi
mov rax, qword [rbp - 0x58]
mov qword [rbp + 0x3e8], rax
mov qword [rbp + 0x3d0], 2
xorps xmm0, xmm0
movups xmmword [rbp + 0x3d8], xmm0
mov r8d, 0x200
mov eax, 2
mov qword [rbp + 0x400], rax
xor edi, edi
xor ebx, ebx
xor r12d, r12d
cmp r8, 0x201
jae 0x140018a40
jmp 0x140018a2f
jae 0x140018b19
cmp r8, 0x201
jae 0x140018a40
mov esi, 0x200
lea r13, [rbp - 0x60]
mov r15, r8
jmp 0x140018a98
sub r8, r12
sub rbx, r12
cmp rbx, r8
jae 0x140018a6f
lea rcx, [rbp + 0x3d0]
mov rdx, r12
call fcn.1400210b0
mov rax, qword [rbp + 0x3d0]
mov qword [rbp + 0x400], rax
mov rdi, qword [rbp + 0x3d8]
mov eax, 0xffffffff
cmp rdi, rax
mov r12d, 0xffffffff
cmovb r12, rdi
mov qword [rbp + 0x3e0], r12
mov rbx, rdi
mov rsi, r12
mov r13, qword [rbp + 0x400]
mov r15, r12
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, qword [rbp + 0x3f8]
mov rdx, r13
mov r8d, r15d
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov r14d, eax
test eax, eax
jne 0x140018ac8
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x140018c03
mov r8d, r14d
cmp r15, r8
jne 0x140018a20
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x140018c23
add r15, r15
mov eax, 0xffffffff
cmp r15, rax
cmovae r15, rax
mov r8, r15
cmp r8, 0x201
jb 0x140018a2f
jmp 0x140018a40
mov rcx, qword [rbp - 0x58]
call fcn.1400129d0
mov byte [rsi + 0x18], 2
jmp 0x140018bb8
cmp rsi, r8
jb 0x140018c3d
lea rcx, [rbp + 0x3b0]
mov rdx, r13
call fcn.140016920
mov rsi, qword [rbp + 0x3b0]
movups xmm0, xmmword [rbp + 0x3b8]
movaps xmmword [rbp + 0x3a0], xmm0
movzx ebx, byte [rbp + 0x3c8]
mov eax, dword [rbp + 0x3c9]
mov dword [rbp + 0x408], eax
mov eax, dword [rbp + 0x3cc]
mov dword [rbp + 0x40b], eax
test rdi, rdi
je 0x140018b80
mov rcx, qword [0x14002c178]
xor edx, edx
mov r8, qword [rbp + 0x400]
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp bl, 2
jne 0x140018bcd
mov rax, qword [rbp + 0x3f0]
mov byte [rax + 0x18], 2
mov rcx, rsi
call fcn.1400129d0
cmp qword [rbp + 0x3e8], 0
je 0x140018bb8
mov rcx, qword [0x14002c178]
xor edx, edx
mov r8, qword [rbp + 0x3f8]
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop
add rsp, 0x498
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov rdx, qword [rbp + 0x3f0]
mov qword [rdx], rsi
movaps xmm0, xmmword [rbp + 0x3a0]
movups xmmword [rdx + 8], xmm0
mov byte [rdx + 0x18], bl
mov eax, dword [rbp + 0x408]
mov ecx, dword [rbp + 0x40b]
mov dword [rdx + 0x19], eax
mov dword [rdx + 0x1c], ecx
cmp qword [rbp + 0x3e8], 0
jne 0x140018ba2
jmp 0x140018bb8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
shl rsi, 0x20
or rsi, 2
mov bl, 2
test rdi, rdi
jne 0x140018b6a
jmp 0x140018b80
lea rcx, str.internal_error:_entered_unreachable_code_rustc_82e1608dfa6e0b5569232559e3d385fea5a93112library_alloc_src_vecmod.rs
lea r8, str.library_std_src_syswindowsmod.rs
mov edx, 0x28
call fcn.140020320
jmp 0x140018c52
lea rax, str.library_std_src_syswindowsmod.rs
mov rcx, r8
mov rdx, rsi
mov r8, rax
call fcn.1400202a0
ud2