Function at 0x14019a760
Capabilities:
Get thread local storage value
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xa8
test rcx, rcx
je 0x14019a799
mov rsi, qword [rcx]
test rsi, rsi
je 0x14019a799
cmp rsi, 0xffffffffffffffff
mov rdi, rdx
mov rbx, rcx
je 0x14019a960
cmp dword [rsi + 0x24], 0xfacade2
je 0x14019a7b2
mov eax, 0x16
add rsp, 0xa8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rdx, rdi
mov rcx, rsi
call sym.pthread_mutex_timedlock
test eax, eax
jne 0x14019a79e
lea rbp, [rsi + 8]
mov rdx, rdi
mov rcx, rbp
call sym.pthread_mutex_timedlock
test eax, eax
mov ebx, eax
jne 0x14019aae6
mov eax, dword [rsi + 0x1c]
test eax, eax
jne 0x14019aa90
mov edx, dword [rsi + 0x20]
test edx, edx
jle 0x14019aaf5
mov ebx, dword [rsi + 0x18]
mov dword [rsi + 0x20], 0
sub ebx, edx
mov edx, ebx
mov dword [rsi + 0x18], ebx
test edx, edx
jle 0x14019aa90
lea rcx, [rsp + 0x40]
neg edx
mov r8, rsi
mov dword [rsi + 0x20], edx
lea r12, [rsp + 0x80]
lea rdx, [sym.ptw32_rwlock_cancelwrwait]
call sym.ptw32_push_cleanup
lea r14, [rsi + 0x10]
lea r13, [r12 + 0x10]
jmp 0x14019a93c
mov rbx, qword [rsi + 0x10]
mov dword [rsp + 0x3c], 0
test rbx, rbx
je 0x14019a945
cmp rbx, 0xffffffffffffffff
je 0x14019ab1c
lea r15, [rbx + 0x18]
mov rcx, r15
call sym.sem_wait
test eax, eax
jne 0x14019aad9
add dword [rbx], 1
mov rcx, r15
call sym.sem_post
test eax, eax
jne 0x14019aad9
mov rcx, qword [0x14020ba18]
lea rax, [rsp + 0x3c]
mov qword [rsp + 0x60], rbp
mov qword [rsp + 0x70], rax
lea rax, [sym.ptw32_cond_wait_cleanup]
mov qword [rsp + 0x80], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x68], rbx
test rcx, rcx
mov qword [rsp + 0x88], rax
je 0x14019ac22
mov qword [rsp + 0x28], rcx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0x28]
mov r15d, eax
mov ecx, dword [rcx]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, r15d
mov qword [rsp + 0x28], rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, qword [0x14020ba18]
mov rax, qword [rsp + 0x28]
mov rdx, r12
mov qword [rsp + 0x90], rax
call sym.pthread_setspecific
mov rcx, rbp
call sym.pthread_mutex_unlock
test eax, eax
mov dword [rsp + 0x3c], eax
je 0x14019abb0
mov ecx, 1
call sym.ptw32_pop_cleanup
mov ebx, dword [rsp + 0x3c]
test ebx, ebx
jne 0x14019a94a
mov eax, dword [rsi + 0x20]
test eax, eax
jns 0x14019aa7f
test rdi, rdi
jne 0x14019a840
mov ebx, 0x16
mov ecx, 1
call sym.ptw32_pop_cleanup
mov eax, ebx
jmp 0x14019a79e
lea rax, [0x14020b9d0]
mov qword [rsp + 0x98], 0
lea rbp, [rsp + 0x80]
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x90], 0
mov rdx, rbp
mov qword [rsp + 0x88], 0
xchg qword [rax], rdx
test rdx, rdx
je 0x14019a9d4
mov qword [rdx + 8], rbp
xor eax, eax
add rdx, 0x18
lock cmpxchg qword [rdx], rsi
test rax, rax
mov rcx, rax
je 0x14019a9c3
call qword [sym.imp.KERNEL32.dll_SetEvent]
lea r12, [rbp + 0x10]
xor esi, esi
lock xadd qword [r12], rsi
test rsi, rsi
je 0x14019aa50
mov rax, qword [rbx]
cmp rax, 0xffffffffffffffff
je 0x14019aafd
cmp rax, 1
sbb r12d, r12d
and r12d, 6
cmp rax, 1
sbb esi, esi
and esi, 0x16
mov r8, qword [rsp + 0x80]
lea rax, [rbp + 8]
xor edx, edx
lock xadd qword [rax], rdx
test rdx, rdx
mov rcx, rdx
je 0x14019aa9d
lea rdx, [rcx + 0x10]
xor eax, eax
mov rcx, 0xffffffffffffffff
lock cmpxchg qword [rdx], rcx
test rax, rax
mov rcx, rax
je 0x14019aa34
call qword [sym.imp.KERNEL32.dll_SetEvent]
test r12d, r12d
mov eax, esi
jne 0x14019a79e
mov rsi, qword [rbx]
jmp 0x14019a790
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov r13, rax
mov rax, rsi
lock cmpxchg qword [r12], r13
test rax, rax
je 0x14019aac9
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14019a9d4
xor ecx, ecx
call sym.ptw32_pop_cleanup
mov eax, dword [rsi + 0x1c]
mov dword [rsi + 0x18], 0
add eax, 1
mov dword [rsi + 0x1c], eax
xor eax, eax
jmp 0x14019a79e
mov rax, rbp
lock cmpxchg qword [r8], rdx
cmp rbp, rax
je 0x14019aa34
lea rcx, [rbp + 0x18]
lock xadd qword [rcx], rdx
test rdx, rdx
je 0x14019ab15
add rbp, 8
xor ecx, ecx
lock xadd qword [rbp], rcx
jmp 0x14019aa14
mov edx, 0xffffffff
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x14019aa71
call qword [sym.imp.msvcrt.dll__errno]
mov ebx, dword [rax]
jmp 0x14019a92d
mov rcx, rsi
call sym.pthread_mutex_unlock
mov eax, ebx
jmp 0x14019a79e
mov edx, dword [rsi + 0x18]
jmp 0x14019a801
xor edx, edx
mov rcx, rbx
call sym.pthread_rwlock_init
mov r12d, eax
mov esi, eax
and r12d, 0xffffffef
jmp 0x14019a9f5
call sym.ptw32_mcs_flag_wait.part.0
jmp 0x14019aab8
lea rdx, [0x14020b9d8]
mov rax, r12
mov qword [rsp + 0x98], 0
mov qword [rsp + 0x80], rdx
mov qword [rsp + 0x90], 0
mov qword [rsp + 0x88], 0
xchg qword [rdx], rax
test rax, rax
je 0x14019ab84
mov qword [rax + 8], r12
lea rdx, [rax + 0x18]
xor eax, eax
lock cmpxchg qword [rdx], rbx
test rax, rax
mov rcx, rax
je 0x14019ab77
call qword [sym.imp.KERNEL32.dll_SetEvent]
xor ebx, ebx
lock xadd qword [r13], rbx
test rbx, rbx
je 0x14019abd5
mov rax, qword [rsi + 0x10]
cmp rax, 0xffffffffffffffff
je 0x14019ac29
test rax, rax
je 0x14019ac10
mov rcx, r12
call sym.ptw32_mcs_lock_release
mov dword [rsp + 0x3c], 0
mov rbx, qword [rsi + 0x10]
jmp 0x14019a85f
lea rcx, [rbx + 0x10]
mov rdx, rdi
call sym.sem_timedwait
test eax, eax
je 0x14019a91f
call qword [sym.imp.msvcrt.dll__errno]
mov eax, dword [rax]
mov dword [rsp + 0x3c], eax
jmp 0x14019a91f
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov r15, rax
mov rax, rbx
lock cmpxchg qword [r13], r15
test rax, rax
jne 0x14019ac02
or edx, 0xffffffff
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14019ab84
mov rcx, r12
mov ebx, 0x16
call sym.ptw32_mcs_lock_release
jmp 0x14019a94a
xor eax, eax
jmp 0x14019a8fb
xor edx, edx
mov rcx, r14
call sym.pthread_cond_init
mov rcx, r12
mov ebx, eax
call sym.ptw32_mcs_lock_release
test ebx, 0xffffffef
mov dword [rsp + 0x3c], ebx
jne 0x14019a94a
jmp 0x14019aba7