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

Disassembly:
sub esp, 0x2a0
mov al, byte [esp + 0x2a4]
push ebx
push ebp
push esi
cmp al, 1
push edi
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0xffffffff
mov byte [esp + 0x13], 0
jne 0x404d31
mov ecx, 0x13
mov esi, str.SystemCurrentControlSetControlClass4D36E96C_E325_11CE_BFC1_08002BE10318
lea edi, [esp + 0x1b0]
mov eax, dword [str.matchingdeviceid]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [0x40af64]
mov edx, dword [0x40af68]
mov dword [esp + 0x30], eax
mov eax, dword [0x40af6c]
mov dword [esp + 0x34], ecx
mov cl, byte [0x40af70]
movsw word es:[edi], word [esi]
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], eax
mov byte [esp + 0x40], cl
jmp 0x404d6a
cmp al, 2
je 0x404d39
cmp al, 3
jne 0x404d6a
mov ecx, 0xd
mov esi, str.SystemCurrentControlSetControlMediaResourcesWave
lea edi, [esp + 0x1b0]
mov edx, dword [str.deviceid]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [0x40af80]
mov cl, byte [0x40af84]
movsb byte es:[edi], byte [esi]
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], eax
mov byte [esp + 0x38], cl
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea edx, [esp + 0x1c]
push edx
push 0x20019
lea eax, [esp + 0x1b8]
push 0
push eax
push 0x80000002
call ebx
test eax, eax
je 0x404d9c
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2a0
ret
lea ecx, [esp + 0x28]
lea edx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x20]
push 0
push 0
push 0
lea eax, [esp + 0x80]
push edx
push eax
push 0
push ecx
mov dword [esp + 0x38], 0x40
mov dword [esp + 0x34], 1
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x404f37
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
or ecx, 0xffffffff
lea edi, [esp + 0x1b0]
xor eax, eax
lea edx, [esp + 0xb0]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, edx
lea edx, [esp + 0xb0]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40aa58
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0xb0]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x70]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x20]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push 0xf003f
lea ecx, [esp + 0xb8]
push 0
push ecx
push 0x80000002
call ebx
push 0x100
call fcn.00405b70
mov ecx, dword [esp + 0x24]
add esp, 4
lea edx, [esp + 0x24]
mov esi, eax
push edx
push esi
push 0
lea eax, [esp + 0x3c]
push 0
push eax
push ecx
mov dword [esp + 0x3c], 0x200
mov dword [esp + 0x30], 0x40
call ebp
push str.modemwave
push esi
call fcn.00405a30
add esp, 8
test eax, eax
jne 0x404edd
push str.MODEMWAVE
push esi
call fcn.00405a30
add esp, 8
test eax, eax
je 0x404f00
lea edx, [esp + 0xb0]
push edx
call fcn.004020b0
mov ecx, dword [esp + 0x18]
mov al, byte [esp + 0x17]
add esp, 4
dec ecx
inc al
mov dword [esp + 0x14], ecx
mov byte [esp + 0x13], al
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x18]
mov eax, ecx
inc ecx
mov dword [esp + 0x14], ecx
lea ecx, [esp + 0x28]
push ecx
push 0
push 0
push 0
lea ecx, [esp + 0x80]
push edx
mov edx, dword [esp + 0x30]
push ecx
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
je 0x404ddf
mov eax, dword [esp + 0x1c]
cmp eax, 0xffffffff
je 0x404f47
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2a0
ret