Function at 0x4045a4
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, 0x410688
call fcn.0040fdb0
sub esp, 0x624
push ebx
push esi
push edi
push 9
push str.softwaremicrosoftwindows_ntcurrentversionperflib
lea eax, [ebp - 0x630]
push str._s_03x
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x20]
xor ebx, ebx
push eax
push 0x20019
lea eax, [ebp - 0x630]
push ebx
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
je 0x404658
push ebx
lea eax, [ebp - 0x10]
push ebx
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::CString_2
push dword [ebp - 0x10]
lea eax, [ebp - 0x630]
mov dword [ebp - 4], ebx
push eax
lea eax, [ebp + 8]
push str.RegOpenKeyEx_Error_szSubKey_s_ErrMessage_s
push eax
call sub.MFC42.DLL_CString::Format
push 0x1389
push dword [ebp + 8]
call fcn.00403aec
add esp, 0x18
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_LocalFree]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
jmp 0x4046d6
lea eax, [ebp - 0x18]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push eax
lea eax, [ebp - 0x24]
push ebx
push eax
mov esi, str.Counters
push ebx
push esi
push dword [ebp - 0x20]
call edi
cmp eax, ebx
je 0x4046e0
push ebx
lea eax, [ebp - 0x10]
push ebx
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::CString_2
push dword [ebp - 0x10]
lea eax, [ebp + 8]
mov dword [ebp - 4], 1
push esi
push str.RegQueryValueEx_Error_szSubKey_s_ErrMessage_s
push eax
call sub.MFC42.DLL_CString::Format
push 0x1389
push dword [ebp + 8]
call fcn.00403aec
add esp, 0x18
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_LocalFree]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::CString
jmp 0x404978
push dword [ebp - 0x18]
call dword [sym.imp.MSVCRT.dll_malloc]
cmp eax, ebx
pop ecx
mov dword [ebp - 0x10], eax
jne 0x40472a
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::CString_2
lea eax, [ebp + 8]
push str.malloc_Error___Insufficient_memory_available
push eax
mov dword [ebp - 4], 2
call sub.MFC42.DLL_CString::Format
push 0x1389
push dword [ebp + 8]
call fcn.00403aec
add esp, 0x10
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
jmp 0x404964
push dword [ebp - 0x18]
push ebx
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x24]
push dword [ebp - 0x10]
push eax
push ebx
push esi
push dword [ebp - 0x20]
call edi
cmp eax, ebx
je 0x4047a8
push ebx
lea eax, [ebp - 0x1c]
push ebx
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::CString_2
push dword [ebp - 0x1c]
lea eax, [ebp + 8]
mov dword [ebp - 4], 3
push esi
push str.RegQueryValueEx_Error_szSubKey_s_ErrMessage_s
push eax
call sub.MFC42.DLL_CString::Format
push 0x1389
push dword [ebp + 8]
call fcn.00403aec
add esp, 0x18
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
jmp 0x404964
mov edi, dword [ebp - 0x10]
mov eax, edi
cmp byte [eax], 0
je 0x404856
mov esi, dword [sym.imp.MSVCRT.dll_isdigit]
cmp edi, dword [ebp - 0x10]
jbe 0x4047da
lea eax, [edi - 2]
mov dword [ebp - 0x14], eax
movsx eax, byte [eax]
push eax
call esi
test eax, eax
pop ecx
je 0x4047da
dec dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
jmp 0x4047c7
push str.process
push edi
call dword [sym.imp.MSVCRT.dll__stricmp]
pop ecx
test eax, eax
pop ecx
jne 0x40480f
lea ebx, [edi - 2]
movsx eax, byte [ebx]
push eax
call esi
test eax, eax
pop ecx
je 0x4047fd
dec ebx
jmp 0x4047ef
inc ebx
lea eax, [ebp - 0x630]
push ebx
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
jmp 0x40483e
push str.id_process
push edi
call dword [sym.imp.MSVCRT.dll__stricmp]
pop ecx
test eax, eax
pop ecx
jne 0x404840
lea ebx, [edi - 2]
movsx eax, byte [ebx]
push eax
call esi
test eax, eax
pop ecx
je 0x404832
dec ebx
jmp 0x404824
inc ebx
push ebx
call dword [sym.imp.MSVCRT.dll_atol]
pop ecx
mov dword [ebp - 0x1c], eax
xor ebx, ebx
push edi
call sub.MSVCRT.dll_strlen
cmp byte [edi + eax + 1], 0
lea edi, [edi + eax + 1]
pop ecx
jne 0x4047bc
push dword [ebp - 0x10]
call dword [sym.imp.MSVCRT.dll_free]
mov eax, 0xc800
push eax
mov dword [ebp - 0x18], eax
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, eax
pop ecx
cmp esi, ebx
pop ecx
mov dword [ebp - 0x10], esi
jne 0x4048b2
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::CString_2
lea eax, [ebp + 8]
push str.malloc_Error___Insufficient_memory_available
push eax
mov dword [ebp - 4], 4
call sub.MFC42.DLL_CString::Format
push 0x1389
push dword [ebp + 8]
call fcn.00403aec
add esp, 0x10
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
jmp 0x404964
push dword [ebp - 0x18]
push ebx
push esi
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x24]
push esi
push eax
lea eax, [ebp - 0x630]
push ebx
push eax
push 0x80000004
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, ebx
jne 0x404903
cmp dword [ebp - 0x18], ebx
jbe 0x404930
cmp word [esi], 0x50
jne 0x404930
cmp word [esi + 2], 0x45
jne 0x404930
cmp word [esi + 4], 0x52
jne 0x404930
cmp word [esi + 6], 0x46
je 0x40499c
cmp eax, 0xea
jne 0x404930
add dword [ebp - 0x18], 0x6400
push dword [ebp - 0x18]
push esi
call dword [sym.imp.MSVCRT.dll_realloc]
push dword [ebp - 0x18]
mov dword [ebp - 0x10], eax
push ebx
push eax
call sub.MSVCRT.dll_memset
mov esi, dword [ebp - 0x10]
add esp, 0x14
jmp 0x4048bf
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::CString_2
lea eax, [ebp - 0x14]
push str.rc_Not_ERROR_MORE_DATA
push eax
mov dword [ebp - 4], 5
call sub.MFC42.DLL_CString::Format
push 0x1389
push dword [ebp - 0x14]
call fcn.00403aec
add esp, 0x10
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::CString
cmp dword [ebp - 0x10], ebx
je 0x404978
push dword [ebp - 0x10]
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
push dword [ebp - 0x20]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
push 0x80000004
call esi
push 1
pop eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
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, ebx
jbe 0x4049c7
mov edi, dword [ebp - 0x1c]
cmp dword [ecx + 4], edi
je 0x4049c1
add ecx, 0x28
inc esi
cmp esi, edx
jb 0x4049af
jmp 0x4049c7
mov ecx, dword [ecx + 0x24]
mov dword [ebp - 0x1c], ecx
mov esi, dword [eax + 4]
mov ecx, dword [eax + 0x28]
add esi, eax
cmp ecx, ebx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x14], ebx
jbe 0x404969
mov eax, dword [esi + 0x10]
push ebx
mov edi, 0x104
push ebx
lea ecx, [ebp - 0x12c]
push edi
add eax, esi
push ecx
push 0xffffffffffffffff
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x404a0f
lea eax, [ebp - 0x12c]
push str.unknown
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
lea eax, [ebp - 0x12c]
push eax
call sub.MSVCRT.dll_strlen
add eax, 4
pop ecx
cmp eax, edi
ja 0x404a4a
lea eax, [ebp - 0x12c]
push eax
lea eax, [ebp - 0x230]
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x230]
push str..exe
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x10
mov edi, dword [esi]
mov eax, dword [ebp - 0x1c]
add edi, esi
mov esi, dword [edi + eax]
cmp esi, ebx
jne 0x404a5b
push 0xfffffffffffffffe
pop esi
lea eax, [ebp - 0x230]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x404a87
mov esi, dword [edi]
add esi, edi
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x28]
jb 0x4049d9
jmp 0x404969
push esi
push dword [ebp + 8]
call fcn.00404a9f
pop ecx
test eax, eax
pop ecx
jne 0x404969
jmp 0x40498d