Function at 0x40e5e8
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x51c
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
xor edi, edi
dec eax
mov dword [ebp - 0xc], eax
push 9
push str.softwaremicrosoftwindows_ntcurrentversionperflib
lea eax, [ebp - 0x51c]
push str._s_03x
push eax
mov dword [ebp - 8], edi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x10]
push eax
push 0x20019
lea eax, [ebp - 0x51c]
push edi
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, edi
jne 0x40e7e2
lea eax, [ebp - 4]
mov esi, str.Counters
push eax
lea eax, [ebp - 0x14]
push edi
push eax
push edi
push esi
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, edi
jne 0x40e7e2
push dword [ebp - 4]
call fcn.0040efd0
mov ebx, eax
pop ecx
cmp ebx, edi
mov dword [ebp - 8], ebx
je 0x40e7e2
push dword [ebp - 4]
push edi
push ebx
call fcn.0040ef70
add esp, 0xc
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x14]
push ebx
push eax
push edi
push esi
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, edi
jne 0x40e7e2
cmp byte [ebx], 0
mov esi, ebx
je 0x40e748
cmp esi, ebx
jbe 0x40e6c9
lea edi, [esi - 2]
cmp edi, ebx
jb 0x40e6c7
movsx eax, byte [edi]
push eax
call fcn.00410110
test eax, eax
pop ecx
je 0x40e6c7
dec edi
jmp 0x40e6b2
xor edi, edi
push str.process
push esi
call fcn.00415e10
pop ecx
test eax, eax
pop ecx
jne 0x40e700
lea edi, [esi - 2]
movsx eax, byte [edi]
push eax
call fcn.00410110
test eax, eax
pop ecx
je 0x40e6ee
dec edi
jmp 0x40e6dd
inc edi
lea eax, [ebp - 0x51c]
push edi
push eax
call fcn.0040f060
pop ecx
pop ecx
jmp 0x40e730
push str.id_process
push esi
call fcn.00415e10
pop ecx
test eax, eax
pop ecx
jne 0x40e732
lea edi, [esi - 2]
movsx eax, byte [edi]
push eax
call fcn.00410110
test eax, eax
pop ecx
je 0x40e725
dec edi
jmp 0x40e714
inc edi
push edi
call fcn.0040fba0
pop ecx
mov dword [ebp + 0xc], eax
xor edi, edi
push esi
call fcn.0040f150
cmp byte [esi + eax + 1], 0
lea esi, [esi + eax + 1]
pop ecx
jne 0x40e6ab
push ebx
call fcn.0040eaf0
pop ecx
mov eax, 0xc800
push eax
mov dword [ebp - 4], eax
call fcn.0040efd0
mov esi, eax
pop ecx
cmp esi, edi
mov dword [ebp - 8], esi
je 0x40e7e2
push dword [ebp - 4]
push edi
push esi
call fcn.0040ef70
add esp, 0xc
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x14]
push esi
push eax
lea eax, [ebp - 0x51c]
push edi
push eax
push 0x80000004
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, edi
jne 0x40e7b4
cmp dword [ebp - 4], edi
jbe 0x40e7b4
cmp word [esi], 0x50
jne 0x40e7b4
cmp word [esi + 2], 0x45
jne 0x40e7b4
cmp word [esi + 4], 0x52
jne 0x40e7b4
cmp word [esi + 6], 0x46
je 0x40e7ea
cmp eax, 0xea
jne 0x40e7e2
add dword [ebp - 4], 0x6400
push dword [ebp - 4]
push esi
call fcn.00410410
pop ecx
mov dword [ebp - 8], eax
pop ecx
push dword [ebp - 4]
push edi
push eax
call fcn.0040ef70
mov esi, dword [ebp - 8]
add esp, 0xc
jmp 0x40e774
mov dword [ebp + 0xc], edi
jmp 0x40e8d7
mov eax, dword [esi + 0x18]
add eax, esi
xor esi, esi
mov ecx, dword [eax + 8]
mov edx, dword [eax + 0x20]
add ecx, eax
cmp edx, edi
jbe 0x40e815
mov ebx, dword [ebp + 0xc]
cmp dword [ecx + 4], ebx
je 0x40e80f
add ecx, 0x28
inc esi
cmp esi, edx
jb 0x40e7fd
jmp 0x40e815
mov ecx, dword [ecx + 0x24]
mov dword [ebp - 0x18], ecx
mov ecx, dword [eax + 0x28]
mov edx, dword [ebp - 0xc]
cmp edx, ecx
mov dword [ebp + 0xc], edx
jb 0x40e825
mov dword [ebp + 0xc], ecx
mov esi, dword [eax + 4]
add esi, eax
cmp dword [ebp + 0xc], edi
jbe 0x40e8d7
mov eax, dword [ebp + 8]
mov ebx, 0x154
lea edi, [eax + 0x10]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
xor eax, eax
lea ecx, [ebp - 0x11c]
push eax
push eax
push 0x104
push ecx
mov ecx, dword [esi + 0x10]
push 0xffffffffffffffff
add ecx, esi
push ecx
push eax
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x40e875
push str.unknown
push edi
call fcn.0040f060
pop ecx
pop ecx
lea eax, [ebp - 0x11c]
push eax
call fcn.0040f150
add eax, 4
pop ecx
cmp eax, 0x104
ja 0x40e8a8
lea eax, [ebp - 0x11c]
push eax
push edi
call fcn.0040f060
pop ecx
pop ecx
push str..exe
push edi
call fcn.0040f070
pop ecx
pop ecx
add esi, dword [esi]
mov eax, dword [ebp - 0x18]
and dword [edi - 8], 0
mov ecx, dword [ebp + 8]
mov eax, dword [eax + esi]
test eax, eax
mov dword [ecx], eax
jne 0x40e8c3
mov dword [ecx], 0xfffffffe
add esi, dword [esi]
add ecx, ebx
add edi, ebx
dec dword [ebp - 0xc]
mov dword [ebp + 8], ecx
jne 0x40e844
xor edi, edi
cmp dword [ebp - 8], edi
je 0x40e8e5
push dword [ebp - 8]
call fcn.0040eaf0
pop ecx
push dword [ebp - 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
push 0x80000004
call esi
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
leave
ret