Function at 0x1401332f0
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 [0x140213038]
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 0x1401334b1
mov r12, qword [rbp]
cmp byte [r12 + 0x1c], 0
je 0x1401334b1
mov r15, r14
mov r14, rbp
mov edi, dword [0x140221510]
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 0x14013349d
cmp rdi, 2
mov rbp, r14
mov r14, r15
jb 0x1401334b1
sub r12, rbx
add r12, 0xfffffffffffffff0
sar r12, 3
movabs rax, 0xcccccccccccccccd
imul rax, r12
inc qword [rdi + 0x2c0]
cmp rax, 0x28
ja 0x1401334aa
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 0x140133575
mov al, byte [rdi + 0x290]
test al, 1
jne 0x14013358b
cmp byte [r14 + 8], 0
je 0x14013347e
mov rcx, qword [rsp + 0x20]
shl rcx, 5
mov rax, qword [rsp + 0x28]
cmp byte [rax + rcx + 0x1d], 0
jne 0x140133598
mov rax, qword [rbp]
mov r8d, dword [rax + 0x18]
add r8, 0x1fff
shr r8, 0xd
je 0x14013347e
movabs rax, 0xfffffffc00000000
and rax, rsi
shr rsi, 0xd
and esi, 0x1fffff
add rsi, rax
mov rcx, rsi
xor edx, edx
call fcn.140103d70
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.1401013e0
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 0x1401333a8
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 0x140133502
jmp 0x1401335a1
pause
dec eax
jne 0x1401334db
add r12d, edi
add edi, edi
cmp edi, 0x40
mov eax, 0x40
cmovge edi, eax
cmp r12d, 0x3e8
jl 0x1401334cc
mov rcx, rbx
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [r13]
cmp rax, rsi
je 0x1401335bf
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 0x1401335b0
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 0x140133425
lea rcx, [rsp + 0x40]
call fcn.140098180
jmp 0x140133425
mov rdx, rdi
add rdx, rax
shr r8, 1
mov rcx, rdi
call fcn.1400f7020
jmp 0x140133417
mov rcx, rdi
call fcn.1400f71e0
jmp 0x140133425
mov r8, qword [r13 + 0x20]
jmp 0x14013344d
mov eax, edi
test edi, edi
jg 0x1401334db
jmp 0x1401334e4
lea rdx, [rsp + 0x30]
mov rcx, r13
call fcn.1400f7260
jmp 0x140133547
int3