Function at 0x1400c8a50
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 [0x14015e028]
xor rax, rsp
mov qword [rsp + 0x30], rax
call fcn.1400c9e00
mov r14, rax
mov r15, rax
mov eax, 0x40
mov ecx, 0x40
test r12, r12
je 0x1400c8a94
bsr rcx, r12
xor rcx, 0x3f
sub rax, rcx
lea rcx, [0x14013b9d0]
mov cl, byte [rax + rcx]
mov rdx, r12
shr rdx, cl
and edx, 7
lea rcx, [0x14013ba20]
mov rcx, qword [rcx + rax*8]
and rcx, r12
lea rax, [rdx + rax*8]
cmp rcx, 1
sbb rax, 0xffffffffffffffff
lea rcx, [0x14013bc28]
movzx r13d, word [rcx + rax*2 + 0x400]
mov byte [rsp + 0x2f], 0
cmp byte [r15 + 2], 0
je 0x1400c8b9e
mov edi, dword [0x140169500]
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 0x1400c8b91
cmp rdi, 1
jbe 0x1400c8bf8
inc qword [rdi + 0x298]
cmp r13w, 0x29
jae 0x1400c8c1b
mov rsi, r13
shl rsi, 4
mov rbp, rdi
add rbp, rsi
cmp qword [rdi + rsi], 0
je 0x1400c8cbe
inc qword [rdi + 0x2a0]
mov rbx, qword [rbp]
mov rax, qword [rbx]
test rax, rax
je 0x1400c8b5c
mov rcx, rax
not rcx
cmp qword [rbx + 8], rcx
jne 0x1400c8ce9
bswap rax
dec byte [rdi + rsi + 8]
mov qword [rbp], rax
test rbx, rbx
je 0x1400c8c29
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.14009d180
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 0x1400c8b05
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 0x1400c8c82
jmp 0x1400c8cfd
pause
dec eax
jne 0x1400c8bdb
add ebx, edi
add edi, edi
cmp edi, 0x40
cmovge edi, ebp
cmp ebx, 0x3e8
jl 0x1400c8bc8
jmp 0x1400c8c7a
je 0x1400c8c29
mov byte [r15 + 2], 0
mov rcx, r15
call fcn.14007f0f0
mov rdi, rax
mov byte [r15 + 2], 1
inc qword [rax + 0x298]
jmp 0x1400c8b16
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 0x1400c8c82
jmp 0x1400c8cee
pause
dec eax
jne 0x1400c8c62
add ebx, edi
add edi, edi
cmp edi, 0x40
cmovge edi, ebp
cmp ebx, 0x3e8
jl 0x1400c8c53
mov rcx, r14
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [rsi]
mov rbx, qword [rax]
test rbx, rbx
je 0x1400c8d0c
mov byte [rsp + 0x2f], 0
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400c8ca6
mov rdx, rcx
not rdx
cmp qword [rbx + 8], rdx
jne 0x1400c8ce9
bswap rcx
mov qword [rax], rcx
inc word [rax + 0x18]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x1400c8b70
inc qword [rdi + 0x2b0]
inc qword [rdi + 0x2a8]
mov rcx, rdi
mov rdx, r13
call fcn.14007f370
mov rbx, qword [rbp]
test rbx, rbx
jne 0x1400c8b44
jmp 0x1400c8c29
call 0x1400c8770
mov eax, edi
test edi, edi
jg 0x1400c8c62
jmp 0x1400c8c6a
mov eax, edi
test edi, edi
jg 0x1400c8bdb
jmp 0x1400c8be3
lea rax, [rsp + 0x2f]
mov qword [rsp + 0x20], rax
mov rcx, rsi
mov rdx, r15
xor r8d, r8d
mov r9, r12
call fcn.140061300
mov rbx, rax
jmp 0x1400c8cb0