Function at 0x2111c920
Capabilities:
Check mutex on windows
Create thread

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
push ebx
push ebp
push esi
push edi
je 0x2111c94e
mov ebx, dword [esp + 0x18]
test ebx, ebx
je 0x2111c94e
push 0x114
call sym.mss32.dll__AIL_mem_alloc_lock_4
mov esi, eax
test esi, esi
jne 0x2111c957
push str.Out_of_memory.
call sym.mss32.dll__AIL_set_error_4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 0xc
xor eax, eax
mov ecx, 0x45
mov edi, esi
rep stosd dword es:[edi], eax
mov eax, dword [0x2114e89c]
test eax, eax
je 0x2111c977
mov eax, dword [0x2114fa38]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea edi, [esi + 0x10]
push edi
push ebx
call dword [0x2114d504]
test eax, eax
jne 0x2111c98c
mov dword [edi], 0xffffffff
mov eax, dword [0x2114e89c]
test eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov ebp, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
je 0x2111c9c0
mov eax, dword [0x2114fa38]
test eax, eax
jne 0x2111c9bb
push 0
push 0
push 0
call edi
test eax, eax
mov dword [0x2114fa38], eax
je 0x2111c9aa
push 0xffffffffffffffff
push eax
call ebp
cmp dword [esi + 0x10], 0xffffffff
jne 0x2111c9df
push str.Unable_to_open_file.
call sym.mss32.dll__AIL_set_error_4
push esi
call sym.mss32.dll__AIL_mem_free_lock_4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 0xc
mov ecx, dword [esp + 0x14]
push ecx
call sym.mss32.dll__AIL_allocate_sample_handle_4
test eax, eax
mov dword [esi + 0xc], eax
jne 0x2111c9ff
push str.Unable_to_obtain_a_sample_handle.
call sym.mss32.dll__AIL_set_error_4
jmp 0x2111cc30
push eax
call sym.mss32.dll__AIL_init_sample_4
mov eax, dword [0x2114e89c]
test eax, eax
je 0x2111ca1b
mov edx, dword [0x2114fa38]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edx, ebx
mov ecx, esi
call fcn.2111cfb0
test eax, eax
jne 0x2111ca32
push str.Error_getting_sound_format.
jmp 0x2111cc22
mov eax, dword [0x2114e89c]
test eax, eax
je 0x2111ca5a
mov eax, dword [0x2114fa38]
test eax, eax
jne 0x2111ca55
push 0
push 0
push 0
call edi
test eax, eax
mov dword [0x2114fa38], eax
je 0x2111ca44
push 0xffffffffffffffff
push eax
call ebp
mov eax, dword [esi + 0x8c]
mov ecx, dword [esi + 0x88]
mov edx, dword [esp + 0x14]
push eax
push ecx
push edx
call sym.mss32.dll__AIL_minimum_sample_buffer_size_12
mov ecx, dword [esp + 0x1c]
test ecx, ecx
mov dword [esp + 0x18], eax
jne 0x2111caab
mov eax, 0xaaaaaaab
mul dword [esi + 0x84]
shr edx, 1
mov dword [esi + 0x64], edx
mov eax, dword [esp + 0x18]
cmp edx, eax
jge 0x2111ca99
mov dword [esi + 0x64], eax
mov eax, dword [esi + 0x64]
add eax, 0xfff
and eax, 0xfffff000
mov dword [esi + 0x64], eax
jmp 0x2111cac7
mov eax, 0x55555556
imul ecx
mov ecx, edx
shr ecx, 0x1f
lea edx, [edx + ecx + 0xfff]
and edx, 0xfffff000
mov dword [esi + 0x64], edx
mov eax, dword [esi + 0x64]
test eax, eax
jne 0x2111cad5
mov dword [esi + 0x64], 0x1000
mov eax, dword [esi + 0x64]
mov ecx, dword [esi + 0x94]
lea edx, [eax + eax*2]
mov ebx, ecx
sub ebx, edx
cmp ebx, 0x3000
mov edi, 1
jge 0x2111cb14
push ecx
mov dword [esi + 0x64], ecx
mov dword [esi + 0xd4], ecx
call sym.mss32.dll__AIL_mem_alloc_lock_4
test eax, eax
mov dword [esi + 0x14], eax
je 0x2111cc1d
mov dword [esi + 0xc4], edi
jmp 0x2111cb6b
mov ecx, dword [esp + 0x18]
add ecx, ecx
lea edx, [eax + eax]
cmp ecx, edx
mov dword [esi + 0xd4], ecx
jge 0x2111cb2d
mov dword [esi + 0xd4], edx
push eax
call sym.mss32.dll__AIL_mem_alloc_lock_4
test eax, eax
mov dword [esi + 0x14], eax
je 0x2111cc1d
mov edx, dword [esi + 0x64]
push edx
call sym.mss32.dll__AIL_mem_alloc_lock_4
test eax, eax
mov dword [esi + 0x18], eax
jne 0x2111cb57
mov eax, dword [esi + 0x14]
push eax
jmp 0x2111cc18
mov ecx, dword [esi + 0x64]
push ecx
call sym.mss32.dll__AIL_mem_alloc_lock_4
test eax, eax
mov dword [esi + 0x1c], eax
je 0x2111cc0b
mov edx, dword [esi + 0xc]
push fcn.2111ccd0
push edx
call sym.mss32.dll__AIL_register_EOB_callback_8
mov eax, dword [esi + 0xc]
push esi
push 4
push eax
call sym.mss32.dll__AIL_set_sample_user_data_12
mov eax, dword [0x211507c0]
test eax, eax
je 0x2111cb96
mov ecx, dword [esi + 0x64]
mov dword [esi + 0x68], ecx
jmp 0x2111cba1
mov eax, dword [esi + 0x64]
cdq
sub eax, edx
sar eax, 1
mov dword [esi + 0x68], eax
mov edx, dword [esi + 0xd4]
mov dword [esi + 0x9c], 0x7fffffff
mov dword [esi + 0x98], 0
mov dword [esi + 0x74], edi
mov dword [esi + 0x7c], 2
mov dword [esi + 0xbc], edi
mov dword [esi + 0xd8], edx
mov dword [esi + 0x108], edi
mov eax, dword [0x211517f4]
test eax, eax
jne 0x2111ccb8
push fcn.2111ccd0
call sym.mss32.dll__AIL_register_timer_4
cmp eax, 0xffffffff
mov dword [0x2114d514], eax
jne 0x2111cc4e
push 0x2114136c
call sym.mss32.dll__AIL_set_error_4
mov eax, dword [esi + 0x1c]
push eax
call sym.mss32.dll__AIL_mem_free_lock_4
mov ecx, dword [esi + 0x14]
push ecx
call sym.mss32.dll__AIL_mem_free_lock_4
mov edx, dword [esi + 0x18]
push edx
call sym.mss32.dll__AIL_mem_free_lock_4
push str.Out_of_memory.
call sym.mss32.dll__AIL_set_error_4
mov eax, dword [esi + 0xc]
push eax
call sym.mss32.dll__AIL_release_sample_handle_4
mov eax, dword [esi + 0x10]
cmp eax, 0xffffffff
je 0x2111cc3f
push eax
call dword [0x2114d508]
push esi
call sym.mss32.dll__AIL_mem_free_lock_4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 0xc
push 0x10
push eax
call sym.mss32.dll__AIL_set_timer_frequency_8
mov ecx, dword [0x2114d514]
push ecx
call sym.mss32.dll__AIL_start_timer_4
mov eax, dword [0x211517fc]
test eax, eax
jne 0x2111ccbe
push 0
push 0
push edi
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
lea edx, [esp + 0x18]
push edx
push 0
push 0
push 0x2111c860
push 0
push 0
mov dword [0x211517f0], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x211517fc], eax
mov eax, dword [esp + 0x18]
push str.MSS_Stream
push eax
call fcn.21101000
pop edi
mov dword [0x211517f4], esi
mov eax, esi
pop esi
pop ebp
pop ebx
ret 0xc
mov dword [esi + 0x104], eax
pop edi
mov dword [0x211517f4], esi
mov eax, esi
pop esi
pop ebp
pop ebx
ret 0xc