Function at 0x2112f1b0
Capabilities:
Check mutex on windows

Disassembly:
push esi
mov esi, eax
test esi, esi
je 0x2112f59c
mov eax, dword [0x2115930c]
test eax, eax
je 0x2112f59c
push ebx
push ebp
push edi
mov ebx, esi
call fcn.21111a10
lock inc dword [0x21159160]
mov eax, dword [0x21159160]
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov ebp, 1
cmp eax, ebp
je 0x2112f1fb
lea ecx, [ecx]
push ebp
call edi
cmp dword [0x21159160], ebp
jne 0x2112f1f0
mov eax, dword [0x211566c0]
test eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_CreateMutexA]
je 0x2112f22d
mov eax, dword [0x211592a0]
test eax, eax
jne 0x2112f224
push 0
push 0
push 0
call edi
test eax, eax
mov dword [0x211592a0], eax
je 0x2112f213
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lock inc dword [0x2115915c]
mov eax, dword [esi + 0xc4]
test eax, eax
mov dword [esi + 0x368], ebp
jne 0x2112f24b
mov eax, esi
call fcn.2112df50
mov eax, dword [esi + 0x38]
xor ebx, ebx
test eax, eax
jle 0x2112f277
xor edi, edi
mov eax, dword [esi + 0x34]
mov ecx, dword [eax + edi + 8]
add eax, edi
cmp ecx, ebp
je 0x2112f269
push eax
call sym.mss32.dll__AIL_release_sample_handle_4
mov eax, dword [esi + 0x38]
inc ebx
add edi, 0x2ac
cmp ebx, eax
jl 0x2112f256
mov eax, dword [0x211592fc]
test eax, eax
je 0x2112f299
cmp dword [eax + 0x38], esi
jne 0x2112f292
push eax
call sym.mss32.dll__AIL_close_filter_4
mov eax, dword [0x211592fc]
jmp 0x2112f295
mov eax, dword [eax + 0x44]
test eax, eax
jne 0x2112f280
mov ecx, dword [esi + 4]
push ecx
call sym.mss32.dll__AIL_release_timer_handle_4
mov ecx, dword [0x2115930c]
cmp esi, ecx
jne 0x2112f2cb
mov eax, dword [esi + 0xcc]
test eax, eax
mov dword [0x2115930c], eax
jne 0x2112f2f5
mov edx, dword [esi + 0xc8]
push edx
push eax
call dword [sym.imp.USER32.dll_KillTimer]
jmp 0x2112f2f5
mov eax, dword [ecx + 0xcc]
cmp eax, esi
je 0x2112f2e9
test eax, eax
je 0x2112f3d3
mov ecx, eax
mov eax, dword [eax + 0xcc]
cmp eax, esi
jne 0x2112f2d5
mov eax, dword [eax + 0xcc]
mov dword [ecx + 0xcc], eax
mov eax, dword [0x211566c0]
test eax, eax
je 0x2112f30b
mov ecx, dword [0x211592a0]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [esi + 0xc4]
test eax, eax
jne 0x2112f321
mov edx, dword [esi + 0x68]
push edx
call fcn.2112dd70
add esp, 4
push ebp
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x211566c0]
test eax, eax
je 0x2112f35a
mov eax, dword [0x211592a0]
test eax, eax
jne 0x2112f351
mov edi, dword [sym.imp.KERNEL32.dll_CreateMutexA]
push 0
push 0
push 0
call edi
test eax, eax
mov dword [0x211592a0], eax
je 0x2112f340
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x2115664c]
test eax, eax
je 0x2112f3b4
mov eax, dword [esi + 0x78]
mov edi, dword [esi + 0x74]
xor ebp, ebp
test eax, eax
jle 0x2112f3b4
nop
mov eax, dword [esi + 0xc4]
test eax, eax
jne 0x2112f390
mov eax, dword [0x2115664c]
test eax, eax
je 0x2112f390
mov eax, dword [esi + 0x68]
push 0x20
push edi
push eax
call dword [sym.imp.WINMM.dll_waveOutUnprepareHeader]
mov ecx, dword [edi]
push ecx
call sym.mss32.dll__AIL_mem_free_lock_4
mov eax, dword [edi + 0xc]
mov ebx, dword [eax + 4]
push eax
call sym.mss32.dll__AIL_mem_free_lock_4
push edi
call sym.mss32.dll__AIL_mem_free_lock_4
mov eax, dword [esi + 0x78]
inc ebp
cmp ebp, eax
mov edi, ebx
jl 0x2112f370
mov eax, dword [esi + 0xc4]
test eax, eax
jne 0x2112f3f8
mov eax, dword [0x2115664c]
test eax, eax
je 0x2112f3df
mov edx, dword [esi + 0x68]
push edx
call dword [sym.imp.WINMM.dll_waveOutClose]
jmp 0x2112f3f8
lock dec dword [0x2115915c]
pop edi
pop ebp
pop ebx
pop esi
ret
mov eax, dword [esi + 0xd8]
test eax, eax
je 0x2112f40a
call fcn.2112d780
mov dword [esi + 0xd8], 0
mov eax, dword [0x2115664c]
test eax, eax
je 0x2112f40a
mov eax, dword [esi + 0x7c]
push eax
call sym.mss32.dll__AIL_mem_free_lock_4
inc word [0x2115929c]
cmp word [0x21159294], 0
mov edi, dword [esi + 0x34]
mov ebx, 1
je 0x2112f45d
cmp word [0x2115929c], bx
je 0x2112f436
cmp word [0x21159298], 0
je 0x2112f45d
mov eax, dword [0x21159308]
test eax, eax
jne 0x2112f45d
call fcn.21112300
test eax, eax
je 0x2112f45d
mov ecx, dword [0x2115c0bc]
push edi
push str.AIL_mem_free_lock_0x_lX__r_n
push ecx
call fcn.211306e2
add esp, 0xc
test edi, edi
je 0x2112f468
push edi
call dword [0x21155834]
cmp word [0x21159294], 0
mov edi, dword [esi + 0x40]
je 0x2112f4af
cmp word [0x2115929c], bx
je 0x2112f488
cmp word [0x21159298], 0
je 0x2112f4af
mov eax, dword [0x21159308]
test eax, eax
jne 0x2112f4af
call fcn.21112300
test eax, eax
je 0x2112f4af
mov edx, dword [0x2115c0bc]
push edi
push str.AIL_mem_free_lock_0x_lX__r_n
push edx
call fcn.211306e2
add esp, 0xc
test edi, edi
je 0x2112f4ba
push edi
call dword [0x21155834]
cmp word [0x21159294], 0
mov edi, dword [esi + 0x33c]
je 0x2112f503
cmp word [0x2115929c], bx
je 0x2112f4dd
cmp word [0x21159298], 0
je 0x2112f503
mov eax, dword [0x21159308]
test eax, eax
jne 0x2112f503
call fcn.21112300
test eax, eax
je 0x2112f503
mov eax, dword [0x2115c0bc]
push edi
push str.AIL_mem_free_lock_0x_lX__r_n
push eax
call fcn.211306e2
add esp, 0xc
test edi, edi
je 0x2112f50e
push edi
call dword [0x21155834]
dec word [0x2115929c]
lock dec dword [0x21159160]
lock dec dword [0x2115915c]
mov eax, dword [0x211566c0]
test eax, eax
je 0x2112f539
mov ecx, dword [0x211592a0]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
inc word [0x2115929c]
cmp word [0x21159294], 0
je 0x2112f58b
cmp word [0x2115929c], bx
je 0x2112f564
cmp word [0x21159298], 0
je 0x2112f58b
mov eax, dword [0x21159308]
test eax, eax
jne 0x2112f58b
call fcn.21112300
test eax, eax
je 0x2112f58b
mov edx, dword [0x2115c0bc]
push esi
push str.AIL_mem_free_lock_0x_lX__r_n
push edx
call fcn.211306e2
add esp, 0xc
push esi
call dword [0x21155834]
dec word [0x2115929c]
pop edi
pop ebp
pop ebx
pop esi
ret