Function at 0x140140bf0
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.14013da40
mov rax, qword [rbp - 0x58]
mov qword [rbp + 0x400], rax
test rax, rax
je 0x140140d74
mov qword [rbp + 0x3f8], rsi
mov rax, qword [rbp - 0x60]
mov qword [rbp + 0x3e8], rax
mov qword [rbp + 0x3d0], 0
mov qword [rbp + 0x3d8], 2
mov qword [rbp + 0x3e0], 0
mov r8d, 0x200
mov eax, 2
mov qword [rbp + 0x408], rax
xor r13d, r13d
xor r12d, r12d
xor edi, edi
cmp r8, 0x201
jae 0x140140cb0
jmp 0x140140c9f
jae 0x140140def
cmp r8, 0x201
jae 0x140140cb0
lea rbx, [rbp - 0x60]
mov r14d, 0x200
mov rsi, r8
jmp 0x140140d07
sub r8, rdi
sub r12, rdi
cmp r12, r8
jae 0x140140cdf
lea rcx, [rbp + 0x3d0]
mov rdx, rdi
call fcn.140174690
mov r13, qword [rbp + 0x3d0]
mov rax, qword [rbp + 0x3d8]
mov qword [rbp + 0x408], rax
mov eax, 0xffffffff
cmp r13, rax
mov edi, 0xffffffff
cmovb rdi, r13
mov qword [rbp + 0x3e0], rdi
mov r12, r13
mov rbx, qword [rbp + 0x408]
mov r14, rdi
mov rsi, rdi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, qword [rbp + 0x400]
mov rdx, rbx
mov r8d, esi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov r15d, eax
test eax, eax
jne 0x140140d36
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x140140f39
mov r8d, r15d
cmp rsi, r8
jne 0x140140c90
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x7a
jne 0x140140f58
add rsi, rsi
mov eax, 0xffffffff
cmp rsi, rax
cmovae rsi, rax
mov r8, rsi
cmp r8, 0x201
jb 0x140140c9f
jmp 0x140140cb0
mov rdx, qword [rbp - 0x60]
mov eax, edx
and eax, 3
cmp eax, 1
jne 0x140140de6
lea rax, [rdx - 1]
mov qword [rbp + 0x400], rax
mov rcx, qword [rdx - 1]
mov qword [rbp + 0x408], rdx
mov rax, qword [rdx + 7]
call qword [rax]
mov rax, qword [rbp + 0x408]
mov rax, qword [rax + 7]
cmp qword [rax + 8], 0
mov rdi, qword [rbp + 0x400]
je 0x140140dd4
mov r8, qword [rdi]
cmp qword [rax + 0x10], 0x11
jb 0x140140dc5
mov r8, qword [r8 - 8]
mov rcx, qword [0x140221370]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [0x140221370]
xor edx, edx
mov r8, rdi
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov byte [rsi + 0x18], 2
jmp 0x140140f24
cmp r14, r8
jb 0x140140f72
lea rcx, [rbp + 0x3b0]
mov rdx, rbx
call fcn.14013f7d0
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 + 0x3f0], eax
mov eax, dword [rbp + 0x3cc]
mov dword [rbp + 0x3f3], eax
test r13, r13
je 0x140140e56
mov rcx, qword [0x140221370]
xor edx, edx
mov r8, qword [rbp + 0x408]
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp bl, 2
jne 0x140140eda
mov rax, qword [rbp + 0x3f8]
mov byte [rax + 0x18], 2
mov eax, esi
and eax, 3
cmp eax, 1
jne 0x140140f04
lea rax, [rsi - 1]
mov qword [rbp + 0x408], rax
mov rcx, qword [rsi - 1]
mov rax, qword [rsi + 7]
mov qword [rbp + 0x3f8], rsi
call qword [rax]
mov rax, qword [rbp + 0x3f8]
mov rax, qword [rax + 7]
cmp qword [rax + 8], 0
mov rsi, qword [rbp + 0x408]
je 0x140140ec6
mov r8, qword [rsi]
cmp qword [rax + 0x10], 0x11
jb 0x140140eb7
mov r8, qword [r8 - 8]
mov rcx, qword [0x140221370]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [0x140221370]
xor edx, edx
mov r8, rsi
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x140140f04
movaps xmm0, xmmword [rbp + 0x3a0]
mov rdx, qword [rbp + 0x3f8]
movups xmmword [rdx + 8], xmm0
mov eax, dword [rbp + 0x3f0]
mov ecx, dword [rbp + 0x3f3]
mov dword [rdx + 0x19], eax
mov dword [rdx + 0x1c], ecx
mov qword [rdx], rsi
mov byte [rdx + 0x18], bl
cmp qword [rbp + 0x3e8], 0
je 0x140140f24
mov rcx, qword [0x140221370]
xor edx, edx
mov r8, qword [rbp + 0x400]
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
call sub.KERNEL32.dll_GetLastError
mov esi, eax
shl rsi, 0x20
or rsi, 2
mov bl, 2
test r13, r13
jne 0x140140e40
jmp 0x140140e56
lea rcx, str.internal_error:_entered_unreachable_code_rustc_84c898d65adf2f39a5a98507f1fe0ce10a2b8dbclibrary_std_src_threadmod.rs
lea r8, str.library_std_src_syswindowsmod.rs
mov edx, 0x28
call fcn.14016f3d0
jmp 0x140140f87
lea rax, str.library_std_src_syswindowsmod.rs
mov rcx, r8
mov rdx, r14
mov r8, rax
call fcn.14016f3c0
ud2