Function at 0x1400c9ac0
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 rsi, rcx
mov rax, qword [0x14015e028]
xor rax, rsp
mov qword [rsp + 0x40], rax
call fcn.1400c9e00
test rsi, rsi
je 0x1400c9bf6
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 0x1400c9c22
cmp byte [r14 + 2], 0
je 0x1400c9cde
mov rax, r13
shl rax, 5
mov rbx, qword [r15 + rax + 0x10]
cmp byte [rbx + 0x1c], 0
je 0x1400c9cde
mov edi, dword [0x140169500]
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 0x1400c9c15
cmp rdi, 2
jb 0x1400c9cde
sub rbx, r14
add rbx, 0xfffffffffffffff0
sar rbx, 3
movabs rax, 0xcccccccccccccccd
imul rax, rbx
inc qword [rdi + 0x2c0]
cmp rax, 0x28
ja 0x1400c9cd7
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 0x1400c9d9a
mov al, byte [rdi + 0x290]
test al, 1
jne 0x1400c9db0
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14009d180
nop
add rsp, 0x48
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 0x1400c9b7f
mov rcx, r13
shl rcx, 5
mov rdx, qword [r15 + rcx + 0x10]
cmp byte [rdx + 0x1c], 0
je 0x1400c9b3d
lea rdx, [r15 + rcx]
add rdx, 0x10
mov rbp, qword [0x14015eeb0]
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 [0x14015eea0], rcx
add rcx, rax
mov rax, qword [0x14015eea8]
cmp rcx, rax
jbe 0x1400c9bf6
mov al, byte [0x14015eec0]
test al, 1
jne 0x1400c9bf6
lea rsi, [0x14015ee10]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14009d180
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.1400c8970
inc qword [rdi + 0x2d0]
add r14, 8
xorps xmm0, xmm0
movaps xmmword [rsp + 0x30], xmm0
mov edi, 1
xor ebp, ebp
mov rbx, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov rcx, r14
call rbx
test al, al
jne 0x1400c9d2b
jmp 0x1400c9dd5
pause
dec eax
jne 0x1400c9d06
add ebp, edi
add edi, edi
cmp edi, 0x40
mov eax, 0x40
cmovge edi, eax
cmp ebp, 0x3e8
jl 0x1400c9cf8
mov rcx, r14
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [r12]
cmp rax, rsi
je 0x1400c9df6
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 0x1400c9de4
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 0x1400c9bf6
lea rcx, [rsp + 0x30]
call fcn.14003df10
jmp 0x1400c9bf6
mov rdx, rdi
add rdx, rax
shr r8, 1
mov rcx, rdi
call fcn.14007f500
jmp 0x1400c9be8
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14009d180
mov rcx, rdi
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp fcn.14007f6c0
mov eax, edi
test edi, edi
jg 0x1400c9d06
jmp 0x1400c9d0e
lea rdx, [rsp + 0x20]
mov rcx, r12
call fcn.14007f740
jmp 0x1400c9d6c
int3