Function at 0x40c470
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x430d46
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x334
mov eax, dword [esp + 0x344]
push edi
mov edi, ecx
mov dword [esp + 0x34], 0x104
lea ecx, [esp + 4]
mov dword [edi + 0x18], eax
call sub.MFC42.DLL_CString::CString_3
lea ecx, [esp + 0x44]
mov dword [esp + 0x340], 0
call fcn.0040c7b0
mov ecx, dword [edi + 0x44]
mov byte [esp + 0x340], 1
push ecx
lea ecx, [esp + 0x48]
call fcn.0040cce0
lea edx, [esp + 0xb4]
lea ecx, [esp + 4]
push edx
call fcn.0042f26e
mov eax, dword [edi + 0x44]
test eax, eax
mov eax, str.VolMic__
je 0x40c4f4
mov eax, str.VolSpkrs__
push eax
lea eax, [esp + 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0
lea ecx, [esp + 8]
call sub.MFC42.DLL_CString::GetBuffer
lea ecx, [esp + 0x134]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 8]
push edx
push str.SoftwareAnalog_DevicesSMax4Settings
push reloc.DSOUND.dll_DirectSoundCreate
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x40c569
push 1
mov ecx, edi
call fcn.0040c730
lea ecx, [esp + 0x44]
mov byte [esp + 0x340], 0
call fcn.0040c870
lea ecx, [esp + 4]
mov dword [esp + 0x340], 0xffffffff
call sub.MFC42.DLL_CString::CString
jmp 0x40c716
mov eax, dword [edi + 0x44]
push esi
test eax, eax
jne 0x40c5b2
lea eax, [esp + 0x38]
lea ecx, [esp + 0x238]
push eax
lea edx, [esp + 0x48]
push ecx
mov ecx, dword [esp + 0x14]
push edx
lea eax, [esp + 0x144]
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40c5a8
mov esi, dword [esp + 0x238]
jmp 0x40c6d8
mov esi, 0xcccc
jmp 0x40c6d8
mov eax, 0xcccc
lea edx, [esp + 0x38]
mov dword [esp + 0x34], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
lea eax, [esp + 0x238]
push edx
lea ecx, [esp + 0x48]
push eax
mov eax, dword [esp + 0x14]
push ecx
lea edx, [esp + 0x144]
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40c664
lea ecx, [esp + 0x14]
lea edx, [esp + 0x10]
push ecx
lea eax, [esp + 0x24]
push edx
lea ecx, [esp + 0x20]
push eax
lea edx, [esp + 0x38]
push ecx
lea eax, [esp + 0x4c]
push edx
lea ecx, [esp + 0x38]
push eax
lea edx, [esp + 0x58]
push ecx
lea eax, [esp + 0x4c]
push edx
lea ecx, [esp + 0x48]
push eax
lea edx, [esp + 0x40]
push ecx
lea eax, [esp + 0x5c]
push edx
push eax
lea ecx, [esp + 0x268]
push str._i__i__i__i__i__i__i__i__i__i__i__i
push ecx
call dword [sym.imp.MSVCRT.dll_sscanf]
add esp, 0x38
cmp dword [edi + 0x60], 0xffffffff
jne 0x40c678
mov eax, dword [esp + 0x34]
mov esi, dword [esp + 0x1c]
cmp eax, esi
jbe 0x40c6d8
jmp 0x40c6d6
mov eax, dword [edi + 0x64]
cmp eax, 4
jne 0x40c68e
mov eax, dword [esp + 0x40]
mov esi, dword [esp + 0x24]
cmp eax, esi
jbe 0x40c6d8
jmp 0x40c6d6
cmp eax, 5
jne 0x40c6a1
mov eax, dword [esp + 0x3c]
mov esi, dword [esp + 0x2c]
cmp eax, esi
jbe 0x40c6d8
jmp 0x40c6d6
cmp eax, 6
jne 0x40c6ac
mov esi, dword [esp + 0x10]
jmp 0x40c6d8
cmp eax, 7
jne 0x40c6b7
mov esi, dword [esp + 0x14]
jmp 0x40c6d8
cmp eax, 0x10
jne 0x40c6ca
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x20]
cmp eax, esi
jbe 0x40c6d8
jmp 0x40c6d6
mov eax, dword [esp + 0x28]
mov esi, dword [esp + 0x30]
cmp eax, esi
jbe 0x40c6d8
mov esi, eax
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0xcccccccd
lea ecx, [esp + 0x48]
mul esi
shr edx, 2
mov dword [edi + 0x3c], edx
mov byte [esp + 0x344], 0
call fcn.0040c870
lea ecx, [esp + 8]
mov dword [esp + 0x344], 0xffffffff
call sub.MFC42.DLL_CString::CString
pop esi
mov ecx, dword [esp + 0x338]
pop edi
mov dword fs:[0], ecx
add esp, 0x340
ret 4