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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
mov rsi, qword [rcx]
test rsi, rsi
jne 0x1402e2860
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea r15, [rsp + 0x60]
mov dword [rsp + 0x3c], 0
lea rbp, [rsi + 0x30]
lea rbx, [rsp + 0x40]
lea r14, [r15 + 8]
add dword [rsp + 0x3c], 1
mov qword [rsp + 0x40], rbp
mov rcx, rbx
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
xchg qword [rbp], rcx
test rcx, rcx
je 0x1402e28e4
mov qword [rcx + 8], rbx
lea rdx, [rcx + 0x18]
xor eax, eax
mov rcx, 0xffffffffffffffff
lock cmpxchg qword [rdx], rcx
test rax, rax
mov rcx, rax
je 0x1402e28cf
call qword [sym.imp.KERNEL32.dll_SetEvent]
lea r12, [rbx + 0x10]
xor edi, edi
lock xadd qword [r12], rdi
test rdi, rdi
je 0x1402e2dd3
mov rax, qword [rsi + 0x58]
xor edx, edx
mov r8, qword [rsp + 0x40]
mov qword [rsi + 0x60], rax
lea rax, [rbx + 8]
lock xadd qword [rax], rdx
test rdx, rdx
mov rcx, rdx
je 0x1402e2e75
add rcx, 0x10
xor eax, eax
mov rdx, 0xffffffffffffffff
lock cmpxchg qword [rcx], rdx
test rax, rax
mov rcx, rax
je 0x1402e2928
call qword [sym.imp.KERNEL32.dll_SetEvent]
xor edi, edi
nop word [rax + rax]
mov qword [rsp + 0x40], rbp
mov rcx, rbx
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
xchg qword [rbp], rcx
test rcx, rcx
je 0x1402e2996
mov qword [rcx + 8], rbx
lea rdx, [rcx + 0x18]
xor eax, eax
mov rcx, 0xffffffffffffffff
lock cmpxchg qword [rdx], rcx
test rax, rax
mov rcx, rax
je 0x1402e2980
call qword [sym.imp.KERNEL32.dll_SetEvent]
lea r13, [rbx + 0x10]
xor r12d, r12d
lock xadd qword [r13], r12
test r12, r12
je 0x1402e2a25
mov r9, qword [rsi + 0x60]
test r9, r9
je 0x1402e2a60
mov rax, qword [r9 + 8]
xor edx, edx
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x68], 0
lea r8, [rax + 0x10]
mov rax, rdx
mov qword [rsp + 0x60], r8
lock cmpxchg qword [r8], r15
test rax, rax
je 0x1402e2ab0
mov r8, qword [rsp + 0x40]
lea rcx, [rbx + 8]
lock xadd qword [rcx], rdx
test rdx, rdx
mov rcx, rdx
je 0x1402e2da0
lea rdx, [rcx + 0x10]
xor eax, eax
mov rcx, 0xffffffffffffffff
lock cmpxchg qword [rdx], rcx
test rax, rax
mov rcx, rax
je 0x1402e2a18
call qword [sym.imp.KERNEL32.dll_SetEvent]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1402e2930
xor r8d, r8d
xor r9d, r9d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov r8, rax
mov rax, r12
lock cmpxchg qword [r13], r8
test rax, rax
je 0x1402e2c70
mov rcx, r8
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r9, qword [rsi + 0x60]
test r9, r9
jne 0x1402e29a3
mov r8, qword [rsp + 0x40]
lea rax, [rbx + 8]
mov rdx, r9
lock xadd qword [rax], rdx
test rdx, rdx
mov rcx, rdx
je 0x1402e2e42
add rcx, 0x10
xor eax, eax
mov rdx, 0xffffffffffffffff
lock cmpxchg qword [rcx], rdx
test rax, rax
mov rcx, rax
je 0x1402e2a9d
call qword [sym.imp.KERNEL32.dll_SetEvent]
test edi, edi
jne 0x1402e287a
jmp 0x1402e284b
mov r10, qword [r9 + 8]
mov qword [rsp + 0x30], rax
mov rax, qword [r9 + 0x10]
mov qword [rsp + 0x28], r9
mov ecx, dword [r10]
mov qword [rsp + 0x20], r10
mov r13, qword [r10 + 8]
mov qword [rsi + 0x60], rax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r10, qword [rsp + 0x20]
xor edx, edx
mov r12, rax
mov ecx, dword [r10]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test r12, r12
mov r9, qword [rsp + 0x28]
je 0x1402e2b90
cmp dword [rsp + 0x3c], 4
mov r8, qword [rsp + 0x30]
jg 0x1402e2b90
mov r9, qword [rsp + 0x40]
lea rdx, [rbx + 8]
lock xadd qword [rdx], r8
test r8, r8
mov rcx, r8
je 0x1402e2d30
add rcx, 0x10
xor eax, eax
mov rdx, 0xffffffffffffffff
lock cmpxchg qword [rcx], rdx
test rax, rax
mov rcx, rax
je 0x1402e2b43
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov r8, qword [rsp + 0x60]
xor edx, edx
lock xadd qword [r14], rdx
test rdx, rdx
mov rcx, rdx
je 0x1402e2d00
add rcx, 0x10
xor eax, eax
mov rdx, 0xffffffffffffffff
lock cmpxchg qword [rcx], rdx
test rax, rax
mov rcx, rax
je 0x1402e2b7b
call qword [sym.imp.KERNEL32.dll_SetEvent]
add edi, 1
mov rcx, r12
call r13
jmp 0x1402e2930
mov rdx, qword [r9 + 0x20]
mov rax, qword [r9 + 0x10]
test rdx, rdx
je 0x1402e2ba1
mov qword [rdx + 0x10], rax
test rax, rax
je 0x1402e2baa
mov qword [rax + 0x20], rdx
mov rdx, qword [r9]
cmp r9, qword [rdx + 0x58]
je 0x1402e2d90
cmp r9, qword [rdx + 0x60]
je 0x1402e2d80
mov rdx, qword [r9 + 0x28]
mov rax, qword [r9 + 0x18]
test rdx, rdx
je 0x1402e2bd2
mov qword [rdx + 0x18], rax
test rax, rax
je 0x1402e2bdb
mov qword [rax + 0x28], rdx
mov rdx, qword [r9 + 8]
cmp r9, qword [rdx + 0x18]
je 0x1402e2d70
mov rcx, r9
call sym.free
mov r8, qword [rsp + 0x40]
lea rcx, [rbx + 8]
xor edx, edx
lock xadd qword [rcx], rdx
test rdx, rdx
mov rcx, rdx
je 0x1402e2cc3
add rcx, 0x10
xor eax, eax
mov rdx, 0xffffffffffffffff
lock cmpxchg qword [rcx], rdx
test rax, rax
mov rcx, rax
je 0x1402e2c2d
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov r8, qword [rsp + 0x60]
xor edx, edx
lock xadd qword [r14], rdx
test rdx, rdx
mov rcx, rdx
je 0x1402e2c90
add rcx, 0x10
xor eax, eax
mov rdx, 0xffffffffffffffff
lock cmpxchg qword [rcx], rdx
test rax, rax
mov rcx, rax
je 0x1402e2930
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x1402e2930
mov rcx, r8
mov qword [rsp + 0x20], r8
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov r8, qword [rsp + 0x20]
jmp 0x1402e2a4a
mov rax, r15
lock cmpxchg qword [r8], rdx
cmp r15, rax
je 0x1402e2930
lea r13, [r15 + 0x18]
mov r12, rdx
lock xadd qword [r13], r12
test r12, r12
je 0x1402e2f10
xor ecx, ecx
lock xadd qword [r14], rcx
jmp 0x1402e2c41
mov rax, rbx
lock cmpxchg qword [r8], rdx
cmp rbx, rax
je 0x1402e2c2d
lea rcx, [rbx + 0x18]
lock xadd qword [rcx], rdx
test rdx, rdx
je 0x1402e2ec0
lea rax, [rbx + 8]
xor ecx, ecx
lock xadd qword [rax], rcx
jmp 0x1402e2c0d
mov rax, r15
lock cmpxchg qword [r8], rdx
cmp r15, rax
je 0x1402e2b7b
lea rcx, [r15 + 0x18]
lock xadd qword [rcx], rdx
test rdx, rdx
je 0x1402e2eb0
xor ecx, ecx
lock xadd qword [r14], rcx
jmp 0x1402e2b5b
mov rax, rbx
lock cmpxchg qword [r9], r8
cmp rbx, rax
je 0x1402e2b43
lea r10, [rbx + 0x18]
mov r11, r8
lock xadd qword [r10], r11
test r11, r11
je 0x1402e2ed0
lea rax, [rbx + 8]
xor ecx, ecx
lock xadd qword [rax], rcx
jmp 0x1402e2b23
mov qword [rdx + 0x18], rax
jmp 0x1402e2be9
mov qword [rdx + 0x60], rax
jmp 0x1402e2bc1
mov qword [rdx + 0x58], rax
jmp 0x1402e2bb7
mov rax, rbx
lock cmpxchg qword [r8], rdx
cmp rbx, rax
je 0x1402e2a18
lea r13, [rbx + 0x18]
mov r12, rdx
lock xadd qword [r13], r12
test r12, r12
je 0x1402e2e02
lea rax, [rbx + 8]
xor ecx, ecx
lock xadd qword [rax], rcx
jmp 0x1402e29f8
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov r13, rax
mov rax, rdi
lock cmpxchg qword [r12], r13
test rax, rax
je 0x1402e2e32
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1402e28e4
xor r8d, r8d
xor r9d, r9d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov r8, rax
mov rax, r12
lock cmpxchg qword [r13], r8
test rax, rax
je 0x1402e2f85
mov rcx, r8
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1402e2dc3
mov edx, 0xffffffff
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x1402e2df4
mov rax, rbx
lock cmpxchg qword [r8], rdx
cmp rbx, rax
je 0x1402e2a9d
lea rcx, [rbx + 0x18]
lock xadd qword [rcx], rdx
test rdx, rdx
je 0x1402e2f7b
lea rax, [rbx + 8]
xor ecx, ecx
lock xadd qword [rax], rcx
jmp 0x1402e2a7d
mov rax, rbx
lock cmpxchg qword [r8], rdx
cmp rbx, rax
je 0x1402e2928
lea rcx, [rbx + 0x18]
lock xadd qword [rcx], rdx
test rdx, rdx
je 0x1402e2f71
lea rax, [rbx + 8]
xor ecx, ecx
lock xadd qword [rax], rcx
jmp 0x1402e2908
call sym.ptw32_mcs_flag_wait.part.0
jmp 0x1402e2d23
call sym.ptw32_mcs_flag_wait.part.0
jmp 0x1402e2ce6
mov qword [rsp + 0x28], r10
xor r9d, r9d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], r11
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov r11, qword [rsp + 0x20]
mov r9, rax
mov r10, qword [rsp + 0x28]
mov rax, r11
lock cmpxchg qword [r10], r9
test rax, rax
je 0x1402e2f3d
mov rcx, r9
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1402e2d56
xor r8d, r8d
xor r9d, r9d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov r8, rax
mov rax, r12
lock cmpxchg qword [r13], r8
test rax, rax
je 0x1402e2f57
mov rcx, r8
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1402e2cb7
mov rcx, r9
mov qword [rsp + 0x20], r9
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov r9, qword [rsp + 0x20]
jmp 0x1402e2f01
mov rcx, r8
mov qword [rsp + 0x20], r8
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov r8, qword [rsp + 0x20]
jmp 0x1402e2f2f
call sym.ptw32_mcs_flag_wait.part.0
jmp 0x1402e2e98
call sym.ptw32_mcs_flag_wait.part.0
jmp 0x1402e2e65
mov rcx, r8
mov qword [rsp + 0x20], r8
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov r8, qword [rsp + 0x20]
jmp 0x1402e2e27