Function at 0x140018e60
Capabilities:
Get thread local storage value

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x20
mov ebp, r8d
mov rsi, rdx
mov rbx, rcx
lea rdi, [rcx + 0x20]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x14001911b
mov ecx, 0x20
call fcn.14009633c
mov r14, rax
movabs rax, 0xffffffffffffff
mov qword [r14], rax
mov qword [r14 + 8], 0
mov dword [r14 + 0x14], 0
mov dword [r14 + 0x18], ebp
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [r14 + 0x10], eax
call fcn.1400c8fe0
mov ecx, dword [0x14013b660]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140019128
mov rcx, qword [0x1401447c8]
shl rcx, 4
mov qword [rax + rcx], r14
mov ecx, dword [0x1401447d0]
mov rdx, qword [0x1401447c8]
shl rdx, 4
mov dword [rax + rdx + 8], ecx
mov r15, qword [rbx + 0x30]
mov rax, qword [rbx + 0x38]
cmp r15, rax
jb 0x140019013
mov rdx, qword [rbx + 0x28]
sub r15, rdx
sar r15, 3
lea r8, [r15 + 1]
mov rcx, r8
shr rcx, 0x3d
jne 0x14001913b
movabs rcx, 0x1fffffffffffffff
sub rax, rdx
mov r12, rax
sar r12, 2
cmp r12, r8
cmovbe r12, r8
movabs rdx, 0x7ffffffffffffff8
cmp rax, rdx
cmovae r12, rcx
test r12, r12
je 0x140019140
cmp r12, rcx
ja 0x140019147
lea rcx, [r12*8]
call fcn.14009633c
shl r15, 3
add r15, rax
je 0x14001914c
lea rax, [rax + r12*8]
mov qword [r15], r14
lea rcx, [r15 + 8]
mov r14, qword [rbx + 0x28]
mov rdx, qword [rbx + 0x30]
cmp rdx, r14
je 0x1400190a7
mov r8, qword [rdx - 8]
mov qword [rdx - 8], 0
lea r9, [rdx - 8]
mov qword [r15 - 8], r8
add r15, 0xfffffffffffffff8
mov rdx, r9
cmp r9, r14
jne 0x140018fa4
mov r14, qword [rbx + 0x28]
mov r12, qword [rbx + 0x30]
mov qword [rbx + 0x28], r15
mov qword [rbx + 0x30], rcx
mov qword [rbx + 0x38], rax
cmp r12, r14
je 0x140019004
mov r15, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, qword [r12 - 8]
mov qword [r12 - 8], 0
add r12, 0xfffffffffffffff8
test rbx, rbx
jne 0x1400190b8
cmp r12, r14
jne 0x140018fe4
test r14, r14
je 0x140019027
mov rcx, r14
call fcn.140096334
jmp 0x140019027
test r15, r15
je 0x14001914f
mov qword [r15], r14
add r15, 8
mov qword [rbx + 0x30], r15
mov rbx, qword [0x1401447c0]
mov rax, qword [0x14012dfa0]
and rax, rbx
cmp rax, qword [0x14012df88]
jne 0x140019049
mov rcx, rbx
call fcn.140062440
mov ecx, 0x30
call fcn.14009633c
mov dword [rax], 1
lea rcx, [0x1400334b0]
mov qword [rax + 8], rcx
lea rcx, [0x1400334e0]
mov qword [rax + 0x10], rcx
lea rcx, [0x1400e2a40]
mov qword [rax + 0x18], rcx
lea rcx, [0x140036350]
mov qword [rax + 0x20], rcx
mov qword [rax + 0x28], rbx
mov qword [rsi], rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov rax, rsi
add rsp, 0x20
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
mov qword [rbx + 0x28], r15
mov qword [rbx + 0x30], rcx
mov qword [rbx + 0x38], rax
jmp 0x140019004
call fcn.1400c8fe0
mov ecx, dword [0x14013b660]
call r15
and rax, 0xfffffffffffffffc
je 0x1400190f4
mov rcx, qword [0x1401447c8]
shl rcx, 4
mov qword [rax + rcx], 0
mov ecx, dword [0x1401447d0]
mov rdx, qword [0x1401447c8]
shl rdx, 4
mov dword [rax + rdx + 8], ecx
mov rcx, qword [rbx + 8]
test rcx, rcx
jne 0x14001910a
mov rcx, rbx
call fcn.140096334
jmp 0x140018fff
lock dec dword [rcx]
jne 0x1400190fd
mov rax, qword [rcx + 0x10]
call qword [0x140150008]
jmp 0x1400190fd
mov rcx, rdi
call fcn.140062160
jmp 0x140018e8c
test r14, r14
je 0x140018f03
call fcn.1400051d0
jmp 0x140018edf
call fcn.1400ae5f0
xor eax, eax
jmp 0x140018f7b
call fcn.1400c9bf0
int3
int3