Function at 0x405f50
Capabilities:
Query environment variable
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x518
mov r14, r8
mov r15, rdx
mov r13, rcx
mov rdi, qword [r9]
mov rbx, qword [r9 + 8]
mov ebp, dword [r9 + 0x10]
mov esi, dword [r9 + 0x14]
call dbg.get<core::cell::Cell<core::option::Option<core::ptr::NonNull<core::task::wake::LocalWaker>>>>
test rax, rax
je 0x406a34
cmp qword [rax], 1
jne 0x405fb5
mov rcx, qword [rax + 8]
add rcx, 1
mov qword [rax + 8], rcx
mov qword [rsp + 0xb0], rcx
cmp rcx, 3
jb 0x405fd1
lea rax, [0x00426c40]
jmp 0x4069a5
mov qword [rax], 1
mov qword [rax + 8], 1
mov eax, 1
mov qword [rsp + 0xb0], rax
lea rax, sym.core::ptr::drop_in_place::h6a21f5a5fafafde8
mov qword [rsp + 0xe0], rax
lea rax, dbg.drop_in_place_core::time::Duration_
mov qword [rsp + 0xe8], rax
mov qword [rsp + 0xf0], r14
mov qword [rsp + 0xf8], rdi
mov qword [rsp + 0x100], rbx
mov dword [rsp + 0x108], ebp
mov dword [rsp + 0x10c], esi
mov rax, qword [0x00431070]
test rax, rax
jne 0x406052
lea rcx, [0x00427a62]
lea rdx, [0x004268d4]
mov r8d, 0x14
call sym._ZN3std3sys7windows6compat6lookup17hf70cf3919de18a02E.llvm.8435489974716925199
test rax, rax
lea rax, [sym._ZN3std3sys7windows1c20AcquireSRWLockShared8fallback17hdb41e1709fb50d8aE.llvm.11945776426423879255]
cmovne rax, rdx
mov rcx, rax
xchg qword [0x00431070], rcx
lea rcx, [0x004310a0]
call rax
mov rcx, r13
call qword [r15 + 0x20]
mov qword [rsp + 0xe0], rax
mov qword [rsp + 0xe8], rdx
call dbg.get<core::cell::Cell<core::option::Option<core::ptr::NonNull<core::task::wake::LocalWaker>>>>
test rax, rax
je 0x406a3b
cmp qword [rax], 1
jne 0x406092
cmp qword [rax + 8], 1
jbe 0x4060a1
jmp 0x406a2d
mov qword [rax], 1
mov qword [rax + 8], 0
mov rax, qword [0x004310a8]
test rax, rax
jne 0x406a1a
lea rdx, [0x00426f63]
mov qword [rsp + 0xd0], rdx
mov qword [rsp + 0xd8], 0xe
lea rcx, [rsp + 0x118]
mov r8d, 0xe
call dbg.inner
mov qword [rsp + 0xb8], r13
mov qword [rsp + 0xc0], r15
cmp qword [rsp + 0x118], 1
lea rax, [rsp + 0x120]
je 0x406a42
mov rcx, qword [rax + 0x10]
mov qword [rsp + 0x90], rcx
movdqu xmm0, xmmword [rax]
movdqa xmmword [rsp + 0x80], xmm0
xor r12d, r12d
xor edx, edx
mov r8d, 0x400
lea rcx, [rsp + 0x118]
call sub.msvcrt.dll_memset
mov qword [rsp + 0x30], 2
pxor xmm0, xmm0
movdqu xmmword [rsp + 0x38], xmm0
mov edi, 0x200
mov r15d, 2
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0xc8], rax
xor r13d, r13d
jmp 0x406173
add rdi, rdi
cmp rdi, 0x201
jb 0x4061d0
mov rsi, rdi
sub rsi, r13
mov rax, r12
sub rax, r13
cmp rax, rsi
jae 0x4061f6
add rsi, r13
jb 0x40626e
lea rax, [r12 + r12]
cmp rsi, rax
cmovb rsi, rax
mov rbx, rsi
add rbx, rsi
jb 0x40626e
call sub.KERNEL32.dll_GetProcessHeap
xor edx, edx
mov rcx, rax
test r12, r12
je 0x4061df
mov r8, r15
mov r9, rbx
call fcn.0041d07c
jmp 0x4061e7
mov ebx, 0x200
lea rbp, [rsp + 0x118]
jmp 0x4061ff
mov r8, rbx
call fcn.0041d08c
mov r15, rax
test rax, rax
je 0x4064aa
mov r12, rsi
mov r13, rdi
mov rbx, rdi
mov rbp, r15
xor ecx, ecx
call sub.KERNEL32.dll_SetLastError
mov rcx, qword [rsp + 0xc8]
mov rdx, rbp
mov r8d, edi
call sub.KERNEL32.dll_GetEnvironmentVariableW
mov esi, eax
test eax, eax
jne 0x406228
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x406287
mov r14d, esi
cmp rdi, r14
jne 0x40623e
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x7a
je 0x406170
cmp rdi, r14
mov rdi, r14
jbe 0x406173
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x38], r12
cmp rbx, r14
jae 0x4062a6
mov rcx, r14
mov rdx, rbx
call dbg.slice_index_len_fail
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x38], r12
call dbg.capacity_overflow
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x38], r12
mov ebx, 1
xor esi, esi
call sub.KERNEL32.dll_GetLastError
mov edi, eax
jmp 0x4062e2
lea rcx, [rsp + 0x50]
mov rdx, rbp
mov r8, r14
call dbg.from_wide
mov sil, byte [rsp + 0x50]
movzx eax, word [rsp + 0x51]
mov word [rsp + 0x70], ax
mov al, byte [rsp + 0x53]
mov byte [rsp + 0x72], al
mov edi, dword [rsp + 0x54]
movdqu xmm0, xmmword [rsp + 0x58]
movdqa xmmword [rsp + 0xa0], xmm0
xor ebx, ebx
mov r13, qword [rsp + 0xb8]
test r12, r12
je 0x406301
call sub.KERNEL32.dll_GetProcessHeap
xor edx, edx
mov rcx, rax
mov r8, r15
call fcn.0041d084
test rbx, rbx
je 0x406380
mov byte [rsp + 0x118], sil
movzx eax, word [rsp + 0x70]
mov word [rsp + 0x119], ax
mov al, byte [rsp + 0x72]
mov byte [rsp + 0x11b], al
mov dword [rsp + 0x11c], edi
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0x120], rax
test sil, sil
mov r15, qword [rsp + 0xc0]
jne 0x4064b9
cmp edi, 0xcb
jne 0x4064b9
pxor xmm0, xmm0
movdqa xmmword [rsp + 0x30], xmm0
lea rcx, [rsp + 0x118]
call dbg.drop_in_place<std::io::error::Error>
xor edi, edi
cmp qword [rsp + 0x88], 0
jne 0x4063c8
jmp 0x4063df
mov byte [rsp + 0x38], sil
movzx eax, word [rsp + 0x70]
mov word [rsp + 0x39], ax
mov al, byte [rsp + 0x72]
mov byte [rsp + 0x3b], al
mov dword [rsp + 0x3c], edi
movdqa xmm0, xmmword [rsp + 0xa0]
movdqu xmmword [rsp + 0x40], xmm0
mov qword [rsp + 0x30], 0
xor edi, edi
mov r15, qword [rsp + 0xc0]
cmp qword [rsp + 0x88], 0
je 0x4063df
call sub.KERNEL32.dll_GetProcessHeap
xor edx, edx
mov rcx, rax
mov r8, qword [rsp + 0xc8]
call fcn.0041d084
lea rsi, [rsp + 0x38]
test rdi, rdi
je 0x406494
movdqu xmm0, xmmword [rsi]
movdqa xmmword [rsp + 0x80], xmm0
lea rax, [rsp + 0xd0]
mov qword [rsp + 0x50], rax
lea rax, [dbg.fmt<std::ffi::os_str::OsStr>]
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x60], rax
lea rax, [sym.__std::io::error::Error_as_core::fmt::Display_::fmt::h765f4158285bb383]
mov qword [rsp + 0x68], rax
lea rax, [0x00427e38]
mov qword [rsp + 0x118], rax
mov qword [rsp + 0x120], 2
lea rax, [0x0042ad00]
mov qword [rsp + 0x128], rax
mov qword [rsp + 0x130], 2
lea rax, [rsp + 0x50]
mov qword [rsp + 0x138], rax
mov qword [rsp + 0x140], 2
lea rdx, str.libstdenv.rsfailed_to_get_environment_variable__
lea rcx, [rsp + 0x118]
call dbg.begin_panic_fmt
mov rsi, qword [rsp + 0x38]
test rsi, rsi
jne 0x406516
mov eax, 1
mov bl, 4
jmp 0x406583
mov edx, 2
mov rcx, rbx
call dbg.handle_alloc_error
ud2
mov al, byte [rsp + 0x118]
mov byte [rsp + 0x38], al
movzx eax, word [rsp + 0x119]
mov word [rsp + 0x39], ax
mov al, byte [rsp + 0x11b]
mov byte [rsp + 0x3b], al
mov eax, dword [rsp + 0x11c]
mov dword [rsp + 0x3c], eax
mov rax, qword [rsp + 0x120]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x30], 1
mov edi, 1
cmp qword [rsp + 0x88], 0
jne 0x4063c8
jmp 0x4063df
mov rax, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x48]
cmp rcx, 4
je 0x406548
cmp rcx, 1
jne 0x40653f
mov bl, 4
lea rcx, [0x00426f71]
cmp rsi, rcx
je 0x406560
cmp byte [rsi], 0x30
je 0x406560
mov bl, 2
test rax, rax
jne 0x406565
jmp 0x406577
lea rcx, [0x00426f72]
cmp rsi, rcx
je 0x40655e
cmp dword [rsi], 0x6c6c7566
mov bl, 2
jne 0x406560
mov bl, 3
test rax, rax
je 0x406577
call sub.KERNEL32.dll_GetProcessHeap
xor edx, edx
mov rcx, rax
mov r8, rsi
call fcn.0041d084
mov al, 1
cmp bl, 4
je 0x406580
mov eax, ebx
movzx eax, al
xchg qword [0x004310a8], rax
lea rax, [rsp + 0xf8]
mov byte [rsp + 0x2e], bl
mov qword [rsp + 0x110], rax
mov rsi, qword [rsp + 0xe0]
mov rax, qword [rsp + 0xe8]
mov rcx, rsi
call qword [rax + 0x18]
movabs rcx, 0x111094d970b09764
cmp rax, rcx
jne 0x4065cc
mov rcx, qword [rsi]
mov rax, qword [rsi + 8]
jmp 0x406606
mov rsi, qword [rsp + 0xe0]
mov rax, qword [rsp + 0xe8]
mov rcx, rsi
call qword [rax + 0x18]
movabs rcx, 0xd7ba72cc1409b4d
cmp rax, rcx
jne 0x4065fa
mov rcx, qword [rsi]
mov rax, qword [rsi + 0x10]
jmp 0x406606
lea rcx, [0x00426cdb]
mov eax, 8
mov qword [rsp + 0x70], rcx
mov qword [rsp + 0x78], rax
mov byte [rsp + 0x2f], 1
call dbg.try_with<core::cell::RefCell<core::option::Option<std::sys_common::thread_info::ThreadInfo>>,closure,std::thread::Thread>
mov rbx, rax
mov qword [rsp + 0x98], rax
test rax, rax
je 0x40663f
lea rax, [rbx + 0x10]
mov rcx, qword [rbx + 0x10]
test rcx, rcx
cmove rax, rcx
jne 0x4067a9
xor eax, eax
test rax, rax
mov edx, 9
cmovne rdx, rcx
lea rcx, [0x00426ce3]
cmovne rcx, rax
mov qword [rsp + 0xd0], rcx
mov qword [rsp + 0xd8], rdx
lea rax, [rsp + 0xd0]
mov qword [rsp + 0x118], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x120], rax
lea rax, [rsp + 0x110]
mov qword [rsp + 0x128], rax
lea rax, [rsp + 0x2e]
mov qword [rsp + 0x130], rax
lea rcx, [0x00424028]
call dbg.get<core::cell::RefCell<core::option::Option<alloc::boxed::Box<Write>>>>
mov rsi, rax
test rax, rax
jne 0x4066c0
call dbg.unwrap_failed<std::thread::local::AccessError>
cmp qword [rsi], 1
je 0x40671d
movdqu xmm0, xmmword [rsi + 0x10]
xorps xmm1, xmm1
movups xmmword [rsi + 0x10], xmm1
mov eax, 1
movq xmm1, rax
cmp qword [rsi], 0
movdqu xmmword [rsi], xmm1
je 0x406713
movq rdi, xmm0
test rdi, rdi
je 0x406713
pshufd xmm0, xmm0, 0x4e
movq rbp, xmm0
mov rcx, rdi
call qword [rbp]
cmp qword [rbp + 8], 0
je 0x406713
mov rdx, qword [rbp + 0x10]
mov rcx, rdi
call sym.__rust_dealloc
cmp qword [rsi], 1
jne 0x4067db
cmp qword [rsi + 8], 0
jne 0x4067c2
mov rax, rsi
add rax, 8
mov qword [rsi + 8], 0xffffffffffffffff
mov rdi, qword [rsi + 0x10]
mov rsi, qword [rsi + 0x18]
pxor xmm0, xmm0
movdqu xmmword [rax], xmm0
lea rax, [rsp + 0x30]
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x60], rax
test rdi, rdi
jne 0x4067ec
lea rdx, [rsp + 0x60]
lea r8, dbg.drop_in_place_core::time::Duration_
lea rcx, [rsp + 0x118]
call sym.std::panicking::default_hook::__u7b__u7b_closure_u7d__u7d_::h23e79f886a5e77b8
mov dil, 1
test rbx, rbx
je 0x40691d
lock sub qword [rbx], 1
jne 0x40691d
lea rcx, [rsp + 0x98]
call dbg.drop_slow<std::thread::Inner>
jmp 0x40691d
mov rdx, qword [rax + 8]
lea rcx, [rdx - 1]
test rdx, rdx
jne 0x4067d3
xor edx, edx
call dbg.slice_index_len_fail
lea rcx, [0x00427924]
call dbg.unwrap_failed<core::cell::BorrowMutError>
mov rax, qword [rax]
jmp 0x406641
lea rcx, [0x004291e8]
call dbg.panic
mov qword [rsp + 0xa0], rdi
mov qword [rsp + 0xa8], rsi
lea rcx, [rsp + 0x118]
mov rdx, rdi
mov r8, rsi
call sym.std::panicking::default_hook::__u7b__u7b_closure_u7d__u7d_::h23e79f886a5e77b8
mov qword [rsp + 0x80], rdi
mov qword [rsp + 0x88], rsi
lea rcx, [0x00424028]
call dbg.get<core::cell::RefCell<core::option::Option<alloc::boxed::Box<Write>>>>
mov r12, rax
test rax, rax
jne 0x40683d
call dbg.unwrap_failed<std::thread::local::AccessError>
cmp qword [r12], 1
je 0x4068a5
movdqu xmm0, xmmword [r12 + 0x10]
pxor xmm1, xmm1
movdqu xmmword [r12 + 0x10], xmm1
mov eax, 1
movq xmm1, rax
cmp qword [r12], 0
movdqu xmmword [r12], xmm1
je 0x40689a
movq rbp, xmm0
test rbp, rbp
je 0x40689a
pshufd xmm0, xmm0, 0x4e
movq r14, xmm0
mov rcx, rbp
call qword [r14]
cmp qword [r14 + 8], 0
je 0x40689a
mov rdx, qword [r14 + 0x10]
mov rcx, rbp
call sym.__rust_dealloc
cmp qword [r12], 1
jne 0x406a0c
mov qword [rsp + 0x80], 0
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x38], rsi
cmp qword [r12 + 8], 0
jne 0x4069fe
mov qword [r12 + 8], 0xffffffffffffffff
mov rcx, qword [r12 + 0x10]
test rcx, rcx
je 0x406902
mov rbp, r12
add rbp, 8
mov rax, qword [r12 + 0x18]
call qword [rax]
mov rax, qword [r12 + 0x18]
cmp qword [rax + 8], 0
je 0x406902
mov rcx, qword [r12 + 0x10]
mov rdx, qword [rax + 0x10]
call sym.__rust_dealloc
mov qword [r12 + 0x10], rdi
mov qword [r12 + 0x18], rsi
add qword [r12 + 8], 1
xor edi, edi
test rbx, rbx
jne 0x406789
test dil, dil
je 0x40694d
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x40694d
mov rax, qword [rsp + 0x58]
call qword [rax]
mov rax, qword [rsp + 0x58]
cmp qword [rax + 8], 0
je 0x40694d
mov rcx, qword [rsp + 0x50]
mov rdx, qword [rax + 0x10]
call sym.__rust_dealloc
mov rax, qword [0x00431080]
test rax, rax
jne 0x40698a
lea rcx, [0x00427a62]
lea rdx, [0x004268ff]
mov r8d, 0x14
call sym._ZN3std3sys7windows6compat6lookup17hf70cf3919de18a02E.llvm.8435489974716925199
test rax, rax
lea rax, [sym._ZN3std3sys7windows1c20ReleaseSRWLockShared8fallback17ha3d5583f2ebeb28dE.llvm.11945776426423879255]
cmovne rax, rdx
mov rcx, rax
xchg qword [0x00431080], rcx
lea rcx, [0x004310a0]
call rax
cmp qword [rsp + 0xb0], 2
jb 0x4069f1
lea rax, [0x00426c70]
mov qword [rsp + 0x118], rax
mov qword [rsp + 0x120], 1
mov qword [rsp + 0x128], 0
lea rax, sym.core::ptr::drop_in_place::h6a21f5a5fafafde8
mov qword [rsp + 0x138], rax
mov qword [rsp + 0x140], 0
lea rcx, [rsp + 0x118]
call sym.std::sys_common::util::dumb_print::habf86360695f37ea
ud2
mov rcx, r13
mov rdx, r15
call dbg.rust_panic
lea rcx, [0x00427924]
call dbg.unwrap_failed<core::cell::BorrowMutError>
lea rcx, [0x004291e8]
call dbg.panic
cmp rax, 1
je 0x406a5f
cmp rax, 2
jne 0x406a2d
mov bl, 2
jmp 0x40658a
mov bl, 3
jmp 0x40658a
call dbg.unwrap_failed<std::thread::local::AccessError>
call dbg.unwrap_failed<std::thread::local::AccessError>
lea rsi, [rsp + 0x38]
movdqu xmm0, xmmword [rax]
movdqu xmmword [rsp + 0x38], xmm0
mov qword [rsp + 0x30], 1
jmp 0x4063ed
mov bl, 4
jmp 0x40658a