Function at 0x401590
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
sub esp, 0x24
push ebx
lea eax, [esp + 0x1c]
push esi
mov dword [esp + 0x24], ecx
xor esi, esi
push eax
push 0x20019
add ecx, 0x114
push esi
xor bl, bl
push ecx
push 0x80000002
mov byte [esp + 0x1f], bl
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], 1
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4017d7
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push edi
mov edi, dword [esp + 0x38]
mov dword [esp + 0x24], esi
mov ebx, 0xff
mov esi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
push ebx
push esi
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x4017be
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x20]
push eax
push 0x20019
push 0
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4017a9
mov esi, dword [esp + 0x40]
mov edx, dword [esp + 0x20]
push ebx
push esi
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x40179e
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x1c]
push eax
push 0x20019
push 0
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40179e
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x1c]
push edi
push eax
push 0
mov esi, 1
push str.Class
push ecx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], esi
call ebp
test eax, eax
jne 0x401793
push edi
push str.MEDIA
call fcn.00406740
add esp, 8
test eax, eax
jne 0x401793
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x1c]
push edi
push eax
push 0
push str.DeviceDesc
push ecx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], esi
call ebp
test eax, eax
jne 0x401793
mov esi, str.SoundMAX_Integrated_Digital_Audio
mov eax, edi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4016f7
test cl, cl
je 0x4016f3
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4016f7
add eax, 2
add esi, 2
test cl, cl
jne 0x4016d3
xor eax, eax
jmp 0x4016fc
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x401793
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x13], 1
mov ax, word [eax]
cmp ax, 4
je 0x401743
cmp ax, 5
je 0x401743
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x1c]
push edi
push edx
push 0
push str.Driver
push eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], 1
call ebp
jmp 0x401793
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x30]
push ecx
push str.Control
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x40178e
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x1c]
push edi
push ecx
push 0
push str.Driver
push edx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], 1
call ebp
mov eax, dword [esp + 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x401793
mov byte [esp + 0x13], 0
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x24]
mov al, byte [esp + 0x13]
inc ecx
test al, al
mov dword [esp + 0x24], ecx
je 0x4015e7
mov eax, dword [esp + 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, byte [esp + 0x13]
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x24
ret 0xc
mov al, bl
pop esi
pop ebx
add esp, 0x24
ret 0xc