Function at 0x14001897c
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r14
push r15
mov rbp, rsp
sub rsp, 0x40
mov r15, rcx
mov ecx, dword [0x14003d17c]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
or ebx, 0xffffffff
mov rsi, rax
test rax, rax
jne 0x1400189c2
mov ebx, dword [0x14003d17c]
lea rdx, [rbp - 8]
and dword [rbp - 8], eax
lea rsi, [rbp - 8]
mov ecx, ebx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
inc dword [rsi]
mov r10, qword [0x14003d048]
lea rax, [0x14003d048]
lea rdx, [0x140035650]
mov r14d, 0x1df
cmp r10, rax
je 0x140018a2e
test byte [r10 + 0x1c], 1
je 0x140018a2e
mov eax, dword [rsi]
lea ecx, [rax + rax*4]
cmp ecx, 0x1e1
ja 0x140018a02
mov eax, ecx
mov ecx, r14d
sub rcx, rax
jmp 0x140018a04
xor ecx, ecx
mov rax, qword [r15 + 0xc8]
lea r9, [rcx + rdx]
mov rcx, qword [r10 + 0x10]
lea r8, [0x1400367b8]
mov qword [rsp + 0x28], rax
mov edx, 0x4c
mov qword [rsp + 0x20], r15
call fcn.140001470
xor eax, eax
lea rcx, [rbp + 0x38]
mov qword [rbp + 0x38], rax
call qword [sym.imp.GDI32.dll_D3DKMTNetDispQueryMiracastDisplayDeviceSupport]
mov edi, eax
test eax, eax
jns 0x140018a50
or edi, 0x10000000
jl 0x140018bc2
and qword [rbp - 0x10], 0
lea rax, [rbp - 0x10]
xor edx, edx
mov qword [rsp + 0x20], rax
lea r9, [0x140036798]
lea rcx, [0x140036788]
lea r8d, [rdx + 4]
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoCreateInstance]
mov edi, eax
test eax, eax
js 0x140018ba7
mov rcx, qword [rbp - 0x10]
lea r9, [rbp + 0x48]
and qword [rbp + 0x48], 0
lea r8, [0x140036778]
lea rdx, str.PvV
mov rax, qword [rcx]
mov rax, qword [rax + 0x60]
call qword [0x140034e68]
mov edi, eax
test eax, eax
js 0x140018b8c
mov rcx, qword [rbp + 0x48]
lea r8, [rbp + 0x38]
and qword [rbp + 0x38], 0
lea rdx, [0x140036758]
mov rax, qword [rcx]
mov rax, qword [rax]
call qword [0x140034e68]
mov edi, eax
test eax, eax
js 0x140018b71
mov rcx, qword [rbp + 0x38]
mov edx, 8
mov rax, qword [rcx]
mov rax, qword [rax + 0x18]
call qword [0x140034e68]
mov edi, eax
test eax, eax
js 0x140018b71
mov rcx, qword [rbp + 0x38]
mov rdx, qword [r15 + 0xc8]
mov rax, qword [rcx]
mov rax, qword [rax + 0x48]
call qword [0x140034e68]
mov edi, eax
test eax, eax
js 0x140018b71
mov rcx, qword [rbp + 0x38]
lea r8, [rbp + 0x40]
and qword [rbp + 0x40], 0
lea rdx, [0x140036748]
mov rax, qword [rcx]
mov rax, qword [rax]
call qword [0x140034e68]
mov edi, eax
test eax, eax
js 0x140018b56
mov rcx, qword [rbp + 0x40]
xor r8d, r8d
xor edx, edx
mov rax, qword [rcx]
mov rax, qword [rax + 0x18]
call qword [0x140034e68]
mov edi, eax
mov rcx, qword [rbp + 0x40]
test rcx, rcx
je 0x140018b71
and qword [rbp + 0x40], 0
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [0x140034e68]
mov rcx, qword [rbp + 0x38]
test rcx, rcx
je 0x140018b8c
and qword [rbp + 0x38], 0
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [0x140034e68]
mov rcx, qword [rbp + 0x48]
test rcx, rcx
je 0x140018ba7
and qword [rbp + 0x48], 0
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [0x140034e68]
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x140018bc2
and qword [rbp - 0x10], 0
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [0x140034e68]
mov rcx, qword [0x14003d048]
lea rax, [0x14003d048]
cmp rcx, rax
je 0x140018c1a
test byte [rcx + 0x1c], 1
je 0x140018c1a
mov eax, dword [rsi]
lea edx, [rax + rax*4]
cmp edx, 0x1e1
ja 0x140018bef
mov eax, edx
sub r14, rax
jmp 0x140018bf2
xor r14d, r14d
mov rcx, qword [rcx + 0x10]
lea r9, [0x140035650]
add r9, r14
mov dword [rsp + 0x28], edi
mov edx, 0x4d
mov qword [rsp + 0x20], r15
lea r8, [0x1400367b8]
call fcn.140001730
dec dword [rsi]
cmp ebx, 0xffffffff
je 0x140018c38
mov ecx, ebx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
test rax, rax
je 0x140018c38
xor edx, edx
mov ecx, ebx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
mov eax, edi
mov rbx, qword [rsp + 0x70]
add rsp, 0x40
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret