Function at 0x100366f0
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov ebx, ecx
mov eax, 1
push edi
mov dword [ebp - 8], ebx
mov esi, 0x100aa664
xchg dword [esi], eax
mov edi, dword [sym.imp.KERNEL32.dll_SleepEx]
cmp eax, 1
jne 0x10036727
push 1
push 0
call edi
mov eax, 1
xchg dword [esi], eax
cmp eax, 1
je 0x10036715
mov eax, dword [0x100aa668]
or eax, dword [0x100aa66c]
jne 0x10036743
push 0x100aa668
push 1
call fcn.10041120
add esp, 8
test ebx, ebx
jne 0x10036777
cmp dword [0x100a9134], ebx
je 0x10036777
push str.reusing_default_context
push str.libusb_init
push 4
push ebx
call fcn.10036f50
inc dword [0x100a9354]
add esp, 0x10
xor eax, eax
xchg dword [esi], eax
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push 0xa0
push 1
call fcn.100539fa
mov esi, eax
add esp, 8
mov dword [ebp - 0x10], esi
test esi, esi
jne 0x10036797
lea ecx, [eax - 0xb]
jmp 0x10036a54
push str.LIBUSB_DEBUG
call fcn.10054f62
add esp, 4
test eax, eax
je 0x100367d2
push eax
call fcn.1005491b
add esp, 4
test eax, eax
jns 0x100367b9
xor eax, eax
jmp 0x100367c3
mov ecx, 4
cmp eax, ecx
cmovg eax, ecx
mov dword [esi], eax
test eax, eax
je 0x100367d8
mov dword [esi + 4], 1
jmp 0x100367d8
mov dword [esi], 0
cmp dword [0x100a9134], 0
jne 0x10036803
inc dword [0x100a9354]
push str.created_default_context
push str.libusb_init
push 4
push 0
mov dword [0x100a9134], esi
call fcn.10036f50
add esp, 0x10
push 0x1007cabc
push 0x2bcf
push 0x15
push 0
push 1
push str.libusb_v_u._u._u._u_s
push str.libusb_init
push 4
push 0
call fcn.10036f50
mov eax, dword [sym.imp.KERNEL32.dll_CreateMutexW]
lea ebx, [esi + 0x18]
add esp, 0x24
test ebx, ebx
je 0x10036844
push 0
push 0
push 0
call eax
mov dword [ebx], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateMutexW]
lea ecx, [esi + 0x24]
test ecx, ecx
je 0x10036856
push 0
push 0
push 0
call eax
mov dword [esi + 0x24], eax
lea eax, [esi + 0x30]
test eax, eax
je 0x1003686c
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [esi + 0x30], eax
lea eax, [esi + 0x10]
mov edx, 0x100a9130
mov dword [ebp - 0xc], eax
mov dword [eax + 4], eax
mov dword [eax], eax
lea eax, [esi + 0x1c]
mov dword [eax + 4], eax
mov dword [eax], eax
lea eax, [esi + 0x28]
mov dword [eax + 4], eax
mov dword [eax], eax
mov eax, 1
xchg dword [edx], eax
cmp eax, 1
jne 0x100368ba
mov ebx, edx
nop word [eax + eax]
push 1
push 0
call edi
mov eax, 1
xchg dword [ebx], eax
cmp eax, 1
je 0x100368a0
lea ebx, [esi + 0x18]
mov edx, 0x100a9130
cmp dword [0x1009dfdc], 0
je 0x100368da
mov ecx, 0x100ae1c0
mov dword [0x1009dfdc], 0
mov dword [0x100ae1c0], ecx
jmp 0x100368e0
mov ecx, dword [0x100ae1c4]
lea eax, [esi + 0x98]
mov dword [eax + 4], ecx
mov dword [eax], 0x100ae1c0
mov dword [ecx], eax
mov dword [0x100ae1c4], eax
xor eax, eax
xchg dword [edx], eax
push esi
call fcn.10039c90
add esp, 4
mov dword [ebp - 4], eax
test eax, eax
jne 0x10036925
mov ecx, esi
call fcn.100370e0
mov dword [ebp - 4], eax
test eax, eax
jns 0x10036a66
push esi
call fcn.1003b940
add esp, 4
cmp esi, dword [0x100a9134]
jne 0x1003693d
dec dword [0x100a9354]
mov dword [0x100a9134], 0
mov eax, 1
mov ecx, 0x100a9130
xchg dword [ecx], eax
cmp eax, 1
jne 0x10036965
mov ebx, ecx
push 1
push 0
call edi
mov eax, 1
xchg dword [ebx], eax
cmp eax, 1
je 0x10036950
lea ebx, [esi + 0x18]
mov ecx, dword [esi + 0x9c]
mov eax, dword [esi + 0x98]
mov dword [ecx], eax
mov ecx, dword [esi + 0x98]
mov eax, dword [esi + 0x9c]
mov dword [ecx + 4], eax
xor eax, eax
mov dword [esi + 0x98], 0
mov ecx, 0x100a9130
mov dword [esi + 0x9c], 0
xchg dword [ecx], eax
test ebx, ebx
je 0x100369ad
push 0xffffffffffffffff
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, dword [esi + 0x14]
lea eax, [esi + 0x10]
mov ebx, dword [edi + 4]
lea ecx, [edi - 0x1c]
sub ebx, 0x1c
cmp edi, eax
je 0x100369f6
mov esi, dword [ebp - 0xc]
mov edx, dword [edi + 4]
mov eax, dword [edi]
mov dword [edx], eax
mov edx, dword [edi]
mov eax, dword [edi + 4]
mov dword [edx + 4], eax
mov dword [edi], 0
mov dword [edi + 4], 0
call fcn.10035f70
mov ecx, ebx
mov ebx, dword [ebx + 0x20]
sub ebx, 0x1c
lea edi, [ecx + 0x1c]
cmp edi, esi
jne 0x100369c3
mov esi, dword [ebp - 0x10]
lea edi, [esi + 0x18]
test edi, edi
je 0x10036a05
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esi + 0x24]
test eax, eax
je 0x10036a21
push dword [eax]
call ebx
test eax, eax
je 0x10036a21
mov dword [esi + 0x24], 0
test edi, edi
je 0x10036a33
push dword [edi]
call ebx
test eax, eax
je 0x10036a33
mov dword [edi], 0
lea edi, [esi + 0x30]
test edi, edi
je 0x10036a48
push dword [edi]
call ebx
test eax, eax
je 0x10036a48
mov dword [edi], 0
push esi
call fcn.10053caa
mov ecx, dword [ebp - 4]
add esp, 4
xor eax, eax
mov edx, 0x100aa664
xchg dword [edx], eax
pop edi
pop esi
mov eax, ecx
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov edx, 0x100aa664
xchg dword [edx], eax
mov eax, dword [ebp - 8]
test eax, eax
je 0x10036a78
mov dword [eax], esi
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret