Function at 0x140019560
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 r14, r8
mov r15, rdx
mov qword [rbp + 0x408], rcx
lea rdi, [r8*2 + 2]
movzx eax, byte [0x14004a208]
mov rcx, rdi
call fcn.14001a4c0
test rax, rax
je 0x140019a57
lea rcx, [r14 + 1]
mov qword [rbp - 0x60], rcx
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x50], 0
add r14, r15
xor ebx, ebx
mov rsi, 0xffffffffffffffff
lea r13, [rbp - 0x60]
xor r12d, r12d
jmp 0x14001961c
mov r8, r14
sub r8, r15
add r8, 3
cmovb r8, rsi
shr r8, 2
cmp di, 1
sbb r8, 0
add r8, 2
mov rcx, r13
mov rdx, rbx
call fcn.14001ec50
mov rax, qword [rbp - 0x58]
mov word [rax + rbx*2], r12w
inc rbx
mov qword [rbp - 0x50], rbx
mov r12d, edi
test r12w, r12w
je 0x140019630
xor edi, edi
cmp rbx, qword [rbp - 0x60]
jne 0x14001960d
jmp 0x1400195e0
cmp r15, r14
je 0x140019713
movzx edx, byte [r15]
movzx r12d, dl
test r12b, r12b
js 0x140019653
inc r15
xor edi, edi
cmp rbx, qword [rbp - 0x60]
jne 0x14001960d
jmp 0x1400195e0
mov ecx, r12d
and ecx, 0x1f
movzx r8d, byte [r15 + 1]
and r8d, 0x3f
cmp r12b, 0xdf
jbe 0x1400196aa
movzx r12d, byte [r15 + 2]
shl r8d, 6
and r12d, 0x3f
or r12d, r8d
cmp dl, 0xf0
jb 0x1400196c8
movzx edx, byte [r15 + 3]
add r15, 4
and ecx, 7
shl ecx, 0x12
shl r12d, 6
and edx, 0x3f
or edx, r12d
or edx, ecx
mov r12d, edx
cmp r12d, 0xffff
jbe 0x140019622
jmp 0x1400196df
add r15, 2
shl ecx, 6
or ecx, r8d
mov r12d, ecx
xor edi, edi
cmp rbx, qword [rbp - 0x60]
jne 0x14001960d
jmp 0x1400195e0
add r15, 3
shl ecx, 0xc
or r12d, ecx
cmp r12d, 0xffff
jbe 0x140019622
lea ecx, [r12 + 0xff0000]
shr ecx, 0xa
or ecx, 0xd800
and r12d, 0x3ff
or r12d, 0xdc00
mov edi, r12d
mov r12d, ecx
cmp rbx, qword [rbp - 0x60]
jne 0x14001960d
jmp 0x1400195e0
mov r8, qword [rbp - 0x58]
movabs rdi, 0x8000000000000000
mov rax, rbx
mov rcx, r8
cmp rbx, 8
jb 0x140019778
mov rcx, r8
mov rax, rbx
cmp word [rcx], 0
je 0x140019790
cmp word [rcx + 2], 0
je 0x140019790
cmp word [rcx + 4], 0
je 0x140019790
cmp word [rcx + 6], 0
je 0x140019790
cmp word [rcx + 8], 0
je 0x140019790
cmp word [rcx + 0xa], 0
je 0x140019790
cmp word [rcx + 0xc], 0
je 0x140019790
cmp word [rcx + 0xe], 0
je 0x140019790
add rax, 0xfffffffffffffff8
add rcx, 0x10
cmp rax, 7
ja 0x140019733
add rax, rax
xor edx, edx
nop dword [rax]
cmp rax, rdx
je 0x1400197d3
cmp word [rcx + rdx], 0
lea rdx, [rdx + 2]
jne 0x140019780
cmp qword [rbp - 0x60], 0
je 0x1400197a6
mov rcx, qword [0x14004a1a0]
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapFree]
lea r8, [0x140045a98]
mov rsi, qword [rbp + 0x408]
mov rcx, r8
call fcn.140013ad0
mov qword [rsi], rdi
add rsp, 0x498
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov rax, qword [rbp - 0x60]
cmp rbx, rax
jne 0x1400197ed
lea rcx, [rbp - 0x60]
call fcn.1400186e0
mov rax, qword [rbp - 0x60]
mov r8, qword [rbp - 0x58]
mov word [r8 + rbx*2], 0
cmp rax, rdi
je 0x1400197ad
mov qword [rbp + 0x3e0], rax
mov qword [rbp + 0x3e8], r8
mov qword [rbp + 0x3f0], 0
mov qword [rbp + 0x3f8], 2
mov qword [rbp + 0x400], 0
mov r8d, 0x200
mov eax, 2
mov qword [rbp + 0x3d8], rax
xor edi, edi
xor ebx, ebx
xor r14d, r14d
cmp r8, 0x201
jb 0x140019863
jmp 0x140019880
lea r13, [rbp - 0x60]
jae 0x14001994a
cmp r8, 0x201
jae 0x140019880
mov r15d, 0x200
mov r12, r13
mov r13, r8
jmp 0x1400198d8
sub r8, r14
sub rbx, r14
cmp r8, rbx
jbe 0x1400198af
lea rcx, [rbp + 0x3f0]
mov rdx, r14
call fcn.14001ec50
mov rdi, qword [rbp + 0x3f0]
mov rax, qword [rbp + 0x3f8]
mov qword [rbp + 0x3d8], rax
mov eax, 0xffffffff
cmp rdi, rax
mov r14d, 0xffffffff
cmovb r14, rdi
mov qword [rbp + 0x400], r14
mov rbx, rdi
mov r15, r14
mov r12, qword [rbp + 0x3d8]
mov r13, r14
xor ecx, ecx
call qword [sym.imp.kernel32.dll_SetLastError]
mov rcx, qword [rbp + 0x3e8]
mov rdx, r12
mov r8d, r13d
call qword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
mov esi, eax
test eax, eax
jne 0x140019907
call qword [sym.imp.kernel32.dll_GetLastError]
test eax, eax
jne 0x1400199c8
mov r8d, esi
cmp r13, r8
jne 0x140019850
call qword [sym.imp.kernel32.dll_GetLastError]
cmp eax, 0x7a
jne 0x140019a3d
add r13, r13
mov eax, 0xffffffff
cmp r13, rax
cmovae r13, rax
mov r8, r13
lea r13, [rbp - 0x60]
cmp r8, 0x201
jae 0x140019880
jmp 0x140019863
cmp r15, r8
jb 0x140019a64
lea rcx, [rbp + 0x3a0]
mov rdx, r12
call fcn.140016d60
mov rsi, qword [rbp + 0x3a0]
mov rdi, qword [rbp + 0x3a8]
movups xmm0, xmmword [rbp + 0x3b0]
movaps xmmword [rbp + 0x3c0], xmm0
cmp qword [rbp + 0x3f0], 0
movabs rbx, 0x8000000000000000
je 0x1400199a8
mov r8, qword [rbp + 0x3f8]
mov rcx, qword [0x14004a1a0]
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapFree]
cmp rsi, rbx
mov rax, qword [rbp + 0x408]
je 0x140019a09
mov qword [rax], rsi
mov qword [rax + 8], rdi
movaps xmm0, xmmword [rbp + 0x3c0]
movups xmmword [rax + 0x10], xmm0
jmp 0x140019a14
call qword [sym.imp.kernel32.dll_GetLastError]
mov edi, eax
shl rdi, 0x20
cmp qword [rbp + 0x3f0], 0
je 0x1400199f4
mov r8, qword [rbp + 0x3f8]
mov rcx, qword [0x14004a1a0]
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapFree]
or rdi, 2
mov rax, qword [rbp + 0x408]
movabs rbx, 0x8000000000000000
mov qword [rax], rbx
mov rcx, rdi
call fcn.140013ad0
cmp qword [rbp + 0x3e0], 0
je 0x1400197bf
mov rcx, qword [0x14004a1a0]
xor edx, edx
mov r8, qword [rbp + 0x3e8]
call qword [sym.imp.kernel32.dll_HeapFree]
jmp 0x1400197bf
lea rcx, str.internal_error:_entered_unreachable_code_rustc_5069856495870486134dd2ca0b0e2516308c5c2alibrary_alloc_src_vecmod.rs
lea r8, str.library_std_src_syspalwindowsmod.rsstrings_passed_to_WinAPI_cannot_contain_NULs
mov edx, 0x28
call fcn.14001d900
jmp 0x140019a79
mov ecx, 2
mov rdx, rdi
call fcn.14001d5f0
lea rax, str.library_std_src_syspalwindowsmod.rsstrings_passed_to_WinAPI_cannot_contain_NULs
mov rcx, r8
mov rdx, r15
mov r8, rax
call fcn.14001d890
ud2