Function at 0x406c90
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
lea ebp, [esp - 0x104]
sub esp, 0x104
push 0xffffffffffffffff
push 0x4397e8
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x44d660]
xor eax, ebp
mov dword [ebp + 0x100], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x10c]
lea ecx, [ebp - 0x14]
push ecx
xor ebx, ebx
push 0x20019
push ebx
push str.Enum
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x406d1c
push str.Could_not_read_from_HKLMEnum
lea ecx, [ebp - 0x34]
call fcn.00404540
push 0x446108
lea edx, [ebp - 0x34]
push edx
call fcn.00425900
xor esi, esi
mov edx, dword [ebp - 0x14]
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp]
push ecx
push esi
push edx
mov dword [ebp - 0x18], 0x80
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
add esi, 1
test eax, eax
mov dword [ebp - 0x24], esi
jne 0x406eff
mov edx, dword [ebp - 0x14]
lea eax, [ebp - 0x1c]
push eax
push 0x20019
push ebx
lea ecx, [ebp]
push ecx
push edx
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x406d99
push str.Could_not_read_from_HKLMEnum_
lea ecx, [ebp - 0x24]
call fcn.00404540
lea ecx, [ebp]
push ecx
push eax
lea edx, [ebp - 0x40]
push edx
mov byte [ebp - 4], 1
call fcn.00406190
add esp, 0xc
push 0x446108
lea eax, [ebp - 0x40]
push eax
call fcn.00425900
xor edx, edx
mov edi, str.USBPORTS
lea esi, [ebp]
mov ecx, 9
repe cmpsb byte [esi], byte es:[edi]
mov eax, edx
sete al
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x1c]
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp + 0x80]
push edx
push ebx
push eax
mov dword [ebp - 0x18], 0x80
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
add ebx, 1
test eax, eax
jne 0x406f2e
mov edi, str.PNP0500
lea esi, [ebp + 0x80]
mov ecx, 9
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x406e13
mov edi, str.PNP0501
lea esi, [ebp + 0x80]
mov ecx, 9
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x406e13
cmp dword [ebp - 0x20], edx
je 0x406db2
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp - 0x28]
push ecx
push 0x20019
mov dword [ebp - 0x28], edx
push 0
lea edx, [ebp + 0x80]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x406e94
push str.Could_not_read_from_HKLMEnum_
lea ecx, [ebp - 0x24]
call fcn.00404540
lea ecx, [ebp]
push ecx
push eax
lea edx, [ebp - 0x2c]
push edx
mov byte [ebp - 4], 2
call fcn.00406190
add esp, 0xc
push 0x43c6cc
push eax
lea eax, [ebp - 0x20]
push eax
mov byte [ebp - 4], 3
call fcn.00406190
add esp, 0xc
lea ecx, [ebp + 0x80]
push ecx
push eax
lea edx, [ebp - 0x30]
push edx
mov byte [ebp - 4], 4
call fcn.00406190
add esp, 0xc
push 0x446108
lea eax, [ebp - 0x30]
push eax
call fcn.00425900
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x28]
push ecx
push edx
push eax
call fcn.004068d0
mov ecx, dword [ebp - 0x28]
add esp, 0xc
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x406db2
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x100]
xor ecx, ebp
call fcn.00425494
add ebp, 0x104
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [ebp - 0x24]
xor ebx, ebx
jmp 0x406d1e