Function at 0x140037000
Capabilities:
Query environment variable

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x478
lea rbp, [rsp + 0x80]
movzx esi, byte [0x140095078]
dec sil
cmp sil, 3
jb 0x140037373
lea rdx, str.RUST_BACKTRACEfailed_to_write_the_buffered_data
lea rcx, [rbp - 0x58]
mov r8d, 0xe
call fcn.1400352e0
mov rcx, qword [rbp - 0x58]
mov rax, rcx
neg rax
jno 0x1400370a2
mov rax, qword [rbp - 0x50]
mov ecx, eax
and ecx, 3
cmp ecx, 1
jne 0x140037098
lea rsi, [rax - 1]
mov rbx, qword [rax - 1]
mov r14, qword [rax + 7]
mov rax, qword [r14]
test rax, rax
je 0x140037078
mov rcx, rbx
call rax
cmp qword [r14 + 8], 0
je 0x14003708b
mov rdx, qword [r14 + 0x10]
mov rcx, rbx
call fcn.1400033d0
mov edx, 8
mov rcx, rsi
call fcn.1400033d0
mov sil, 2
mov bl, 3
jmp 0x140037354
mov qword [rbp + 0x3d0], rcx
mov rax, qword [rbp - 0x50]
mov qword [rbp + 0x3d8], rax
mov qword [rbp + 0x3e0], 0
mov qword [rbp + 0x3e8], 2
mov qword [rbp + 0x3f0], 0
mov r8d, 0x200
mov eax, 2
mov qword [rbp + 0x3c8], rax
xor esi, esi
xor edi, edi
xor r14d, r14d
cmp r8, 0x201
jae 0x140037120
jmp 0x14003710f
jae 0x1400371f1
cmp r8, 0x201
jae 0x140037120
mov r15d, 0x200
lea r12, [rbp - 0x58]
mov r13, r8
jmp 0x140037187
sub r8, r14
sub rdi, r14
cmp rdi, r8
jae 0x14003715e
mov qword [rsp + 0x20], 2
mov r9d, 2
lea rcx, [rbp + 0x3e0]
mov rdx, r14
call fcn.140018750
mov rsi, qword [rbp + 0x3e0]
mov rax, qword [rbp + 0x3e8]
mov qword [rbp + 0x3c8], rax
mov eax, 0xffffffff
cmp rsi, rax
mov r14d, 0xffffffff
cmovb r14, rsi
mov qword [rbp + 0x3f0], r14
mov rdi, rsi
mov r15, r14
mov r12, qword [rbp + 0x3c8]
mov r13, r14
xor ecx, ecx
call sub.kernel32.dll_SetLastError
mov rcx, qword [rbp + 0x3d8]
mov rdx, r12
mov r8d, r13d
call sub.kernel32.dll_GetEnvironmentVariableW
mov ebx, eax
test eax, eax
jne 0x1400371b3
call sub.kernel32.dll_GetLastError
test eax, eax
jne 0x14003724a
mov r8d, ebx
cmp r13, r8
jne 0x140037100
call sub.kernel32.dll_GetLastError
cmp eax, 0x7a
jne 0x140037389
add r13, r13
mov eax, 0xffffffff
cmp r13, rax
cmovae r13, rax
mov r8, r13
cmp r8, 0x201
jb 0x14003710f
jmp 0x140037120
cmp r15, r8
jb 0x1400373a3
lea rcx, [rbp + 0x3a8]
mov rdx, r12
call fcn.1400178f0
mov r14, qword [rbp + 0x3a8]
mov rdi, qword [rbp + 0x3b0]
mov r15, qword [rbp + 0x3b8]
cmp qword [rbp + 0x3e0], 0
je 0x140037239
mov rcx, qword [rbp + 0x3e8]
mov edx, 2
call fcn.1400033d0
movabs rax, 0x8000000000000000
cmp r14, rax
je 0x140037274
jmp 0x1400372c5
call sub.kernel32.dll_GetLastError
mov edi, eax
shl rdi, 0x20
cmp qword [rbp + 0x3e0], 0
je 0x140037270
mov rcx, qword [rbp + 0x3e8]
mov edx, 2
call fcn.1400033d0
or rdi, 2
mov eax, edi
and eax, 3
cmp eax, 1
jne 0x140037307
lea rbx, [rdi - 1]
mov r14, qword [rdi - 1]
mov rsi, qword [rdi + 7]
mov rax, qword [rsi]
test rax, rax
je 0x14003729b
mov rcx, r14
call rax
cmp qword [rsi + 8], 0
je 0x1400372ae
mov rdx, qword [rsi + 0x10]
mov rcx, r14
call fcn.1400033d0
mov edx, 8
mov rcx, rbx
call fcn.1400033d0
movabs r14, 0x8000000000000000
cmp qword [rbp + 0x3d0], 0
je 0x1400372e0
mov edx, 2
mov rcx, qword [rbp + 0x3d8]
call fcn.1400033d0
mov sil, 2
mov bl, 3
movabs rax, 0x8000000000000000
cmp r14, rax
je 0x140037354
cmp r15, 4
je 0x14003731d
cmp r15, 1
jne 0x140037325
cmp byte [rdi], 0x30
jne 0x140037325
jmp 0x140037342
movabs r14, 0x8000000000000000
cmp qword [rbp + 0x3d0], 0
jne 0x1400372cf
jmp 0x1400372e0
cmp dword [rdi], 0x6c6c7566
je 0x14003733d
mov bl, 1
test r14, r14
je 0x140037339
mov edx, 1
mov rcx, rdi
call fcn.1400033d0
xor esi, esi
jmp 0x140037354
mov sil, 1
mov bl, 2
test r14, r14
je 0x140037354
mov edx, 1
mov rcx, rdi
call fcn.1400033d0
xor eax, eax
lock cmpxchg byte [0x140095078], bl
je 0x140037373
mov sil, 3
cmp al, 4
jae 0x140037373
shl al, 3
mov esi, 0x2010003
mov ecx, eax
shr esi, cl
mov eax, esi
add rsp, 0x478
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lea rcx, str.internal_error:_entered_unreachable_codeP
lea r8, str.std_src_syspalwindowsmod.rsstrings_passed_to_WinAPI_cannot_contain_NULs
mov edx, 0x28
call fcn.140004330
jmp 0x1400373b8
lea rax, str.std_src_syspalwindowsmod.rsstrings_passed_to_WinAPI_cannot_contain_NULs
mov rcx, r8
mov rdx, r15
mov r8, rax
call fcn.140003e70
ud2