Function at 0x405873
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
push str.GetPerfTitleSz_start
call fcn.00403cd5
mov esi, dword [ebp + 0x10]
mov eax, dword [ebp + 0x14]
xor ebx, ebx
pop ecx
mov dword [esi], ebx
mov dword [eax], ebx
lea eax, [ebp - 0xc]
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push eax
push 0x20019
push ebx
push str.softwaremicrosoftwindows_ntcurrentversionperflib
push dword [ebp + 8]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
call edi
push eax
push str.RegOpenKeyEx:_dwR_d
mov dword [ebp + 0x10], eax
call fcn.00403cd5
cmp dword [ebp + 0x10], ebx
pop ecx
pop ecx
jne 0x405a00
lea eax, [ebp - 4]
mov dword [ebp - 4], 4
push eax
lea eax, [ebp - 0x14]
push dword [ebp + 0x18]
push eax
push ebx
push str.Last_Counter
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [ebp + 0x18]
mov dword [ebp + 0x10], eax
push dword [ecx]
push eax
push str.RegQueryValueEx_Last_Counter_:_dwR_d__TitleLastIdx_d
call fcn.00403cd5
add esp, 0xc
cmp dword [ebp + 0x10], ebx
jne 0x405a00
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push ebx
push str.Version
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0x18]
mov dword [ebp + 0x10], eax
push eax
push str.RegQueryValueEx_Version_:_dwR_d__dwTemp_d
call fcn.00403cd5
add esp, 0xc
cmp dword [ebp + 0x10], ebx
je 0x405976
lea eax, [ebp - 0x10]
mov dword [ebp - 8], str.Counters
push eax
push 0x20019
push ebx
push str.softwaremicrosoftwindows_ntcurrentversionperflib009
push dword [ebp + 8]
call edi
push eax
push str.RegOpenKeyEx:_dwR_d
mov dword [ebp + 0x10], eax
call fcn.00403cd5
cmp dword [ebp + 0x10], ebx
pop ecx
pop ecx
jne 0x405a00
jmp 0x405983
mov eax, dword [ebp + 0xc]
mov dword [ebp - 8], str.Counter_009
mov dword [ebp - 0x10], eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x14]
push ebx
push eax
push ebx
push dword [ebp - 8]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0x14]
mov dword [ebp + 0x10], eax
push eax
push dword [ebp - 8]
push str.RegQueryValueEx__s_:_dwR_d__Type_d
call fcn.00403cd5
add esp, 0x10
cmp dword [ebp + 0x10], ebx
jne 0x405a00
push dword [ebp - 4]
mov edi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push ebx
call edi
cmp eax, ebx
mov dword [esi], eax
je 0x4059ee
push esi
push str.TitleBuffer_p
call fcn.00403cd5
mov eax, dword [ebp + 0x18]
pop ecx
pop ecx
mov eax, dword [eax]
lea eax, [eax*4 + 4]
push eax
push 0x40
call edi
mov ecx, dword [ebp + 0x14]
cmp eax, ebx
mov dword [ecx], eax
jne 0x405a5d
push str.ERROR_NOT_ENOUGH_MEMORY
mov dword [ebp + 0x10], 8
call fcn.00403cd5
pop ecx
push str.Done
call fcn.00403cd5
cmp dword [ebp + 0x10], ebx
pop ecx
je 0x405a2b
mov esi, dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_LocalFree]
cmp esi, ebx
je 0x405a1f
push esi
call edi
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
cmp eax, ebx
je 0x405a2b
push eax
call edi
cmp dword [ebp - 0xc], ebx
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x405a3b
push dword [ebp - 0xc]
call esi
mov eax, dword [ebp - 0x10]
cmp eax, ebx
je 0x405a4a
cmp eax, dword [ebp + 0xc]
je 0x405a4a
push eax
call esi
push str.GetPerfTitleSz_end
call fcn.00403cd5
mov eax, dword [ebp + 0x10]
pop ecx
pop edi
pop esi
pop ebx
leave
ret
push ecx
push str.TitleSz_p
call fcn.00403cd5
pop ecx
lea eax, [ebp - 4]
pop ecx
push eax
lea eax, [ebp - 0x14]
push dword [esi]
push eax
push ebx
push dword [ebp - 8]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [esi]
mov dword [ebp + 0x10], eax
push eax
push dword [ebp - 8]
push str.RegQueryValueEx__s_:_dwR_d__TitleBuffer_s
call fcn.00403cd5
add esp, 0x10
cmp dword [ebp + 0x10], ebx
jne 0x405a00
mov edi, dword [esi]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x405a00
push edi
call fcn.0040d2f2
push eax
push str.Index_d
mov dword [ebp + 8], eax
call fcn.00403cd5
mov eax, dword [ebp - 8]
lea edi, [edi + eax + 1]
mov eax, dword [ebp + 0x18]
push dword [eax]
push dword [ebp + 8]
push str.Index_d__TitleLastIdx_d
call fcn.00403cd5
mov ecx, dword [ebp + 0x18]
mov eax, dword [ebp + 8]
add esp, 0x18
cmp eax, dword [ecx]
ja 0x405b06
push edi
push str.Title_s
call fcn.00403cd5
mov eax, dword [ebp + 0x14]
pop ecx
pop ecx
mov eax, dword [eax]
mov ecx, dword [ebp + 8]
mov dword [eax + ecx*4], edi
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edi, [edi + eax + 1]
jmp 0x405aa2