Function at 0x14008a970
Capabilities:
Get thread local storage value

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
mov rax, qword [0x1400e5028]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov rsi, qword [rcx]
test rsi, rsi
jne 0x14008a9b6
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14005e850
nop
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov qword [rcx + 8], rsi
call fcn.14008aff0
mov rax, rsi
and rax, 0xffffffffffe00000
mov rcx, rsi
shr rcx, 9
and ecx, 0xfe0
lea r15, [rax + rcx]
add r15, 0x1000
movzx ecx, word [r15 + 0x1e]
mov r13, rcx
neg r13
shl rcx, 5
mov r12, r15
sub r12, rcx
mov rcx, r12
and rcx, 0xfffffffffffff000
mov r14, qword [rcx]
cmp byte [r14], 2
je 0x14008aaf7
cmp byte [r14 + 2], 0
je 0x14008abb3
mov rax, r13
shl rax, 5
mov rdi, qword [r15 + rax + 0x10]
cmp byte [rdi + 0x1c], 0
je 0x14008abb3
mov ebx, dword [0x1400f0298]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test ebp, ebp
jne 0x14008aaea
cmp rbx, 2
jb 0x14008abb3
sub rdi, r14
add rdi, 0xfffffffffffffff0
sar rdi, 3
movabs rax, 0xcccccccccccccccd
imul rax, rdi
inc qword [rbx + 0x2c0]
cmp rax, 0x28
ja 0x14008abac
shl rax, 4
mov rcx, qword [rbx + rax]
bswap rcx
mov qword [rsi], rcx
not rcx
mov qword [rsi + 8], rcx
mov qword [rbx + rax], rsi
inc byte [rbx + rax + 8]
inc qword [rbx + 0x2c8]
movzx r8d, byte [rbx + rax + 9]
cmp byte [rbx + rax + 8], r8b
jae 0x14008ac6b
mov al, byte [rbx + 0x290]
test al, 1
je 0x14008a997
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14005e850
mov rcx, rbx
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp fcn.140054f30
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14008aa4e
mov rcx, r13
shl rcx, 5
mov rdx, qword [r15 + rcx + 0x10]
cmp byte [rdx + 0x1c], 0
je 0x14008aa0c
lea rdx, [r15 + rcx]
add rdx, 0x10
mov rbp, qword [0x1400e5eb0]
and ebp, 1
shl rbp, 0xe
add rbp, rax
mov rcx, rsi
shr rcx, 4
shr rsi, 7
and esi, 0x3ff8
mov eax, 1
shl rax, cl
lock or qword [rsi + rbp + 0x4000], rax
mov rax, qword [rdx]
mov eax, dword [rax + 0x18]
mov rcx, rax
lock xadd qword [0x1400e5ea0], rcx
add rcx, rax
mov rax, qword [0x1400e5ea8]
cmp rcx, rax
jbe 0x14008a997
mov al, byte [0x1400e5ec0]
test al, 1
jne 0x14008a997
lea rsi, [0x1400e5e10]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14005e850
mov rcx, rsi
mov edx, 1
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp fcn.140089b60
inc qword [rbx + 0x2d0]
add r14, 8
xorps xmm0, xmm0
movaps xmmword [rsp + 0x30], xmm0
mov ebx, 1
xor ebp, ebp
mov rdi, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, r14
call rdi
test al, al
jne 0x14008ac00
jmp 0x14008ac81
pause
dec eax
jne 0x14008abdb
add ebp, ebx
add ebx, ebx
cmp ebx, 0x40
mov eax, 0x40
cmovge ebx, eax
cmp ebp, 0x3e8
jl 0x14008abcd
mov rcx, r14
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [r12]
cmp rsi, rax
je 0x14008ac9f
bswap rax
mov qword [rsi], rax
not rax
mov qword [rsi + 8], rax
mov qword [r12], rsi
shl r13, 5
movzx eax, word [r15 + r13 + 0x18]
dec eax
mov word [r15 + r13 + 0x18], ax
test ax, ax
jle 0x14008ac90
xorps xmm0, xmm0
movaps xmmword [rsp + 0x20], xmm0
movaps xmm0, xmmword [rsp + 0x20]
movaps xmmword [rsp + 0x30], xmm0
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
cmp qword [rsp + 0x30], 0
je 0x14008a997
lea rcx, [rsp + 0x30]
call fcn.140034130
jmp 0x14008a997
mov rdx, rbx
add rdx, rax
shr r8, 1
mov rcx, rbx
call fcn.140054d70
jmp 0x14008aab7
mov eax, ebx
test ebx, ebx
jg 0x14008abdb
jmp 0x14008abe3
lea rdx, [rsp + 0x20]
mov rcx, r12
call fcn.140054fb0
jmp 0x14008ac3d
int3