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

Disassembly:
sub esp, 0x108
mov eax, dword [0x58c780]
xor eax, esp
mov dword [esp + 0x104], eax
push esi
push edi
call dword [sym.imp.WINMM.dll_mixerGetNumDevs]
xor esi, esi
mov edi, eax
cmp edi, esi
mov dword [esp + 0x18], edi
mov dword [0xc33fe4], esi
mov dword [esp + 0x10], esi
jle 0x4f20bb
push ebx
mov ebx, dword [sym.imp.WINMM.dll_mixerGetLineInfoA]
push ebp
lea ebp, [esi + 1]
push 0
push 0
push 0
push esi
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.WINMM.dll_mixerOpen]
test eax, eax
jne 0x4f20ab
mov edx, dword [esp + 0x10]
push 0x30
lea ecx, [esp + 0xe8]
push ecx
push edx
call dword [sym.imp.WINMM.dll_mixerGetDevCapsA]
test eax, eax
je 0x4f1e64
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.WINMM.dll_mixerClose]
jmp 0x4f20ab
xor esi, esi
cmp dword [esp + 0x110], esi
mov dword [esp + 0x14], esi
jle 0x4f208f
jmp 0x4f1e80
mov edx, dword [esp + 0x10]
push 0
lea ecx, [esp + 0x40]
push ecx
push edx
mov dword [esp + 0x48], 0xa8
mov dword [esp + 0x4c], esi
call ebx
test eax, eax
jne 0x4f207c
mov eax, dword [esp + 0x5c]
xor edi, edi
mov dword [esp + 0x1c], eax
test eax, eax
jle 0x4f2073
mov ecx, dword [esp + 0x10]
push ebp
lea eax, [esp + 0x40]
push eax
push ecx
mov dword [esp + 0x48], 0xa8
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], edi
call ebx
test eax, eax
jne 0x4f2063
test dword [esp + 0x4c], 0x80000000
je 0x4f205a
cmp dword [esp + 0x54], 0x1005
je 0x4f1f1b
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpA]
push 0x5607f8
lea edx, [esp + 0x78]
push edx
call esi
test eax, eax
je 0x4f1f1b
push str.CD_Digital
lea eax, [esp + 0x78]
push eax
call esi
test eax, eax
jne 0x4f205a
mov edx, dword [esp + 0x10]
push 2
lea ecx, [esp + 0x40]
push ecx
push edx
mov dword [esp + 0x48], 0xa8
call ebx
test eax, eax
jne 0x4f2063
mov eax, dword [esp + 0x60]
test eax, eax
je 0x4f2063
xor ecx, ecx
mov edx, 0x94
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004f346a
mov ecx, dword [esp + 0x64]
add esp, 4
mov esi, eax
mov eax, dword [esp + 0x48]
push 0
lea edx, [esp + 0x28]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x14]
push edx
push eax
mov dword [esp + 0x30], 0x18
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], 0x94
mov dword [esp + 0x44], esi
call dword [sym.imp.WINMM.dll_mixerGetLineControlsA]
test eax, eax
je 0x4f1fa8
push esi
call fcn.004f33a4
add esp, 4
jmp 0x4f2063
mov edx, dword [esp + 0x30]
xor ecx, ecx
test edx, edx
jle 0x4f2051
lea eax, [esi + 8]
lea esp, [esp]
cmp dword [eax], 0x50030001
je 0x4f1fd5
add ecx, ebp
add eax, 0x94
cmp ecx, edx
jl 0x4f1fc0
jmp 0x4f2051
mov edx, dword [0xc33fe4]
imul ecx, ecx, 0x94
mov eax, dword [esp + 0x18]
mov dword [edx*4 + 0xc33d18], eax
lea eax, [edx + edx*2]
lea eax, [eax*8 + 0xc33718]
mov dword [eax], 0x18
mov ebx, dword [ecx + esi + 4]
add ecx, esi
mov dword [eax + 4], ebx
mov dword [eax + 8], ebp
mov ecx, dword [ecx + 0x10]
push 0
lea edx, [edx*4 + 0xc33618]
push eax
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], 4
mov dword [eax + 0x14], edx
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.WINMM.dll_mixerGetControlDetailsA]
mov ebx, dword [sym.imp.WINMM.dll_mixerGetLineInfoA]
test eax, eax
jne 0x4f2051
mov eax, dword [0xc33fe4]
mov ecx, dword [eax*4 + 0xc33618]
mov dword [eax*4 + 0xc33518], ecx
add eax, ebp
mov dword [0xc33fe4], eax
push esi
call fcn.004f33a4
add esp, 4
cmp dword [0xc33fe4], 0x40
jge 0x4f208f
mov esi, dword [esp + 0x14]
add edi, ebp
cmp edi, dword [esp + 0x1c]
jl 0x4f1eb4
cmp dword [0xc33fe4], 0x40
jge 0x4f208f
add esi, ebp
cmp esi, dword [esp + 0x110]
mov dword [esp + 0x14], esi
jl 0x4f1e80
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.WINMM.dll_mixerClose]
cmp dword [0xc33fe4], 0x40
jge 0x4f20b9
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x20]
add esi, ebp
cmp esi, edi
mov dword [esp + 0x18], esi
jl 0x4f1e21
pop ebp
pop ebx
mov ecx, dword [esp + 0x10c]
pop edi
pop esi
xor ecx, esp
call fcn.004f3b35
add esp, 0x108
ret