Function at 0x1402ee2b0
Capabilities:
Get thread local storage value

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
test rcx, rcx
je 0x1402ee360
mov rsi, qword [rcx]
mov ebx, dword [rcx + 8]
test rsi, rsi
jne 0x1402ee2df
test ebx, ebx
je 0x1402ee3a0
mov rdi, qword [0x14048b840]
test rdi, rdi
je 0x1402ee4a3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rdi]
mov ebp, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, ebp
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rdi, rdi
je 0x1402ee4a3
mov rdi, qword [rdi + 0x10]
test rdi, rdi
je 0x1402ee390
add ebx, 0xf423f
mov edx, 0x431bde83
mov eax, ebx
sar ebx, 0x1f
imul esi, esi, 0x3e8
imul edx
sar edx, 0x12
sub edx, ebx
mov ebx, dword [rdi + 0x18c]
lea ecx, [rdx + rsi]
test ebx, ebx
jne 0x1402ee380
mov edx, ecx
mov rsi, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rdi + 0x40]
call rsi
test eax, eax
je 0x1402ee3b4
cmp eax, 0x102
je 0x1402ee365
mov ebx, 0x16
mov eax, ebx
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
call qword [sym.imp.KERNEL32.dll_Sleep]
xor ebx, ebx
jmp 0x1402ee365
mov ebx, 0xc
jmp 0x1402ee365
call sym.pthread_testcancel
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
call sym.pthread_testcancel
jmp 0x1402ee365
mov qword [rsp + 0x78], 0
lea rax, [rdi + 0x38]
lea rbx, [rsp + 0x60]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x70], 0
mov rdx, rbx
mov qword [rsp + 0x68], 0
xchg qword [rax], rdx
test rdx, rdx
je 0x1402ee41d
mov qword [rdx + 8], rbx
xor eax, eax
add rdx, 0x18
mov rcx, 0xffffffffffffffff
lock cmpxchg qword [rdx], rcx
test rax, rax
mov rcx, rax
je 0x1402ee40c
call qword [sym.imp.KERNEL32.dll_SetEvent]
lea r12, [rbx + 0x10]
xor ebp, ebp
lock xadd qword [r12], rbp
test rbp, rbp
je 0x1402ee470
mov eax, dword [rdi + 0x28]
cmp eax, 3
jbe 0x1402ee5b5
mov r8, qword [rsp + 0x60]
lea rax, [rbx + 8]
xor edx, edx
lock xadd qword [rax], rdx
test rdx, rdx
mov rcx, rdx
je 0x1402ee570
add rcx, 0x10
xor eax, eax
mov rdx, 0xffffffffffffffff
lock cmpxchg qword [rcx], rdx
test rax, rax
mov rcx, rax
je 0x1402ee465
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov ebx, 3
jmp 0x1402ee365
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov r13, rax
mov rax, rbp
lock cmpxchg qword [r12], r13
test rax, rax
je 0x1402ee59f
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1402ee41d
lea r12, [rsp + 0x50]
mov rcx, r12
call sym.ptw32_new
mov rbp, qword [rsp + 0x50]
mov r14, qword [rsp + 0x58]
test rbp, rbp
mov rdi, rbp
je 0x1402ee390
or byte [rbp + 0x194], 1
mov dword [rbp + 0x184], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov r13, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rbp + 0x198], eax
call r13
mov qword [rsp + 0x48], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov r15, rax
call r13
lea r9, [rbp + 8]
mov r8, qword [rsp + 0x48]
mov rdx, r15
mov dword [rsp + 0x30], 2
mov rcx, rax
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x1402ee553
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov rcx, qword [0x14048b840]
mov rdx, rbp
mov dword [rbp + 0x188], eax
call sym.pthread_setspecific
jmp 0x1402ee31c
mov rcx, r12
mov qword [rsp + 0x50], rbp
mov ebx, 0xc
mov qword [rsp + 0x58], r14
call sym.ptw32_threadReusePush
jmp 0x1402ee365
mov rax, rbx
lock cmpxchg qword [r8], rdx
cmp rbx, rax
je 0x1402ee465
lea rcx, [rbx + 0x18]
lock xadd qword [rcx], rdx
test rdx, rdx
je 0x1402ee5ae
add rbx, 8
xor ecx, ecx
lock xadd qword [rbx], rcx
jmp 0x1402ee445
mov edx, 0xffffffff
mov rcx, r13
call rsi
jmp 0x1402ee495
call sym.ptw32_mcs_flag_wait.part.0
jmp 0x1402ee58f
mov rcx, rbx
mov dword [rdi + 0x28], 4
mov dword [rdi + 0x18c], 1
call sym.ptw32_mcs_lock_release
mov ecx, 2
call sym.ptw32_throw
nop
nop dword [rax]