Function at 0x140479ac0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
mov rbp, qword [0x14072af60]
mov rax, qword [rbp]
mov qword [rsp + 0x28], rax
xor eax, eax
mov rsi, rcx
mov rdi, rdx
test rcx, rcx
je 0x140479a30
lea r12, [0x140604628]
mov rcx, r12
call fcn.140476dc0
mov rcx, rsi
call fcn.140477430
mov rcx, r12
mov rbx, rax
call fcn.140477090
test rbx, rbx
je 0x140479a30
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x140479a30
lea rdx, [rsp + 0x24]
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x140479a30
test byte [rbx + 0x44], 4
jne 0x140479a50
call fcn.140477b10
mov ecx, dword [0x140604638]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x140479a70
cmp rsi, qword [rax + 0x1d8]
je 0x140479aa0
mov eax, dword [rbx + 0xbc]
mov rcx, qword [rbx + 0x28]
test eax, eax
je 0x1404799bf
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1404799ce
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 0x1404799e2
call rsi
mov qword [rbx + 0x30], 0
test rdi, rdi
je 0x140479a88
mov rax, qword [rbx + 8]
lea rcx, [rbx + 0x38]
mov qword [rdi], rax
call fcn.140477230
lea rcx, [rbx + 0x68]
call fcn.1404773a0
cmp eax, 1
je 0x140479aac
cmp qword [rbx + 0x1d0], 0
mov qword [rbx + 0x68], 0xffffffffffffffff
je 0x140479a60
xor eax, eax
jmp 0x140479a35
mov eax, 3
mov rdx, qword [rsp + 0x28]
sub rdx, qword [rbp]
jne 0x140479aa7
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, 0x16
jmp 0x140479a35
mov rcx, rbx
call fcn.140477970
xor eax, eax
jmp 0x140479a35
call fcn.140477bc0
test rax, rax
je 0x1404799a7
jmp 0x14047999a
lea rcx, [rbx + 0x38]
call fcn.140477230
lea rcx, [rbx + 0x68]
jmp 0x140479a07
mov eax, 0x24
jmp 0x140479a35
call fcn.140466a70
call fcn.140477700
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 [0x14072af60]
mov r12, qword [rbp]
mov qword [rsp + 0x28], r12
lea r12, [0x140604628]
mov rsi, rcx
mov rdi, rdx
mov rcx, r12
call fcn.140476dc0
mov rcx, rsi
call fcn.140477430
mov rbx, rax
test rax, rax
je 0x140479c00
mov rcx, qword [rax + 0x28]
test rcx, rcx
je 0x140479c00
lea rdx, [rsp + 0x24]
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x140479c00
test byte [rbx + 0x44], 4
jne 0x140479c10
call fcn.140477b10
mov ecx, dword [0x140604638]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x140479c40
mov rdx, qword [rax + 0x1d8]
cmp rsi, rdx
je 0x140479c80
mov edx, dword [rbx + 0xbc]
test edx, edx
jne 0x140479b75
xor edx, edx
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x140479c20
mov rcx, qword [rbx + 0x28]
mov rsi, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rsi
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x140479b8d
call rsi
mov qword [rbx + 0x30], 0
test rdi, rdi
je 0x140479c58
mov rax, qword [rbx + 8]
lea rcx, [rbx + 0x38]
mov qword [rdi], rax
call fcn.140477230
lea rcx, [rbx + 0x68]
call fcn.1404773a0
cmp eax, 1
je 0x140479c97
cmp qword [rbx + 0x1d0], 0
mov qword [rbx + 0x68], 0xffffffffffffffff
je 0x140479c70
mov rcx, r12
call fcn.140477090
xor eax, eax
mov rdx, qword [rsp + 0x28]
sub rdx, qword [rbp]
jne 0x140479c92
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, r12
call fcn.140477090
mov eax, 3
jmp 0x140479be0
mov rcx, r12
call fcn.140477090
mov eax, 0x16
jmp 0x140479be0
mov eax, dword [rbx + 0xbc]
test eax, eax
jne 0x140479b75
mov rcx, r12
call fcn.140477090
mov eax, 0x10
jmp 0x140479be0
call fcn.140477bc0
xor edx, edx
test rax, rax
je 0x140479b4e
jmp 0x140479b47
lea rcx, [rbx + 0x38]
call fcn.140477230
lea rcx, [rbx + 0x68]
jmp 0x140479bb2
mov rcx, rbx
call fcn.140477970
jmp 0x140479bd6
mov rcx, r12
call fcn.140477090
mov eax, 0x24
jmp 0x140479be0
call fcn.140466a70
call fcn.140477700
nop
nop dword [rax]