Function at 0x140086920
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 [0x1400dd028]
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 0x140086ae1
mov r12, qword [rbp]
cmp byte [r12 + 0x1c], 0
je 0x140086ae1
mov r15, r14
mov r14, rbp
mov edi, dword [0x1400e78f0]
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 0x140086acd
cmp rdi, 2
mov rbp, r14
mov r14, r15
jb 0x140086ae1
sub r12, rbx
add r12, 0xfffffffffffffff0
sar r12, 3
movabs rax, 0xcccccccccccccccd
imul rax, r12
inc qword [rdi + 0x2c0]
cmp rax, 0x28
ja 0x140086ada
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 0x140086ba5
mov al, byte [rdi + 0x290]
test al, 1
jne 0x140086bbb
cmp byte [r14 + 8], 0
je 0x140086aae
mov rcx, qword [rsp + 0x20]
shl rcx, 5
mov rax, qword [rsp + 0x28]
cmp byte [rax + rcx + 0x1d], 0
jne 0x140086bc8
mov rax, qword [rbp]
mov r8d, dword [rax + 0x18]
add r8, 0x1fff
shr r8, 0xd
je 0x140086aae
movabs rax, 0xfffffffc00000000
and rax, rsi
shr rsi, 0xd
and esi, 0x1fffff
add rsi, rax
mov rcx, rsi
xor edx, edx
call fcn.14005e0e0
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.14005b820
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 0x1400869d8
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 0x140086b32
jmp 0x140086bd1
pause
dec eax
jne 0x140086b0b
add r12d, edi
add edi, edi
cmp edi, 0x40
mov eax, 0x40
cmovge edi, eax
cmp r12d, 0x3e8
jl 0x140086afc
mov rcx, rbx
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [r13]
cmp rax, rsi
je 0x140086bef
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 0x140086be0
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 0x140086a55
lea rcx, [rsp + 0x40]
call fcn.14002f610
jmp 0x140086a55
mov rdx, rdi
add rdx, rax
shr r8, 1
mov rcx, rdi
call fcn.14004e6a0
jmp 0x140086a47
mov rcx, rdi
call fcn.14004e860
jmp 0x140086a55
mov r8, qword [r13 + 0x20]
jmp 0x140086a7d
mov eax, edi
test edi, edi
jg 0x140086b0b
jmp 0x140086b14
lea rdx, [rsp + 0x30]
mov rcx, r13
call fcn.14004e8e0
jmp 0x140086b77
int3