Function at 0x14000af98
Capabilities:
Set thread local storage value

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
mov qword [rbp - 0x50], 0xfffffffffffffffe
mov rbx, rcx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentThreadId]
mov dword [rbx + 0x58], eax
xor eax, eax
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x40], rax
mov dword [rbp - 0x48], 0x7fffffff
or dword [rbp + 0x40], 0xffffffff
lea rcx, [rbp + 0x40]
call fcn.1400098dc
mov edi, eax
mov r13d, 1
test eax, eax
js 0x14000b224
lea rdx, [rbp - 0x48]
mov esi, dword [rbp + 0x40]
mov ecx, esi
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
mov eax, dword [rbx + 0x50]
neg eax
sbb edx, edx
and edx, 2
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoInitializeEx]
mov edi, eax
test eax, eax
js 0x14000b224
and qword [rbp + 0x50], 0
and qword [rbp + 0x48], 0
lea rcx, [rbp + 0x50]
call fcn.140009b80
lea r8, [rbp + 0x50]
lea rdx, [rbp - 0x44]
mov rcx, rbx
call fcn.14000b28c
mov edi, eax
test eax, eax
js 0x14000b206
mov rax, qword [rbp + 0x50]
mov qword [rbp - 0x40], rax
lea rcx, [rbp + 0x48]
call fcn.140009b80
lea r14, [rbx + 0x5c]
lea r8, [rbp + 0x48]
mov rdx, r14
mov rcx, rbx
call fcn.14000b28c
mov edi, eax
test eax, eax
js 0x14000b206
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.api_ms_win_shcore_thread_l1_1_0.dll_SHSetThreadRef]
mov edi, eax
test eax, eax
js 0x14000b206
mov eax, dword [rbx + 0x50]
shl eax, 0x18
or eax, dword [rbx + 0x54]
add eax, r13d
mov dword [rbp - 0x48], eax
and dword [rbx + 0x34], 0
mov rcx, qword [rbx + 0x38]
test rcx, rcx
je 0x14000b0ab
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_SetEvent]
mov rcx, qword [rbx + 0x40]
test rcx, rcx
je 0x14000b0b9
call fcn.14001d0e0
and qword [rbx + 0x40], 0
mov byte [rbx + 0x60], 0
lock dec dword [0x1400cb668]
mov r15b, r13b
lea rsi, [rbx + 0x90]
jmp 0x14000b14a
lea rdx, [rbp - 0x38]
mov rcx, rbx
call fcn.140048cd0
mov dword [rsp + 0x20], r13d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, [rbp - 0x38]
call qword [sym.imp.ext_ms_win_rtcore_ntuser_window_ext_l1_1_0.dll_PeekMessageW]
test eax, eax
jne 0x14000b0d5
mov eax, dword [rbx + 0x50]
shl eax, 0x18
or eax, dword [rbx + 0x54]
bts eax, 0x17
add eax, r13d
mov dword [rbp - 0x48], eax
mov rcx, qword [rsi]
mov rax, qword [rcx]
mov rax, qword [rax + 0x18]
call qword [case.0x14000702c.0]
mov eax, dword [rbx + 0x50]
shl eax, 0x18
or eax, dword [rbx + 0x54]
add eax, r13d
mov dword [rbp - 0x48], eax
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x14000b142
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_SetEvent]
and qword [rbx + 0x28], 0
mov rcx, rbx
call fcn.14000b6cc
mov rcx, rsi
call fcn.14000b6bc
cmp eax, 0xffffffff
jne 0x14000b0e1
mov eax, dword [r14]
cmp eax, r13d
jle 0x14000b170
or edx, 0xffffffff
mov rcx, rbx
call fcn.14000b350
mov eax, dword [r14]
cmp eax, r13d
jne 0x14000b1ba
mov r15b, r13b
cmp byte [rbx + 0x30], 0
jne 0x14000b181
cmp dword [rbp - 0x44], r13d
jle 0x14000b18b
mov rcx, rbx
call fcn.140030570
jmp 0x14000b1ba
mov al, byte [reloc.SHCORE.dll_Ordinal_1]
test al, al
je 0x14000b1ba
mov eax, r13d
lock xadd dword [0x1400cb5a4], eax
add eax, r13d
cmp eax, 0xa
ja 0x14000b1b3
mov rcx, rbx
call fcn.140030570
xor r15b, r15b
lock dec dword [0x1400cb5a4]
mov rcx, rsi
call fcn.14000b6bc
cmp eax, 0xffffffff
jne 0x14000b14a
cmp dword [r14], r13d
jg 0x14000b14a
cmp dword [rbp - 0x44], r13d
jg 0x14000b14a
mov r8b, r15b
xor edx, edx
mov rcx, rbx
call fcn.1400305b8
test al, al
je 0x14000b14a
xor ecx, ecx
call qword [sym.imp.api_ms_win_shcore_thread_l1_1_0.dll_SHSetThreadRef]
and qword [rbp - 0x40], 0
mov dword [rbp - 0x48], 0x7fffffff
mov esi, dword [rbp + 0x40]
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoUninitialize]
nop
lea rcx, [rbp + 0x48]
call fcn.140009b80
nop
lea rcx, [rbp + 0x50]
call fcn.140009b80
test edi, edi
jns 0x14000b26a
mov dword [rbx + 0x34], edi
mov rcx, qword [rbx + 0x38]
test rcx, rcx
je 0x14000b236
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_SetEvent]
mov rcx, qword [rbx + 0x40]
test rcx, rcx
je 0x14000b249
call fcn.14001ce50
and qword [rbx + 0x40], 0
lock dec dword [0x1400cb668]
xor r8d, r8d
mov dl, r13b
mov rcx, rbx
call fcn.1400305b8
lea rcx, [rbx + 0x18]
call fcn.140044c30
mov esi, dword [rbp + 0x40]
cmp esi, 0xffffffff
je 0x14000b279
xor edx, edx
mov ecx, esi
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
add rsp, 0x80
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbx
pop rbp
ret