Function at 0x408f80
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x459712
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x44c
push edi
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x18]
mov dword [esp + 0x458], 0
call sub.MFC42.DLL_CString::CString_1
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x40]
mov byte [esp + 0x458], 1
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x248]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x464]
lea ecx, [esp + 0x20]
push eax
call fcn.004581ae
mov ecx, dword [esp + 0x460]
push ecx
lea ecx, [esp + 0x1c]
call fcn.004581ae
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::MakeLower
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::MakeLower
lea edx, [esp + 0x248]
push str.SYSTEMCurrentControlSetServicesUSBSTOREnum
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 8
lea eax, [esp + 0x14]
lea ecx, [esp + 0x248]
push eax
push 0x20019
push 0
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4093a4
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [esp + 0xc]
push ebp
lea eax, [esp + 0x48]
push edx
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x10]
push eax
push ecx
push 0
push str.Count
push edx
mov dword [esp + 0x24], 4
mov dword [esp + 0x28], 0x104
call ebx
test eax, eax
jne 0x409397
movsx ebp, byte [esp + 0x48]
cmp ebp, 0x10
mov dword [esp + 0x2c], ebp
jbe 0x4090a4
mov dword [esp + 0x2c], 0x10
mov ebp, dword [esp + 0x2c]
xor edi, edi
test ebp, ebp
mov dword [esp + 0x30], edi
jbe 0x409397
push esi
lea eax, [esp + 0x14]
mov esi, dword [sym.imp.MSVCRT.dll__itoa]
push eax
lea ecx, [esp + 0x14]
push 0
push ecx
push 0
lea edx, [esp + 0x54]
push 0xa
push edx
push edi
mov dword [esp + 0x2c], 1
call esi
add esp, 0xc
push eax
mov eax, dword [esp + 0x34]
push eax
call ebx
test eax, eax
jne 0x409389
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
lea edx, [esp + 0x14]
mov ebp, eax
lea eax, [esp + 0x10]
push edx
push ebp
push eax
push 0
lea ecx, [esp + 0x54]
push 0xa
push ecx
push edi
call esi
mov edx, dword [esp + 0x3c]
add esp, 0xc
push eax
push edx
call ebx
mov esi, dword [sym.imp.MSVCRT.dll_strstr]
push str.058f
push ebp
call esi
add esp, 8
test eax, eax
jne 0x409182
push str.6387
push ebp
call esi
add esp, 8
test eax, eax
jne 0x409182
push str.9380
push ebp
call esi
add esp, 8
test eax, eax
jne 0x409182
push str.1234
push ebp
call esi
add esp, 8
test eax, eax
jne 0x409182
mov eax, dword [esp + 0x24]
push eax
push ebp
call esi
add esp, 8
test eax, eax
jne 0x409182
mov ecx, dword [esp + 0x2c]
push ecx
push ebp
call esi
add esp, 8
test eax, eax
je 0x40937b
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x28]
mov byte [esp + 0x464], 2
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x1c]
mov byte [esp + 0x464], 3
call sub.MFC42.DLL_CString::CString_1
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x150]
push ebp
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x35c]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x468], 4
call fcn.004581ae
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x1c]
mov eax, dword [edx - 8]
push eax
lea eax, [esp + 0x40]
push 0x16
push eax
call sub.MFC42.DLL_CString::Mid
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x468], 5
call fcn.004581c0
lea ecx, [esp + 0x3c]
mov byte [esp + 0x464], 4
call sub.MFC42.DLL_CString::CString
push ebp
lea ecx, [esp + 0x154]
push str.SYSTEMCurrentControlSetEnum_s
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea edx, [esp + 0x38]
lea eax, [esp + 0x150]
push edx
push 0x20019
push 0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40928e
lea ecx, [esp + 0x14]
lea edx, [esp + 0x358]
push ecx
mov ecx, dword [esp + 0x3c]
lea eax, [esp + 0x14]
push edx
push eax
push 0
push str.ParentIdPrefix
push ecx
call ebx
lea edx, [esp + 0x358]
lea ecx, [esp + 0x28]
push edx
call fcn.004581ae
mov eax, dword [esp + 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x18]
xor ebx, ebx
mov eax, 0x497040
mov edx, dword [ecx - 8]
mov dword [esp + 0x40], edx
mov esi, dword [eax]
mov ecx, dword [esp + 0x40]
mov edi, dword [esp + 0x18]
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x4092bd
add eax, 8
inc ebx
cmp eax, 0x4970c0
jl 0x4092a0
jmp 0x4092ce
lea eax, [esp + 0x28]
lea ecx, [ebx*8 + 0x497044]
push eax
call fcn.004581c0
cmp ebx, 0x10
jne 0x40933e
xor ebx, ebx
mov edi, 0x497044
mov eax, dword [edi]
mov esi, 0x4970cc
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x409305
test cl, cl
je 0x409301
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x409305
add eax, 2
add esi, 2
test cl, cl
jne 0x4092e1
xor eax, eax
jmp 0x40930a
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40931c
add edi, 8
inc ebx
cmp edi, 0x4970c4
jl 0x4092da
jmp 0x40933e
lea eax, [esp + 0x28]
lea ecx, [ebx*8 + 0x497044]
push eax
call fcn.004581c0
lea ecx, [esp + 0x18]
push ecx
lea ecx, [ebx*8 + 0x497040]
call fcn.004581c0
lea ecx, [esp + 0x1c]
mov byte [esp + 0x464], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x28]
mov byte [esp + 0x464], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x464], 1
call sub.MFC42.DLL_CString::CString
mov edi, dword [esp + 0x34]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push ebp
call dword [sym.imp.MSVCRT.dll_free]
mov ebp, dword [esp + 0x34]
add esp, 4
inc edi
cmp edi, ebp
mov dword [esp + 0x34], edi
jb 0x4090b3
pop esi
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebp
pop ebx
lea ecx, [esp + 0x18]
mov byte [esp + 0x458], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x20]
mov dword [esp + 0x458], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x450]
mov eax, 1
pop edi
mov dword fs:[0], ecx
add esp, 0x458
ret 8