Function at 0x40c491
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x33c
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [ebp + 8]
lea eax, [ebp - 0x12c]
xor esi, esi
mov dword [ebp - 0x14], SysReAllocStringLen
push eax
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 8], esi
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
and byte [ebp - 0x128], 0
lea eax, [ebp - 0x12c]
push str.HKEY
push eax
call ebx
test eax, eax
jne 0x40c80b
push dword [ebp + 8]
lea eax, [ebp - 0x12c]
push eax
call edi
mov cl, byte [ebp - 0x12c]
test cl, cl
je 0x40c523
mov eax, dword [ebp - 0x18]
cmp cl, 0x5c
jne 0x40c50e
test esi, esi
mov dword [ebp - 0x1c], eax
jne 0x40c516
mov esi, eax
cmp cl, 0x3b
jne 0x40c516
mov dword [ebp - 0x20], eax
mov cl, byte [ebp + eax - 0x12b]
inc eax
mov dword [ebp - 0x18], eax
jmp 0x40c4f9
mov edx, dword [ebp - 0x20]
lea eax, [ebp + esi - 0x12b]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x1c]
and byte [ebp + edx - 0x12c], 0
and byte [ebp + esi - 0x12c], 0
and byte [ebp + eax - 0x12c], 0
lea ecx, [ebp + eax - 0x12b]
lea eax, [ebp - 0x33c]
push ecx
push eax
mov dword [ebp - 0x24], ecx
call edi
cmp dword [ebp - 0x1c], esi
jne 0x40c56b
and byte [ebp - 0x33c], 0
push dword [ebp - 0x18]
lea eax, [ebp - 0x234]
push eax
call edi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x234]
push 0x4684cc
push eax
call esi
push dword [ebp - 0x24]
lea eax, [ebp - 0x234]
push eax
call esi
lea eax, [ebp - 0x12c]
push str.HKEY_CLASSES_ROOT
push eax
call ebx
test eax, eax
jne 0x40c5b0
mov dword [ebp - 0x14], SysReAllocStringLen
lea eax, [ebp - 0x12c]
push str.HKEY_CURRENT_CONFIG
push eax
call ebx
test eax, eax
jne 0x40c5c9
mov dword [ebp - 0x14], SysStringLen
lea eax, [ebp - 0x12c]
push str.HKEY_CURRENT_USER
push eax
call ebx
test eax, eax
jne 0x40c5e2
mov dword [ebp - 0x14], SysReAllocStringLen
lea eax, [ebp - 0x12c]
push str.HKEY_LOCAL_MACHINE
push eax
call ebx
test eax, eax
jne 0x40c5fb
mov dword [ebp - 0x14], SysReAllocStringLen
lea eax, [ebp - 0x12c]
push str.HKEY_USERS
push eax
call ebx
test eax, eax
jne 0x40c614
mov dword [ebp - 0x14], SysReAllocStringLen
lea eax, [ebp - 0x12c]
push str.HKEY_PERFORMANCE_DATA
push eax
call ebx
test eax, eax
jne 0x40c62d
mov dword [ebp - 0x14], reloc.OLEAUT32.dll_SysReAllocStringLen
lea eax, [ebp - 0x12c]
push str.HKEY_DYN_DATA
push eax
call ebx
test eax, eax
jne 0x40c646
mov dword [ebp - 0x14], reloc.OLEAUT32.dll_SysStringLen
push str.Not_Found
push dword [ebp + 8]
call edi
lea eax, [ebp - 0x10]
xor ebx, ebx
push eax
push 0x20019
push ebx
push dword [ebp - 0x18]
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40c80b
push ebx
lea eax, [ebp - 0xc]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push ebx
push eax
lea eax, [ebp - 0x33c]
push ebx
push eax
push dword [ebp - 0x10]
call esi
test eax, eax
jne 0x40c752
mov ecx, dword [ebp - 0xc]
cmp ecx, ebx
jbe 0x40c6b2
cmp ecx, 2
jbe 0x40c728
push 4
pop eax
cmp ecx, eax
je 0x40c70d
cmp ecx, 5
je 0x40c6da
cmp ecx, 7
je 0x40c728
push 1
pop esi
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, ebx
jne 0x40c80b
lea eax, [ebp - 0x12c]
push eax
push dword [ebp + 8]
call edi
push 1
pop eax
jmp 0x40c80d
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
lea eax, [ebp - 0x33c]
push eax
push dword [ebp - 0x10]
call esi
movzx ecx, word [ebp - 8]
mov esi, eax
mov eax, dword [ebp - 8]
shr eax, 0x10
shl ecx, 0x10
or eax, ecx
push eax
jmp 0x40c7cf
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
lea eax, [ebp - 0x33c]
jmp 0x40c7c4
lea eax, [ebp - 4]
mov dword [ebp - 4], 0x104
push eax
lea eax, [ebp - 0x12c]
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
lea eax, [ebp - 0x33c]
push eax
push dword [ebp - 0x10]
call esi
mov esi, eax
jmp 0x40c6b5
push ebx
lea eax, [ebp - 0xc]
push ebx
push eax
lea eax, [ebp - 0x234]
push ebx
push eax
push dword [ebp - 0x10]
call esi
test eax, eax
jne 0x40c6b2
mov ecx, dword [ebp - 0xc]
cmp ecx, ebx
jbe 0x40c6b2
cmp ecx, 2
jbe 0x40c7e9
push 4
pop eax
cmp ecx, eax
je 0x40c7ae
cmp ecx, 5
je 0x40c793
cmp ecx, 7
je 0x40c7e9
jmp 0x40c6b2
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
lea eax, [ebp - 0x234]
jmp 0x40c6f0
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
lea eax, [ebp - 0x234]
push eax
push dword [ebp - 0x10]
call esi
push dword [ebp - 8]
mov esi, eax
lea eax, [ebp - 0x12c]
push 0x468e58
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x40c6b5
lea eax, [ebp - 4]
mov dword [ebp - 4], 0x104
push eax
lea eax, [ebp - 0x12c]
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
lea eax, [ebp - 0x234]
jmp 0x40c745
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret