Function at 0x1400cfcf0
Capabilities:
Set thread local storage value

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x60
mov rax, qword [0x1403a0028]
xor rax, rsp
mov qword [rsp + 0x58], rax
test rcx, rcx
je 0x1400cff54
movabs rax, 0xe69e32f3ad9ea63
cmp qword [0x1403a5550], rax
jne 0x1400cff57
mov r13, rcx
mov eax, dword [rcx + 0xc]
lea r15, [rax + 0x2f8]
mov byte [rsp + 0x3f], 0xaa
lea r12, [rcx + 0x48]
cmp byte [rcx + 3], 0
je 0x1400cff5a
bsr rcx, r15
xor rcx, 0x3f
mov rbx, r15
mov edx, 0x40
sub rdx, rcx
lea rcx, [0x140379ad0]
mov cl, byte [rdx + rcx]
mov rax, rbx
shr rax, cl
and eax, 3
lea rcx, [0x140379b20]
and rbx, qword [rcx + rdx*8]
lea rax, [rax + rdx*4]
cmp rbx, 1
sbb rax, 0xffffffffffffffff
lea rcx, [0x1403796b8]
movzx eax, word [rcx + rax*2 + 0x200]
lea rsi, [rax + rax*4]
lea rdi, [r12 + rsi*8]
lea r14, [r13 + 0x40]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x1400cff16
mov rax, qword [rdi]
mov rbx, qword [rax]
test rbx, rbx
je 0x1400cfea4
mov byte [rsp + 0x3f], 0
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400cff0f
bswap rcx
mov edi, dword [r12 + rsi*8 + 0x18]
mov rdx, rcx
xor rdx, rbx
cmp rdx, 0x1fffff
ja 0x1400cff23
mov edx, ecx
and edx, 0x1fc000
je 0x1400cff23
prefetcht0 byte [rcx]
mov qword [rax], rcx
mov ecx, dword [rax + 0x18]
lea edx, [rcx + 2]
and edx, 0x3ffe
and ecx, 0xffffc001
or ecx, edx
mov dword [rax + 0x18], ecx
mov rax, qword [rax + 0x10]
mov eax, dword [rax + 0x18]
add rax, qword [r13 + 0xa98]
mov qword [r13 + 0xa98], rax
mov rcx, qword [r13 + 0xaa0]
cmp rcx, rax
cmova rax, rcx
mov qword [r13 + 0xaa0], rax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov rcx, rbx
mov rdx, r13
call fcn.14017e370
mov ecx, dword [0x1403baa58]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [0x1403b1c84]
mov rcx, qword gs:[0x58]
mov rax, qword [rcx + rax*8]
mov qword [rax + 0x120], rbx
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1401bb0d0
mov rax, rbx
add rsp, 0x60
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rax, [rsp + 0x3f]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0x4000
mov rcx, rdi
mov rdx, r13
mov r8d, 2
mov r9, r15
call fcn.1401961e0
test rax, rax
je 0x1400cffb3
mov rbx, rax
mov rcx, rax
and rcx, 0xffffffffffe00000
mov rdx, rax
shr rdx, 9
and edx, 0xfe0
lea rax, [rdx + rcx]
movzx ecx, byte [rdx + rcx + 0x101e]
and ecx, 0x3f
shl rcx, 5
sub rax, rcx
add rax, 0x1000
jmp 0x1400cfe1d
xor ecx, ecx
jmp 0x1400cfe03
mov rcx, r14
call fcn.14017ed70
jmp 0x1400cfdb7
movaps xmm0, xmmword [0x14032f5c0]
lea rsi, [rsp + 0x40]
movaps xmmword [rsi], xmm0
mov r8, qword [rbx]
lea rdx, str.first
mov rcx, rsi
call fcn.14028e180
mov rcx, rsi
call fcn.1400399a0
mov rcx, rdi
call fcn.14028e200
int3
int3
cmp eax, 0xfd07
ja 0x1400cfd4e
mov edx, r15d
mov ecx, 0xffffffff
mov eax, 0x20
sub edx, 1
cmovae ecx, eax
je 0x1400cff80
bsr eax, edx
xor eax, 0x1f
sub ecx, eax
mov eax, 1
shl eax, cl
movsxd rcx, eax
mov rax, rcx
shr rax, 1
lea rbx, [rax + rax*4]
shr rbx, 2
cmp rbx, r15
cmovb rbx, rcx
test rbx, rbx
je 0x1400cffba
bsr rcx, rbx
xor rcx, 0x3f
jmp 0x1400cfd59
xor ebx, ebx
jmp 0x1400cfe47
mov ecx, 0x40
jmp 0x1400cfd59