Function at 0x6b807500
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov edx, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
mov ecx, dword [edx]
test ecx, ecx
js 0x6b807705
cmp dword [edx + 4], 0xf423f
ja 0x6b807705
test ebx, ebx
cmove ebx, dword [sym.libusb_1.0.dll_usbi_default_context]
lea ecx, [ebp - 0x20]
mov eax, ebx
call sym._get_next_timeout
test eax, eax
mov dword [ebp - 0x2c], eax
mov edi, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
je 0x6b8075cb
jmp 0x6b8076f0
test ebx, ebx
mov eax, ebx
cmove eax, dword [sym.libusb_1.0.dll_usbi_default_context]
add eax, 0xb8
mov dword [esp], eax
call edi
sub esp, 4
test esi, esi
je 0x6b807578
mov eax, dword [esi]
test eax, eax
jne 0x6b8076c0
mov dword [esp], ebx
call sym.libusb_1.0.dll_libusb_event_handler_active
sub esp, 4
test eax, eax
jne 0x6b807650
test ebx, ebx
mov eax, ebx
cmove eax, dword [sym.libusb_1.0.dll_usbi_default_context]
add eax, 0xb8
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
mov dword [esp + 0xc], str.event_handler_was_active_but_went_away__retrying
mov dword [esp + 8], str.libusb_handle_events_timeout_completed
mov dword [esp + 4], 4
mov dword [esp], 0
call sym.libusb_1.0.dll_usbi_log
mov dword [esp], ebx
call sym.libusb_1.0.dll_libusb_try_lock_events
sub esp, 4
test eax, eax
jne 0x6b807552
test esi, esi
je 0x6b8075e8
mov edx, dword [esi]
test edx, edx
jne 0x6b807636
mov dword [esp + 0xc], str.doing_our_own_event_handling
mov dword [esp + 8], str.libusb_handle_events_timeout_completed
mov dword [esp + 4], 4
mov dword [esp], 0
call sym.libusb_1.0.dll_usbi_log
mov eax, dword [ebx + 0xb4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
mov dword [ebp - 0x2c], 0xfffffffa
jne 0x6b807636
lea edx, [ebp - 0x20]
mov eax, ebx
call sym._handle_events.part.6
mov dword [ebp - 0x2c], eax
mov dword [esp], ebx
call sym.libusb_1.0.dll_libusb_unlock_events
mov esi, dword [ebp - 0x2c]
sub esp, 4
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
mov dword [esp + 0xc], str.another_thread_is_doing_event_handling
mov dword [esp + 8], str.libusb_handle_events_timeout_completed
mov dword [esp + 4], 4
mov dword [esp], 0
call sym.libusb_1.0.dll_usbi_log
lea eax, [ebp - 0x20]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym.libusb_1.0.dll_libusb_wait_for_event
sub esp, 8
test ebx, ebx
mov dword [ebp - 0x2c], eax
mov eax, ebx
je 0x6b8076e4
add eax, 0xb8
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x2c]
sub esp, 4
test eax, eax
mov esi, eax
js 0x6b807644
xor esi, esi
cmp eax, 1
jne 0x6b807644
mov eax, ebx
call sym._handle_timeouts
jmp 0x6b807644
test ebx, ebx
je 0x6b8076e4
add ebx, 0xb8
xor esi, esi
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
mov eax, dword [sym.libusb_1.0.dll_usbi_default_context]
jmp 0x6b80768f
mov eax, ebx
xor esi, esi
call sym._handle_timeouts
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
mov esi, 0xfffffffe
jmp 0x6b807644