Function at 0x14001c830
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 r14, rcx
mov rax, qword [0x14028f028]
xor rax, rsp
mov qword [rsp + 0x50], rax
call fcn.1400a2bb0
test r14, r14
je 0x14001c98f
prefetcht0 byte [r14]
mov rdi, r14
and rdi, 0xffffffffffe00000
mov rax, r14
shr rax, 9
and eax, 0xfe0
lea r12, [rdi + rax]
add r12, 0x1000
movzx eax, byte [r12 + 0x1e]
mov rsi, rax
neg rsi
shl rax, 5
mov rbx, r12
sub rbx, rax
prefetcht0 byte [rbx]
mov rax, rbx
and rax, 0xfffffffffffff000
mov r13, qword [rax]
cmp byte [r13], 2
je 0x14001c9bb
mov qword [rsp + 0x28], rbx
cmp byte [r13 + 2], 0
je 0x14001cad5
mov rax, rsi
shl rax, 5
mov rbx, qword [r12 + rax + 0x10]
lea r15, [r13 + 0x10]
cmp r15, rbx
ja 0x14001cad5
lea rax, [r13 + 0x1410]
cmp rax, rbx
jb 0x14001cad5
mov edi, dword [0x14029b018]
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 0x14001c9ae
cmp rdi, 2
jb 0x14001cad5
sub rbx, r15
sar rbx, 3
movabs rax, 0xcccccccccccccccd
imul rax, rbx
inc qword [rdi + 0x5c8]
cmp rax, 0x28
ja 0x14001cace
shl rax, 4
mov rcx, qword [rdi + rax]
bswap rcx
mov qword [r14], rcx
not rcx
mov qword [r14 + 8], rcx
mov qword [rdi + rax], r14
mov dl, byte [rdi + rax + 8]
inc dl
mov byte [rdi + rax + 8], dl
movzx ecx, word [rdi + rax + 0xa]
add qword [rdi + 0x590], rcx
inc qword [rdi + 0x5d0]
mov cl, byte [rdi + rax + 9]
cmp dl, cl
ja 0x14001cb96
mov al, byte [rdi + 0x598]
test al, 1
jne 0x14001cbb0
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.1400ccfe0
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 0x14001c90f
mov al, byte [0x140292688]
cmp al, 2
je 0x14001cbe1
mov rax, rsi
shl rax, 5
mov rcx, qword [r12 + rax + 0x10]
lea rdx, [r13 + 0x10]
cmp rdx, rcx
ja 0x14001c8b5
lea rdx, [r13 + 0x1410]
cmp rdx, rcx
jb 0x14001c8b5
mov edx, dword [rcx + 0x18]
cmp byte [r12 + rax + 0x1d], 0
mov r8, rdx
jne 0x14001cbf3
mov rax, qword [0x140292660]
and eax, 1
shl rax, 0xe
lea r9, [rax + rdi]
lea rbp, [rax + rdi]
add rbp, 0x4000
mov rcx, r14
shr rcx, 4
mov ebx, r14d
shr ebx, 0xa
and ebx, 0x7ff
mov edi, 1
shl rdi, cl
mov rax, qword [r9 + rbx*8 + 0x4000]
mov rcx, rax
or rcx, rdi
lock cmpxchg qword [rbp + rbx*8], rcx
jne 0x14001ca44
test rax, rdi
jne 0x14001cbfc
mov rdi, rdx
lock xadd qword [0x140292650], rdi
add rdi, rdx
mov rbx, qword [0x140292658]
cmp byte [0x140292689], 1
jne 0x14001ca85
mov rcx, r14
xor edx, edx
call fcn.1400cf750
cmp rdi, rbx
jbe 0x14001c98f
mov al, byte [0x140292688]
test al, al
jne 0x14001c98f
call fcn.14011e1a0
mov rsi, rax
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.1400ccfe0
mov rcx, rsi
mov edx, 1
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp fcn.140191b80
inc qword [rdi + 0x5d8]
mov rbp, r12
add r13, 8
xorps xmm0, xmm0
movaps xmmword [rsp + 0x40], xmm0
mov edi, 1
xor ebx, ebx
mov r15, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov r12d, 0x40
mov rcx, r13
call r15
test al, al
jne 0x14001cb2a
mov eax, edi
test edi, edi
jle 0x14001cb10
pause
dec eax
jne 0x14001cb08
add ebx, edi
add edi, edi
cmp edi, 0x40
cmovge edi, r12d
cmp ebx, 0x3e8
jl 0x14001caf8
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
mov rcx, qword [rsp + 0x28]
mov rax, qword [rcx]
cmp rax, r14
je 0x14001cc01
bswap rax
mov qword [r14], rax
not rax
mov qword [r14 + 8], rax
mov qword [rcx], r14
shl rsi, 5
movzx eax, word [rbp + rsi + 0x18]
dec eax
mov word [rbp + rsi + 0x18], ax
test ax, ax
jle 0x14001cbd5
xorps xmm0, xmm0
movaps xmmword [rsp + 0x30], xmm0
movaps xmm0, xmmword [rsp + 0x30]
movaps xmmword [rsp + 0x40], xmm0
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
cmp qword [rsp + 0x40], 0
je 0x14001c98f
lea rcx, [rsp + 0x40]
call fcn.14011f1d0
jmp 0x14001c98f
mov rdx, rdi
add rdx, rax
movzx r8d, cl
shr r8, 1
mov rcx, rdi
call fcn.1400a2f70
jmp 0x14001c981
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.1400ccfe0
mov rcx, rdi
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp fcn.140072d40
lea rdx, [rsp + 0x30]
call fcn.140008dc0
jmp 0x14001cb68
call fcn.14011e1a0
mov rcx, rax
call fcn.140147fd0
jmp 0x14001c9c9
mov r8, qword [rbx + 0x20]
jmp 0x14001ca04
call fcn.1401a8800
int3