Function at 0x40e160
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xa1c
mov al, byte [esp + 0xa24]
push ebx
push ebp
push esi
mov esi, ecx
test al, al
mov dword [esp + 0x14], esi
jne 0x40e188
push 0xffffffffffffffff
push 0
lea ecx, [esi + 4]
call sub.MFC42u.DLL_CStringArray::SetSize
jmp 0x40e18c
mov byte [esi + 0x18], 0
push 9
push str.softwaremicrosoftwindows_ntcurrentversionperflib
lea eax, [esp + 0x230]
push str._s_03x
push eax
mov byte [esp + 0x1f], 0
call dword [sym.imp.MSVCRT.dll_swprintf]
add esp, 0x10
lea ecx, [esp + 0x18]
lea edx, [esp + 0x228]
push ecx
push 0x20019
push 0
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40e1e8
push str.Could_not_open_performance_registry_key
lea ecx, [esi + 0x2c]
mov byte [esp + 0x13], 1
call sub.MFC42u.DLL_CString::operator_1
jmp 0x40e4aa
mov edx, dword [esp + 0x18]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x1c]
push eax
push 0
push ecx
push 0
push str.Counters
push edx
call ebx
test eax, eax
je 0x40e223
push str.Could_not_open_counter_registry_key
lea ecx, [esi + 0x2c]
mov byte [esp + 0x13], 1
call sub.MFC42u.DLL_CString::operator_1
jmp 0x40e4aa
mov eax, dword [esp + 0x10]
push edi
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40e24f
push str.Out_of_Memory
lea ecx, [esi + 0x2c]
mov byte [esp + 0x17], 1
call sub.MFC42u.DLL_CString::operator_1
jmp 0x40e49b
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 ebx
test eax, eax
je 0x40e299
push str.Could_Not_Read_the_counter_Names
lea ecx, [esi + 0x2c]
mov byte [esp + 0x17], 1
call sub.MFC42u.DLL_CString::operator_1
jmp 0x40e49b
cmp word [ebp], 0
mov edi, ebp
je 0x40e33c
mov ebx, dword [sym.imp.MSVCRT.dll_iswdigit]
cmp edi, ebp
jbe 0x40e2d6
mov ax, word [edi - 4]
lea esi, [edi - 4]
push eax
call ebx
add esp, 4
test eax, eax
je 0x40e2d2
mov cx, word [esi - 2]
sub esi, 2
push ecx
call ebx
add esp, 4
test eax, eax
jne 0x40e2c1
mov esi, dword [esp + 0x18]
push str.process
push edi
call dword [sym.imp.MSVCRT.dll__wcsicmp]
add esp, 8
test eax, eax
jne 0x40e324
mov dx, word [edi - 4]
lea esi, [edi - 4]
push edx
call ebx
add esp, 4
test eax, eax
je 0x40e30b
mov ax, word [esi - 2]
sub esi, 2
push eax
call ebx
add esp, 4
test eax, eax
jne 0x40e2fa
add esi, 2
lea ecx, [esp + 0x22c]
push esi
push ecx
call dword [sym.imp.MSVCRT.dll_wcscpy]
mov esi, dword [esp + 0x20]
add esp, 8
push edi
call dword [sym.imp.MSVCRT.dll_wcslen]
lea edi, [edi + eax*2 + 2]
add esp, 4
cmp word [edi], 0
jne 0x40e2ac
push ebp
call dword [sym.imp.MSVCRT.dll_free]
push 0xc800
mov dword [esp + 0x1c], 0xc800
call dword [sym.imp.MSVCRT.dll_malloc]
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x40e238
mov ecx, dword [esp + 0x14]
xor eax, eax
mov edx, ecx
mov edi, ebp
shr ecx, 2
mov ebx, dword [sym.imp.MSVCRT.dll_realloc]
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [esp + 0x14]
lea ecx, [esp + 0x20]
push eax
push ebp
push ecx
lea edx, [esp + 0x238]
push 0
push edx
push 0x80000004
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x40e3d8
cmp eax, 0xea
jne 0x40e3fc
mov eax, dword [esp + 0x14]
add eax, 0x6400
push eax
push ebp
mov dword [esp + 0x1c], eax
call ebx
mov ecx, dword [esp + 0x1c]
mov ebp, eax
mov edx, ecx
xor eax, eax
mov edi, ebp
add esp, 8
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
jmp 0x40e37f
mov eax, dword [esp + 0x14]
test eax, eax
jbe 0x40e3fc
cmp word [ebp], 0x50
jne 0x40e3fc
cmp word [ebp + 2], 0x45
jne 0x40e3fc
cmp word [ebp + 4], 0x52
jne 0x40e3fc
cmp word [ebp + 6], 0x46
je 0x40e413
push str.Could_Not_Obtain_Performance_Data
lea ecx, [esi + 0x2c]
mov byte [esp + 0x17], 1
call sub.MFC42u.DLL_CString::operator_1
jmp 0x40e49b
mov eax, dword [ebp + 0x18]
mov ebx, 0x100
add eax, ebp
mov ecx, dword [eax + 0x28]
cmp ecx, 0x100
ja 0x40e42a
mov ebx, ecx
mov esi, dword [eax + 4]
xor edi, edi
add esi, eax
test ebx, ebx
jbe 0x40e49b
mov eax, dword [esi + 0x10]
lea ecx, [esp + 0x24]
add eax, esi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov al, byte [esp + 0xa34]
test al, al
je 0x40e46f
mov eax, dword [esp + 0xa30]
lea edx, [esp + 0x24]
push edx
mov ecx, dword [eax]
push ecx
call dword [sym.imp.MSVCRT.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x40e493
jmp 0x40e484
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x24]
push eax
lea ecx, [edx + 4]
mov edx, dword [edx + 0xc]
push edx
call sub.MFC42u.DLL_CStringArray::SetAtGrow
mov eax, dword [esi]
add eax, esi
mov esi, dword [eax]
add esi, eax
inc edi
cmp edi, ebx
jb 0x40e435
jmp 0x40e49b
mov eax, dword [esp + 0x18]
mov byte [eax + 0x18], 1
test ebp, ebp
pop edi
je 0x40e4aa
push ebp
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov ecx, dword [esp + 0x18]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call esi
push 0x80000004
call esi
mov cl, byte [esp + 0xf]
xor eax, eax
test cl, cl
pop esi
pop ebp
sete al
pop ebx
add esp, 0xa1c
ret 8