Function at 0x404693
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 0x404a0d
push dword [ebp + 8]
lea eax, [ebp - 0x12c]
push eax
call edi
mov cl, byte [ebp - 0x12c]
test cl, cl
je 0x404725
mov eax, dword [ebp - 0x18]
cmp cl, 0x5c
jne 0x404710
test esi, esi
mov dword [ebp - 0x1c], eax
jne 0x404718
mov esi, eax
cmp cl, 0x3b
jne 0x404718
mov dword [ebp - 0x20], eax
mov cl, byte [ebp + eax - 0x12b]
inc eax
mov dword [ebp - 0x18], eax
jmp 0x4046fb
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 0x40476d
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 0x4644d4
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 0x4047b2
mov dword [ebp - 0x14], SysReAllocStringLen
lea eax, [ebp - 0x12c]
push str.HKEY_CURRENT_CONFIG
push eax
call ebx
test eax, eax
jne 0x4047cb
mov dword [ebp - 0x14], SysStringLen
lea eax, [ebp - 0x12c]
push str.HKEY_CURRENT_USER
push eax
call ebx
test eax, eax
jne 0x4047e4
mov dword [ebp - 0x14], SysReAllocStringLen
lea eax, [ebp - 0x12c]
push str.HKEY_LOCAL_MACHINE
push eax
call ebx
test eax, eax
jne 0x4047fd
mov dword [ebp - 0x14], SysReAllocStringLen
lea eax, [ebp - 0x12c]
push str.HKEY_USERS
push eax
call ebx
test eax, eax
jne 0x404816
mov dword [ebp - 0x14], SysReAllocStringLen
lea eax, [ebp - 0x12c]
push str.HKEY_PERFORMANCE_DATA
push eax
call ebx
test eax, eax
jne 0x40482f
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 0x404848
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 0x404a0d
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 0x404954
mov ecx, dword [ebp - 0xc]
cmp ecx, ebx
jbe 0x4048b4
cmp ecx, 2
jbe 0x40492a
push 4
pop eax
cmp ecx, eax
je 0x40490f
cmp ecx, 5
je 0x4048dc
cmp ecx, 7
je 0x40492a
push 1
pop esi
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, ebx
jne 0x404a0d
lea eax, [ebp - 0x12c]
push eax
push dword [ebp + 8]
call edi
push 1
pop eax
jmp 0x404a0f
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 0x4049d1
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 0x4049c6
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 0x4048b7
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 0x4048b4
mov ecx, dword [ebp - 0xc]
cmp ecx, ebx
jbe 0x4048b4
cmp ecx, 2
jbe 0x4049eb
push 4
pop eax
cmp ecx, eax
je 0x4049b0
cmp ecx, 5
je 0x404995
cmp ecx, 7
je 0x4049eb
jmp 0x4048b4
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 0x4048f2
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 0x4648f4
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x4048b7
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 0x404947
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret