Function at 0x18006ea50
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r13
push r14
mov rbp, rsp
sub rsp, 0x60
mov qword [rbp - 0x38], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov r12, rdx
mov r14, rcx
mov ecx, dword [0x180205148]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
mov dword [rbp + 0x40], eax
lea edx, [rax + 1]
mov ecx, dword [0x180205148]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [0x180209190]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
mov dword [rbp + 0x44], eax
lea edx, [rax + 1]
mov ecx, dword [0x180209190]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
nop
lea ecx, [rsi + rdi]
test ecx, ecx
jne 0x18006ec66
lea rsi, [r14 + 0x18]
mov qword [rbp - 0x28], rsi
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebx, eax
mov ecx, dword [rsi + 4]
cmp ecx, eax
jne 0x18006eae5
mov rax, qword [rbp - 0x28]
inc dword [rax]
jmp 0x18006eaff
mov rcx, qword [rbp - 0x28]
add rcx, 8
call fcn.180035b50
xchg dword [rsi + 4], ebx
mov rax, qword [rbp - 0x28]
mov dword [rax], 1
mov byte [rbp - 0x20], 1
mov rcx, qword [r14 + 0x38]
mov rax, qword [rcx + 8]
cmp byte [rax + 0x31], 0
jne 0x18006eb29
cmp qword [rax + 0x18], r12
jae 0x18006eb1d
mov rax, qword [rax + 0x10]
jmp 0x18006eb23
mov rcx, rax
mov rax, qword [rax]
cmp byte [rax + 0x31], 0
je 0x18006eb11
mov qword [rbp + 0x48], rcx
mov rax, qword [r14 + 0x38]
cmp rcx, rax
je 0x18006eb42
cmp r12, qword [rcx + 0x18]
jb 0x18006eb42
lea r8, [rbp + 0x48]
jmp 0x18006eb4a
mov qword [rbp - 0x40], rax
lea r8, [rbp - 0x40]
mov r8, qword [r8]
xor r13d, r13d
cmp r8, qword [r14 + 0x38]
je 0x18006ec1b
mov qword [rbp - 0x18], r13
mov qword [rbp - 0x10], r13
mov rdx, qword [r8 + 0x28]
mov r10, qword [r8 + 0x20]
test rdx, rdx
je 0x18006eb91
mov eax, dword [rdx + 8]
test eax, eax
je 0x18006eb91
lea ecx, [rax + 1]
lock cmpxchg dword [rdx + 8], ecx
je 0x18006eb89
mov eax, dword [rdx + 8]
test eax, eax
jne 0x18006eb76
jmp 0x18006eb91
mov qword [rbp - 0x10], rdx
mov qword [rbp - 0x18], r10
lea rdx, [rbp - 0x30]
lea rcx, [r14 + 0x30]
call fcn.18005ca90
mov rax, qword [rbp - 0x28]
dec dword [rax]
jne 0x18006ebdf
mov eax, r13d
xchg dword [rsi + 4], eax
mov rcx, qword [rbp - 0x28]
add rcx, 8
mov eax, 0x80000000
lock xadd dword [rcx], eax
bt eax, 0x1e
jb 0x18006ebdf
cmp eax, 0x80000000
jle 0x18006ebdf
lock bts dword [rcx], 0x1e
jb 0x18006ebdf
call fcn.180035ad0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov byte [rbp - 0x20], 0
mov dl, 1
mov rcx, qword [r14 + 0x50]
call fcn.18006da50
nop
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x18006ec1b
lock dec dword [rcx + 8]
jne 0x18006ec1b
mov rbx, qword [rbp - 0x10]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock dec dword [rbx + 0xc]
jne 0x18006ec1b
mov rcx, qword [rbp - 0x10]
mov rax, qword [rcx]
call qword [rax + 8]
nop
cmp byte [rbp - 0x20], 0
je 0x18006ec60
mov rax, qword [rbp - 0x28]
dec dword [rax]
jne 0x18006ec60
xchg dword [rsi + 4], r13d
mov rcx, qword [rbp - 0x28]
add rcx, 8
mov eax, 0x80000000
lock xadd dword [rcx], eax
bt eax, 0x1e
jb 0x18006ec60
cmp eax, 0x80000000
jle 0x18006ec60
lock bts dword [rcx], 0x1e
jb 0x18006ec60
call fcn.180035ad0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov edi, dword [rbp + 0x40]
mov esi, dword [rbp + 0x44]
mov rdx, r12
mov rcx, qword [r14 + 0x10]
call fcn.180078670
mov ebx, eax
mov edx, esi
mov ecx, dword [0x180209190]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov edx, edi
mov ecx, dword [0x180205148]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, ebx
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rbp
ret