Function at 0x1401a0630
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 [0x1401f5028]
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 0x1401a07f1
mov r12, qword [rbp]
cmp byte [r12 + 0x1c], 0
je 0x1401a07f1
mov r15, r14
mov r14, rbp
mov edi, dword [0x1402003c0]
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 0x1401a07dd
cmp rdi, 2
mov rbp, r14
mov r14, r15
jb 0x1401a07f1
sub r12, rbx
add r12, 0xfffffffffffffff0
sar r12, 3
movabs rax, 0xcccccccccccccccd
imul rax, r12
inc qword [rdi + 0x2c0]
cmp rax, 0x28
ja 0x1401a07ea
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 0x1401a08b5
mov al, byte [rdi + 0x290]
test al, 1
jne 0x1401a08cb
cmp byte [r14 + 8], 0
je 0x1401a07be
mov rcx, qword [rsp + 0x20]
shl rcx, 5
mov rax, qword [rsp + 0x28]
cmp byte [rax + rcx + 0x1d], 0
jne 0x1401a08d8
mov rax, qword [rbp]
mov r8d, dword [rax + 0x18]
add r8, 0x1fff
shr r8, 0xd
je 0x1401a07be
movabs rax, 0xfffffffc00000000
and rax, rsi
shr rsi, 0xd
and esi, 0x1fffff
add rsi, rax
mov rcx, rsi
xor edx, edx
call fcn.1400f5b50
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.1400f32c0
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 0x1401a06e8
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 0x1401a0842
jmp 0x1401a08e1
pause
dec eax
jne 0x1401a081b
add r12d, edi
add edi, edi
cmp edi, 0x40
mov eax, 0x40
cmovge edi, eax
cmp r12d, 0x3e8
jl 0x1401a080c
mov rcx, rbx
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [r13]
cmp rax, rsi
je 0x1401a08ff
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 0x1401a08f0
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 0x1401a0765
lea rcx, [rsp + 0x40]
call fcn.140005990
jmp 0x1401a0765
mov rdx, rdi
add rdx, rax
shr r8, 1
mov rcx, rdi
call fcn.1400b9550
jmp 0x1401a0757
mov rcx, rdi
call fcn.1400b9720
jmp 0x1401a0765
mov r8, qword [r13 + 0x20]
jmp 0x1401a078d
mov eax, edi
test edi, edi
jg 0x1401a081b
jmp 0x1401a0824
lea rdx, [rsp + 0x30]
mov rcx, r13
call fcn.1400b9250
jmp 0x1401a0887
int3