Function at 0x4018f0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xd4
mov eax, dword [0x44c6b0]
xor eax, esp
mov dword [esp + 0xd0], eax
mov eax, dword [esp + 0xd8]
push ebx
push edi
push 0x10000
push 0
push eax
mov ebx, ecx
call dword [sym.imp.WINMM.dll_mmioOpenA]
mov edi, eax
mov dword [esp + 0xc], edi
test edi, edi
jne 0x401933
push str.Not_Open_Wave
mov ecx, ebx
call fcn.00401830
push ebp
push esi
mov esi, dword [sym.imp.WINMM.dll_mmioDescend]
push 0x20
push 0
lea eax, [esp + 0x50]
push eax
push edi
mov dword [esp + 0x60], 0x45564157
call esi
test eax, eax
je 0x40195f
push str.Not_RIFF_WAVE
mov ecx, ebx
call fcn.00401830
push 0x10
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x68]
push edx
push edi
mov dword [esp + 0x70], 0x20746d66
call esi
test eax, eax
je 0x401986
push str.Not_fmt_Chunk
mov ecx, ebx
call fcn.00401830
mov ebp, dword [sym.imp.WINMM.dll_mmioRead]
push 0x10
lea eax, [esp + 0x24]
push eax
push edi
call ebp
cmp eax, 0x10
je 0x4019a7
push str.Not_File_Read
mov ecx, ebx
call fcn.00401830
cmp word [esp + 0x20], 1
jne 0x4019b9
mov dword [esp + 0x10], 0
jmp 0x4019d4
push 2
lea ecx, [esp + 0x14]
push ecx
push edi
call ebp
cmp eax, 2
je 0x4019d4
push str.Not_File_Read
mov ecx, ebx
call fcn.00401830
movzx edx, word [esp + 0x10]
add edx, 0x12
push edx
call fcn.00429112
mov esi, eax
mov eax, dword [esp + 0x24]
mov dword [esi], eax
mov ecx, dword [esp + 0x28]
mov dword [esi + 4], ecx
mov edx, dword [esp + 0x2c]
mov dword [esi + 8], edx
mov eax, dword [esp + 0x30]
mov dword [esi + 0xc], eax
mov cx, word [esp + 0x14]
mov word [esi + 0x10], cx
mov eax, dword [esp + 0x14]
add esp, 4
test ax, ax
je 0x401a30
movzx edx, ax
push edx
lea eax, [esi + 0x12]
push eax
push edi
call ebp
cmp eax, 2
je 0x401a30
push str.Not_File_Read
mov ecx, ebx
call fcn.00401830
push 0
lea ecx, [esp + 0x64]
push ecx
push edi
call dword [sym.imp.WINMM.dll_mmioAscend]
test eax, eax
je 0x401a4e
push str.Error
mov ecx, ebx
call fcn.00401830
mov edx, dword [esp + 0x54]
push 0
add edx, 4
push edx
push edi
call dword [sym.imp.WINMM.dll_mmioSeek]
cmp eax, 0xffffffff
jne 0x401a70
push str.Error
mov ecx, ebx
call fcn.00401830
push 0x10
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x3c]
push ecx
push edi
mov dword [esp + 0x44], 0x61746164
call dword [sym.imp.WINMM.dll_mmioDescend]
test eax, eax
je 0x401a9b
push str.Not_Data_Chunk
mov ecx, ebx
call fcn.00401830
mov ecx, dword [esp + 0x38]
xor eax, eax
mov dword [esp + 0xbc], eax
mov dword [esp + 0xc0], eax
mov dword [esp + 0xc4], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0xc8], eax
mov dword [esp + 0xcc], eax
mov dword [esp + 0xd0], eax
mov dword [esp + 0xd4], eax
mov dword [esp + 0xd8], eax
mov dword [esp + 0xdc], eax
mov dword [esp + 0xbc], 0x24
mov dword [esp + 0xc0], 0x82
mov dword [esp + 0xc4], ecx
movzx edi, word [esi + 0x10]
add edi, 0x12
push edi
mov ebp, ecx
call fcn.00429112
push edi
push esi
push eax
mov dword [esp + 0xdc], eax
call fcn.004291e0
push esi
call fcn.00429035
mov esi, dword [esp + 0x100]
mov ecx, dword [ebx + 0xc]
mov eax, dword [ebx + 8]
mov edx, dword [eax]
mov edx, dword [edx + 0xc]
add esp, 0x14
add esi, esi
push 0
add esi, esi
add ecx, esi
push ecx
lea ecx, [esp + 0xc4]
push ecx
push eax
call edx
test eax, eax
je 0x401b5e
push str.Not_Sound_Buffer_Create
mov ecx, ebx
call fcn.00401830
mov eax, dword [esp + 0xcc]
push eax
call fcn.00429035
mov ecx, dword [ebx + 0xc]
mov esi, dword [esi + ecx]
mov edx, dword [esi]
mov edx, dword [edx + 0x2c]
add esp, 4
push 0
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x38]
push ecx
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x28]
push ecx
push ebp
push 0
push esi
call edx
test eax, eax
je 0x401ba5
push str.Error
mov ecx, ebx
call fcn.00401830
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x1c]
push 0
lea eax, [esp + 0x78]
push eax
push ecx
call dword [sym.imp.WINMM.dll_mmioGetInfo]
test eax, eax
je 0x401bcb
push str.Error
mov ecx, ebx
call fcn.00401830
mov eax, dword [esp + 0x38]
cmp edi, eax
jbe 0x401bd5
mov edi, eax
sub eax, edi
xor esi, esi
mov dword [esp + 0x38], eax
test edi, edi
jbe 0x401c3a
mov ebp, dword [sym.imp.WINMM.dll_mmioAdvance]
jmp 0x401bf0
mov edx, dword [esp + 0x90]
cmp edx, dword [esp + 0x94]
jne 0x401c1e
mov ecx, dword [esp + 0x14]
push 0
lea eax, [esp + 0x78]
push eax
push ecx
call ebp
test eax, eax
je 0x401c1e
push str.Error
mov ecx, ebx
call fcn.00401830
mov edx, dword [esp + 0x90]
mov al, byte [edx]
mov ecx, dword [esp + 0x18]
mov byte [esi + ecx], al
inc dword [esp + 0x90]
inc esi
cmp esi, edi
jb 0x401bf0
mov eax, dword [esp + 0x14]
push 0
lea edx, [esp + 0x78]
push edx
push eax
call dword [sym.imp.WINMM.dll_mmioSetInfo]
pop esi
pop ebp
test eax, eax
je 0x401c5e
push str.Error
mov ecx, ebx
call fcn.00401830
mov ecx, dword [esp + 0xd8]
pop edi
pop ebx
xor ecx, esp
call fcn.00428f13
add esp, 0xd4
ret 8