Function at 0x479744
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 0x4798c3
cmp byte [rdi + 0xc4], 0
je 0x4797c3
lock sub qword [rbx], 0x40
jb 0x479ecd
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 0x479e29
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 0x4797e1
lea rcx, [rdi + 0x48]
call fcn.00478d66
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 0x479853
lock dec qword [rdi + 0x100]
inc dword [rdi + 0xc0]
mov rdx, qword [rdi + 0xc8]
test rdx, rdx
je 0x479e1a
add rdi, 0xc8
mov rcx, rdi
call fcn.0043d91e
jmp 0x479e1a
mov rax, qword [rdi + 0xf8]
cmp rax, qword [rdi + 0xf0]
je 0x479e1a
mov r14, qword [rdi + 0x98]
test r14, r14
je 0x479eeb
lock inc qword [r14]
jle 0x479ee7
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 0x4798d0
mov r14, qword [rdi + 0x18]
jmp 0x4798d0
mov rcx, rsi
call fcn.0043e964
jmp 0x479776
mov r12, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x78]
mov r15, qword [rsp + 0x80]
cmp qword [r13], 0
je 0x479907
mov rcx, qword [r13 + 8]
mov qword [rsp + 0x60], rcx
lock inc qword [rcx]
mov ecx, 1
mov qword [rsp + 0x58], rcx
jg 0x479921
jmp 0x479ee7
mov rcx, qword [r13 + 8]
mov qword [rsp + 0x60], rcx
lock inc qword [rcx]
jle 0x479ee7
xor ecx, ecx
mov qword [rsp + 0x58], rcx
test rax, rax
jne 0x479a57
mov r14, qword [0x004a30b8]
test r14, r14
je 0x47993e
dec r14
jmp 0x479a57
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.00469250
mov al, byte [r14 + 0x18]
cmp al, 2
je 0x479a46
mov r10, qword [rsp + 0x70]
mov r13, qword [rsp + 0x78]
mov r8, qword [rsp + 0x80]
test al, al
jne 0x479a03
test r8, r8
je 0x479a08
lea rax, [r10 + r8]
mov rdx, r10
lea rcx, [rdx + 1]
mov r9b, byte [rdx]
test r9b, r9b
jns 0x4799fb
cmp r9b, 0xe0
jae 0x4799ad
add rdx, 2
cmp rcx, rax
cmovne rcx, rdx
jmp 0x4799fb
cmp r9b, 0xed
jne 0x4799d4
cmp rcx, rax
je 0x479a03
lea rcx, [rdx + 2]
cmp rcx, rax
je 0x479a03
cmp byte [rdx + 1], 0x9f
ja 0x479eae
add rdx, 3
mov rcx, rdx
jmp 0x4799fb
add rdx, 2
cmp rcx, rax
cmove rdx, rcx
xor ecx, ecx
cmp rdx, rax
setne cl
add rcx, rdx
cmp r9b, 0xf0
jb 0x4799fb
xor edx, edx
cmp rcx, rax
setne dl
add rcx, rdx
mov rdx, rcx
cmp rcx, rax
jne 0x47998e
test r10, r10
je 0x479a46
lea r14, [rsp + 0x70]
mov rcx, r14
mov rdx, r10
mov qword [rsp + 0x38], r10
call fcn.00430850
mov al, byte [r14]
mov r14, qword [r14 + 8]
test r13, r13
je 0x479a42
mov rcx, qword [0x004a30e8]
xor edx, edx
mov r8, qword [rsp + 0x38]
mov r13d, eax
call sub.KERNEL32.dll_HeapFree
mov eax, r13d
test al, al
je 0x479a4c
mov r14d, 0x200000
lea rax, [r14 + 1]
mov qword [0x004a30b8], rax
test r12, r12
je 0x479a7f
cmp r15, 0x10
jae 0x479a83
test r15, r15
je 0x479a92
xor eax, eax
xor edx, edx
cmp byte [r12 + rdx], 0
je 0x479a98
inc rdx
cmp r15, rdx
jne 0x479a6b
mov rdx, r15
jmp 0x479a9d
xor ecx, ecx
jmp 0x479abe
xor ecx, ecx
mov rdx, r12
mov r8, r15
call fcn.0042f440
jmp 0x479a9d
xor edx, edx
xor eax, eax
jmp 0x479a9d
mov eax, 1
test rax, rax
jne 0x479f2e
lea rcx, [rsp + 0x70]
mov qword [rcx], r12
mov qword [rcx + 8], rbp
mov qword [rcx + 0x10], r15
call fcn.004294e0
mov rcx, rax
call fcn.0044a120
lock inc qword [rax]
jle 0x479ee7
mov r15, rax
mov al, byte [0x004a3150]
mov ecx, 0x30
mov edx, 8
call fcn.004279a0
test rax, rax
je 0x479f00
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 0x479ee7
xor ecx, ecx
call fcn.0046c660
mov r13, rax
test rax, rax
je 0x479b39
lock inc qword [r13]
jle 0x479ee7
mov rcx, r13
jmp 0x479b3b
xor ecx, ecx
call fcn.0046c660
mov qword [rsp + 0x38], r14
test rax, rax
je 0x479b58
lock dec qword [rax]
jne 0x479b58
mov rcx, rax
call fcn.004788a4
mov r14, qword [rsp + 0x68]
mov rcx, qword [r14 + 0x10]
test rcx, rcx
je 0x479b71
lock inc qword [rcx + 0x18]
jle 0x479f68
mov al, byte [0x004a3150]
mov ecx, 0x38
mov edx, 8
call fcn.004279a0
test rax, rax
je 0x479f0c
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 [0x004a3150]
mov ecx, 0x10
mov edx, 8
call fcn.004279a0
test rax, rax
je 0x479f1d
mov r12, rax
mov qword [rax], rbp
lea rax, [0x004958f8]
mov qword [r12 + 8], rax
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x10000
lea r8, [0x0046d800]
xor ecx, ecx
mov rdx, qword [rsp + 0x38]
mov r9, r12
call sub.KERNEL32.dll_CreateThread
test rax, rax
je 0x479d71
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.00474879
mov r14, rax
cmp qword [rdi + 0x78], 0
je 0x479e36
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 0x479cdd
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 0x479cad
jmp 0x479d22
cmp r11, 1
mov r11d, 1
je 0x479cff
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 0x479e4a
add r8, r10
add r8, 0x10
add r10, 0x10
and r8, rcx
jmp 0x479c9a
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 0x479e1a
lea rcx, [rsp + 0x70]
call fcn.00472e1f
jmp 0x479e1a
mov rbx, qword [r12]
mov r13, qword [r12 + 8]
mov rcx, rbx
call qword [r13]
cmp qword [r13 + 8], 0
je 0x479da4
cmp qword [r13 + 0x10], 0x11
jb 0x479d93
mov rbx, qword [rbx - 8]
mov rcx, qword [0x004a30e8]
xor edx, edx
mov r8, rbx
call sub.KERNEL32.dll_HeapFree
mov rcx, qword [0x004a30e8]
xor edx, edx
mov r8, r12
call sub.KERNEL32.dll_HeapFree
call sub.KERNEL32.dll_GetLastError
mov ebx, eax
shl rbx, 0x20
lock dec qword [r14]
jne 0x479dd0
lea rcx, [rsp + 0x68]
call fcn.00472ff8
or rbx, 2
lock dec qword [r15]
jne 0x479de2
mov rcx, r15
call fcn.00472fa4
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x40], 0
mov rcx, rbx
call case.0x46b295.147
cmp al, 0xd
jne 0x479796
mov rax, qword [rdi + 0xf8]
test rax, rax
je 0x479796
lea rcx, [rsp + 0x48]
call fcn.00473a42
xor edi, edi
mov al, 1
lock cmpxchg byte [rsi], dil
je 0x4797a9
mov rcx, rsi
call fcn.0043e68f
jmp 0x4797a9
lea rcx, [rdi + 0x68]
mov rdx, r15
mov r8, r12
call fcn.0047911a
jmp 0x479c67
mov r8b, byte [rax + rdx]
test r8b, r8b
js 0x479e62
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 0x479e1a
test r13, r13
je 0x479a46
mov rcx, qword [0x004a30e8]
xor edx, edx
mov r8, r10
call sub.KERNEL32.dll_HeapFree
jmp 0x479a46
lea rcx, str.assertion_failed:_prev.ref_count_____1
lea r8, [0x004981a8]
mov edx, 0x27
call fcn.0042c320
ud2
ud2
lea rcx, str.assertion_failed:_shared.shutdown_tx.is_some___cargo_registry_src_index.crates.io_6f17d22bba15001f_tokio_1.35.1_src_runtime_blocking_pool.rs
lea r8, [0x00498368]
mov edx, 0x2e
jmp 0x479ee0
mov ecx, 8
mov edx, 0x30
jmp 0x479f16
mov ecx, 8
mov edx, 0x38
call fcn.00429330
ud2
mov ecx, 8
mov edx, 0x10
call fcn.00429330
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_82e1608dfa6e0b5569232559e3d385fea5a93112library_std_src_threadmod.rs
mov qword [rsp + 0x20], rax
lea rcx, str.thread_name_may_not_contain_interior_null_bytes
lea r9, [0x00495b78]
mov edx, 0x2f
call fcn.0042d5e0
ud2
add rcx, 0x10
xor edx, edx
call fcn.0044ce90
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.rs
call fcn.0042b5e0
ud2