Function at 0x40cce0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xb0
mov eax, dword [esp + 0xb4]
push ebp
push esi
push edi
mov edi, ecx
mov dword [esp + 0x10], 0
test eax, eax
mov dword [edi + 0x40], eax
jne 0x40ce51
lea eax, [esp + 0x1c]
push ebx
lea ecx, [esp + 0x10]
push eax
push ecx
push 0x2015
push 0xffffffffffffffff
call dword [sym.imp.WINMM.dll_waveInMessage]
mov ebx, dword [sym.imp.WINMM.dll_waveInGetDevCapsA]
test eax, eax
jne 0x40cd32
cmp dword [esp + 0x10], 0xffffffff
jne 0x40cde7
lea edx, [esp + 0x1c]
mov byte [esp + 0x5c], 0
push edx
push str.SoftwareMicrosoftMultimediaSound_Mapper
push reloc.DSOUND.dll_DirectSoundCreate
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x40cdd9
lea eax, [esp + 0x18]
lea ecx, [esp + 0x5c]
push eax
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x28]
push ecx
push edx
push 0
push str.Record
push eax
mov dword [esp + 0x30], 0x64
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, byte [esp + 0x5c]
test al, al
je 0x40cdd9
call dword [sym.imp.WINMM.dll_waveInGetNumDevs]
mov ebp, eax
xor eax, eax
test ebp, ebp
mov dword [esp + 0x10], eax
jle 0x40cddd
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpA]
lea edx, [esp + 0x28]
push 0x30
push edx
push eax
call ebx
lea eax, [esp + 0x5c]
lea ecx, [esp + 0x30]
push eax
push ecx
call esi
test eax, eax
je 0x40cdeb
mov eax, dword [esp + 0x10]
inc eax
cmp eax, ebp
mov dword [esp + 0x10], eax
jl 0x40cda8
mov dword [esp + 0x10], 0
jmp 0x40cdeb
mov ebp, dword [esp + 0x18]
mov dword [esp + 0x10], 0
jmp 0x40cdeb
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x28]
push 0x30
push edx
push eax
call ebx
test eax, eax
pop ebx
jne 0x40cedb
lea ecx, [esp + 0x2c]
lea esi, [edi + 0x70]
push ecx
mov ecx, esi
call sub.MFC42.DLL_CString::operator_1
mov ecx, esi
call sub.MFC42.DLL_CString::TrimRight
mov eax, dword [esp + 0xc]
lea edx, [esp + 0x10]
push 0x20000000
push edx
push eax
call dword [sym.imp.WINMM.dll_mixerGetID]
test eax, eax
jne 0x40cedb
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
push 0x20000000
push ebp
push ecx
push edx
mov ecx, edi
call fcn.0040d130
jmp 0x40cede
lea eax, [esp + 0x1c]
lea ecx, [esp + 0xc]
push eax
push ecx
push 0x2015
push 0xffffffffffffffff
call dword [sym.imp.WINMM.dll_waveOutMessage]
test eax, eax
jne 0x40ce75
mov eax, dword [esp + 0xc]
cmp eax, 0xffffffff
jne 0x40ce7b
xor eax, eax
mov dword [esp + 0xc], eax
lea edx, [esp + 0x24]
push 0x34
push edx
push eax
call dword [sym.imp.WINMM.dll_waveOutGetDevCapsA]
test eax, eax
jne 0x40cedb
lea esi, [edi + 0x70]
lea eax, [esp + 0x2c]
push eax
mov ecx, esi
call sub.MFC42.DLL_CString::operator_1
mov ecx, esi
call sub.MFC42.DLL_CString::TrimRight
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0x10]
push 0x10000000
push ecx
push edx
call dword [sym.imp.WINMM.dll_mixerGetID]
test eax, eax
jne 0x40cedb
call dword [sym.imp.WINMM.dll_waveOutGetNumDevs]
mov ecx, dword [esp + 0xc]
push 0x10000000
push eax
mov eax, dword [esp + 0x18]
push eax
push ecx
mov ecx, edi
call fcn.0040d130
jmp 0x40cede
or eax, 0xffffffff
lea esi, [edi + 0x70]
push str.Digital_Audio_MB
mov ecx, esi
mov dword [esp + 0x14], eax
mov dword [edi + 0x44], eax
call sub.MFC42.DLL_CString::Find
test eax, eax
jge 0x40cf1c
push 0x43f34c
mov ecx, esi
call sub.MFC42.DLL_CString::Find
test eax, eax
jge 0x40cf1c
push str.HD_Audio
mov ecx, esi
call sub.MFC42.DLL_CString::Find
test eax, eax
jge 0x40cf1c
xor eax, eax
jmp 0x40cf21
mov eax, 1
mov dword [edi + 0xd0], eax
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
add esp, 0xb0
ret 4