Function at 0x458946
Capabilities:
Create thread

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xa8
mov r13, r9
mov ebp, r8d
mov rbx, rdx
mov rdi, rcx
lea rsi, [rcx + 0x40]
mov cl, 1
xor eax, eax
lock cmpxchg byte [rdi + 0x40], cl
jne 0x458ac5
cmp byte [rdi + 0xc4], 0
je 0x4589c5
lock sub qword [rbx], 0x40
jb 0x4590d3
mov rax, qword [rbx + 0x10]
mov rcx, rbx
call qword [rax + 0x30]
xor ebx, ebx
xor ecx, ecx
mov al, 1
lock cmpxchg byte [rsi], cl
mov edi, 1
jne 0x45902f
mov rax, rdi
mov rdx, rbx
add rsp, 0xa8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, qword [rdi + 0x50]
mov rax, qword [rdi + 0x60]
cmp rax, rcx
jne 0x4589e3
lea rcx, [rdi + 0x48]
call fcn.00457f90
mov rcx, qword [rdi + 0x50]
mov rax, qword [rdi + 0x60]
mov rdx, qword [rdi + 0x58]
add rdx, rax
xor r8d, r8d
cmp rdx, rcx
cmovae r8, rcx
sub rdx, r8
mov rcx, qword [rdi + 0x48]
shl rdx, 4
mov qword [rcx + rdx], rbx
mov byte [rcx + rdx + 8], bpl
inc rax
mov qword [rdi + 0x60], rax
lock inc qword [rdi + 0x108]
mov rax, qword [rdi + 0x100]
test rax, rax
je 0x458a55
lock dec qword [rdi + 0x100]
inc dword [rdi + 0xc0]
mov rdx, qword [rdi + 0xc8]
test rdx, rdx
je 0x459020
add rdi, 0xc8
mov rcx, rdi
call fcn.0041f68e
jmp 0x459020
mov rax, qword [rdi + 0xf8]
cmp rax, qword [rdi + 0xf0]
je 0x459020
mov r14, qword [rdi + 0x98]
test r14, r14
je 0x4590f1
lock inc qword [r14]
jle 0x4590ed
mov rbx, qword [rdi + 0xb8]
mov rax, qword [rdi + 0x30]
mov r8, qword [rdi + 0x38]
mov rcx, qword [r8 + 0x10]
dec rcx
and rcx, 0xfffffffffffffff0
lea rdx, [rcx + rax]
add rdx, 0x10
lea rcx, [rsp + 0x70]
call qword [r8 + 0x28]
mov rax, qword [rdi + 0x10]
test rax, rax
mov qword [rsp + 0xa0], r14
je 0x458ad2
mov r14, qword [rdi + 0x18]
jmp 0x458ad2
mov rcx, rsi
call fcn.004206e1
jmp 0x458978
mov r12, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x78]
mov r15, qword [rsp + 0x80]
cmp qword [r13], 0
je 0x458b09
mov rcx, qword [r13 + 8]
mov qword [rsp + 0x60], rcx
lock inc qword [rcx]
mov ecx, 1
mov qword [rsp + 0x58], rcx
jg 0x458b23
jmp 0x4590ed
mov rcx, qword [r13 + 8]
mov qword [rsp + 0x60], rcx
lock inc qword [rcx]
jle 0x4590ed
xor ecx, ecx
mov qword [rsp + 0x58], rcx
test rax, rax
jne 0x458c59
mov r14, qword [0x004770b8]
test r14, r14
je 0x458b40
dec r14
jmp 0x458c59
lea rdx, str.RUST_MIN_STACKfatal_runtime_error:_assertion_failed:_thread_info.stack_guard.get__.is_none____thread_info.thread.get__.is_none___n
lea r14, [rsp + 0x70]
mov r8d, 0xe
mov rcx, r14
call fcn.004484f0
mov al, byte [r14 + 0x18]
cmp al, 2
je 0x458c48
mov r10, qword [rsp + 0x70]
mov r13, qword [rsp + 0x78]
mov r8, qword [rsp + 0x80]
test al, al
jne 0x458c05
test r8, r8
je 0x458c0a
lea rax, [r10 + r8]
mov rdx, r10
lea rcx, [rdx + 1]
mov r9b, byte [rdx]
test r9b, r9b
jns 0x458bfd
cmp r9b, 0xe0
jae 0x458baf
add rdx, 2
cmp rcx, rax
cmovne rcx, rdx
jmp 0x458bfd
cmp r9b, 0xed
jne 0x458bd6
cmp rcx, rax
je 0x458c05
lea rcx, [rdx + 2]
cmp rcx, rax
je 0x458c05
cmp byte [rdx + 1], 0x9f
ja 0x4590b4
add rdx, 3
mov rcx, rdx
jmp 0x458bfd
add rdx, 2
cmp rcx, rax
cmove rdx, rcx
xor ecx, ecx
cmp rdx, rax
setne cl
add rcx, rdx
cmp r9b, 0xf0
jb 0x458bfd
xor edx, edx
cmp rcx, rax
setne dl
add rcx, rdx
mov rdx, rcx
cmp rcx, rax
jne 0x458b90
test r10, r10
je 0x458c48
lea r14, [rsp + 0x70]
mov rcx, r14
mov rdx, r10
mov qword [rsp + 0x38], r10
call fcn.0041bc40
mov al, byte [r14]
mov r14, qword [r14 + 8]
test r13, r13
je 0x458c44
mov rcx, qword [0x004770f8]
xor edx, edx
mov r8, qword [rsp + 0x38]
mov r13d, eax
call fcn.0045f0e4
mov eax, r13d
test al, al
je 0x458c4e
mov r14d, 0x200000
lea rax, [r14 + 1]
mov qword [0x004770b8], rax
test r12, r12
je 0x458c81
cmp r15, 0x10
jae 0x458c85
test r15, r15
je 0x458c94
xor eax, eax
xor edx, edx
cmp byte [r12 + rdx], 0
je 0x458c9a
inc rdx
cmp r15, rdx
jne 0x458c6d
mov rdx, r15
jmp 0x458c9f
xor ecx, ecx
jmp 0x458cc0
xor ecx, ecx
mov rdx, r12
mov r8, r15
call fcn.0041a750
jmp 0x458c9f
xor edx, edx
xor eax, eax
jmp 0x458c9f
mov eax, 1
test rax, rax
jne 0x459134
lea rcx, [rsp + 0x70]
mov qword [rcx], r12
mov qword [rcx + 8], rbp
mov qword [rcx + 0x10], r15
call fcn.004162d0
mov rcx, rax
call fcn.00428a50
lock inc qword [rax]
jle 0x4590ed
mov r15, rax
mov al, byte [0x00477190]
mov ecx, 0x30
mov edx, 8
call fcn.00415bd0
test rax, rax
je 0x459106
mov r12, rax
mov eax, 1
mov qword [r12], rax
mov qword [r12 + 8], rax
pxor xmm0, xmm0
movdqu xmmword [r12 + 0x10], xmm0
mov qword [rsp + 0x68], r12
lock inc qword [r12]
jle 0x4590ed
xor ecx, ecx
call fcn.0044bb50
mov r13, rax
test rax, rax
je 0x458d3b
lock inc qword [r13]
jle 0x4590ed
mov rcx, r13
jmp 0x458d3d
xor ecx, ecx
call fcn.0044bb50
mov qword [rsp + 0x38], r14
test rax, rax
je 0x458d5a
lock dec qword [rax]
jne 0x458d5a
mov rcx, rax
call fcn.00457987
mov r14, qword [rsp + 0x68]
mov rcx, qword [r14 + 0x10]
test rcx, rcx
je 0x458d73
lock inc qword [rcx + 0x18]
jle 0x45916e
mov al, byte [0x00477190]
mov ecx, 0x38
mov edx, 8
call fcn.00415bd0
test rax, rax
je 0x459112
mov rbp, rax
mov qword [rax], r15
mov qword [rax + 8], r12
mov qword [rax + 0x10], r13
mov rax, qword [rsp + 0x58]
mov qword [rbp + 0x18], rax
mov rax, qword [rsp + 0x60]
mov qword [rbp + 0x20], rax
mov rax, qword [rsp + 0xa0]
mov qword [rbp + 0x28], rax
mov qword [rbp + 0x30], rbx
mov al, byte [0x00477190]
mov ecx, 0x10
mov edx, 8
call fcn.00415bd0
test rax, rax
je 0x459123
mov r12, rax
mov qword [rax], rbp
lea rax, [0x0046bdf8]
mov qword [r12 + 8], rax
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x10000
lea r8, [0x0044c8a0]
xor ecx, ecx
mov rdx, qword [rsp + 0x38]
mov r9, r12
call sub.KERNEL32.dll_CreateThread
test rax, rax
je 0x458f73
mov qword [rsp + 0x48], r14
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x40], r15
lock inc qword [rdi + 0xf8]
inc qword [rdi + 0xb8]
mov r15, qword [rdi + 0x88]
mov r12, qword [rdi + 0x90]
mov rcx, r15
mov rdx, r12
mov r8, rbx
call fcn.00456a4d
mov r14, rax
cmp qword [rdi + 0x78], 0
je 0x45903c
mov rax, qword [rdi + 0x68]
mov rcx, qword [rdi + 0x70]
mov r8, rcx
and r8, r14
shr r14, 0x39
movd xmm0, r14d
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
pshufd xmm0, xmm0, 0
lea r9, [rax - 0x20]
xor r10d, r10d
pcmpeqd xmm1, xmm1
xor r11d, r11d
movdqu xmm2, xmmword [rax + r8]
movdqa xmm3, xmm2
pcmpeqb xmm3, xmm0
pmovmskb r12d, xmm3
test r12w, r12w
je 0x458edf
lea ebp, [r12 - 1]
and ebp, r12d
bsf r15d, r12d
add r15, r8
and r15, rcx
mov r12, r15
shl r12, 5
mov r13, r9
sub r13, r12
mov r12d, ebp
cmp qword [r13], rbx
jne 0x458eaf
jmp 0x458f24
cmp r11, 1
mov r11d, 1
je 0x458f01
pmovmskb edx, xmm2
xor r11d, r11d
test edx, edx
setne r11b
bsf edx, edx
add rdx, r8
and rdx, rcx
pcmpeqb xmm2, xmm1
pmovmskb ebp, xmm2
test ebp, ebp
jne 0x459050
add r8, r10
add r8, 0x10
add r10, 0x10
and r8, rcx
jmp 0x458e9c
neg r15
shl r15, 5
mov rcx, qword [rax + r15 - 8]
mov qword [rsp + 0x80], rcx
movups xmm0, xmmword [rax + r15 - 0x18]
movaps xmmword [rsp + 0x70], xmm0
mov rcx, qword [rsp + 0x50]
mov qword [rax + r15 - 8], rcx
movups xmm0, xmmword [rsp + 0x40]
movups xmmword [rax + r15 - 0x18], xmm0
cmp qword [rsp + 0x70], 0
je 0x459020
lea rcx, [rsp + 0x70]
call fcn.004521ba
jmp 0x459020
mov rbx, qword [r12]
mov r13, qword [r12 + 8]
mov rcx, rbx
call qword [r13]
cmp qword [r13 + 8], 0
je 0x458fa6
cmp qword [r13 + 0x10], 0x11
jb 0x458f95
mov rbx, qword [rbx - 8]
mov rcx, qword [0x004770f8]
xor edx, edx
mov r8, rbx
call fcn.0045f0e4
mov rcx, qword [0x004770f8]
xor edx, edx
mov r8, r12
call fcn.0045f0e4
call sub.KERNEL32.dll_GetLastError
mov ebx, eax
shl rbx, 0x20
lock dec qword [r14]
jne 0x458fd2
lea rcx, [rsp + 0x68]
call fcn.0045238e
or rbx, 2
lock dec qword [r15]
jne 0x458fe4
mov rcx, r15
call fcn.0045233a
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x40], 0
mov rcx, rbx
shr rcx, 0x20
call fcn.0042c320
cmp al, 0xd
jne 0x458998
mov rax, qword [rdi + 0xf8]
test rax, rax
je 0x458998
lea rcx, [rsp + 0x48]
call fcn.00401f01
xor edi, edi
mov al, 1
lock cmpxchg byte [rsi], dil
je 0x4589ab
mov rcx, rsi
call fcn.00420409
jmp 0x4589ab
lea rcx, [rdi + 0x68]
mov rdx, r15
mov r8, r12
call fcn.00458344
jmp 0x458e69
mov r8b, byte [rax + rdx]
test r8b, r8b
js 0x459068
movdqa xmm0, xmmword [rax]
pmovmskb edx, xmm0
bsf edx, edx
mov r8b, byte [rax + rdx]
and r8b, 1
movzx r8d, r8b
sub qword [rdi + 0x78], r8
lea r8, [rdx - 0x10]
and r8, rcx
mov byte [rax + rdx], r14b
mov byte [r8 + rax + 0x10], r14b
inc qword [rdi + 0x80]
shl rdx, 5
mov rcx, rax
sub rcx, rdx
mov qword [rcx - 0x20], rbx
neg rdx
movups xmm0, xmmword [rsp + 0x40]
movups xmmword [rax + rdx - 0x18], xmm0
mov rax, qword [rsp + 0x50]
mov qword [rcx - 8], rax
jmp 0x459020
test r13, r13
je 0x458c48
mov rcx, qword [0x004770f8]
xor edx, edx
mov r8, r10
call fcn.0045f0e4
jmp 0x458c48
lea rcx, str.assertion_failed:_prev.ref_count_____1
lea r8, [0x0046e3c0]
mov edx, 0x27
call fcn.00417b30
ud2
ud2
lea rcx, str.assertion_failed:_shared.shutdown_tx.is_some___cargo_registry_src_index.crates.io_6f17d22bba15001f_tokio_1.32.0_src_runtime_blocking_pool.rs
lea r8, [0x0046e580]
mov edx, 0x2e
jmp 0x4590e6
mov ecx, 8
mov edx, 0x30
jmp 0x45911c
mov ecx, 8
mov edx, 0x38
call fcn.00416100
ud2
mov ecx, 8
mov edx, 0x10
call fcn.00416100
ud2
lea r8, [rsp + 0x70]
mov qword [r8], r12
mov qword [r8 + 8], rbp
mov qword [r8 + 0x10], r15
mov qword [r8 + 0x18], rdx
lea rax, str._rustc_a28077b28a02b92985b3a3faecf92813155f1ea1library_std_src_threadmod.rs
mov qword [rsp + 0x20], rax
lea rcx, str.thread_name_may_not_contain_interior_null_bytes
lea r9, [0x0046c078]
mov edx, 0x2f
call fcn.00418750
ud2
add rcx, 0x10
xor edx, edx
call fcn.0042b940
lea rax, str.too_many_running_threads_in_thread_scope
lea rcx, [rsp + 0x70]
mov qword [rcx], rax
mov qword [rcx + 8], 1
lea rax, str.Index_out_of_bounds
mov qword [rcx + 0x10], rax
pxor xmm0, xmm0
movdqu xmmword [rcx + 0x18], xmm0
lea rdx, str.library_std_src_thread_scoped.rsX
call fcn.00416df0
ud2