Function at 0x1400866d0
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov rsi, rcx
mov rbp, rdx
test rcx, rcx
je 0x140086660
lea rdi, [0x14014ff98]
mov rcx, rdi
call fcn.140083a00
mov rcx, rsi
call fcn.140084050
mov rcx, rdi
mov rbx, rax
call fcn.140083cd0
test rbx, rbx
je 0x140086660
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x140086660
lea rdx, [rsp + 0x2c]
call qword [sym.imp.KERNEL32.DLL_GetHandleInformation]
test eax, eax
je 0x140086660
test byte [rbx + 0x44], 4
jne 0x140086670
call fcn.1400847e0
mov ecx, dword [0x14014ffa8]
call qword [sym.imp.KERNEL32.DLL_TlsGetValue]
test rax, rax
je 0x140086690
cmp rsi, qword [rax + 0x1d8]
je 0x1400866c0
mov eax, dword [rbx + 0xbc]
mov rcx, qword [rbx + 0x28]
test eax, eax
je 0x1400865eb
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1400865fa
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
mov rcx, qword [rbx + 0x28]
mov rsi, qword [sym.imp.KERNEL32.DLL_CloseHandle]
call rsi
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x14008660e
call rsi
mov qword [rbx + 0x30], 0
test rbp, rbp
je 0x1400866a8
mov rax, qword [rbx + 8]
lea rcx, [rbx + 0x38]
mov qword [rbp], rax
call fcn.140083e60
lea rcx, [rbx + 0x68]
call fcn.140083fd0
cmp eax, 1
je 0x1400866c7
cmp qword [rbx + 0x1d0], 0
mov qword [rbx + 0x68], 0xffffffffffffffff
je 0x140086680
xor eax, eax
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov eax, 3
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov eax, 0x16
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov rcx, rbx
call fcn.140084640
xor eax, eax
jmp 0x140086656
call fcn.140084890
test rax, rax
jne 0x1400865c6
jmp 0x1400865d3
lea rcx, [rbx + 0x38]
call fcn.140083e60
lea rcx, [rbx + 0x68]
jmp 0x140086634
mov eax, 0x24
jmp 0x140086665
call fcn.140084340
nop
nop dword [rax]
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
lea rbp, [0x14014ff98]
mov rsi, rcx
mov rcx, rbp
mov rdi, rdx
call fcn.140083a00
mov rcx, rsi
call fcn.140084050
mov rbx, rax
test rax, rax
je 0x1400867f0
mov rcx, qword [rax + 0x28]
test rcx, rcx
je 0x1400867f0
lea rdx, [rsp + 0x2c]
call qword [sym.imp.KERNEL32.DLL_GetHandleInformation]
test eax, eax
je 0x1400867f0
test byte [rbx + 0x44], 4
jne 0x140086810
call fcn.1400847e0
mov ecx, dword [0x14014ffa8]
call qword [sym.imp.KERNEL32.DLL_TlsGetValue]
test rax, rax
je 0x140086850
mov rdx, qword [rax + 0x1d8]
cmp rsi, rdx
je 0x140086890
mov edx, dword [rbx + 0xbc]
mov rcx, qword [rbx + 0x28]
test edx, edx
jne 0x140086777
xor edx, edx
call qword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
test eax, eax
jne 0x140086830
mov rcx, qword [rbx + 0x28]
mov rsi, qword [sym.imp.KERNEL32.DLL_CloseHandle]
call rsi
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x14008678b
call rsi
mov qword [rbx + 0x30], 0
test rdi, rdi
je 0x140086868
mov rax, qword [rbx + 8]
lea rcx, [rbx + 0x38]
mov qword [rdi], rax
call fcn.140083e60
lea rcx, [rbx + 0x68]
call fcn.140083fd0
cmp eax, 1
je 0x1400868a2
cmp qword [rbx + 0x1d0], 0
mov qword [rbx + 0x68], 0xffffffffffffffff
je 0x140086880
mov rcx, rbp
call fcn.140083cd0
xor eax, eax
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov rcx, rbp
call fcn.140083cd0
mov eax, 3
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov rcx, rbp
call fcn.140083cd0
mov eax, 0x16
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov eax, dword [rbx + 0xbc]
test eax, eax
jne 0x140086773
mov rcx, rbp
call fcn.140083cd0
mov eax, 0x10
jmp 0x1400867de
call fcn.140084890
xor edx, edx
test rax, rax
jne 0x140086745
jmp 0x14008674c
lea rcx, [rbx + 0x38]
call fcn.140083e60
lea rcx, [rbx + 0x68]
jmp 0x1400867b0
mov rcx, rbx
call fcn.140084640
jmp 0x1400867d4
mov rcx, rbp
call fcn.140083cd0
mov eax, 0x24
jmp 0x1400867de
call fcn.140084340
nop
nop dword [rax + rax]