Function at 0x14027f150
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, 0xb8
mov rsi, qword [0x1403b97c0]
mov rbx, qword [rcx]
test rsi, rsi
mov rdi, rcx
je 0x14027f2f0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rsi]
mov ebp, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, ebp
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rsi, rsi
je 0x14027f2f0
mov rsi, qword [rsi + 0x10]
test rsi, rsi
je 0x14027f1ae
mov eax, dword [rsi + 0x28]
cmp eax, 3
je 0x14027f214
test rbx, rbx
je 0x14027f200
lea rbp, [rbx + 8]
mov rcx, rbp
call sym.pthread_mutex_lock
test eax, eax
mov esi, eax
jne 0x14027f205
cmp qword [rdi], 0
je 0x14027f7b8
mov eax, dword [rbx]
mov rcx, rbp
lea edi, [rax - 1]
mov dword [rbx], edi
call sym.pthread_mutex_unlock
test edi, edi
js 0x14027f3a4
xor eax, eax
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov esi, 0x16
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], esi
mov eax, 0xffffffff
jmp 0x14027f1e8
mov qword [rsp + 0xa8], 0
lea rax, [rsi + 0x38]
lea rbp, [rsp + 0x90]
mov qword [rsp + 0x90], rax
mov qword [rsp + 0xa0], 0
mov rdx, rbp
mov qword [rsp + 0x98], 0
xchg qword [rax], rdx
test rdx, rdx
je 0x14027f291
mov qword [rdx + 8], rbp
xor eax, eax
add rdx, 0x18
mov rcx, 0xffffffffffffffff
lock cmpxchg qword [rdx], rcx
test rax, rax
mov rcx, rax
je 0x14027f27b
call qword [sym.imp.KERNEL32.dll_SetEvent]
lea r13, [rbp + 0x10]
xor r12d, r12d
lock xadd qword [r13], r12
test r12, r12
je 0x14027f5c0
cmp dword [rsi + 0x18c], 1
jne 0x14027f81b
mov r8, qword [rsp + 0x90]
lea rcx, [rbp + 8]
xor edx, edx
lock xadd qword [rcx], rdx
test rdx, rdx
mov rcx, rdx
je 0x14027f620
add rcx, 0x10
xor eax, eax
mov rdx, 0xffffffffffffffff
lock cmpxchg qword [rcx], rdx
test rax, rax
mov rcx, rax
je 0x14027f1ae
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x14027f1ae
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 rsi, rbp
je 0x14027f1ae
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 0x14027f600
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov rcx, qword [0x1403b97c0]
mov rdx, rbp
mov dword [rbp + 0x188], eax
call sym.pthread_setspecific
jmp 0x14027f1a6
lea rcx, [rsp + 0x70]
mov r8, rbx
lea rdx, [sym.ptw32_sem_wait_cleanup]
call sym.ptw32_push_cleanup
mov rax, qword [rbx + 0x10]
mov rbx, qword [0x1403b97c0]
mov qword [rsp + 0x60], rax
test rbx, rbx
je 0x14027f6de
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, edi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rbx, rbx
je 0x14027f6de
mov rbx, qword [rbx + 0x10]
test rbx, rbx
je 0x14027f695
mov eax, dword [rbx + 0x18c]
test eax, eax
jne 0x14027f5f3
mov rax, qword [rbx + 0x40]
mov ecx, 2
test rax, rax
mov qword [rsp + 0x68], rax
je 0x14027f5f3
lea rdx, [rsp + 0x60]
xor r8d, r8d
mov r9d, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
je 0x14027f581
cmp eax, 1
jne 0x14027f654
mov rcx, qword [rsp + 0x68]
lea rbp, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
lea rdx, [rbx + 0x38]
mov rax, rbp
mov qword [rsp + 0xa8], 0
mov qword [rsp + 0x90], rdx
mov qword [rsp + 0xa0], 0
mov qword [rsp + 0x98], 0
xchg qword [rdx], rax
test rax, rax
je 0x14027f4d2
mov qword [rax + 8], rbp
lea rdx, [rax + 0x18]
mov rcx, 0xffffffffffffffff
xor eax, eax
lock cmpxchg qword [rdx], rcx
test rax, rax
mov rcx, rax
je 0x14027f4be
call qword [sym.imp.KERNEL32.dll_SetEvent]
lea rdi, [rbp + 0x10]
xor esi, esi
lock xadd qword [rdi], rsi
test rsi, rsi
je 0x14027f78a
mov eax, dword [rbx + 0x28]
cmp eax, 3
jbe 0x14027f848
mov rcx, qword [rsp + 0x90]
lea rax, [rbp + 8]
xor edx, edx
lock xadd qword [rax], rdx
test rdx, rdx
mov rax, rdx
je 0x14027f7d6
lea rdx, [rax + 0x10]
mov rcx, 0xffffffffffffffff
xor eax, eax
lock cmpxchg qword [rdx], rcx
test rax, rax
mov rcx, rax
je 0x14027f51d
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov esi, 0x16
mov rbx, qword [0x1403b97b8]
test rbx, rbx
je 0x14027f205
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, edi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rbx, rbx
je 0x14027f205
mov rax, qword [rbx]
test rax, rax
je 0x14027f564
mov rcx, qword [rbx + 8]
call rax
mov rdx, qword [rbx + 0x10]
mov rcx, qword [0x1403b97b8]
call sym.pthread_setspecific
test esi, esi
je 0x14027f1e6
jmp 0x14027f205
mov rbx, qword [0x1403b97b8]
test rbx, rbx
je 0x14027f1e6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, edi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rbx, rbx
jne 0x14027f564
jmp 0x14027f1e6
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov r14, rax
mov rax, r12
lock cmpxchg qword [r13], r14
test rax, rax
je 0x14027f670
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14027f291
mov ecx, 1
jmp 0x14027f427
mov rcx, r12
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x58], r14
call sym.ptw32_threadReusePush
jmp 0x14027f1ae
mov rax, rbp
lock cmpxchg qword [r8], rdx
cmp rbp, rax
je 0x14027f1ae
lea rcx, [rbp + 0x18]
lock xadd qword [rcx], rdx
test rdx, rdx
je 0x14027f6d4
add rbp, 8
xor ecx, ecx
lock xadd qword [rbp], rcx
jmp 0x14027f2bd
cmp eax, 0x102
mov esi, 0x8a
mov eax, 0x16
cmovne esi, eax
jmp 0x14027f522
mov edx, 0xffffffff
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x14027f5e5
mov rcx, rbp
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x58], r13
call sym.ptw32_threadReusePush
xor r8d, r8d
mov r9d, 0xffffffff
mov ecx, 1
mov qword [rsp + 0x68], 0
lea rdx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
je 0x14027f581
cmp eax, 1
jne 0x14027f654
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
jmp 0x14027f51d
call sym.ptw32_mcs_flag_wait.part.0
jmp 0x14027f643
lea rbp, [rsp + 0x50]
mov rcx, rbp
call sym.ptw32_new
mov rdi, qword [rsp + 0x50]
mov r13, qword [rsp + 0x58]
test rdi, rdi
mov rbx, rdi
je 0x14027f695
or byte [rdi + 0x194], 1
mov dword [rdi + 0x184], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov r12, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rdi + 0x198], eax
call r12
mov r15, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov r14, rax
call r12
lea r9, [rdi + 8]
mov r8, r15
mov rdx, r14
mov rcx, rax
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x14027f683
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov rcx, qword [0x1403b97c0]
mov rdx, rdi
mov dword [rdi + 0x188], eax
call sym.pthread_setspecific
jmp 0x14027f402
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov r12, rax
mov rax, rsi
lock cmpxchg qword [rdi], r12
test rax, rax
je 0x14027f806
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14027f4d2
mov rcx, rbp
call sym.pthread_mutex_unlock
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], 0x16
mov eax, 0xffffffff
jmp 0x14027f1e8
mov rax, rbp
lock cmpxchg qword [rcx], rdx
cmp rbp, rax
je 0x14027f51d
lea rcx, [rbp + 0x18]
lock xadd qword [rcx], rdx
test rdx, rdx
je 0x14027f814
add rbp, 8
xor eax, eax
lock xadd qword [rbp], rax
jmp 0x14027f4fd
or edx, 0xffffffff
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x14027f7aa
call sym.ptw32_mcs_flag_wait.part.0
jmp 0x14027f7f5
mov rcx, qword [rsi + 0x40]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rcx, rbp
mov dword [rsi + 0x28], 4
mov dword [rsi + 0x18c], 1
call sym.ptw32_mcs_lock_release
mov ecx, 2
call sym.ptw32_throw
mov rcx, rbp
mov dword [rbx + 0x28], 4
mov dword [rbx + 0x18c], 1
call sym.ptw32_mcs_lock_release
mov ecx, 2
call sym.ptw32_throw
nop
nop dword [rax]