Function at 0x140217130
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
mov rbp, qword [0x1402efcc0]
mov rax, qword [rbp]
mov qword [rsp + 0x28], rax
xor eax, eax
mov rsi, rcx
mov rdi, rdx
test rcx, rcx
je 0x1402170a0
lea r12, [0x140268738]
mov rcx, r12
call fcn.1402179e0
mov rcx, rsi
call fcn.1402149c0
mov rcx, r12
mov rbx, rax
call fcn.140217cb0
test rbx, rbx
je 0x1402170a0
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x1402170a0
lea rdx, [rsp + 0x24]
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x1402170a0
test byte [rbx + 0x44], 4
jne 0x1402170c0
call fcn.140215160
mov ecx, dword [0x140268748]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x1402170e0
cmp rsi, qword [rax + 0x1d8]
je 0x140217110
mov eax, dword [rbx + 0xbc]
mov rcx, qword [rbx + 0x28]
test eax, eax
je 0x14021702f
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14021703e
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 0x140217052
call rsi
mov qword [rbx + 0x30], 0
test rdi, rdi
je 0x1402170f8
mov rax, qword [rbx + 8]
lea rcx, [rbx + 0x38]
mov qword [rdi], rax
call fcn.140217e40
lea rcx, [rbx + 0x68]
call fcn.140218cd0
cmp eax, 1
je 0x14021711c
cmp qword [rbx + 0x1d0], 0
mov qword [rbx + 0x68], 0xffffffffffffffff
je 0x1402170d0
xor eax, eax
jmp 0x1402170a5
mov eax, 3
mov rdx, qword [rsp + 0x28]
sub rdx, qword [rbp]
jne 0x140217117
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, 0x16
jmp 0x1402170a5
mov rcx, rbx
call fcn.140214fc0
xor eax, eax
jmp 0x1402170a5
call fcn.140215210
test rax, rax
jne 0x14021700a
jmp 0x140217017
lea rcx, [rbx + 0x38]
call fcn.140217e40
lea rcx, [rbx + 0x68]
jmp 0x140217077
mov eax, 0x24
jmp 0x1402170a5
call fcn.140226cf0
call fcn.140214cb0
nop
nop word cs:[rax + rax]
nop dword [rax]
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
mov rbp, qword [0x1402efcc0]
lea r12, [0x140268738]
mov rax, qword [rbp]
mov qword [rsp + 0x28], rax
xor eax, eax
mov rsi, rcx
mov rcx, r12
mov rdi, rdx
call fcn.1402179e0
mov rcx, rsi
call fcn.1402149c0
mov rbx, rax
test rax, rax
je 0x140217270
mov rcx, qword [rax + 0x28]
test rcx, rcx
je 0x140217270
lea rdx, [rsp + 0x24]
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x140217270
test byte [rbx + 0x44], 4
jne 0x140217280
call fcn.140215160
mov ecx, dword [0x140268748]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x1402172b0
mov rdx, qword [rax + 0x1d8]
cmp rsi, rdx
je 0x1402172f0
mov edx, dword [rbx + 0xbc]
mov rcx, qword [rbx + 0x28]
test edx, edx
jne 0x1402171eb
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x140217290
mov rcx, qword [rbx + 0x28]
mov rsi, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rsi
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x1402171ff
call rsi
mov qword [rbx + 0x30], 0
test rdi, rdi
je 0x1402172c8
mov rax, qword [rbx + 8]
lea rcx, [rbx + 0x38]
mov qword [rdi], rax
call fcn.140217e40
lea rcx, [rbx + 0x68]
call fcn.140218cd0
cmp eax, 1
je 0x140217307
cmp qword [rbx + 0x1d0], 0
mov qword [rbx + 0x68], 0xffffffffffffffff
je 0x1402172e0
mov rcx, r12
call fcn.140217cb0
xor eax, eax
mov rdx, qword [rsp + 0x28]
sub rdx, qword [rbp]
jne 0x140217302
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, r12
call fcn.140217cb0
mov eax, 3
jmp 0x140217252
mov rcx, r12
call fcn.140217cb0
mov eax, 0x16
jmp 0x140217252
mov eax, dword [rbx + 0xbc]
test eax, eax
jne 0x1402171e7
mov rcx, r12
call fcn.140217cb0
mov eax, 0x10
jmp 0x140217252
call fcn.140215210
xor edx, edx
test rax, rax
jne 0x1402171b9
jmp 0x1402171c0
lea rcx, [rbx + 0x38]
call fcn.140217e40
lea rcx, [rbx + 0x68]
jmp 0x140217224
mov rcx, rbx
call fcn.140214fc0
jmp 0x140217248
mov rcx, r12
call fcn.140217cb0
mov eax, 0x24
jmp 0x140217252
call fcn.140226cf0
call fcn.140214cb0
nop
nop dword [rax]