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

Disassembly:
mov rax, rsp
push rbp
push r13
mov rbp, rsp
sub rsp, 0x78
mov r13, qword [rcx]
test r13, r13
je 0x1400cbc5d
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov qword [rax - 0x18], r12
xor esi, esi
mov qword [rax - 0x20], r14
mov qword [rax - 0x28], r15
or r14, 0xffffffffffffffff
lea r15, [r13 + 0x30]
mov edi, esi
nop dword [rax]
inc edi
lea rcx, [rbp - 0x58]
mov qword [rbp - 0x58], r15
mov qword [rbp - 0x40], rsi
mov qword [rbp - 0x48], rsi
mov qword [rbp - 0x50], rsi
xchg qword [r15], rcx
mov r12d, esi
mov dword [rbp + 0x18], edi
test rcx, rcx
je 0x1400cb71f
lea rax, [rbp - 0x58]
mov qword [rcx + 8], rax
xor eax, eax
lock cmpxchg qword [rcx + 0x18], r14
je 0x1400cb6df
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rax, rsi
lock xadd qword [rbp - 0x48], rax
test rax, rax
jne 0x1400cb71f
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rbx, rax
xor eax, eax
lock cmpxchg qword [rbp - 0x48], rbx
jne 0x1400cb716
or edx, 0xffffffff
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [r13 + 0x58]
mov rcx, rsi
mov qword [r13 + 0x60], rax
mov rdx, qword [rbp - 0x58]
lock xadd qword [rbp - 0x50], rcx
test rcx, rcx
jne 0x1400cb794
lea rax, [rbp - 0x58]
lock cmpxchg qword [rdx], rsi
lea rcx, [rbp - 0x58]
cmp rcx, rax
je 0x1400cb7b0
mov rax, rsi
lock xadd qword [rbp - 0x40], rax
test rax, rax
jne 0x1400cb78b
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rbx, rax
xor eax, eax
lock cmpxchg qword [rbp - 0x40], rbx
jne 0x1400cb782
or edx, 0xffffffff
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
lock xadd qword [rbp - 0x50], rcx
xor eax, eax
lock cmpxchg qword [rcx + 0x10], r14
je 0x1400cb7b0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
nop word [rax + rax]
lea rcx, [rbp - 0x58]
mov qword [rbp - 0x58], r15
mov qword [rbp - 0x40], rsi
mov qword [rbp - 0x48], rsi
mov qword [rbp - 0x50], rsi
xchg qword [r15], rcx
test rcx, rcx
je 0x1400cb827
lea rax, [rbp - 0x58]
mov qword [rcx + 8], rax
xor eax, eax
lock cmpxchg qword [rcx + 0x18], r14
je 0x1400cb7e7
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rax, rsi
lock xadd qword [rbp - 0x48], rax
test rax, rax
jne 0x1400cb827
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rbx, rax
xor eax, eax
lock cmpxchg qword [rbp - 0x48], rbx
jne 0x1400cb81e
or edx, 0xffffffff
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [r13 + 0x60]
test rbx, rbx
je 0x1400cbbad
mov rcx, qword [rbx + 8]
lea rdx, [rbp - 0x38]
mov qword [rbp - 0x20], rsi
add rcx, 0x10
mov qword [rbp - 0x28], rsi
mov qword [rbp - 0x30], rsi
mov qword [rbp - 0x38], rcx
xor eax, eax
lock cmpxchg qword [rcx], rdx
je 0x1400cb8ea
mov rdx, qword [rbp - 0x58]
mov rcx, rsi
lock xadd qword [rbp - 0x50], rcx
test rcx, rcx
jne 0x1400cb8ca
lea rax, [rbp - 0x58]
lock cmpxchg qword [rdx], rsi
lea rcx, [rbp - 0x58]
cmp rcx, rax
je 0x1400cb8dd
mov rax, rsi
lock xadd qword [rbp - 0x40], rax
test rax, rax
jne 0x1400cb8c1
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rbx, rax
xor eax, eax
lock cmpxchg qword [rbp - 0x40], rbx
jne 0x1400cb8b8
or edx, 0xffffffff
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
lock xadd qword [rbp - 0x50], rcx
xor eax, eax
lock cmpxchg qword [rcx + 0x10], r14
je 0x1400cb8dd
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1400cb7b0
mov rax, qword [rbx + 0x10]
mov qword [r13 + 0x60], rax
mov rdi, qword [rbx + 8]
mov ecx, dword [rdi]
mov r14, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [rdi]
xor edx, edx
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov edi, dword [rbp + 0x18]
test rsi, rsi
je 0x1400cba44
cmp edi, 4
jg 0x1400cba44
mov rdx, qword [rbp - 0x58]
xor ebx, ebx
mov ecx, ebx
lock xadd qword [rbp - 0x50], rcx
test rcx, rcx
jne 0x1400cb993
lea rax, [rbp - 0x58]
lock cmpxchg qword [rdx], rbx
lea rcx, [rbp - 0x58]
cmp rcx, rax
je 0x1400cb9aa
mov eax, ebx
lock xadd qword [rbp - 0x40], rax
test rax, rax
jne 0x1400cb98a
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rbx, rax
xor eax, eax
lock cmpxchg qword [rbp - 0x40], rbx
jne 0x1400cb97f
or edx, 0xffffffff
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
mov rcx, rbx
lock xadd qword [rbp - 0x50], rcx
xor eax, eax
or rdx, 0xffffffffffffffff
lock cmpxchg qword [rcx + 0x10], rdx
je 0x1400cb9aa
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rdx, qword [rbp - 0x38]
mov rcx, rbx
lock xadd qword [rbp - 0x30], rcx
test rcx, rcx
jne 0x1400cba19
lea rax, [rbp - 0x38]
lock cmpxchg qword [rdx], rbx
lea rcx, [rbp - 0x38]
cmp rcx, rax
je 0x1400cba30
mov rax, rbx
lock xadd qword [rbp - 0x20], rax
test rax, rax
jne 0x1400cba10
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rbx, rax
xor eax, eax
lock cmpxchg qword [rbp - 0x20], rbx
jne 0x1400cba05
or edx, 0xffffffff
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
mov rcx, rbx
lock xadd qword [rbp - 0x30], rcx
xor eax, eax
or rdx, 0xffffffffffffffff
lock cmpxchg qword [rcx + 0x10], rdx
je 0x1400cba30
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rsi
inc r12d
call r14
xor esi, esi
or r14, 0xffffffffffffffff
jmp 0x1400cb7b0
mov rcx, qword [rbx + 0x20]
mov rax, qword [rbx + 0x10]
test rcx, rcx
je 0x1400cba55
mov qword [rcx + 0x10], rax
test rax, rax
je 0x1400cba5e
mov qword [rax + 0x20], rcx
mov rcx, qword [rbx]
cmp qword [rcx + 0x58], rbx
jne 0x1400cba6b
mov qword [rcx + 0x58], rax
mov rcx, qword [rbx]
cmp qword [rcx + 0x60], rbx
jne 0x1400cba78
mov qword [rcx + 0x60], rax
mov rcx, qword [rbx + 0x28]
mov rax, qword [rbx + 0x18]
test rcx, rcx
je 0x1400cba89
mov qword [rcx + 0x18], rax
test rax, rax
je 0x1400cba92
mov qword [rax + 0x28], rcx
mov rcx, qword [rbx + 8]
cmp qword [rcx + 0x18], rbx
jne 0x1400cbaa0
mov qword [rcx + 0x18], rax
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdx, qword [rbp - 0x58]
xor esi, esi
mov ecx, esi
lock xadd qword [rbp - 0x50], rcx
test rcx, rcx
jne 0x1400cbb16
lea rax, [rbp - 0x58]
lock cmpxchg qword [rdx], rsi
lea rcx, [rbp - 0x58]
cmp rcx, rax
je 0x1400cbb2f
mov eax, esi
lock xadd qword [rbp - 0x40], rax
test rax, rax
jne 0x1400cbb0d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rbx, rax
xor eax, eax
lock cmpxchg qword [rbp - 0x40], rbx
jne 0x1400cbb04
or edx, 0xffffffff
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
lock xadd qword [rbp - 0x50], rcx
xor eax, eax
or r14, 0xffffffffffffffff
lock cmpxchg qword [rcx + 0x10], r14
je 0x1400cbb33
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x1400cbb33
or r14, 0xffffffffffffffff
mov rdx, qword [rbp - 0x38]
mov rcx, rsi
lock xadd qword [rbp - 0x30], rcx
test rcx, rcx
jne 0x1400cb794
lea rax, [rbp - 0x38]
lock cmpxchg qword [rdx], rsi
lea rcx, [rbp - 0x38]
cmp rcx, rax
je 0x1400cb7b0
mov rax, rsi
lock xadd qword [rbp - 0x20], rax
test rax, rax
jne 0x1400cbb9f
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rbx, rax
xor eax, eax
lock cmpxchg qword [rbp - 0x20], rbx
jne 0x1400cbb96
or edx, 0xffffffff
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
lock xadd qword [rbp - 0x30], rcx
jmp 0x1400cb794
mov rdx, qword [rbp - 0x58]
mov rcx, rsi
lock xadd qword [rbp - 0x50], rcx
test rcx, rcx
jne 0x1400cbc1a
lea rax, [rbp - 0x58]
lock cmpxchg qword [rdx], rsi
lea rcx, [rbp - 0x58]
cmp rcx, rax
je 0x1400cbc2d
mov rax, rsi
lock xadd qword [rbp - 0x40], rax
test rax, rax
jne 0x1400cbc11
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rbx, rax
xor eax, eax
lock cmpxchg qword [rbp - 0x40], rbx
jne 0x1400cbc08
or edx, 0xffffffff
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
lock xadd qword [rbp - 0x50], rcx
xor eax, eax
lock cmpxchg qword [rcx + 0x10], r14
je 0x1400cbc2d
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
test r12d, r12d
jne 0x1400cb6a0
mov r15, qword [rsp + 0x60]
mov r14, qword [rsp + 0x68]
mov r12, qword [rsp + 0x70]
mov rdi, qword [rsp + 0xa8]
mov rsi, qword [rsp + 0xa0]
mov rbx, qword [rsp + 0x98]
add rsp, 0x78
pop r13
pop rbp
ret