Function at 0x140046c50
Capabilities:
Get thread local storage value

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
mov rsi, rdx
mov rdi, rcx
mov rax, qword [0x14029a038]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov dword [rdi + 0x28], 0
mov rbx, qword [0x1402a4730]
cmp rbx, 1
jbe 0x140046de3
mov ecx, dword [0x14029bf80]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140046cc2
mov rcx, qword [rbx]
shl rcx, 4
mov qword [rax + rcx], 0
mov ecx, dword [rbx + 8]
mov rdx, qword [rbx]
shl rdx, 4
mov dword [rax + rdx + 8], ecx
mov eax, dword [rsi + 0x10]
mov dword [rdi + 0x50], eax
mov rax, qword [rsi + 8]
test rax, rax
jne 0x140046e3e
cmp qword [rsi + 0x18], 0
jne 0x140046e9c
mov ecx, 0x28
call fcn.14017b1d8
mov rbx, rax
mov dword [rax], 1
lea rax, [0x14003ca20]
mov qword [rbx + 8], rax
lea rax, [0x140076c10]
mov qword [rbx + 0x10], rax
lea rax, [0x1401df3a0]
mov qword [rbx + 0x18], rax
mov ebp, dword [rsi]
mov dword [rbx + 0x24], ebp
mov ecx, 0x48
call fcn.14017b1d8
mov r14, rax
lea r8, [rsp + 0x38]
mov qword [r8], rbx
mov rcx, rax
mov edx, ebp
call fcn.140046f10
mov rcx, qword [rdi + 0x40]
mov qword [rdi + 0x40], r14
test rcx, rcx
jne 0x140046e53
mov rcx, qword [rdi + 0x70]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
lea rbx, [rdi + 0x20]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x140046e62
cmp byte [rsi + 0x2c], 0
mov eax, dword [rsi]
mov r9d, dword [rsi + 0x28]
je 0x140046e6f
lea r8, [rdi + 0x18]
mov rcx, qword [rsi + 0x20]
mov dword [rsp + 0x20], eax
mov rdx, rdi
call fcn.14001e760
mov ebp, eax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
test bpl, bpl
je 0x140046e86
mov al, byte [rsi + 0x2c]
mov byte [rdi + 0xc], al
mov dil, 1
mov rcx, qword [rsi + 0x18]
test rcx, rcx
jne 0x140046e2a
mov rcx, qword [rsi + 8]
mov qword [rsi + 8], 0
test rcx, rcx
jne 0x140046e8d
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14017e7b0
mov eax, edi
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret
lea rcx, [0x1402a4730]
call fcn.140008ab0
test al, al
je 0x140046ef1
mov qword [0x1402a4740], 0
lea rbx, [0x1402a4738]
mov qword [0x1402a4738], 0xffffffffffffffff
mov rcx, rbx
xor edx, edx
call fcn.140002850
mov qword [0x1402a4730], rbx
jmp 0x140046c93
lock dec dword [rcx]
jne 0x140046db2
mov rax, qword [rcx + 0x10]
call qword [case.0x1401e7f70.0]
jmp 0x140046db2
mov qword [rsi + 8], 0
mov rcx, qword [rdi + 0x40]
mov qword [rdi + 0x40], rax
jmp 0x140046d40
mov edx, 1
call fcn.14003d540
jmp 0x140046d49
mov rcx, rbx
call fcn.1400fdfc0
jmp 0x140046d68
mov rcx, qword [rsi + 0x20]
mov rdx, rdi
mov r8d, r9d
mov r9d, eax
call fcn.1401e7f20
jmp 0x140046d8c
xor edi, edi
jmp 0x140046da9
mov edx, 1
call fcn.14003d540
jmp 0x140046dc7
lea r14, [rsi + 0x18]
mov ecx, 0x48
call fcn.14017b1d8
mov rbx, rax
lea r15, [rsp + 0x30]
mov rcx, r15
mov rdx, r14
call fcn.140179750
lea rcx, [rsp + 0x38]
mov rdx, r15
call fcn.140178b50
mov rcx, qword [r15]
test rcx, rcx
jne 0x140046efd
lea r8, [rsp + 0x38]
mov rcx, rbx
mov edx, 2
call fcn.140046f10
mov rcx, qword [rdi + 0x40]
mov qword [rdi + 0x40], rbx
jmp 0x140046d40
mov rbx, qword [0x1402a4730]
jmp 0x140046c93
lock dec dword [rcx]
jne 0x140046ed2
mov rax, qword [rcx + 0x10]
call qword [case.0x1401e7f70.0]
jmp 0x140046ed2