Function at 0x14022a1b0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
mov rbp, qword [0x1404c8a60]
mov rax, qword [rbp]
mov qword [rsp + 0x28], rax
xor eax, eax
mov rsi, rcx
mov rdi, rdx
test rcx, rcx
je 0x14022a120
lea r12, [0x1403ff568]
mov rcx, r12
call fcn.1402274b0
mov rcx, rsi
call fcn.140227b20
mov rcx, r12
mov rbx, rax
call fcn.140227780
test rbx, rbx
je 0x14022a120
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x14022a120
lea rdx, [rsp + 0x24]
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x14022a120
test byte [rbx + 0x44], 4
jne 0x14022a140
call fcn.140228200
mov ecx, dword [0x1403ff578]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x14022a160
cmp rsi, qword [rax + 0x1d8]
je 0x14022a190
mov eax, dword [rbx + 0xbc]
mov rcx, qword [rbx + 0x28]
test eax, eax
je 0x14022a0af
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14022a0be
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 0x14022a0d2
call rsi
mov qword [rbx + 0x30], 0
test rdi, rdi
je 0x14022a178
mov rax, qword [rbx + 8]
lea rcx, [rbx + 0x38]
mov qword [rdi], rax
call fcn.140227920
lea rcx, [rbx + 0x68]
call fcn.140227a90
cmp eax, 1
je 0x14022a19c
cmp qword [rbx + 0x1d0], 0
mov qword [rbx + 0x68], 0xffffffffffffffff
je 0x14022a150
xor eax, eax
jmp 0x14022a125
mov eax, 3
mov rdx, qword [rsp + 0x28]
sub rdx, qword [rbp]
jne 0x14022a197
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, 0x16
jmp 0x14022a125
mov rcx, rbx
call fcn.140228060
xor eax, eax
jmp 0x14022a125
call fcn.1402282b0
test rax, rax
je 0x14022a097
jmp 0x14022a08a
lea rcx, [rbx + 0x38]
call fcn.140227920
lea rcx, [rbx + 0x68]
jmp 0x14022a0f7
mov eax, 0x24
jmp 0x14022a125
call fcn.14021b9a0
call fcn.140227df0
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 [0x1404c8a60]
mov r12, qword [rbp]
mov qword [rsp + 0x28], r12
lea r12, [0x1403ff568]
mov rsi, rcx
mov rdi, rdx
mov rcx, r12
call fcn.1402274b0
mov rcx, rsi
call fcn.140227b20
mov rbx, rax
test rax, rax
je 0x14022a2f0
mov rcx, qword [rax + 0x28]
test rcx, rcx
je 0x14022a2f0
lea rdx, [rsp + 0x24]
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x14022a2f0
test byte [rbx + 0x44], 4
jne 0x14022a300
call fcn.140228200
mov ecx, dword [0x1403ff578]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x14022a330
mov rdx, qword [rax + 0x1d8]
cmp rsi, rdx
je 0x14022a370
mov edx, dword [rbx + 0xbc]
test edx, edx
jne 0x14022a265
xor edx, edx
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x14022a310
mov rcx, qword [rbx + 0x28]
mov rsi, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rsi
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x14022a27d
call rsi
mov qword [rbx + 0x30], 0
test rdi, rdi
je 0x14022a348
mov rax, qword [rbx + 8]
lea rcx, [rbx + 0x38]
mov qword [rdi], rax
call fcn.140227920
lea rcx, [rbx + 0x68]
call fcn.140227a90
cmp eax, 1
je 0x14022a387
cmp qword [rbx + 0x1d0], 0
mov qword [rbx + 0x68], 0xffffffffffffffff
je 0x14022a360
mov rcx, r12
call fcn.140227780
xor eax, eax
mov rdx, qword [rsp + 0x28]
sub rdx, qword [rbp]
jne 0x14022a382
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, r12
call fcn.140227780
mov eax, 3
jmp 0x14022a2d0
mov rcx, r12
call fcn.140227780
mov eax, 0x16
jmp 0x14022a2d0
mov eax, dword [rbx + 0xbc]
test eax, eax
jne 0x14022a265
mov rcx, r12
call fcn.140227780
mov eax, 0x10
jmp 0x14022a2d0
call fcn.1402282b0
xor edx, edx
test rax, rax
je 0x14022a23e
jmp 0x14022a237
lea rcx, [rbx + 0x38]
call fcn.140227920
lea rcx, [rbx + 0x68]
jmp 0x14022a2a2
mov rcx, rbx
call fcn.140228060
jmp 0x14022a2c6
mov rcx, r12
call fcn.140227780
mov eax, 0x24
jmp 0x14022a2d0
call fcn.14021b9a0
call fcn.140227df0
nop
nop dword [rax]