Function at 0x407e60
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 0x407ed1
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 [0x411204]
mov edx, dword [0x411208]
mov dword [esp + 0x30], eax
mov eax, dword [0x41120c]
mov dword [esp + 0x34], ecx
mov cl, byte [0x411210]
movsw word es:[edi], word [esi]
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], eax
mov byte [esp + 0x40], cl
jmp 0x407f0a
cmp al, 2
je 0x407ed9
cmp al, 3
jne 0x407f0a
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 [0x4111c0]
mov cl, byte [0x4111c4]
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 0x407f3c
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 0x4080d7
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, 0x410350
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.0040a280
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.0040a100
add esp, 8
test eax, eax
jne 0x40807d
push str.MODEMWAVE
push esi
call fcn.0040a100
add esp, 8
test eax, eax
je 0x4080a0
lea edx, [esp + 0xb0]
push edx
call fcn.00408420
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 0x407f7f
mov eax, dword [esp + 0x1c]
cmp eax, 0xffffffff
je 0x4080e7
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