Function at 0x140042230
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 [0x14005c078]
dec sil
cmp sil, 3
jb 0x1400425ec
lea rdx, str.RUST_BACKTRACEfailed_to_write_the_buffered_data
lea rcx, [rbp - 0x58]
mov r8d, 0xe
call fcn.14003df50
mov rcx, qword [rbp - 0x58]
mov rax, rcx
neg rax
jno 0x1400422e6
mov rax, qword [rbp - 0x50]
mov ecx, eax
and ecx, 3
cmp ecx, 1
jne 0x1400422dc
lea rsi, [rax - 1]
mov rbx, qword [rax - 1]
mov r14, qword [rax + 7]
mov rax, qword [r14]
test rax, rax
je 0x1400422a8
mov rcx, rbx
call rax
cmp qword [r14 + 8], 0
je 0x1400422cb
cmp qword [r14 + 0x10], 0x11
jb 0x1400422ba
mov rbx, qword [rbx - 8]
mov rcx, qword [0x14005c0b0]
xor edx, edx
mov r8, rbx
call sub.kernel32.dll_HeapFree
mov rcx, qword [0x14005c0b0]
xor edx, edx
mov r8, rsi
call sub.kernel32.dll_HeapFree
mov sil, 2
mov bl, 3
jmp 0x1400425cd
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 0x140042360
jmp 0x14004234f
jae 0x140042431
cmp r8, 0x201
jae 0x140042360
mov r15d, 0x200
lea r12, [rbp - 0x58]
mov r13, r8
jmp 0x1400423c7
sub r8, r14
sub rdi, r14
cmp rdi, r8
jae 0x14004239e
mov qword [rsp + 0x20], 2
mov r9d, 2
lea rcx, [rbp + 0x3e0]
mov rdx, r14
call fcn.140020ae0
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 0x1400423f3
call sub.kernel32.dll_GetLastError
test eax, eax
jne 0x14004253b
mov r8d, ebx
cmp r13, r8
jne 0x140042340
call sub.kernel32.dll_GetLastError
cmp eax, 0x7a
jne 0x140042602
add r13, r13
mov eax, 0xffffffff
cmp r13, rax
cmovae r13, rax
mov r8, r13
cmp r8, 0x201
jb 0x14004234f
jmp 0x140042360
cmp r15, r8
jb 0x14004261c
lea rcx, [rbp + 0x3a8]
mov rdx, r12
call fcn.14001f6c0
mov r14, qword [rbp + 0x3a8]
mov rdi, qword [rbp + 0x3b0]
mov r15, qword [rbp + 0x3b8]
cmp qword [rbp + 0x3e0], 0
je 0x14004247d
mov r8, qword [rbp + 0x3e8]
mov rcx, qword [0x14005c0b0]
xor edx, edx
call sub.kernel32.dll_HeapFree
movabs rax, 0x8000000000000000
cmp r14, rax
jne 0x1400424f1
mov eax, edi
and eax, 3
cmp eax, 1
jne 0x140042577
lea rbx, [rdi - 1]
mov r14, qword [rdi - 1]
mov rsi, qword [rdi + 7]
mov rax, qword [rsi]
test rax, rax
je 0x1400424b3
mov rcx, r14
call rax
cmp qword [rsi + 8], 0
je 0x1400424d6
cmp qword [rsi + 0x10], 0x11
jb 0x1400424c5
mov r14, qword [r14 - 8]
mov rcx, qword [0x14005c0b0]
xor edx, edx
mov r8, r14
call sub.kernel32.dll_HeapFree
mov rcx, qword [0x14005c0b0]
xor edx, edx
mov r8, rbx
call sub.kernel32.dll_HeapFree
movabs r14, 0x8000000000000000
cmp qword [rbp + 0x3d0], 0
je 0x140042510
mov rcx, qword [0x14005c0b0]
xor edx, edx
mov r8, qword [rbp + 0x3d8]
call sub.kernel32.dll_HeapFree
mov sil, 2
mov bl, 3
movabs rax, 0x8000000000000000
cmp r14, rax
je 0x1400425cd
cmp r15, 4
je 0x140042594
cmp r15, 1
jne 0x14004259c
cmp byte [rdi], 0x30
jne 0x14004259c
jmp 0x1400425b7
call sub.kernel32.dll_GetLastError
mov edi, eax
shl rdi, 0x20
cmp qword [rbp + 0x3e0], 0
je 0x140042565
mov r8, qword [rbp + 0x3e8]
mov rcx, qword [0x14005c0b0]
xor edx, edx
call sub.kernel32.dll_HeapFree
or rdi, 2
mov eax, edi
and eax, 3
cmp eax, 1
je 0x14004249a
movabs r14, 0x8000000000000000
cmp qword [rbp + 0x3d0], 0
jne 0x1400424fb
jmp 0x140042510
cmp dword [rdi], 0x6c6c7566
je 0x1400425b2
mov bl, 1
test r14, r14
je 0x1400425ae
mov rcx, qword [0x14005c0b0]
xor esi, esi
jmp 0x1400425c3
xor esi, esi
jmp 0x1400425cd
mov sil, 1
mov bl, 2
test r14, r14
je 0x1400425cd
mov rcx, qword [0x14005c0b0]
xor edx, edx
mov r8, rdi
call sub.kernel32.dll_HeapFree
xor eax, eax
lock cmpxchg byte [0x14005c078], bl
je 0x1400425ec
mov sil, 3
cmp al, 4
jae 0x1400425ec
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_codeb
lea r8, str.std_src_syspalwindowsmod.rsstrings_passed_to_WinAPI_cannot_contain_NULs
mov edx, 0x28
call fcn.140008ea0
jmp 0x140042631
lea rax, str.std_src_syspalwindowsmod.rsstrings_passed_to_WinAPI_cannot_contain_NULs
mov rcx, r8
mov rdx, r15
mov r8, rax
call fcn.1400089e0
ud2