Function at 0x408fa0
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x4a6e12
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x450
push ebx
push ebp
mov dword [esp + 0x38], ecx
push esi
push edi
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x20]
mov dword [esp + 0x468], 0
call sub.MFC42.DLL_CString::CString_1
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x50]
mov byte [esp + 0x468], 1
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x258]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x474]
lea ecx, [esp + 0x28]
push eax
call fcn.004a5764
mov ecx, dword [esp + 0x470]
push ecx
lea ecx, [esp + 0x24]
call fcn.004a5764
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CString::MakeLower
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::MakeLower
lea edx, [esp + 0x258]
push str.SYSTEMCurrentControlSetServicesUSBSTOREnum
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 8
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x258]
push eax
push 0x20019
push 0
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4093d5
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [esp + 0x14]
lea eax, [esp + 0x50]
push edx
mov edx, dword [esp + 0x30]
lea ecx, [esp + 0x14]
push eax
push ecx
push 0
push str.Count
push edx
mov dword [esp + 0x28], 4
mov dword [esp + 0x2c], 0x104
call ebx
test eax, eax
jne 0x4093ca
movsx ebp, byte [esp + 0x50]
cmp ebp, 0x10
mov dword [esp + 0x30], ebp
jbe 0x4090c9
mov dword [esp + 0x30], 0x10
mov ebp, dword [esp + 0x30]
xor edi, edi
test ebp, ebp
mov dword [esp + 0x3c], edi
jbe 0x4093ca
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 + 0x58]
push 0xa
push edx
push edi
mov dword [esp + 0x2c], 1
call esi
add esp, 0xc
push eax
mov eax, dword [esp + 0x40]
push eax
call ebx
test eax, eax
jne 0x4093bd
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 + 0x58]
push 0xa
push ecx
push edi
call esi
mov edx, dword [esp + 0x48]
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 0x4091b6
push str.6387
push ebp
call esi
add esp, 8
test eax, eax
jne 0x4091b6
push str.9380
push ebp
call esi
add esp, 8
test eax, eax
jne 0x4091b6
push str.1234
push ebp
call esi
add esp, 8
test eax, eax
jne 0x4091b6
push ecx
lea eax, [esp + 0x24]
mov ecx, esp
mov dword [esp + 0x3c], esp
push eax
call fcn.004a57ee
mov ecx, dword [esp + 0x44]
push ebp
call fcn.0040bde0
test eax, eax
jne 0x4091b6
mov ecx, dword [esp + 0x28]
push ecx
push ebp
call esi
add esp, 8
test eax, eax
je 0x4093af
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x1c]
mov byte [esp + 0x468], 2
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x24]
mov byte [esp + 0x468], 3
call sub.MFC42.DLL_CString::CString_1
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x154]
push ebp
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x360]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x28]
mov byte [esp + 0x46c], 4
call fcn.004a5764
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x24]
mov eax, dword [edx - 8]
push eax
lea eax, [esp + 0x48]
push 0x16
push eax
call sub.MFC42.DLL_CString::Mid
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x46c], 5
call fcn.004a5776
lea ecx, [esp + 0x44]
mov byte [esp + 0x468], 4
call sub.MFC42.DLL_CString::CString
push ebp
lea ecx, [esp + 0x158]
push str.SYSTEMCurrentControlSetEnum_s
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea edx, [esp + 0x34]
lea eax, [esp + 0x154]
push edx
push 0x20019
push 0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4092c2
lea ecx, [esp + 0x14]
lea edx, [esp + 0x35c]
push ecx
mov ecx, dword [esp + 0x38]
lea eax, [esp + 0x14]
push edx
push eax
push 0
push str.ParentIdPrefix
push ecx
call ebx
lea edx, [esp + 0x35c]
lea ecx, [esp + 0x1c]
push edx
call fcn.004a5764
mov eax, dword [esp + 0x34]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x18]
xor ebx, ebx
mov eax, 0x4e5a10
mov edx, dword [ecx - 8]
mov dword [esp + 0x38], edx
mov esi, dword [eax]
mov ecx, dword [esp + 0x38]
mov edi, dword [esp + 0x18]
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x4092f1
add eax, 8
inc ebx
cmp eax, 0x4e5a90
jl 0x4092d4
jmp 0x409302
lea eax, [esp + 0x1c]
lea ecx, [ebx*8 + 0x4e5a14]
push eax
call fcn.004a5776
cmp ebx, 0x10
jne 0x409372
xor ebx, ebx
mov edi, 0x4e5a14
mov eax, dword [edi]
mov esi, 0x4e5a9c
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x409339
test cl, cl
je 0x409335
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x409339
add eax, 2
add esi, 2
test cl, cl
jne 0x409315
xor eax, eax
jmp 0x40933e
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x409350
add edi, 8
inc ebx
cmp edi, 0x4e5a94
jl 0x40930e
jmp 0x409372
lea eax, [esp + 0x1c]
lea ecx, [ebx*8 + 0x4e5a14]
push eax
call fcn.004a5776
lea ecx, [esp + 0x18]
push ecx
lea ecx, [ebx*8 + 0x4e5a10]
call fcn.004a5776
lea ecx, [esp + 0x24]
mov byte [esp + 0x468], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0x468], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x468], 1
call sub.MFC42.DLL_CString::CString
mov edi, dword [esp + 0x3c]
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 + 0x3c], edi
jb 0x4090d7
mov edx, dword [esp + 0x2c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x20]
mov byte [esp + 0x468], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x28]
mov dword [esp + 0x468], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x460]
pop edi
pop esi
pop ebp
mov eax, 1
mov dword fs:[0], ecx
pop ebx
add esp, 0x45c
ret 8