Function at 0x408090
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x518
mov al, byte [esp + 0x520]
push ebx
mov ebx, ecx
push ebp
test al, al
push esi
mov dword [esp + 0x14], ebx
jne 0x4080b8
push 0xffffffffffffffff
push 0
lea ecx, [ebx + 4]
call fcn.004224c7
jmp 0x4080bc
mov byte [ebx + 0x18], 0
push 9
push str.softwaremicrosoftwindows_ntcurrentversionperflib
lea eax, [esp + 0x12c]
push str._s_03x
push eax
mov byte [esp + 0x1f], 0
call fcn.00413174
add esp, 0x10
lea ecx, [esp + 0x18]
lea edx, [esp + 0x124]
push ecx
push 0x20019
push 0
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x408117
push str.Could_not_open_performance_registry_key
lea ecx, [ebx + 0x2c]
mov byte [esp + 0x13], 1
call fcn.00422f18
jmp 0x4083fa
mov edx, dword [esp + 0x18]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x1c]
push eax
push 0
push ecx
push 0
push str.Counters
push edx
call esi
test eax, eax
je 0x408152
push str.Could_not_open_counter_registry_key
lea ecx, [ebx + 0x2c]
mov byte [esp + 0x13], 1
call fcn.00422f18
jmp 0x4083fa
mov eax, dword [esp + 0x10]
push edi
push eax
call fcn.00413bea
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40817d
push str.Out_of_Memory
lea ecx, [ebx + 0x2c]
mov byte [esp + 0x17], 1
call fcn.00422f18
jmp 0x4083ec
mov ecx, dword [esp + 0x14]
xor eax, eax
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x24]
push ebp
push ecx
push 0
push str.Counters
push edx
call esi
test eax, eax
je 0x4081c7
push str.Could_Not_Read_the_counter_Names
lea ecx, [ebx + 0x2c]
mov byte [esp + 0x17], 1
call fcn.00422f18
jmp 0x4083ec
mov al, byte [ebp]
mov ebx, ebp
test al, al
je 0x40827f
cmp ebx, ebp
jbe 0x4081fe
movsx eax, byte [ebx - 2]
lea edi, [ebx - 2]
push eax
call fcn.00413b5b
add esp, 4
test eax, eax
je 0x4081fe
movsx ecx, byte [edi - 1]
dec edi
push ecx
call fcn.00413b5b
add esp, 4
test eax, eax
jne 0x4081ec
push str.process
push ebx
call fcn.004139c6
add esp, 8
test eax, eax
jne 0x408263
movsx edx, byte [ebx - 2]
lea esi, [ebx - 2]
push edx
call fcn.00413b5b
add esp, 4
test eax, eax
je 0x408236
movsx eax, byte [esi - 1]
dec esi
push eax
call fcn.00413b5b
add esp, 4
test eax, eax
jne 0x408224
lea edi, [esi + 1]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x128]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov al, byte [ebx + ecx + 1]
lea ebx, [ebx + ecx + 1]
test al, al
jne 0x4081d4
push ebp
call fcn.0041397e
push 0xc800
mov dword [esp + 0x1c], 0xc800
call fcn.00413bea
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x4082bb
mov ecx, dword [esp + 0x18]
push str.Out_of_Memory
add ecx, 0x2c
mov byte [esp + 0x17], 1
call fcn.00422f18
jmp 0x4083ec
mov ecx, dword [esp + 0x14]
xor eax, eax
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
lea edx, [esp + 0x128]
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [esp + 0x14]
lea ecx, [esp + 0x20]
push eax
push ebp
push ecx
push 0
push edx
push reloc.OLEAUT32.dll_SysReAllocStringLen
call esi
test eax, eax
je 0x408313
cmp eax, 0xea
jne 0x408337
mov eax, dword [esp + 0x14]
add eax, 0x6400
push eax
push ebp
mov dword [esp + 0x1c], eax
call fcn.00413846
add esp, 8
mov ebp, eax
jmp 0x4082bb
mov eax, dword [esp + 0x14]
test eax, eax
jbe 0x408337
cmp word [ebp], 0x50
jne 0x408337
cmp word [ebp + 2], 0x45
jne 0x408337
cmp word [ebp + 4], 0x52
jne 0x408337
cmp word [ebp + 6], 0x46
je 0x408352
mov eax, dword [esp + 0x18]
push str.Could_Not_Obtain_Performance_Data
mov byte [esp + 0x17], 1
lea ecx, [eax + 0x2c]
call fcn.00422f18
jmp 0x4083ec
mov eax, dword [ebp + 0x18]
mov ebx, 0x100
add eax, ebp
mov ecx, dword [eax + 0x28]
cmp ecx, 0x100
ja 0x408369
mov ebx, ecx
mov esi, dword [eax + 4]
xor edi, edi
add esi, eax
test ebx, ebx
jbe 0x4083ec
mov eax, dword [esi + 0x10]
push 0
push 0
lea ecx, [esp + 0x2c]
push 0x104
add eax, esi
push ecx
push 0xffffffffffffffff
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_WideCharToMultiByte]
test eax, eax
je 0x4083d5
mov al, byte [esp + 0x530]
test al, al
je 0x4083c0
mov edx, dword [esp + 0x52c]
lea ecx, [esp + 0x24]
push ecx
mov eax, dword [edx]
push eax
call fcn.004139c6
add esp, 8
test eax, eax
je 0x4083e4
jmp 0x4083d5
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x24]
push eax
lea ecx, [edx + 4]
mov edx, dword [edx + 0xc]
push edx
call fcn.00422610
mov eax, dword [esi]
add eax, esi
mov esi, dword [eax]
add esi, eax
inc edi
cmp edi, ebx
jb 0x408374
jmp 0x4083ec
mov eax, dword [esp + 0x18]
mov byte [eax + 0x18], 1
test ebp, ebp
pop edi
je 0x4083fa
push ebp
call fcn.0041397e
add esp, 4
mov ecx, dword [esp + 0x18]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call esi
push reloc.OLEAUT32.dll_SysReAllocStringLen
call esi
mov cl, byte [esp + 0xf]
xor eax, eax
test cl, cl
pop esi
pop ebp
sete al
pop ebx
add esp, 0x518
ret 8