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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
mov rbp, rcx
mov ecx, dword [0x14003d17c]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
or r15d, 0xffffffff
mov rsi, rax
mov ebx, r15d
test rax, rax
jne 0x1400178d6
mov ebx, dword [0x14003d17c]
lea rdx, [rsp + 0x60]
and dword [rsp + 0x60], eax
lea rsi, [rsp + 0x60]
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 r12, [0x14003d048]
lea rdx, [0x140035650]
mov r14d, 0x1df
cmp r10, r12
je 0x140017936
test byte [r10 + 0x1c], 1
je 0x140017936
mov eax, dword [rsi]
lea ecx, [rax + rax*4]
cmp ecx, 0x1e1
ja 0x140017916
mov eax, ecx
mov ecx, r14d
sub rcx, rax
jmp 0x140017918
xor ecx, ecx
lea r9, [rcx + rdx]
mov qword [rsp + 0x20], rbp
mov rcx, qword [r10 + 0x10]
lea r8, [0x1400367b8]
mov edx, 0x37
call fcn.140001370
mov rcx, qword [rbp + 0xe0]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ResetEvent]
mov r13d, 0x80070000
test eax, eax
jne 0x140017970
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx edi, ax
or edi, r13d
test eax, eax
cmovle edi, eax
mov eax, 0x80004005
test edi, edi
cmovns edi, eax
test edi, edi
js 0x140017b00
mov rcx, qword [rbp + 0x80]
lea rdx, [0x1400175d0]
mov r8, rbp
call qword [sym.imp.deviceassociation.dll_DafStartFinalize]
mov edi, eax
test eax, eax
jns 0x1400179d7
mov rcx, qword [0x14003d048]
cmp rcx, r12
je 0x140017b52
test byte [rcx + 0x1c], 0x10
je 0x140017b07
mov eax, dword [rsi]
inc eax
lea edx, [rax + rax*4]
cmp edx, 0x1e1
ja 0x1400179c0
mov eax, edx
mov rdx, r14
sub rdx, rax
jmp 0x1400179c2
xor edx, edx
lea r13, [0x140035650]
lea r9, [rdx + r13]
mov edx, 0x38
jmp 0x140017aac
mov rcx, qword [rbp + 0xe0]
mov edx, r15d
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_WaitForSingleObject]
test eax, eax
jne 0x1400179f3
mov edi, dword [rbp + 0x100]
jmp 0x140017a0e
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx edi, ax
or edi, r13d
test eax, eax
cmovle edi, eax
mov eax, 0x80004005
test edi, edi
cmovns edi, eax
test edi, edi
js 0x140017b00
mov rcx, qword [rbp + 0xe0]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ResetEvent]
test eax, eax
jne 0x140017a42
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx edi, ax
or edi, r13d
test eax, eax
cmovle edi, eax
mov eax, 0x80004005
test edi, edi
cmovns edi, eax
test edi, edi
js 0x140017b00
mov rcx, qword [rbp + 0x80]
lea rdx, [0x140017720]
mov r8, rbp
call qword [sym.imp.deviceassociation.dll_DafStartDeviceStatusNotification]
mov edi, eax
test eax, eax
jns 0x140017ac9
mov rcx, qword [0x14003d048]
cmp rcx, r12
je 0x140017b52
test byte [rcx + 0x1c], 0x10
je 0x140017b07
mov eax, dword [rsi]
inc eax
lea edx, [rax + rax*4]
cmp edx, 0x1e1
ja 0x140017a9a
mov eax, edx
mov rdx, r14
sub rdx, rax
jmp 0x140017a9c
xor edx, edx
lea r13, [0x140035650]
lea r9, [rdx + r13]
mov edx, 0x39
mov rcx, qword [rcx + 0x10]
lea r8, [0x1400367b8]
mov dword [rsp + 0x20], edi
call fcn.140001304
mov rcx, qword [0x14003d048]
jmp 0x140017b0e
mov rcx, qword [rbp + 0xe0]
mov edx, r15d
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_WaitForSingleObject]
test eax, eax
jne 0x140017ae5
mov edi, dword [rbp + 0x100]
jmp 0x140017b00
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx edi, ax
or edi, r13d
test eax, eax
cmovle edi, eax
mov eax, 0x80004005
test edi, edi
cmovns edi, eax
mov rcx, qword [0x14003d048]
lea r13, [0x140035650]
cmp rcx, r12
je 0x140017b52
test byte [rcx + 0x1c], 1
je 0x140017b52
mov eax, dword [rsi]
lea edx, [rax + rax*4]
cmp edx, 0x1e1
ja 0x140017b2d
mov eax, edx
sub r14, rax
jmp 0x140017b30
xor r14d, r14d
mov rcx, qword [rcx + 0x10]
lea r9, [r14 + r13]
mov edx, 0x3a
mov dword [rsp + 0x28], edi
lea r8, [0x1400367b8]
mov qword [rsp + 0x20], rbp
call fcn.140001730
add dword [rsi], r15d
cmp ebx, r15d
je 0x140017b71
mov ecx, ebx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
test rax, rax
je 0x140017b71
xor edx, edx
mov ecx, ebx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
mov rbx, qword [rsp + 0x68]
mov eax, edi
mov rbp, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
ret