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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x78
movaps xmmword [rsp + 0x60], xmm6
mov r14, rdx
mov rsi, rcx
mov ecx, dword [rcx + 0x134]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, 0xfffffffa
test rax, rax
jne 0x1400722f4
lea rdi, [rsi + 0x168]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test byte [rsi + 0x190], 1
jne 0x14007226e
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
imul eax, dword [r14], 0x3e8
movsxd rcx, dword [r14 + 4]
imul rbx, rcx, 0x10624dd3
mov rdx, rbx
shr rdx, 0x3f
sar rbx, 0x26
add ebx, edx
add ebx, eax
imul eax, ecx, 0x26e978d5
add eax, 0x10624d8
ror eax, 3
cmp eax, 0x418937
sbb ebx, 0xffffffff
mov dword [rsp + 0x48], 0
mov ecx, dword [rsi + 0x134]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
lea rdx, [rsp + 0x48]
mov rcx, rsi
mov r8d, ebx
call fcn.140073110
test eax, eax
je 0x14007230c
mov ebx, eax
cmp eax, 0xfffffff9
jne 0x14007225b
lea rdi, [rsi + 0xe0]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, rsi
call fcn.140072c00
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor ebx, ebx
mov ecx, dword [rsi + 0x134]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x1400722f4
lea r8, str.handle_events
lea r9, str.event_sources_modified__reallocating_event_data
xor ecx, ecx
mov edx, 4
call fcn.140055400
lea rbx, [rsi + 0x1a8]
mov rax, qword [rsi + 0x1b0]
cmp rax, rbx
je 0x1400722d9
lea rcx, [rax - 0x10]
xorps xmm6, xmm6
mov r15, qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop dword [rax]
mov r12, qword [rcx + 0x18]
mov rdx, qword [rax]
mov qword [r12], rdx
mov rdx, qword [rcx + 0x18]
mov r8, qword [rax]
mov qword [r8 + 8], rdx
movups xmmword [rax], xmm6
call r15
lea rcx, [r12 - 0x10]
mov rax, r12
cmp r12, rbx
jne 0x1400722b0
mov rcx, rsi
call fcn.140073010
test eax, eax
je 0x140072369
mov ebx, eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
movaps xmm6, xmmword [rsp + 0x60]
add rsp, 0x78
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov eax, dword [rsp + 0x48]
test al, 1
je 0x14007260d
lea r8, str.handle_event_trigger
lea r9, str.event_triggered
xor ecx, ecx
mov edx, 4
call fcn.140055400
lea r14, [rsp + 0x38]
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x38], r14
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [rsi + 0x190]
test al, 1
jne 0x140072384
test al, 2
jne 0x1400723a8
test al, 0x20
jne 0x1400723d5
test al, 8
jne 0x1400723f9
jmp 0x14007246d
and dword [rsi + 0x190], 0xfffffffe
jne 0x1400721c2
lea rcx, [rsi + 0x10]
call fcn.140072dc0
jmp 0x1400721c2
lea r8, str.handle_event_trigger
lea r9, str.someone_updated_the_event_sources
xor ecx, ecx
mov edx, 4
call fcn.140055400
mov eax, dword [rsi + 0x190]
test al, 2
je 0x140072358
lea r8, str.handle_event_trigger
lea r9, str.someone_purposefully_interrupted
xor ecx, ecx
mov edx, 4
call fcn.140055400
mov eax, dword [rsi + 0x190]
and eax, 0xfffffffd
mov dword [rsi + 0x190], eax
test al, 0x20
je 0x14007235c
lea r8, str.handle_event_trigger
lea r9, str.someone_is_closing_a_device
xor ecx, ecx
mov edx, 4
call fcn.140055400
mov eax, dword [rsi + 0x190]
test al, 8
je 0x14007246d
lea r8, str.handle_event_trigger
lea r9, str.hotplug_message_received
xor ecx, ecx
mov edx, 4
call fcn.140055400
mov eax, dword [rsi + 0x190]
and eax, 0xfffffff7
mov dword [rsi + 0x190], eax
lea rcx, [rsi + 0x1c8]
mov rdx, qword [rsi + 0x1d0]
cmp rdx, rcx
je 0x140072463
mov qword [rsp + 0x40], rdx
mov qword [rdx], r14
mov rax, qword [rsi + 0x1c8]
mov qword [rsp + 0x38], rax
mov qword [rax + 8], r14
mov qword [rsi + 0x1d0], rcx
mov qword [rsi + 0x1c8], rcx
mov eax, dword [rsi + 0x190]
jmp 0x14007246d
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x38], r14
xor ebx, ebx
test al, 0x10
je 0x140072587
lea r15, [rsi + 0x1d8]
mov rax, qword [rsi + 0x1e0]
cmp rax, r15
je 0x1400724b2
mov qword [rsp + 0x30], rax
lea rcx, [rsp + 0x28]
mov qword [rax], rcx
mov rax, qword [rsi + 0x1d8]
mov qword [rax + 8], rcx
mov qword [rsi + 0x1e0], r15
mov qword [rsi + 0x1d8], r15
jmp 0x1400724bc
lea rax, [rsp + 0x28]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rax, qword [rsp + 0x30]
mov r13, qword [0x140123c60]
lea r12, [rsp + 0x28]
xorps xmm6, xmm6
nop
cmp rax, r12
je 0x140072531
lea rcx, [rax - 0x18]
mov rdx, qword [rcx + 0x18]
mov rbp, qword [rcx + 0x20]
mov qword [rbp], rdx
mov rdx, qword [rcx + 0x18]
mov r8, qword [rcx + 0x20]
mov qword [rdx + 8], r8
movups xmmword [rax], xmm6
call r13
mov ebx, eax
mov rax, rbp
test ebx, ebx
je 0x1400724e0
mov dword [rsp + 0x20], ebx
lea r8, str.handle_event_trigger
lea r9, str.backend_handle_transfer_completion_failed_with_error__d
mov rcx, rsi
mov edx, 1
call fcn.140055400
jmp 0x140072533
xor ebx, ebx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [rsp + 0x30]
cmp rax, r12
je 0x140072571
mov qword [rax], r15
mov rax, qword [rsi + 0x1e0]
mov rcx, qword [rsp + 0x28]
mov qword [rcx + 8], rax
mov rax, qword [rsi + 0x1e0]
mov qword [rax], rcx
mov rax, qword [rsp + 0x30]
mov qword [rsi + 0x1e0], rax
jmp 0x140072581
cmp qword [rsi + 0x1e0], r15
jne 0x140072581
and byte [rsi + 0x190], 0xef
mov eax, dword [rsi + 0x190]
test eax, eax
jne 0x140072594
lea rcx, [rsi + 0x10]
call fcn.140072dc0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov r12, qword [rsp + 0x40]
cmp r12, r14
je 0x140072601
mov r15, qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
jmp 0x1400725d7
mov rax, qword [rdi + 0x10]
mov rcx, qword [rdi + 0x18]
mov qword [rcx], rax
mov rax, qword [rdi + 0x10]
mov rcx, qword [rdi + 0x18]
mov qword [rax + 8], rcx
mov rcx, rdi
call r15
mov r12, qword [rsp + 0x40]
cmp r12, r14
je 0x140072601
lea rdi, [r12 - 0x10]
mov r8d, dword [r12 - 0x10]
mov rdx, qword [r12 - 8]
mov rcx, rsi
call fcn.140070680
cmp dword [r12 - 0x10], 2
jne 0x1400725b0
mov rcx, qword [rdi + 8]
call fcn.140055ca0
jmp 0x1400725b0
test ebx, ebx
jne 0x14007225b
mov eax, dword [rsp + 0x48]
test al, 2
jne 0x140072620
mov r9d, dword [rsp + 0x5c]
test r9d, r9d
jne 0x140072661
jmp 0x140072259
lea rdi, [rsi + 0xe0]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, rsi
call fcn.140072c00
mov rcx, rsi
call fcn.140072b40
mov ebx, eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test ebx, ebx
jne 0x14007225b
mov r9d, dword [rsp + 0x5c]
test r9d, r9d
je 0x14007225b
mov r8d, dword [rsp + 0x58]
mov rdx, qword [rsp + 0x50]
mov rcx, rsi
call qword [0x140123c58]
test eax, eax
je 0x140072259
mov ebx, eax
mov dword [rsp + 0x20], eax
lea r8, str.handle_events
lea r9, str.backend_handle_events_failed_with_error__d
mov rcx, rsi
mov edx, 1
call fcn.140055400
jmp 0x14007225b