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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x40
mov esi, edx
mov ebx, ecx
xorps xmm0, xmm0
movaps xmmword [esp + 0x20], xmm0
push dword [ecx + 0xb8]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, 0xfffffffa
test eax, eax
jne 0x604338
mov dword [esp + 0x18], esi
lea esi, [ebx + 0xd8]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test byte [ebx + 0xf0], 1
mov dword [esp + 4], ebx
jne 0x603f4f
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ebx, dword [esp + 0x18]
mov ecx, dword [ebx + 4]
mov edx, 0x10624dd3
mov eax, ecx
imul edx
mov edi, edx
imul eax, dword [ebx], 0x3e8
mov ebx, dword [esp + 4]
shr edx, 0x1f
sar edi, 6
add edi, edx
add edi, eax
imul eax, ecx, 0x26e978d5
add eax, 0x10624d8
ror eax, 3
cmp eax, 0x418937
sbb edi, 0xffffffff
mov dword [esp + 0x20], 0
push ebx
push dword [ebx + 0xb8]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
lea eax, [esp + 0x20]
push edi
push eax
push ebx
call fcn.00759950
add esp, 0xc
test eax, eax
je 0x603fcc
mov edi, eax
cmp eax, 0xfffffff9
jne 0x60432a
lea esi, [ebx + 0x84]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, ebx
call fcn.00604910
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor edi, edi
jmp 0x60432a
mov dword [esp], esi
push str.event_sources_modified__reallocating_event_data
push str.handle_events
push 4
push ebx
call fcn.005fe840
add esp, 0x10
lea edi, [ebx + 0x100]
mov eax, dword [ebx + 0x104]
cmp eax, edi
je 0x603fa7
lea ecx, [eax - 8]
nop word [eax + eax]
mov esi, dword [ecx + 0xc]
mov edx, dword [eax]
mov dword [esi], edx
mov edx, dword [ecx + 0xc]
mov ebx, dword [eax]
mov dword [ebx + 4], edx
mov dword [eax], 0
push ecx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
lea ecx, [esi - 8]
mov eax, esi
cmp esi, edi
jne 0x603f80
mov ebx, dword [esp + 4]
push ebx
call fcn.00759880
add esp, 4
test eax, eax
je 0x604066
mov edi, eax
push dword [esp]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x604338
mov dword [esp], esi
movzx eax, byte [esp + 0x20]
test al, 1
je 0x6042aa
push str.event_triggered
push str.handle_event_trigger
push 4
push ebx
call fcn.005fe840
add esp, 0x10
lea esi, [esp + 0x10]
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], esi
push dword [esp]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebx + 0xf0]
test al, 1
je 0x60402b
push str.someone_updated_the_event_sources
push str.handle_event_trigger
push 4
push ebx
call fcn.005fe840
add esp, 0x10
mov eax, dword [ebx + 0xf0]
test al, 2
je 0x604053
push str.someone_purposefully_interrupted
push str.handle_event_trigger
push 4
push ebx
call fcn.005fe840
add esp, 0x10
mov eax, dword [ebx + 0xf0]
and eax, 0xfffffffd
mov dword [ebx + 0xf0], eax
xor edi, edi
test al, 4
jne 0x604087
test al, 0x20
jne 0x6040b4
test al, 8
jne 0x6040d3
jmp 0x60413b
and dword [ebx + 0xf0], 0xfffffffe
mov esi, dword [esp]
jne 0x603eb3
lea eax, [ebx + 0xc]
push eax
call fcn.00759630
add esp, 4
jmp 0x603eb3
push str.someone_unregistered_a_hotplug_cb
push str.handle_event_trigger
push 4
push ebx
call fcn.005fe840
add esp, 0x10
mov eax, dword [ebx + 0xf0]
and eax, 0xfffffffb
mov dword [ebx + 0xf0], eax
mov edi, 1
test al, 0x20
je 0x60405d
push str.someone_is_closing_a_device
push str.handle_event_trigger
push 4
push ebx
call fcn.005fe840
add esp, 0x10
mov eax, dword [ebx + 0xf0]
test al, 8
je 0x60413b
push str.hotplug_message_received
push str.handle_event_trigger
push 4
push ebx
call fcn.005fe840
add esp, 0x10
mov eax, dword [ebx + 0xf0]
mov edx, dword [ebx + 0x114]
and eax, 0xfffffff7
mov dword [ebx + 0xf0], eax
lea ecx, [ebx + 0x110]
cmp edx, ecx
je 0x60412e
mov dword [esp + 0x14], edx
mov dword [edx], esi
mov eax, dword [ebx + 0x110]
mov dword [esp + 0x10], eax
mov dword [eax + 4], esi
mov dword [ebx + 0x114], ecx
mov dword [ebx + 0x110], ecx
mov eax, dword [ebx + 0xf0]
jmp 0x604136
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], esi
mov edi, 1
mov dword [esp + 0x18], edi
xor edi, edi
test al, 0x10
je 0x604273
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
lea edx, [ebx + 0x118]
mov eax, dword [ebx + 0x11c]
cmp eax, edx
mov dword [esp + 0x1c], edx
je 0x604192
mov dword [esp + 0xc], eax
lea ecx, [esp + 8]
mov dword [eax], ecx
mov eax, dword [ebx + 0x118]
mov dword [esp + 8], eax
mov dword [eax + 4], ecx
mov dword [ebx + 0x11c], edx
mov dword [ebx + 0x118], edx
jmp 0x60419e
lea eax, [esp + 8]
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
mov eax, dword [esp]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0xc]
mov ecx, dword [0x8c401c]
mov ebx, dword [ecx + 0x80]
nop dword [eax + eax]
lea ecx, [esp + 8]
cmp eax, ecx
je 0x604214
add eax, 0xfffffff4
mov ecx, dword [eax + 0xc]
mov esi, dword [eax + 0x10]
mov dword [esi], ecx
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 0x10]
mov dword [ecx + 4], edx
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
push eax
call ebx
add esp, 4
mov edi, eax
mov eax, esi
test edi, edi
je 0x6041c0
push edi
push str.backend_handle_transfer_completion_failed_with_error__d
push str.handle_event_trigger
push 1
mov ebx, dword [esp + 0x14]
push ebx
call fcn.005fe840
add esp, 0x14
jmp 0x60421a
xor edi, edi
mov ebx, dword [esp + 4]
lea esi, [esp + 0x10]
push dword [esp]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esp + 0xc]
lea ecx, [esp + 8]
cmp eax, ecx
je 0x60425a
mov ecx, dword [esp + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebx + 0x11c]
mov ecx, dword [esp + 8]
mov dword [ecx + 4], eax
mov eax, dword [ebx + 0x11c]
mov dword [eax], ecx
mov eax, dword [esp + 0xc]
mov dword [ebx + 0x11c], eax
jmp 0x60426d
mov eax, dword [esp + 0x1c]
cmp dword [ebx + 0x11c], eax
jne 0x60426d
and byte [ebx + 0xf0], 0xef
mov eax, dword [ebx + 0xf0]
test eax, eax
jne 0x604283
lea eax, [ebx + 0xc]
push eax
call fcn.00759630
add esp, 4
push dword [esp]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [esp + 0x18], 0
je 0x60429d
push esi
push ebx
call fcn.00600b40
add esp, 8
test edi, edi
jne 0x60432a
movzx eax, byte [esp + 0x20]
test al, 2
jne 0x6042b8
mov eax, dword [esp + 0x2c]
test eax, eax
jne 0x6042ee
jmp 0x604322
mov esi, ebx
add ebx, 0x84
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, esi
call fcn.00604910
mov ecx, esi
call fcn.00604880
mov edi, eax
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
jne 0x604326
mov eax, dword [esp + 0x2c]
test eax, eax
mov ebx, dword [esp + 4]
je 0x60432a
mov ecx, dword [0x8c401c]
push eax
push dword [esp + 0x2c]
push dword [esp + 0x2c]
push ebx
call dword [ecx + 0x7c]
add esp, 0x10
test eax, eax
je 0x604322
mov edi, eax
push eax
push str.backend_handle_events_failed_with_error__d
push str.handle_events
push 1
push ebx
call fcn.005fe840
add esp, 0x14
jmp 0x60432a
xor edi, edi
jmp 0x60432a
mov ebx, dword [esp + 4]
push 0
push dword [ebx + 0xb8]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, edi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret