Function at 0x4051b7
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov eax, dword [esp + 0xc]
mov ebp, esp
dec eax
sub esp, 0x51c
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
xor esi, esi
push 9
lea ecx, [ebp - 0x51c]
push str.softwaremicrosoftwindows_ntcurrentversionperflib
mov dword [ebp - 8], esi
push str._s_03x
push ecx
call fcn.00407e4c
add esp, 0x10
lea ecx, [ebp - 0xc]
lea edx, [ebp - 0x51c]
push ecx
push 0x20019
push esi
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4054c6
lea eax, [ebp - 4]
lea ecx, [ebp - 0x18]
push eax
push 0
push ecx
push 0
push str.Counters
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4054c6
push dword [ebp - 4]
call fcn.004078e9
add esp, 4
mov esi, eax
test esi, esi
je 0x4054cd
push dword [ebp - 4]
push 0
push esi
call fcn.00407942
add esp, 0xc
lea ecx, [ebp - 4]
lea eax, [ebp - 0x18]
push ecx
push esi
push eax
push 0
push str.Counters
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4054c6
mov edi, esi
cmp byte [esi], 0
je 0x40534a
cmp edi, esi
jbe 0x4052a8
lea ebx, [edi - 2]
movsx eax, byte [ebx]
push eax
call fcn.00404bdf
add esp, 4
test eax, eax
je 0x4052a8
dec ebx
movsx eax, byte [ebx]
push eax
call fcn.00404bdf
add esp, 4
test eax, eax
jne 0x405297
push str.process
push edi
call fcn.00404ce8
add esp, 8
test eax, eax
jne 0x4052f1
lea ebx, [edi - 2]
movsx eax, byte [ebx]
push eax
call fcn.00404bdf
add esp, 4
test eax, eax
je 0x4052de
dec ebx
movsx eax, byte [ebx]
push eax
call fcn.00404bdf
add esp, 4
test eax, eax
jne 0x4052cd
inc ebx
lea eax, [ebp - 0x51c]
push ebx
push eax
call fcn.004078f6
add esp, 8
jmp 0x405334
push str.id_process
push edi
call fcn.00404ce8
add esp, 8
test eax, eax
jne 0x405334
lea ebx, [edi - 2]
movsx eax, byte [ebx]
push eax
call fcn.00404bdf
add esp, 4
test eax, eax
je 0x405327
dec ebx
movsx eax, byte [ebx]
push eax
call fcn.00404bdf
add esp, 4
test eax, eax
jne 0x405316
inc ebx
push ebx
call fcn.00404c16
add esp, 4
mov dword [ebp - 0x14], eax
push edi
call fcn.004078d7
add esp, 4
lea edi, [eax + edi + 1]
cmp byte [edi], 0
jne 0x405280
push esi
call fcn.00407937
add esp, 4
mov eax, 0x12c00
mov dword [ebp - 4], eax
push eax
call fcn.004078e9
add esp, 4
mov esi, eax
test esi, esi
je 0x4054c6
push dword [ebp - 4]
xor edi, edi
push edi
push esi
call fcn.00407942
add esp, 0xc
lea eax, [ebp - 4]
lea ecx, [ebp - 0x18]
push eax
push esi
lea eax, [ebp - 0x51c]
push ecx
push edi
push eax
push 0x80000004
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4054c6
cmp dword [ebp - 4], edi
jbe 0x4054c6
cmp word [esi], 0x50
jne 0x4054c6
cmp word [esi + 2], 0x45
jne 0x4054c6
cmp word [esi + 4], 0x52
jne 0x4054c6
cmp word [esi + 6], 0x46
jne 0x4054c6
mov ecx, dword [esi + 0x18]
add ecx, esi
mov edx, dword [ecx + 8]
mov eax, dword [ecx + 0x20]
add edx, ecx
cmp eax, edi
je 0x4053fe
mov ebx, dword [ebp - 0x14]
cmp dword [edx + 4], ebx
je 0x4053f8
add edx, 0x28
inc edi
cmp edi, eax
jb 0x4053e6
jmp 0x4053fe
mov eax, dword [edx + 0x24]
mov dword [ebp - 0x14], eax
mov eax, dword [ecx + 0x28]
mov edx, dword [ebp - 0x10]
cmp eax, edx
jb 0x40540a
mov eax, edx
mov ebx, dword [ecx + 4]
mov dword [ebp + 0xc], eax
add ebx, ecx
test eax, eax
je 0x4054cd
mov edi, dword [ebp + 8]
mov dword [ebp - 0x10], eax
mov eax, dword [ebx + 0x10]
push 0
add eax, ebx
push 0
push 0x104
lea ecx, [ebp - 0x11c]
push ecx
push 0xffffffffffffffff
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x405457
push str.unknown
lea eax, [edi + 0x10]
push eax
call fcn.004078f6
add esp, 8
lea eax, [ebp - 0x11c]
push eax
call fcn.004078d7
add esp, 4
add eax, 4
cmp eax, 0x104
ja 0x405494
lea eax, [ebp - 0x11c]
push eax
lea eax, [edi + 0x10]
push eax
call fcn.004078f6
add esp, 8
lea eax, [edi + 0x10]
push str..exe
push eax
call fcn.00407911
add esp, 8
mov ecx, dword [ebx]
mov eax, dword [ebp - 0x14]
add ecx, ebx
mov dword [edi + 8], 0
mov eax, dword [ecx + eax]
mov dword [edi], eax
test eax, eax
jne 0x4054b1
mov dword [edi], 0xfffffffe
add edi, 0x154
mov ebx, dword [ecx]
add ebx, ecx
dec dword [ebp - 0x10]
jne 0x405420
jmp 0x4054cd
mov dword [ebp - 8], 1
xor eax, eax
test esi, esi
je 0x4054e4
cmp dword [ebp - 8], eax
je 0x4054db
mov dword [ebp + 0xc], eax
push esi
call fcn.00407937
add esp, 4
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x80000004
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret