Function at 0x140084a10
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, 0x38
mov r12, rcx
mov rax, qword [0x1400dd028]
xor rax, rsp
mov qword [rsp + 0x30], rax
call fcn.140085dc0
mov r14, rax
mov r15, rax
mov eax, 0x40
mov ecx, 0x40
test r12, r12
je 0x140084a54
bsr rcx, r12
xor rcx, 0x3f
sub rax, rcx
lea rcx, [0x1400c6570]
mov cl, byte [rax + rcx]
mov rdx, r12
shr rdx, cl
and edx, 7
lea rcx, [0x1400c65c0]
mov rcx, qword [rcx + rax*8]
and rcx, r12
lea rax, [rdx + rax*8]
cmp rcx, 1
sbb rax, 0xffffffffffffffff
lea rcx, [0x1400c67c8]
movzx r13d, word [rcx + rax*2 + 0x400]
mov byte [rsp + 0x2f], 0
cmp byte [r15 + 2], 0
je 0x140084b5e
mov edi, dword [0x1400e78f0]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test ebx, ebx
jne 0x140084b51
cmp rdi, 1
jbe 0x140084bb8
inc qword [rdi + 0x298]
cmp r13w, 0x29
jae 0x140084bdb
mov rsi, r13
shl rsi, 4
mov rbp, rdi
add rbp, rsi
cmp qword [rdi + rsi], 0
je 0x140084c7e
inc qword [rdi + 0x2a0]
mov rbx, qword [rbp]
mov rax, qword [rbx]
test rax, rax
je 0x140084b1c
mov rcx, rax
not rcx
cmp qword [rbx + 8], rcx
jne 0x140084ca9
bswap rax
dec byte [rdi + rsi + 8]
mov qword [rbp], rax
test rbx, rbx
je 0x140084be9
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.14005b820
mov rax, rbx
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x140084ac5
lea rax, [r13*4]
add rax, r13
lea rsi, [r14 + rax*8]
add rsi, 0x10
add r14, 8
mov edi, 1
xor ebx, ebx
mov r13, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov ebp, 0x40
mov rcx, r14
call r13
test al, al
jne 0x140084c42
jmp 0x140084cbd
pause
dec eax
jne 0x140084b9b
add ebx, edi
add edi, edi
cmp edi, 0x40
cmovge edi, ebp
cmp ebx, 0x3e8
jl 0x140084b88
jmp 0x140084c3a
je 0x140084be9
mov byte [r15 + 2], 0
mov rcx, r15
call fcn.14004e290
mov rdi, rax
mov byte [r15 + 2], 1
inc qword [rax + 0x298]
jmp 0x140084ad6
inc qword [rdi + 0x2b8]
inc qword [rdi + 0x2a8]
lea rax, [r13*4]
add rax, r13
lea rsi, [r14 + rax*8]
add rsi, 0x10
add r14, 8
mov edi, 1
xor ebx, ebx
mov r13, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov ebp, 0x40
mov rcx, r14
call r13
test al, al
jne 0x140084c42
jmp 0x140084cae
pause
dec eax
jne 0x140084c22
add ebx, edi
add edi, edi
cmp edi, 0x40
cmovge edi, ebp
cmp ebx, 0x3e8
jl 0x140084c13
mov rcx, r14
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [rsi]
mov rbx, qword [rax]
test rbx, rbx
je 0x140084ccc
mov byte [rsp + 0x2f], 0
mov rcx, qword [rbx]
test rcx, rcx
je 0x140084c66
mov rdx, rcx
not rdx
cmp qword [rbx + 8], rdx
jne 0x140084ca9
bswap rcx
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x140084b30
inc qword [rdi + 0x2b0]
inc qword [rdi + 0x2a8]
mov rcx, rdi
mov rdx, r13
call fcn.14004e510
mov rbx, qword [rbp]
test rbx, rbx
jne 0x140084b04
jmp 0x140084be9
call 0x140084730
mov eax, edi
test edi, edi
jg 0x140084c22
jmp 0x140084c2a
mov eax, edi
test edi, edi
jg 0x140084b9b
jmp 0x140084ba3
lea rax, [rsp + 0x2f]
mov qword [rsp + 0x20], rax
mov rcx, rsi
mov rdx, r15
xor r8d, r8d
mov r9, r12
call fcn.140038f30
mov rbx, rax
jmp 0x140084c70