Function at 0x140051b80
Capabilities:
Set thread local storage value

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x198
mov rsi, rcx
mov rax, qword [0x1400ea658]
xor rax, rsp
mov qword [rsp + 0x190], rax
test rcx, rcx
jne 0x140051bdb
lea rdx, str....._base_allocatorpartition_allocator_srcpartition_alloc_thread_cache.cc
lea r9, str.root
lea rdi, [rsp + 0x40]
mov rcx, rdi
mov r8d, 0x1cb
call fcn.140042880
mov rcx, rdi
call fcn.1400428e0
mov rcx, rdi
call fcn.1400428f0
movabs rax, 0xe69e32f3ad9ea63
cmp qword [0x1400f6b90], rax
je 0x140051c1f
lea rdx, str....._base_allocatorpartition_allocator_srcpartition_alloc_thread_cache.cc
lea r9, str.tools::kThreadCacheNeedleArray_0___tools::kNeedle1
lea rdi, [rsp + 0x40]
mov rcx, rdi
mov r8d, 0x1ce
call fcn.140042880
mov rcx, rdi
call fcn.1400428e0
mov rcx, rdi
call fcn.1400428f0
mov r14d, dword [rsi + 8]
add r14, 0x920
mov byte [rsp + 0x3f], 0xaa
cmp byte [rsi + 2], 0
sete al
bsr rdx, r14
xor rdx, 0xffffffffffffffc0
lea rcx, [0x1400cbb20]
movzx ecx, byte [rdx + rcx + 0x41]
mov r8, r14
shr r8, cl
and r8d, 7
lea rcx, [0x1400cbb70]
mov rcx, qword [rcx + rdx*8 + 0x208]
and rcx, r14
lea rdx, [r8 + rdx*8]
add rdx, 0x208
cmp rcx, 1
sbb rdx, 0xffffffffffffffff
lea rcx, [0x1400cb300]
movzx ecx, word [rcx + rdx*2 + 0x400]
cmp cx, 0x6e
setb dl
and dl, al
movzx eax, dl
or eax, ecx
movzx eax, ax
lea r12, [rax + rax*4]
lea r15, [rsi + r12*8]
add r15, 0x48
lea rdi, [rsi + 0x40]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
jne 0x140051cbe
mov rcx, rdi
call fcn.140052770
mov rax, qword [r15]
mov rbx, qword [rax]
test rbx, rbx
je 0x140051db6
mov byte [rsp + 0x3f], 0
mov r8, qword [rbx]
test r8, r8
je 0x140051d0f
lea rdx, [rsi + 0x48]
mov rcx, r8
bswap rcx
mov r14d, dword [rdx + r12*8 + 0x18]
mov rdx, rcx
xor rdx, rbx
cmp rdx, 0x1fffff
ja 0x140051e1a
mov edx, ecx
and edx, 0x1fc000
je 0x140051e1a
prefetcht0 byte [rcx]
jmp 0x140051d11
xor ecx, ecx
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 [rsi + 0x1498]
mov qword [rsi + 0x1498], rax
mov rcx, qword [rsi + 0x14a0]
cmp rcx, rax
cmova rax, rcx
mov qword [rsi + 0x14a0], rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov rcx, rbx
mov rdx, rsi
call fcn.140051e70
mov ecx, dword [0x1400fc390]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [0x1400f9318]
mov rcx, qword gs:[0x58]
mov rax, qword [rcx + rax*8]
mov qword [rax + 0x158], rbx
mov rcx, qword [rsp + 0x190]
xor rcx, rsp
call fcn.14008e0c0
mov rax, rbx
add rsp, 0x198
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
lea rax, [rsp + 0x3f]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0x4000
mov rcx, r15
mov rdx, rsi
mov r8d, 2
mov r9, r14
call fcn.140056990
test rax, rax
je 0x140051e4a
mov rbx, rax
mov rcx, rax
and rcx, 0xffffffffffe00000
mov edx, ebx
shr edx, 9
and edx, 0xfe0
lea rax, [rdx + rcx]
add rax, 0x1000
movzx ecx, byte [rdx + rcx + 0x101e]
and ecx, 0x3f
shl ecx, 5
sub rax, rcx
jmp 0x140051d2b
movaps xmm0, xmmword [section..rdata]
movaps xmmword [rsp + 0x40], xmm0
lea rdx, str.first
lea rsi, [rsp + 0x40]
mov rcx, rsi
call fcn.140047850
mov rcx, rsi
call fcn.140001700
mov rcx, r14
call fcn.140056490
xor ebx, ebx
jmp 0x140051d55