Function at 0x40c180
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x40ffeb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x52c
push ebx
push ebp
xor ebx, ebx
push esi
push edi
mov dword [esp + 0x28], 0xffffffff
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x30], vtable.CRegistry.0
mov byte [esp + 0x38], bl
mov edi, str.SoftwareSigmaTel
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x38]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x34], SysReAllocStringLen
mov eax, ecx
mov esi, edi
mov edi, edx
mov dword [esp + 0x544], ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov byte [esp + 0x20], 0xff
and ecx, 3
mov dword [esp + 0x24], ebx
rep movsb byte es:[edi], byte [esi]
mov ecx, str.STSysTray1.0
test ecx, ecx
je 0x40c25a
mov edi, 0x4135b4
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x38]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea edx, [esp + 0x38]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.STSysTray1.0
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [esp + 0x34]
lea eax, [esp + 0x10]
push eax
push 0x20019
lea ecx, [esp + 0x40]
push ebx
push ecx
push edx
mov dword [esp + 0x28], 4
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40c2a8
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x14]
lea ecx, [esp + 0x28]
push eax
push ecx
push ebx
push ebx
push str.RecordPriority
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [esp + 0x54c]
mov esi, dword [esp + 0x550]
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x13c]
mov ebp, dword [edi + esi*4 + 0x1e8]
mov ecx, dword [edi + esi*4 + 0x2d8]
push edx
push ebp
push str.SelectActiveRecordingDevice___Port__0x_x_Priority___d
push eax
mov dword [esp + 0x20], ecx
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0x14c]
push 1
push ecx
call fcn.004029d0
mov eax, dword [esp + 0x40]
add esp, 0x18
sub eax, ebx
je 0x40c303
dec eax
je 0x40c35a
jmp 0x40c436
mov eax, dword [edi + 0x1c4]
mov bl, byte [edi + esi + 0x238]
test eax, eax
mov dword [esp + 0x18], 0
je 0x40c328
mov edx, dword [eax]
lea ecx, [esp + 0x18]
push ecx
push ebp
push eax
call dword [edx + 0x40]
test bl, bl
je 0x40c35a
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40c35a
mov edx, dword [esp + 0x10]
push edx
call fcn.0040c150
add esp, 4
test eax, eax
je 0x40c35a
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], 1
jmp 0x40c436
mov eax, dword [edi + 0x1e4]
xor esi, esi
test eax, eax
jbe 0x40c436
lea ebp, [edi + 0x1e8]
mov cl, byte [edi + esi + 0x238]
mov eax, dword [ebp + 0xb0]
test cl, cl
mov dword [esp + 0x2c], eax
je 0x40c391
cmp eax, 2
je 0x40c391
mov ebx, 1
jmp 0x40c393
xor ebx, ebx
mov eax, dword [edi + 0x1c4]
mov dword [esp + 0x18], 0
test eax, eax
je 0x40c424
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
mov edx, dword [ebp]
push edx
push eax
call dword [ecx + 0x40]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40c424
cmp dword [esp + 0x2c], 1
je 0x40c424
mov eax, dword [ebp + 0xf0]
push eax
call fcn.0040c150
add esp, 4
test eax, eax
je 0x40c424
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x40c3f6
test ebx, ebx
je 0x40c3fa
mov cl, byte [esi + edi + 0x358]
mov edx, dword [ebp]
mov byte [esp + 0x20], cl
mov dword [esp + 0x10], edx
jmp 0x40c414
test ebx, ebx
je 0x40c424
mov al, byte [esi + edi + 0x358]
mov cl, byte [esp + 0x20]
cmp al, cl
jae 0x40c424
mov byte [esp + 0x20], al
mov eax, dword [ebp]
mov dword [esp + 0x10], eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], 1
mov eax, dword [edi + 0x1e4]
inc esi
add ebp, 4
cmp esi, eax
jb 0x40c370
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x1c]
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
and ecx, 0xff
lea eax, [esp + 0x13c]
push ecx
push edx
push esi
push str.SetRecordingDevice___NewDeviceSelected___d__TopPriorityPortIndex___d_MinSequenceNumber___d
push eax
call ebx
lea ecx, [esp + 0x150]
push 1
push ecx
call fcn.004029d0
add esp, 0x1c
test esi, esi
je 0x40c4b3
mov edi, dword [edi + 0x1c8]
test edi, edi
je 0x40c4b3
mov eax, dword [esp + 0x10]
mov edx, dword [edi]
push eax
push 0
push edi
call dword [edx + 0xc]
test eax, eax
jge 0x40c4b3
push eax
lea ecx, [esp + 0x140]
push str.SetRecordingDevice_failed_hr__0x_x
push ecx
call ebx
lea edx, [esp + 0x148]
push 1
push edx
call fcn.004029d0
add esp, 0x14
mov ecx, dword [esp + 0x53c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x538
ret