Function at 0x140129200
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
mov rbp, qword [0x1402b09c0]
mov rax, qword [rbp]
mov qword [rsp + 0x28], rax
xor eax, eax
mov rsi, rcx
mov rdi, rdx
test rcx, rcx
je 0x140129170
lea r12, [0x14027eb78]
mov rcx, r12
call fcn.140126440
mov rcx, rsi
call fcn.140126a90
mov rcx, r12
mov rbx, rax
call fcn.140126710
test rbx, rbx
je 0x140129170
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x140129170
lea rdx, [rsp + 0x24]
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x140129170
test byte [rbx + 0x44], 4
jne 0x140129190
call fcn.140127230
mov ecx, dword [0x14027eb88]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x1401291b0
cmp rsi, qword [rax + 0x1d8]
je 0x1401291e0
mov eax, dword [rbx + 0xbc]
mov rcx, qword [rbx + 0x28]
test eax, eax
je 0x1401290ff
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14012910e
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 0x140129122
call rsi
mov qword [rbx + 0x30], 0
test rdi, rdi
je 0x1401291c8
mov rax, qword [rbx + 8]
lea rcx, [rbx + 0x38]
mov qword [rdi], rax
call fcn.1401268a0
lea rcx, [rbx + 0x68]
call fcn.140126a10
cmp eax, 1
je 0x1401291ec
cmp qword [rbx + 0x1d0], 0
mov qword [rbx + 0x68], 0xffffffffffffffff
je 0x1401291a0
xor eax, eax
jmp 0x140129175
mov eax, 3
mov rdx, qword [rsp + 0x28]
sub rdx, qword [rbp]
jne 0x1401291e7
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, 0x16
jmp 0x140129175
mov rcx, rbx
call fcn.140127090
xor eax, eax
jmp 0x140129175
call fcn.1401272e0
test rax, rax
jne 0x1401290da
jmp 0x1401290e7
lea rcx, [rbx + 0x38]
call fcn.1401268a0
lea rcx, [rbx + 0x68]
jmp 0x140129147
mov eax, 0x24
jmp 0x140129175
call fcn.1401173c0
call fcn.140126d80
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 [0x1402b09c0]
lea r12, [0x14027eb78]
mov rax, qword [rbp]
mov qword [rsp + 0x28], rax
xor eax, eax
mov rsi, rcx
mov rcx, r12
mov rdi, rdx
call fcn.140126440
mov rcx, rsi
call fcn.140126a90
mov rbx, rax
test rax, rax
je 0x140129340
mov rcx, qword [rax + 0x28]
test rcx, rcx
je 0x140129340
lea rdx, [rsp + 0x24]
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x140129340
test byte [rbx + 0x44], 4
jne 0x140129350
call fcn.140127230
mov ecx, dword [0x14027eb88]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x140129380
mov rdx, qword [rax + 0x1d8]
cmp rsi, rdx
je 0x1401293c0
mov edx, dword [rbx + 0xbc]
mov rcx, qword [rbx + 0x28]
test edx, edx
jne 0x1401292bb
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x140129360
mov rcx, qword [rbx + 0x28]
mov rsi, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rsi
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x1401292cf
call rsi
mov qword [rbx + 0x30], 0
test rdi, rdi
je 0x140129398
mov rax, qword [rbx + 8]
lea rcx, [rbx + 0x38]
mov qword [rdi], rax
call fcn.1401268a0
lea rcx, [rbx + 0x68]
call fcn.140126a10
cmp eax, 1
je 0x1401293d7
cmp qword [rbx + 0x1d0], 0
mov qword [rbx + 0x68], 0xffffffffffffffff
je 0x1401293b0
mov rcx, r12
call fcn.140126710
xor eax, eax
mov rdx, qword [rsp + 0x28]
sub rdx, qword [rbp]
jne 0x1401293d2
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, r12
call fcn.140126710
mov eax, 3
jmp 0x140129322
mov rcx, r12
call fcn.140126710
mov eax, 0x16
jmp 0x140129322
mov eax, dword [rbx + 0xbc]
test eax, eax
jne 0x1401292b7
mov rcx, r12
call fcn.140126710
mov eax, 0x10
jmp 0x140129322
call fcn.1401272e0
xor edx, edx
test rax, rax
jne 0x140129289
jmp 0x140129290
lea rcx, [rbx + 0x38]
call fcn.1401268a0
lea rcx, [rbx + 0x68]
jmp 0x1401292f4
mov rcx, rbx
call fcn.140127090
jmp 0x140129318
mov rcx, r12
call fcn.140126710
mov eax, 0x24
jmp 0x140129322
call fcn.1401173c0
call fcn.140126d80
nop
nop dword [rax]