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

Disassembly:
sub esp, 0x1ec
push ebx
push ebp
push esi
lea eax, [esp + 0x10]
push edi
push eax
push 1
push 0
push str.Config_ManagerEnum
mov edi, ecx
push reloc.OLEAUT32.dll_SysStringLen
mov byte [esp + 0x27], 0
mov dword [esp + 0x30], 0x80
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405acb
xor ebp, ebp
mov edx, dword [esp + 0x14]
push ebp
push ebp
push ebp
push ebp
push ebp
lea ecx, [esp + 0x4c]
push ebp
push ecx
push ebp
push ebp
push ebp
push ebp
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x14]
inc eax
lea ecx, [esp + 0x3c]
push eax
push ecx
push ebp
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov esi, eax
test esi, esi
jne 0x405ac2
lea eax, [esp + 0x3c]
lea ecx, [esp + 0xfc]
push eax
push str.Config_ManagerEnum_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea edx, [esp + 0x18]
lea eax, [esp + 0xfc]
push edx
push 1
push esi
push eax
push reloc.OLEAUT32.dll_SysStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405ab7
lea ecx, [esp + 0x20]
lea edx, [esp + 0x7c]
push ecx
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x2c]
push edx
push eax
push esi
push str.HardWareKey
push ecx
mov dword [esp + 0x38], 0x80
call ebx
lea edx, [esp + 0x30]
lea eax, [esp + 0x7c]
push edx
push eax
mov ecx, edi
call fcn.00405c00
test eax, eax
je 0x405ab7
mov ecx, dword [esp + 0x30]
xor eax, eax
mov al, byte [0x436904]
shl eax, 2
cmp ecx, 0x20
mov dword [eax + 0x4368dc], ecx
je 0x405aa1
mov ecx, dword [edi + 0x88]
test ecx, ecx
jne 0x405a8f
mov al, byte [esp + 0x13]
or al, 1
jmp 0x405aa7
mov dword [eax + 0x4368b4], 1
mov al, byte [esp + 0x13]
or al, 4
jmp 0x405aa7
mov al, byte [esp + 0x13]
or al, 2
mov byte [esp + 0x13], al
mov al, byte [0x436904]
inc al
mov byte [0x436904], al
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc ebp
test esi, esi
je 0x4059cc
mov edx, dword [esp + 0x14]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edx
call ebp
mov al, byte [0x436904]
mov dword [esp + 0x18], 0
test al, al
jbe 0x405be5
mov edi, 0x435df4
lea esi, [edi + 0x84]
lea ecx, [esp + 0x17c]
lea eax, [esi + 0x40]
push eax
push esi
push str.EnumMFCHILD0000PCI_s_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea edx, [esp + 0x14]
lea eax, [esp + 0x17c]
push edx
push 1
push 0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405bc6
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x38]
push edx
push eax
push 0
push str.PORTNAME
push ecx
mov dword [esp + 0x34], 0x80
call ebx
lea edx, [esp + 0x2b]
push edx
call fcn.0040e5b9
add esp, 4
mov dword [esi - 0xb8], eax
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x20]
push eax
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x38]
push ecx
push edx
push 0
push str.SBMPID
push eax
call ebx
mov ecx, dword [esp + 0x22]
and ecx, 0xff
mov dword [esi - 0xb4], ecx
mov eax, dword [edi]
cmp eax, 4
je 0x405bb2
cmp eax, 8
je 0x405bb2
cmp eax, 5
je 0x405bb2
cmp eax, 0x10
jne 0x405bbf
mov edx, dword [esp + 0x23]
and edx, 0xff
mov dword [edi - 0x18], edx
mov eax, dword [esp + 0x14]
push eax
call ebp
mov eax, dword [esp + 0x18]
xor ecx, ecx
mov cl, byte [0x436904]
inc eax
add edi, 0x118
cmp eax, ecx
mov dword [esp + 0x18], eax
jl 0x405af2
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1ec
ret