Function at 0x14027e0e0
Capabilities:
Get thread local storage value

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x70
mov rbx, qword [0x1403b97c0]
test rbx, rbx
je 0x14027e201
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
mov esi, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, esi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rbx, rbx
je 0x14027e201
mov rbx, qword [rbx + 0x10]
test rbx, rbx
je 0x14027e133
mov eax, dword [rbx + 0x28]
cmp eax, 3
je 0x14027e142
add rsp, 0x70
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov qword [rsp + 0x68], 0
lea rax, [rbx + 0x38]
lea rsi, [rsp + 0x50]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x60], 0
mov rdx, rsi
mov qword [rsp + 0x58], 0
xchg qword [rax], rdx
test rdx, rdx
je 0x14027e1af
mov qword [rdx + 8], rsi
xor eax, eax
add rdx, 0x18
mov rcx, 0xffffffffffffffff
lock cmpxchg qword [rdx], rcx
test rax, rax
mov rcx, rax
je 0x14027e19a
call qword [sym.imp.KERNEL32.dll_SetEvent]
lea rbp, [rsi + 0x10]
xor edi, edi
lock xadd qword [rbp], rdi
test rdi, rdi
je 0x14027e2b0
cmp dword [rbx + 0x18c], 1
jne 0x14027e347
mov r8, qword [rsp + 0x50]
lea rcx, [rsi + 8]
xor edx, edx
lock xadd qword [rcx], rdx
test rdx, rdx
mov rcx, rdx
je 0x14027e300
add rcx, 0x10
xor eax, eax
mov rdx, 0xffffffffffffffff
lock cmpxchg qword [rcx], rdx
test rax, rax
mov rcx, rax
je 0x14027e133
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x14027e133
lea rdi, [rsp + 0x40]
mov rcx, rdi
call sym.ptw32_new
mov rsi, qword [rsp + 0x40]
mov r13, qword [rsp + 0x48]
test rsi, rsi
mov rbx, rsi
je 0x14027e133
or byte [rsi + 0x194], 1
mov dword [rsi + 0x184], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov rbp, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rsi + 0x198], eax
call rbp
mov r14, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov r12, rax
call rbp
mov dword [rsp + 0x30], 2
mov r8, r14
mov rdx, r12
mov dword [rsp + 0x28], 0
lea r9, [rsi + 8]
mov rcx, rax
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x14027e2e0
mov rcx, qword [rsi + 8]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov rcx, qword [0x1403b97c0]
mov rdx, rsi
mov dword [rsi + 0x188], eax
call sym.pthread_setspecific
jmp 0x14027e12b
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov r12, rax
mov rax, rdi
lock cmpxchg qword [rbp], r12
test rax, rax
je 0x14027e330
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14027e1af
mov rcx, rdi
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x48], r13
call sym.ptw32_threadReusePush
jmp 0x14027e133
mov rax, rsi
lock cmpxchg qword [r8], rdx
cmp rsi, rax
je 0x14027e133
lea rcx, [rsi + 0x18]
lock xadd qword [rcx], rdx
test rdx, rdx
je 0x14027e340
add rsi, 8
xor ecx, ecx
lock xadd qword [rsi], rcx
jmp 0x14027e1d8
mov edx, 0xffffffff
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x14027e2d1
call sym.ptw32_mcs_flag_wait.part.0
jmp 0x14027e31f
mov rcx, qword [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rcx, rsi
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 word cs:[rax + rax]