Function at 0x140028910
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 0x140028f0d
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 0x1400289cf
lea rax, [rbp - 0x58]
mov qword [rcx + 8], rax
xor eax, eax
lock cmpxchg qword [rcx + 0x18], r14
je 0x14002898f
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rax, rsi
lock xadd qword [rbp - 0x48], rax
test rax, rax
jne 0x1400289cf
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 0x1400289c6
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 0x140028a44
lea rax, [rbp - 0x58]
lock cmpxchg qword [rdx], rsi
lea rcx, [rbp - 0x58]
cmp rcx, rax
je 0x140028a60
mov rax, rsi
lock xadd qword [rbp - 0x40], rax
test rax, rax
jne 0x140028a3b
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 0x140028a32
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 0x140028a60
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 0x140028ad7
lea rax, [rbp - 0x58]
mov qword [rcx + 8], rax
xor eax, eax
lock cmpxchg qword [rcx + 0x18], r14
je 0x140028a97
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rax, rsi
lock xadd qword [rbp - 0x48], rax
test rax, rax
jne 0x140028ad7
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 0x140028ace
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 0x140028e5d
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 0x140028b9a
mov rdx, qword [rbp - 0x58]
mov rcx, rsi
lock xadd qword [rbp - 0x50], rcx
test rcx, rcx
jne 0x140028b7a
lea rax, [rbp - 0x58]
lock cmpxchg qword [rdx], rsi
lea rcx, [rbp - 0x58]
cmp rcx, rax
je 0x140028b8d
mov rax, rsi
lock xadd qword [rbp - 0x40], rax
test rax, rax
jne 0x140028b71
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 0x140028b68
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 0x140028b8d
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140028a60
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 0x140028cf4
cmp edi, 4
jg 0x140028cf4
mov rdx, qword [rbp - 0x58]
xor ebx, ebx
mov ecx, ebx
lock xadd qword [rbp - 0x50], rcx
test rcx, rcx
jne 0x140028c43
lea rax, [rbp - 0x58]
lock cmpxchg qword [rdx], rbx
lea rcx, [rbp - 0x58]
cmp rcx, rax
je 0x140028c5a
mov eax, ebx
lock xadd qword [rbp - 0x40], rax
test rax, rax
jne 0x140028c3a
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 0x140028c2f
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 0x140028c5a
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 0x140028cc9
lea rax, [rbp - 0x38]
lock cmpxchg qword [rdx], rbx
lea rcx, [rbp - 0x38]
cmp rcx, rax
je 0x140028ce0
mov rax, rbx
lock xadd qword [rbp - 0x20], rax
test rax, rax
jne 0x140028cc0
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 0x140028cb5
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 0x140028ce0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rsi
inc r12d
call r14
xor esi, esi
or r14, 0xffffffffffffffff
jmp 0x140028a60
mov rcx, qword [rbx + 0x20]
mov rax, qword [rbx + 0x10]
test rcx, rcx
je 0x140028d05
mov qword [rcx + 0x10], rax
test rax, rax
je 0x140028d0e
mov qword [rax + 0x20], rcx
mov rcx, qword [rbx]
cmp qword [rcx + 0x58], rbx
jne 0x140028d1b
mov qword [rcx + 0x58], rax
mov rcx, qword [rbx]
cmp qword [rcx + 0x60], rbx
jne 0x140028d28
mov qword [rcx + 0x60], rax
mov rcx, qword [rbx + 0x28]
mov rax, qword [rbx + 0x18]
test rcx, rcx
je 0x140028d39
mov qword [rcx + 0x18], rax
test rax, rax
je 0x140028d42
mov qword [rax + 0x28], rcx
mov rcx, qword [rbx + 8]
cmp qword [rcx + 0x18], rbx
jne 0x140028d50
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 0x140028dc6
lea rax, [rbp - 0x58]
lock cmpxchg qword [rdx], rsi
lea rcx, [rbp - 0x58]
cmp rcx, rax
je 0x140028ddf
mov eax, esi
lock xadd qword [rbp - 0x40], rax
test rax, rax
jne 0x140028dbd
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 0x140028db4
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 0x140028de3
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x140028de3
or r14, 0xffffffffffffffff
mov rdx, qword [rbp - 0x38]
mov rcx, rsi
lock xadd qword [rbp - 0x30], rcx
test rcx, rcx
jne 0x140028a44
lea rax, [rbp - 0x38]
lock cmpxchg qword [rdx], rsi
lea rcx, [rbp - 0x38]
cmp rcx, rax
je 0x140028a60
mov rax, rsi
lock xadd qword [rbp - 0x20], rax
test rax, rax
jne 0x140028e4f
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 0x140028e46
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 0x140028a44
mov rdx, qword [rbp - 0x58]
mov rcx, rsi
lock xadd qword [rbp - 0x50], rcx
test rcx, rcx
jne 0x140028eca
lea rax, [rbp - 0x58]
lock cmpxchg qword [rdx], rsi
lea rcx, [rbp - 0x58]
cmp rcx, rax
je 0x140028edd
mov rax, rsi
lock xadd qword [rbp - 0x40], rax
test rax, rax
jne 0x140028ec1
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 0x140028eb8
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 0x140028edd
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
test r12d, r12d
jne 0x140028950
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