Function at 0x1401ba400
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 0x1401ba9fd
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 0x1401ba4bf
lea rax, [rbp - 0x58]
mov qword [rcx + 8], rax
xor eax, eax
lock cmpxchg qword [rcx + 0x18], r14
je 0x1401ba47f
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rax, rsi
lock xadd qword [rbp - 0x48], rax
test rax, rax
jne 0x1401ba4bf
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 0x1401ba4b6
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 0x1401ba534
lea rax, [rbp - 0x58]
lock cmpxchg qword [rdx], rsi
lea rcx, [rbp - 0x58]
cmp rcx, rax
je 0x1401ba550
mov rax, rsi
lock xadd qword [rbp - 0x40], rax
test rax, rax
jne 0x1401ba52b
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 0x1401ba522
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 0x1401ba550
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 0x1401ba5c7
lea rax, [rbp - 0x58]
mov qword [rcx + 8], rax
xor eax, eax
lock cmpxchg qword [rcx + 0x18], r14
je 0x1401ba587
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rax, rsi
lock xadd qword [rbp - 0x48], rax
test rax, rax
jne 0x1401ba5c7
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 0x1401ba5be
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 0x1401ba94d
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 0x1401ba68a
mov rdx, qword [rbp - 0x58]
mov rcx, rsi
lock xadd qword [rbp - 0x50], rcx
test rcx, rcx
jne 0x1401ba66a
lea rax, [rbp - 0x58]
lock cmpxchg qword [rdx], rsi
lea rcx, [rbp - 0x58]
cmp rcx, rax
je 0x1401ba67d
mov rax, rsi
lock xadd qword [rbp - 0x40], rax
test rax, rax
jne 0x1401ba661
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 0x1401ba658
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 0x1401ba67d
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1401ba550
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 0x1401ba7e4
cmp edi, 4
jg 0x1401ba7e4
mov rdx, qword [rbp - 0x58]
xor ebx, ebx
mov ecx, ebx
lock xadd qword [rbp - 0x50], rcx
test rcx, rcx
jne 0x1401ba733
lea rax, [rbp - 0x58]
lock cmpxchg qword [rdx], rbx
lea rcx, [rbp - 0x58]
cmp rcx, rax
je 0x1401ba74a
mov eax, ebx
lock xadd qword [rbp - 0x40], rax
test rax, rax
jne 0x1401ba72a
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 0x1401ba71f
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 0x1401ba74a
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 0x1401ba7b9
lea rax, [rbp - 0x38]
lock cmpxchg qword [rdx], rbx
lea rcx, [rbp - 0x38]
cmp rcx, rax
je 0x1401ba7d0
mov rax, rbx
lock xadd qword [rbp - 0x20], rax
test rax, rax
jne 0x1401ba7b0
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 0x1401ba7a5
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 0x1401ba7d0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rsi
inc r12d
call r14
xor esi, esi
or r14, 0xffffffffffffffff
jmp 0x1401ba550
mov rcx, qword [rbx + 0x20]
mov rax, qword [rbx + 0x10]
test rcx, rcx
je 0x1401ba7f5
mov qword [rcx + 0x10], rax
test rax, rax
je 0x1401ba7fe
mov qword [rax + 0x20], rcx
mov rcx, qword [rbx]
cmp qword [rcx + 0x58], rbx
jne 0x1401ba80b
mov qword [rcx + 0x58], rax
mov rcx, qword [rbx]
cmp qword [rcx + 0x60], rbx
jne 0x1401ba818
mov qword [rcx + 0x60], rax
mov rcx, qword [rbx + 0x28]
mov rax, qword [rbx + 0x18]
test rcx, rcx
je 0x1401ba829
mov qword [rcx + 0x18], rax
test rax, rax
je 0x1401ba832
mov qword [rax + 0x28], rcx
mov rcx, qword [rbx + 8]
cmp qword [rcx + 0x18], rbx
jne 0x1401ba840
mov qword [rcx + 0x18], rax
mov rcx, rbx
call qword [sym.imp.MSVCR120.dll_free]
mov rdx, qword [rbp - 0x58]
xor esi, esi
mov ecx, esi
lock xadd qword [rbp - 0x50], rcx
test rcx, rcx
jne 0x1401ba8b6
lea rax, [rbp - 0x58]
lock cmpxchg qword [rdx], rsi
lea rcx, [rbp - 0x58]
cmp rcx, rax
je 0x1401ba8cf
mov eax, esi
lock xadd qword [rbp - 0x40], rax
test rax, rax
jne 0x1401ba8ad
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 0x1401ba8a4
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 0x1401ba8d3
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x1401ba8d3
or r14, 0xffffffffffffffff
mov rdx, qword [rbp - 0x38]
mov rcx, rsi
lock xadd qword [rbp - 0x30], rcx
test rcx, rcx
jne 0x1401ba534
lea rax, [rbp - 0x38]
lock cmpxchg qword [rdx], rsi
lea rcx, [rbp - 0x38]
cmp rcx, rax
je 0x1401ba550
mov rax, rsi
lock xadd qword [rbp - 0x20], rax
test rax, rax
jne 0x1401ba93f
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 0x1401ba936
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 0x1401ba534
mov rdx, qword [rbp - 0x58]
mov rcx, rsi
lock xadd qword [rbp - 0x50], rcx
test rcx, rcx
jne 0x1401ba9ba
lea rax, [rbp - 0x58]
lock cmpxchg qword [rdx], rsi
lea rcx, [rbp - 0x58]
cmp rcx, rax
je 0x1401ba9cd
mov rax, rsi
lock xadd qword [rbp - 0x40], rax
test rax, rax
jne 0x1401ba9b1
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 0x1401ba9a8
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 0x1401ba9cd
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
test r12d, r12d
jne 0x1401ba440
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