Function at 0x16002b130
Capabilities:
Set thread local storage value

Disassembly:
mov qword [rsp + 0x20], r9
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x70
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov qword [rsp + 0xb8], rbx
mov r12d, edx
mov rbp, rcx
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x1600bfd80]
lea rcx, [0x160273cd0]
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_InitOnceExecuteOnce]
xor esi, esi
cmp byte [0x1602742e0], sil
jne 0x16008d492
mov edx, esi
mov ecx, dword [0x160270d20]
cmp ecx, 0xffffffff
jne 0x16008d4a5
mov rbx, qword [0x160273d18]
add rbx, 0x1c08
cmp dword [rbx], esi
jne 0x16008d4d0
lock inc dword [rbx + 8]
cmp dword [rbx], esi
jne 0x16008d51c
mov byte [rsp + 0x40], sil
xor edx, edx
mov rcx, qword [rbp + 0xd78]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x16008d52a
lea r13, [rbp + 0x4e0]
mov rcx, r13
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_EnterCriticalSection]
mov r15d, esi
mov rdi, qword [rbp + 0x508]
test rdi, rdi
je 0x16008d535
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x16008d5dd
cmp qword [rdi + 0x10], rsi
je 0x16008d54a
mov rcx, qword [rdi + 0x10]
call fcn.160029270
test r15d, r15d
js 0x16002b2fe
test r12d, r12d
je 0x16002b2b9
mov r14, qword [rsp + 0xd0]
mov rdi, qword [rsp + 0xc8]
add rdi, 8
xor r13b, r13b
xor cl, cl
mov byte [rsp + 0xb0], cl
mov edx, dword [rdi - 8]
mov eax, edx
and eax, 0xf
cmp al, 3
je 0x16008d5fc
mov qword [rsp + 0x38], rsi
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rsi
mov dword [rsp + 0x20], esi
mov r9, qword [rdi + 0x18]
mov r8, qword [rdi]
lea rcx, [rbp - 0x30]
call fcn.16002d988
movzx ecx, byte [rsp + 0xb0]
mov dword [r14], eax
test eax, eax
jns 0x16002b33e
mov r15d, 0x80040e21
add rdi, 0x28
add r14, 4
sub r12, 1
jne 0x16002b242
mov byte [rsp + 0x40], r13b
lea r13, [rbp + 0x4e0]
mov rdi, qword [rbp + 0x508]
cmp byte [rsp + 0x40], sil
jne 0x16008d606
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x16008d69c
cmp qword [rdi + 0x10], rsi
je 0x16008d614
test esi, esi
jne 0x16002b2f1
mov rcx, qword [rdi + 0x10]
call fcn.1600291f8
mov esi, eax
mov rcx, r13
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
test esi, esi
js 0x16002b346
cmp dword [rbx], 0
jne 0x16008d6b2
lock dec dword [rbx + 8]
cmp dword [rbx], 0
jne 0x16008d6c8
mov ecx, dword [0x160270d20]
cmp ecx, 0xffffffff
jne 0x16008d6f9
mov eax, r15d
mov rbx, qword [rsp + 0xb8]
add rsp, 0x70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
or r13b, cl
jmp 0x16002b29f
mov r15d, esi
jmp 0x16002b2fe
mov rax, qword [rbp + 0xd88]
mov rdx, qword [rax + 0xe8]
jmp 0x16002b186
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
mov rcx, qword [rsp + 0xa8]
test eax, eax
jne 0x16002b195
lea r8, str.onecoreuap_base_appmodel_searchcommonincludePerUserCatalogResetHelper.h
lea edx, [rax + 0x39]
call fcn.160108704
nop
jmp 0x16002b195
mov r14d, esi
lea rcx, [rbx + 0x38]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_EnterCriticalSection]
cmp dword [rbx], esi
je 0x16008d4f8
mov rcx, rbx
call fcn.16000e024
mov rcx, qword [rbx + 0x60]
call fcn.160054648
mov r14d, 1
lea rcx, [rbx + 0x38]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
test r14d, r14d
je 0x16008d513
or edx, 0xffffffff
mov rcx, qword [rbx + 0x60]
call fcn.160054628
cmp dword [rbx], esi
jne 0x16008d4d0
jmp 0x16002b1ab
mov rcx, rbx
call fcn.160072020
nop
jmp 0x16002b1a3
mov r15d, 0x8000ffff
jmp 0x16002b2fe
mov r15d, 0x8000ffff
mov rcx, r13
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
nop
jmp 0x16002b219
mov rax, qword [rcx]
lea rdx, [rsp + 0x48]
mov qword [rsp + 0x20], rdx
mov r9, qword [rdi + 0xd8]
mov r8, qword [rdi + 0x80]
mov rdx, qword [rdi + 0x20]
mov rax, qword [rax + 0x20]
call qword [case.0x16003fc5a.0]
mov r14d, eax
test eax, eax
js 0x16008d5e3
mov rcx, qword [rsp + 0x48]
mov rax, rcx
mov qword [rsp + 0x58], rcx
test rcx, rcx
je 0x16008d5a3
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x16003fc5a.0]
mov rcx, qword [rsp + 0x48]
mov rax, qword [rsp + 0x58]
mov rdx, qword [rdi + 0x10]
test rdx, rdx
je 0x16008d5c6
mov rax, qword [rdx]
mov rcx, rdx
mov rax, qword [rax + 0x10]
call qword [case.0x16003fc5a.0]
mov rcx, qword [rsp + 0x48]
mov rax, qword [rsp + 0x58]
mov qword [rdi + 0x10], rax
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [case.0x16003fc5a.0]
cmp qword [rdi + 0x10], rsi
jne 0x16008d5ee
mov r14d, 0x8000ffff
mov ecx, 0x1f
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
test r14d, r14d
jne 0x16002b219
jmp 0x16002b210
mov eax, 0x80070057
jmp 0x16002b28e
mov rcx, rdi
call fcn.160025ed0
nop
jmp 0x16002b2ef
mov rax, qword [rcx]
lea rdx, [rsp + 0x50]
mov qword [rsp + 0x20], rdx
mov r9, qword [rdi + 0xd8]
mov r8, qword [rdi + 0x80]
mov rdx, qword [rdi + 0x20]
mov rax, qword [rax + 0x20]
call qword [case.0x16003fc5a.0]
mov esi, eax
test eax, eax
js 0x16008d6a1
mov rcx, qword [rsp + 0x50]
mov rbp, rcx
test rcx, rcx
je 0x16008d662
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x16003fc5a.0]
mov rcx, qword [rsp + 0x50]
mov rdx, qword [rdi + 0x10]
test rdx, rdx
je 0x16008d680
mov rax, qword [rdx]
mov rcx, rdx
mov rax, qword [rax + 0x10]
call qword [case.0x16003fc5a.0]
mov rcx, qword [rsp + 0x50]
mov qword [rdi + 0x10], rbp
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [case.0x16003fc5a.0]
cmp qword [rdi + 0x10], 0
jne 0x16002b2e2
mov esi, 0x8000ffff
mov ecx, 0x1f
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop
jmp 0x16002b2e2
lea rcx, [rbx + 0x38]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_EnterCriticalSection]
lock dec dword [rbx + 8]
cmp dword [rbx + 8], 0
je 0x16008d6d8
jmp 0x16008d6e9
lea rcx, [rbx + 0x38]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_EnterCriticalSection]
cmp dword [rbx + 8], 0
jne 0x16008d6e9
mov rcx, rbx
call fcn.16000dfd0
mov rcx, qword [rbx + 0x68]
call fcn.16005460c
lea rcx, [rbx + 0x38]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
nop
jmp 0x16002b314
xor edx, edx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
test eax, eax
jne 0x16002b323
mov rcx, qword [rsp + 0xa8]
lea r8, str.onecoreuap_base_appmodel_searchcommonincludePerUserCatalogResetHelper.h
lea edx, [rax + 0x39]
call fcn.160108704
nop
jmp 0x16002b323