Function at 0x47b954
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x27c
push edi
push esi
push ebx
mov edx, dword [0x4d5504]
cmp edx, 7
jg 0x47b98c
mov eax, dword [0x4c523c]
push edx
push 0x47b821
push 0
push 1
mov eax, dword [eax + 0x28]
call eax
mov dword [0x4d5504], 8
add esp, 0x10
call sub.WINMM.DLL_waveOutGetNumDevs
test eax, eax
jne 0x47b9b8
add esp, 0xfffffffc
mov eax, dword [0x4c523c]
push 0x47b839
push 0
push 2
mov eax, dword [eax + 0x28]
call eax
mov eax, 0xffffffff
jmp 0x47bd31
mov edx, dword [0x4d54f8]
mov eax, edx
and al, 0xc7
mov dword [0x4d54f8], eax
test dl, 0x44
je 0x47b9d8
or al, 2
mov dword [0x4d54f8], eax
jmp 0x47b9e1
and edx, 0xffffffc5
mov dword [0x4d54f8], edx
mov ebx, dword [0x4d54f8]
and ebx, 1
lea edi, [ebp - 0x20]
xor eax, eax
cld
mov ecx, 4
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov word [ebp - 0x20], 1
test ebx, ebx
je 0x47ba0c
mov word [ebp - 0x1e], 1
jmp 0x47ba12
mov word [ebp - 0x1e], 2
mov eax, dword [0x4d54f4]
mov dword [ebp - 0x1c], eax
mov esi, eax
mov edx, 1
test ebx, ebx
jne 0x47ba2c
add esi, esi
mov edx, 2
mov eax, dword [0x4d54f8]
test al, 0x40
je 0x47ba40
lea esi, [esi + esi*2]
lea edx, [edx + edx*2]
jmp 0x47ba48
test al, 4
je 0x47ba48
add esi, esi
add edx, edx
mov dword [ebp - 0x18], esi
mov word [ebp - 0x14], dx
mov eax, dword [0x4d54f8]
test al, 0x40
je 0x47ba60
mov word [ebp - 0x12], 0x18
jmp 0x47ba72
test al, 4
je 0x47ba6c
mov word [ebp - 0x12], 0x10
jmp 0x47ba72
mov word [ebp - 0x12], 8
mov word [ebp - 0x10], 0xe
add esp, 0xfffffff8
push 0x47b853
lea ebx, [ebp - 0x160]
push ebx
call sub.USER32.dll_wsprintfA
add esp, 0xfffffff4
push ebx
call sub.KERNEL32.dll_OutputDebugStringA
mov dword [0x5919a0], 0
add esp, 0xfffffff4
push 0x30002
push 0
push 0x47c310
lea eax, [ebp - 0x20]
push eax
push 0xffffffffffffffff
push 0x5919a0
call sub.WINMM.DLL_waveOutOpen
mov esi, eax
add esp, 0x28
test esi, esi
je 0x47bb10
add esp, 0xfffffffc
mov ebx, dword [0x4c523c]
add esp, 0xfffffff4
push esi
call fcn.0047c5b0
push eax
movzx eax, word [ebp - 0x1e]
push eax
push dword [0x4d54f4]
add esp, 0xfffffff4
push dword [0x4d54f8]
call fcn.00423cc8
add esp, 0x10
push eax
push 0x47b868
push 0
push 2
mov eax, dword [ebx + 0x28]
call eax
mov eax, 0xffffffff
jmp 0x47bd31
add esp, 0xfffffff8
push 0x47b8a7
lea ebx, [ebp - 0x260]
push ebx
call sub.USER32.dll_wsprintfA
add esp, 0xfffffff4
push ebx
call sub.KERNEL32.dll_OutputDebugStringA
add esp, 0x1c
mov dword [ebp - 0x264], 0
add esp, 0xfffffff8
lea eax, [ebp - 0x264]
push eax
push dword [0x5919a0]
call sub.WINMM.DLL_waveOutGetID
lea edi, [ebp - 0x60]
mov eax, esi
cld
mov ecx, 0xd
rep stosd dword es:[edi], eax
add esp, 0xfffffff4
push 0x34
lea eax, [ebp - 0x60]
push eax
push dword [ebp - 0x264]
call sub.WINMM.DLL_waveOutGetDevCapsA
add esp, 0xfffffff4
mov eax, dword [0x4c523c]
push dword [ebp - 0x264]
push 0x47b8b7
push 3
push 0
mov eax, dword [eax + 0x28]
call eax
add esp, 0x30
mov edx, dword [0x4c523c]
movzx eax, word [ebp - 0x60]
push eax
push 0x47b8c5
push 3
push 0
mov eax, dword [edx + 0x28]
call eax
mov edx, dword [0x4c523c]
movzx eax, word [ebp - 0x5e]
push eax
push 0x47b8d8
push 3
push 0
mov eax, dword [edx + 0x28]
call eax
add esp, 0x20
mov eax, dword [0x4c523c]
push dword [ebp - 0x5c]
push 0x47b8e7
push 3
push 0
mov eax, dword [eax + 0x28]
call eax
mov edx, dword [0x4c523c]
lea eax, [ebp - 0x58]
push eax
push 0x47b8fa
push 3
push 0
mov eax, dword [edx + 0x28]
call eax
add esp, 0x20
mov eax, dword [0x4c523c]
push dword [ebp - 0x38]
push 0x47b90b
push 3
push 0
mov eax, dword [eax + 0x28]
call eax
mov edx, dword [0x4c523c]
movzx eax, word [ebp - 0x34]
push eax
push 0x47b925
push 3
push 0
mov eax, dword [edx + 0x28]
call eax
add esp, 0x20
mov eax, dword [0x4c523c]
push dword [ebp - 0x30]
push 0x47b937
push 3
push 0
mov eax, dword [eax + 0x28]
call eax
mov dword [0x5919b0], 0x1000
mov eax, dword [0x4d54f8]
add esp, 0x10
test al, 1
jne 0x47bc5d
mov dword [0x5919b0], 0x2000
test al, 0x40
je 0x47bc70
mov eax, dword [0x5919b0]
add eax, eax
add dword [0x5919b0], eax
jmp 0x47bc80
test al, 4
je 0x47bc80
mov eax, dword [0x5919b0]
add eax, eax
mov dword [0x5919b0], eax
mov eax, dword [0x5919b0]
mov edx, eax
shl edx, 5
sub edx, eax
lea edx, [eax + edx*4]
lea eax, [edx*8]
cdq
idiv dword [0x4d54f4]
mov dword [0x5919b0], eax
add esp, 0xfffffff4
mov eax, dword [0x4d5504]
shl eax, 3
sub eax, dword [0x4d5504]
shl eax, 2
push eax
call fcn.0040d4d8
mov dword [0x591970], eax
xor esi, esi
add esp, 0x10
cmp esi, dword [0x4d5504]
jge 0x47bd20
xor edi, edi
mov ebx, edi
add ebx, dword [0x591970]
add esp, 0xfffffff8
push 0x4000
push 0x40
call sub.KERNEL32.dll_GlobalAlloc
mov dword [ebx + 8], eax
add esp, 0xfffffffc
push eax
call sub.KERNEL32.dll_GlobalLock
mov dword [ebx + 0xc], eax
add esp, 0xfffffff4
push 0x20
push 0x40
call sub.KERNEL32.dll_GlobalAlloc
mov dword [ebx + 0x10], eax
add esp, 0xfffffffc
push eax
call sub.KERNEL32.dll_GlobalLock
mov dword [ebx + 0x14], eax
add esp, 0x1c
add edi, 0x1c
inc esi
cmp esi, dword [0x4d5504]
jl 0x47bcd0
call fcn.0047c638
mov dword [0x4d5500], 0
xor eax, eax
lea esp, [ebp - 0x288]
pop ebx
pop esi
pop edi
leave
ret