Function at 0x1401b7900
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 0x1401b7efd
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 0x1401b79bf
lea rax, [rbp - 0x58]
mov qword [rcx + 8], rax
xor eax, eax
lock cmpxchg qword [rcx + 0x18], r14
je 0x1401b797f
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rax, rsi
lock xadd qword [rbp - 0x48], rax
test rax, rax
jne 0x1401b79bf
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 0x1401b79b6
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 0x1401b7a34
lea rax, [rbp - 0x58]
lock cmpxchg qword [rdx], rsi
lea rcx, [rbp - 0x58]
cmp rcx, rax
je 0x1401b7a50
mov rax, rsi
lock xadd qword [rbp - 0x40], rax
test rax, rax
jne 0x1401b7a2b
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 0x1401b7a22
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 0x1401b7a50
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 0x1401b7ac7
lea rax, [rbp - 0x58]
mov qword [rcx + 8], rax
xor eax, eax
lock cmpxchg qword [rcx + 0x18], r14
je 0x1401b7a87
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rax, rsi
lock xadd qword [rbp - 0x48], rax
test rax, rax
jne 0x1401b7ac7
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 0x1401b7abe
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 0x1401b7e4d
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 0x1401b7b8a
mov rdx, qword [rbp - 0x58]
mov rcx, rsi
lock xadd qword [rbp - 0x50], rcx
test rcx, rcx
jne 0x1401b7b6a
lea rax, [rbp - 0x58]
lock cmpxchg qword [rdx], rsi
lea rcx, [rbp - 0x58]
cmp rcx, rax
je 0x1401b7b7d
mov rax, rsi
lock xadd qword [rbp - 0x40], rax
test rax, rax
jne 0x1401b7b61
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 0x1401b7b58
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 0x1401b7b7d
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1401b7a50
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 0x1401b7ce4
cmp edi, 4
jg 0x1401b7ce4
mov rdx, qword [rbp - 0x58]
xor ebx, ebx
mov ecx, ebx
lock xadd qword [rbp - 0x50], rcx
test rcx, rcx
jne 0x1401b7c33
lea rax, [rbp - 0x58]
lock cmpxchg qword [rdx], rbx
lea rcx, [rbp - 0x58]
cmp rcx, rax
je 0x1401b7c4a
mov eax, ebx
lock xadd qword [rbp - 0x40], rax
test rax, rax
jne 0x1401b7c2a
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 0x1401b7c1f
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 0x1401b7c4a
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 0x1401b7cb9
lea rax, [rbp - 0x38]
lock cmpxchg qword [rdx], rbx
lea rcx, [rbp - 0x38]
cmp rcx, rax
je 0x1401b7cd0
mov rax, rbx
lock xadd qword [rbp - 0x20], rax
test rax, rax
jne 0x1401b7cb0
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 0x1401b7ca5
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 0x1401b7cd0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rsi
inc r12d
call r14
xor esi, esi
or r14, 0xffffffffffffffff
jmp 0x1401b7a50
mov rcx, qword [rbx + 0x20]
mov rax, qword [rbx + 0x10]
test rcx, rcx
je 0x1401b7cf5
mov qword [rcx + 0x10], rax
test rax, rax
je 0x1401b7cfe
mov qword [rax + 0x20], rcx
mov rcx, qword [rbx]
cmp qword [rcx + 0x58], rbx
jne 0x1401b7d0b
mov qword [rcx + 0x58], rax
mov rcx, qword [rbx]
cmp qword [rcx + 0x60], rbx
jne 0x1401b7d18
mov qword [rcx + 0x60], rax
mov rcx, qword [rbx + 0x28]
mov rax, qword [rbx + 0x18]
test rcx, rcx
je 0x1401b7d29
mov qword [rcx + 0x18], rax
test rax, rax
je 0x1401b7d32
mov qword [rax + 0x28], rcx
mov rcx, qword [rbx + 8]
cmp qword [rcx + 0x18], rbx
jne 0x1401b7d40
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 0x1401b7db6
lea rax, [rbp - 0x58]
lock cmpxchg qword [rdx], rsi
lea rcx, [rbp - 0x58]
cmp rcx, rax
je 0x1401b7dcf
mov eax, esi
lock xadd qword [rbp - 0x40], rax
test rax, rax
jne 0x1401b7dad
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 0x1401b7da4
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 0x1401b7dd3
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x1401b7dd3
or r14, 0xffffffffffffffff
mov rdx, qword [rbp - 0x38]
mov rcx, rsi
lock xadd qword [rbp - 0x30], rcx
test rcx, rcx
jne 0x1401b7a34
lea rax, [rbp - 0x38]
lock cmpxchg qword [rdx], rsi
lea rcx, [rbp - 0x38]
cmp rcx, rax
je 0x1401b7a50
mov rax, rsi
lock xadd qword [rbp - 0x20], rax
test rax, rax
jne 0x1401b7e3f
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 0x1401b7e36
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 0x1401b7a34
mov rdx, qword [rbp - 0x58]
mov rcx, rsi
lock xadd qword [rbp - 0x50], rcx
test rcx, rcx
jne 0x1401b7eba
lea rax, [rbp - 0x58]
lock cmpxchg qword [rdx], rsi
lea rcx, [rbp - 0x58]
cmp rcx, rax
je 0x1401b7ecd
mov rax, rsi
lock xadd qword [rbp - 0x40], rax
test rax, rax
jne 0x1401b7eb1
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 0x1401b7ea8
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 0x1401b7ecd
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
test r12d, r12d
jne 0x1401b7940
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