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

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x50
mov r13, rcx
mov r15, rdx
mov ecx, dword [0x14003d17c]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
or ebx, 0xffffffff
xor r12d, r12d
mov rdi, rax
test rax, rax
jne 0x140016375
mov ebx, dword [0x14003d17c]
lea rdx, [rbp + 0x50]
mov ecx, ebx
mov dword [rbp + 0x50], r12d
lea rdi, [rbp + 0x50]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
inc dword [rdi]
mov r10, qword [0x14003d048]
lea rax, [0x14003d048]
lea rdx, [0x140035650]
mov r14d, 0x1df
cmp r10, rax
je 0x1400163d6
test byte [r10 + 0x1c], 1
je 0x1400163d6
mov eax, dword [rdi]
lea ecx, [rax + rax*4]
cmp ecx, 0x1e1
ja 0x1400163b5
mov eax, ecx
mov ecx, r14d
sub rcx, rax
jmp 0x1400163b8
mov rcx, r12
lea r9, [rcx + rdx]
mov qword [rsp + 0x20], r13
mov rcx, qword [r10 + 0x10]
lea r8, [0x1400367b8]
mov edx, 0x1a
call fcn.140001370
xor edx, edx
mov qword [r15], r12
lea rax, [rbp + 0x48]
mov word [rbp - 0x20], r12w
lea r9, [0x140036768]
mov qword [rbp + 0x48], r12
lea rcx, [0x1400367a8]
mov qword [rsp + 0x20], rax
lea r8d, [rdx + 0x17]
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoCreateInstance]
mov esi, eax
test eax, eax
js 0x1400164b9
mov rcx, qword [rbp + 0x48]
lea rdx, [r13 + 0x98]
lea r8, [rbp - 0x20]
mov rax, qword [rcx]
mov rax, qword [rax + 0x78]
call qword [0x140034e68]
mov esi, eax
test eax, eax
js 0x1400164b9
mov qword [r15], r12
cmp word [rbp - 0x20], r12w
jne 0x140016446
mov esi, 0x80070490
jmp 0x1400164b9
mov rdx, r15
lea rcx, [rbp - 0x20]
call qword [sym.imp.PROPSYS.dll_PropVariantToStringAlloc]
mov esi, eax
test eax, eax
js 0x1400164b9
mov rcx, qword [0x14003d048]
lea rax, [0x14003d048]
cmp rcx, rax
je 0x140016511
test byte [rcx + 0x1c], 4
je 0x1400164c0
mov eax, dword [rdi]
inc eax
lea edx, [rax + rax*4]
cmp edx, 0x1e1
ja 0x14001648f
mov eax, edx
mov rdx, r14
sub rdx, rax
jmp 0x140016492
mov rdx, r12
mov rax, qword [r15]
lea r9, [0x140035650]
mov rcx, qword [rcx + 0x10]
lea r8, [0x1400367b8]
add r9, rdx
mov qword [rsp + 0x20], rax
mov edx, 0x1b
call fcn.140004a7c
mov rcx, qword [0x14003d048]
lea r15, [0x14003d048]
cmp rcx, r15
je 0x140016511
test byte [rcx + 0x1c], 1
je 0x140016511
mov eax, dword [rdi]
lea edx, [rax + rax*4]
cmp edx, 0x1e1
ja 0x1400164e6
mov eax, edx
sub r14, rax
jmp 0x1400164e9
mov r14, r12
mov rcx, qword [rcx + 0x10]
lea r9, [0x140035650]
add r9, r14
mov dword [rsp + 0x28], esi
mov edx, 0x1c
mov qword [rsp + 0x20], r13
lea r8, [0x1400367b8]
call fcn.140001730
mov rcx, qword [rbp + 0x48]
test rcx, rcx
je 0x140016527
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [0x140034e68]
lea rcx, [rbp - 0x20]
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_PropVariantClear]
or eax, 0xffffffff
add dword [rdi], eax
cmp ebx, eax
je 0x140016551
mov ecx, ebx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
test rax, rax
je 0x140016551
xor edx, edx
mov ecx, ebx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
mov eax, esi
mov rbx, qword [rsp + 0x90]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret