Function at 0x10039c90
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x1009c00c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, 0xffffff9d
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [ebp - 0x18]
push str.libusb_init_08X
push eax
call fcn.10038a40
add esp, 0xc
lea eax, [ebp - 0x18]
push eax
push 1
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov esi, eax
mov dword [ebp - 0x1c], esi
test esi, esi
jne 0x10039d0d
xor ecx, ecx
call fcn.10040980
push eax
push str.could_not_create_semaphore:__s
push str.windows_init
push 1
push edi
call fcn.10036f50
add esp, 0x14
lea eax, [ebx + 0x58]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100417b6
mov esp, ebp
pop ebp
ret
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x10039d54
xor ecx, ecx
call fcn.10040980
push eax
push str.failure_to_access_semaphore:__s
push str.windows_init
push 1
push edi
call fcn.10036f50
add esp, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, 0xfffffff5
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100417b6
mov esp, ebp
pop ebp
ret
add dword [0x1009e09c], 1
jne 0x10039e12
call fcn.100398f0
cmp dword [0x1009dd10], 0
jne 0x10039d8e
push str.This_version_of_Windows_is_NOT_supported
push str.windows_init
push 1
push edi
call fcn.10036f50
add esp, 0x10
mov ebx, 0xfffffff4
jmp 0x10039ea8
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [0x100aa814], eax
call fcn.10040010
call fcn.10038bf0
test eax, eax
je 0x10039dc7
push str.could_not_resolve_DLL_functions
push str.windows_init
push 1
push edi
call fcn.10036f50
add esp, 0x10
jmp 0x10039ea8
mov esi, 0x1007c7f8
nop dword [eax]
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call eax
add esi, 0x50
add esp, 8
cmp esi, 0x1007c988
jl 0x10039dd0
mov ecx, edi
call fcn.10040c60
test eax, eax
je 0x10039e9e
cmp dword [0x100aa978], 0
je 0x10039e3e
push str.hash_table_already_allocated
push str.htab_create
push 1
push edi
call fcn.10036f50
add esp, 0x10
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
mov esi, dword [ebp - 0x1c]
push 0
push 1
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
push esi
call edi
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100417b6
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
push 0x3fd
push str.using__lu_entries_hash_table
push str.htab_create
push 4
push 0
mov dword [0x100aa984], eax
call fcn.10036f50
push 8
push 0x3fe
mov dword [0x100aa958], 0
call fcn.100539fa
add esp, 0x1c
mov dword [0x100aa978], eax
test eax, eax
jne 0x10039e12
push str.could_not_allocate_space_for_hash_table
push str.htab_create
push 1
push edi
call fcn.10036f50
add esp, 0x10
call fcn.100416c0
mov ebx, 0xfffffff5
mov eax, dword [0x1009e09c]
test eax, eax
jne 0x10039f0a
mov esi, 0x1007c7fc
mov eax, dword [esi]
push 0xffffffffffffffff
call eax
add esi, 0x50
add esp, 4
cmp esi, 0x1007c98c
jl 0x10039eb6
call fcn.10039030
call fcn.10040160
call fcn.100416c0
push dword [0x100aa814]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
mov ecx, dword [0x100aa814]
xor edx, edx
test eax, eax
mov eax, dword [0x1009e09c]
cmovne ecx, edx
dec eax
mov dword [0x100aa814], ecx
mov dword [0x1009e09c], eax
jmp 0x10039e1a
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
dec eax
mov dword [0x1009e09c], eax
jmp 0x10039e1a