Function at 0x14008bb50
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, 0x58
mov rsi, rdx
mov r14, rcx
mov rax, qword [0x1400e5028]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov rax, rdx
and rax, 0xffffffffffe00000
mov rcx, rdx
shr rcx, 9
and ecx, 0xfe0
lea r13, [rax + rcx]
add r13, 0x1000
movzx eax, word [r13 + 0x1e]
mov rcx, rax
neg rcx
mov qword [rsp + 0x20], rcx
shl rax, 5
mov qword [rsp + 0x28], r13
sub r13, rax
mov rax, qword [r13 + 0x10]
mov eax, dword [rax + 0x18]
mov rcx, qword [r14 + 0x10]
add qword [rcx], rax
lea rbp, [r13 + 0x10]
mov rbx, qword [r14]
cmp byte [rbx + 2], 0
je 0x14008bd11
mov r12, qword [rbp]
cmp byte [r12 + 0x1c], 0
je 0x14008bd11
mov r15, r14
mov r14, rbp
mov edi, dword [0x1400f0298]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test ebp, ebp
jne 0x14008bcfd
cmp rdi, 2
mov rbp, r14
mov r14, r15
jb 0x14008bd11
sub r12, rbx
add r12, 0xfffffffffffffff0
sar r12, 3
movabs rax, 0xcccccccccccccccd
imul rax, r12
inc qword [rdi + 0x2c0]
cmp rax, 0x28
ja 0x14008bd0a
shl rax, 4
mov rcx, qword [rdi + rax]
bswap rcx
mov qword [rsi], rcx
not rcx
mov qword [rsi + 8], rcx
mov qword [rdi + rax], rsi
inc byte [rdi + rax + 8]
inc qword [rdi + 0x2c8]
movzx r8d, byte [rdi + rax + 9]
cmp byte [rdi + rax + 8], r8b
jae 0x14008bdd5
mov al, byte [rdi + 0x290]
test al, 1
jne 0x14008bdeb
cmp byte [r14 + 8], 0
je 0x14008bcde
mov rcx, qword [rsp + 0x20]
shl rcx, 5
mov rax, qword [rsp + 0x28]
cmp byte [rax + rcx + 0x1d], 0
jne 0x14008bdf8
mov rax, qword [rbp]
mov r8d, dword [rax + 0x18]
add r8, 0x1fff
shr r8, 0xd
je 0x14008bcde
movabs rax, 0xfffffffc00000000
and rax, rsi
shr rsi, 0xd
and esi, 0x1fffff
add rsi, rax
mov rcx, rsi
xor edx, edx
call fcn.1400611e0
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.14005e850
nop
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14008bc08
inc qword [rdi + 0x2d0]
add rbx, 8
xorps xmm0, xmm0
movaps xmmword [rsp + 0x40], xmm0
mov edi, 1
xor r12d, r12d
mov r15, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, rbx
call r15
test al, al
jne 0x14008bd62
jmp 0x14008be01
pause
dec eax
jne 0x14008bd3b
add r12d, edi
add edi, edi
cmp edi, 0x40
mov eax, 0x40
cmovge edi, eax
cmp r12d, 0x3e8
jl 0x14008bd2c
mov rcx, rbx
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [r13]
cmp rax, rsi
je 0x14008be1f
bswap rax
mov qword [rsi], rax
not rax
mov qword [rsi + 8], rax
mov qword [r13], rsi
mov rax, qword [rsp + 0x20]
shl rax, 5
mov rdx, qword [rsp + 0x28]
movzx ecx, word [rdx + rax + 0x18]
dec ecx
mov word [rdx + rax + 0x18], cx
test cx, cx
jle 0x14008be10
xorps xmm0, xmm0
movaps xmmword [rsp + 0x30], xmm0
movaps xmm0, xmmword [rsp + 0x30]
movaps xmmword [rsp + 0x40], xmm0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
cmp qword [rsp + 0x40], 0
je 0x14008bc85
lea rcx, [rsp + 0x40]
call fcn.140034130
jmp 0x14008bc85
mov rdx, rdi
add rdx, rax
shr r8, 1
mov rcx, rdi
call fcn.140054d70
jmp 0x14008bc77
mov rcx, rdi
call fcn.140054f30
jmp 0x14008bc85
mov r8, qword [r13 + 0x20]
jmp 0x14008bcad
mov eax, edi
test edi, edi
jg 0x14008bd3b
jmp 0x14008bd44
lea rdx, [rsp + 0x30]
mov rcx, r13
call fcn.140054fb0
jmp 0x14008bda7
int3