Function at 0x21113550
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0x10
inc word [0x2115929c]
cmp word [0x21159294], 0
push ebx
mov ebx, dword [esp + 0x18]
push ebp
mov ebp, dword [esp + 0x28]
push esi
mov esi, dword [esp + 0x28]
je 0x211135b5
cmp word [0x2115929c], 1
je 0x21113587
cmp word [0x21159298], 0
je 0x211135b5
mov eax, dword [0x21159308]
test eax, eax
jne 0x211135b5
call fcn.21112300
test eax, eax
je 0x211135b5
mov eax, dword [esp + 0x24]
mov ecx, dword [0x2115c0bc]
push ebp
push esi
push eax
push ebx
push str.AIL_open_digital_driver__ld___ld___ld__0x_lX__r_n
push ecx
call fcn.211306e2
add esp, 0x18
mov eax, dword [0x211566c0]
test eax, eax
je 0x211135e5
mov eax, dword [0x211592a0]
test eax, eax
jne 0x211135dc
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
test eax, eax
mov dword [0x211592a0], eax
je 0x211135c7
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor edx, edx
push edi
xor edi, edi
cmp esi, 1
setne dl
mov word [esp + 0x10], 1
mov ecx, ebx
inc edx
test ebx, ebx
mov word [esp + 0x12], dx
jne 0x21113608
mov ecx, 0x5622
mov esi, dword [esp + 0x28]
xor eax, eax
cmp esi, 8
setne al
mov dword [esp + 0x14], ecx
mov esi, ebp
lea eax, [eax*8 + 8]
mov word [esp + 0x1e], ax
shr ax, 3
imul eax, dword [esp + 0x12]
mov word [esp + 0x1c], ax
movzx eax, ax
imul eax, ecx
and esi, 1
mov dword [esp + 0x18], eax
jne 0x2111364c
push 0
push 0xf
call sym.mss32.dll__AIL_set_preference_8
lea ecx, [esp + 0x10]
push ecx
push 0xffffffffffffffff
push 0
lea edx, [esp + 0x3c]
push edx
call sym.mss32.dll__AIL_waveOutOpen_16
test eax, eax
mov ebx, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jne 0x211136d6
mov eax, dword [esp + 0x30]
mov ecx, dword [eax + 0xa8]
test ecx, ecx
je 0x2111372c
test esi, esi
jne 0x2111372c
mov ecx, dword [0x211566c0]
test ecx, ecx
je 0x21113699
mov eax, dword [0x211592a0]
push eax
call ebx
mov eax, dword [esp + 0x30]
push eax
call sym.mss32.dll__AIL_waveOutClose_4
mov eax, dword [0x211566c0]
test eax, eax
je 0x211136cf
mov eax, dword [0x211592a0]
test eax, eax
jne 0x211136c6
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
test eax, eax
mov dword [0x211592a0], eax
je 0x211136b1
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, 1
jmp 0x211136de
test esi, esi
jne 0x21113789
push 1
push 0xf
call sym.mss32.dll__AIL_set_preference_8
lea ecx, [esp + 0x10]
push ecx
push 0xffffffffffffffff
push 0
lea edx, [esp + 0x3c]
push edx
call sym.mss32.dll__AIL_waveOutOpen_16
test eax, eax
je 0x21113728
mov edi, edi
test edi, edi
je 0x21113789
xor edi, edi
push edi
push 0xf
call sym.mss32.dll__AIL_set_preference_8
lea eax, [esp + 0x10]
push eax
push 0xffffffffffffffff
push edi
lea ecx, [esp + 0x3c]
push ecx
call sym.mss32.dll__AIL_waveOutOpen_16
test eax, eax
jne 0x21113700
mov eax, dword [esp + 0x30]
mov ecx, dword [0x211566c0]
test ecx, ecx
pop edi
je 0x21113744
mov edx, dword [0x211592a0]
push edx
call ebx
mov eax, dword [esp + 0x2c]
cmp word [0x21159294], 0
pop esi
pop ebp
pop ebx
je 0x2111377c
cmp word [0x2115929c], 1
je 0x21113765
cmp word [0x21159298], 0
je 0x2111377c
mov ecx, dword [0x21159308]
test ecx, ecx
jne 0x2111377c
push eax
call fcn.211120a0
mov eax, dword [esp + 0x24]
add esp, 4
dec word [0x2115929c]
add esp, 0x10
ret 0x10
xor eax, eax
mov dword [esp + 0x30], eax
jmp 0x2111372c