Function at 0x404ea5
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
lea ebp, [esp - 0x179c]
mov eax, 0x181c
call fcn.00406ad0
mov eax, dword [0x40c150]
xor eax, ebp
mov dword [ebp + 0x1798], eax
mov eax, dword [ebp + 0x17a4]
push ebx
push esi
push edi
xor ebx, ebx
mov esi, 0x7ff
push esi
mov dword [ebp - 0x74], eax
lea eax, [ebp + 0xf99]
push ebx
push eax
mov dword [ebp - 0x70], ebx
mov byte [ebp + 0xf98], bl
call sub.MSVCR100.dll_memset
push esi
lea eax, [ebp + 0x799]
push ebx
push eax
mov byte [ebp + 0x798], bl
call sub.MSVCR100.dll_memset
add esp, 0x18
lea eax, [ebp - 0x78]
push eax
inc esi
push 0x20019
mov dword [ebp - 0x6c], esi
mov edi, reloc.OLEAUT32.dll_SysReAllocString
push ebx
cmp dword [ebp + 0x17ac], ebx
je 0x404ff0
push 0x408c9c
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4050f3
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp + 0xf98]
push eax
push ebx
jmp 0x404fda
lea eax, [ebp + 0xf98]
push eax
push 0x408cbc
push 0x408cdc
lea eax, [ebp + 0x798]
push esi
push eax
call dword [sym.imp.MSVCR100.dll_sprintf_s]
add esp, 0x14
lea eax, [ebp - 0x7c]
push eax
push 0x20019
push ebx
lea eax, [ebp + 0x798]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x404fc2
mov eax, dword [ebp + 0x17a8]
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x6c]
push eax
push dword [ebp - 0x74]
lea eax, [ebp - 0x80]
push eax
push ebx
push 0x408ce4
push dword [ebp - 0x7c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x404fc2
push dword [ebp + 0x17a8]
push dword [ebp - 0x74]
call fcn.00404e6b
pop ecx
pop ecx
inc dword [ebp - 0x70]
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp + 0xf98]
push eax
push dword [ebp - 0x70]
mov dword [ebp - 0x6c], esi
push dword [ebp - 0x78]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
je 0x404f4d
jmp 0x4050f3
push 0x408cf0
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4050f3
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp + 0xf98]
push eax
push ebx
jmp 0x4050e2
lea eax, [ebp + 0xf98]
push eax
push 0x408d1c
push 0x408d48
lea eax, [ebp + 0x798]
push esi
push eax
call dword [sym.imp.MSVCR100.dll_sprintf_s]
add esp, 0x14
lea eax, [ebp - 0x7c]
push eax
push 0x20019
push ebx
lea eax, [ebp + 0x798]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4050ca
push 0x7ff
lea eax, [ebp - 0x67]
push ebx
push eax
mov byte [ebp - 0x68], bl
call sub.MSVCR100.dll_memset
add esp, 0xc
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp - 0x80]
push eax
push ebx
push str.RuntimeLib
push dword [ebp - 0x7c]
mov dword [ebp - 0x6c], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4050ca
cmp dword [ebp - 0x6c], ebx
jbe 0x4050ca
mov eax, dword [ebp + 0x17a8]
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x6c]
push eax
push dword [ebp - 0x74]
lea eax, [ebp - 0x80]
push eax
push ebx
push 0x408d5c
push dword [ebp - 0x7c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4050ca
push dword [ebp + 0x17a8]
push dword [ebp - 0x74]
call fcn.00404e6b
pop ecx
pop ecx
inc dword [ebp - 0x70]
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp + 0xf98]
push eax
push dword [ebp - 0x70]
mov dword [ebp - 0x6c], esi
push dword [ebp - 0x78]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
je 0x405019
mov eax, dword [ebp - 0x74]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4050f9
sub eax, edx
xor ecx, ecx
cmp ecx, eax
mov ecx, dword [ebp + 0x1798]
pop edi
sbb eax, eax
pop esi
xor ecx, ebp
neg eax
pop ebx
call fcn.00406ab9
add ebp, 0x179c
leave
ret