Function at 0x404f60
Capabilities:
Query or enumerate registry key

Disassembly:
sub esp, 0x510
push ebp
mov ebp, ecx
mov eax, dword [ebp]
call dword [eax + 0xc]
test eax, eax
je 0x4051c1
push edi
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x219]
mov byte [esp + 0x218], 0
mov byte [esp + 0x118], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x119]
mov byte [esp + 0x318], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x319]
push esi
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x21c]
push ebx
push ecx
mov ecx, dword [ebp + 0xc]
push 0x1fe
stosb byte es:[edi], al
call sub.LDSERV.dll_Ordinal_374
test eax, eax
je 0x4051b1
mov ecx, dword [ebp + 0xc]
lea edx, [esp + 0x120]
push edx
push 0x25e
call sub.LDSERV.dll_Ordinal_374
test eax, eax
je 0x4051b1
mov ecx, dword [ebp + 0xc]
lea eax, [esp + 0x320]
push eax
push 0x32f
call sub.LDSERV.dll_Ordinal_374
test eax, eax
je 0x4051b1
mov ecx, ebp
call fcn.004013d0
test eax, eax
je 0x4051b1
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x421]
mov byte [esp + 0x420], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x320]
lea edx, [esp + 0x120]
stosb byte es:[edi], al
push ecx
lea eax, [esp + 0x224]
push edx
lea ecx, [esp + 0x428]
push eax
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea edx, [esp + 0x10]
lea eax, [esp + 0x420]
push edx
push 0x20019
push 0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405191
mov ecx, 0x3f
lea edi, [esp + 0x21]
mov byte [esp + 0x20], al
lea edx, [esp + 0x14]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x18]
mov dword [esp + 0x14], 0x100
push ecx
mov ecx, dword [esp + 0x14]
push 0
push 0
stosb byte es:[edi], al
push 0
lea eax, [esp + 0x30]
push edx
push eax
push 0
push ecx
mov ebx, 1
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x405186
mov dword [esp + 0x14], 0x100
xor esi, esi
lea edi, [ebp + 0x544]
lea edx, [esp + 0x20]
push edi
push edx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x405113
inc esi
add edi, 0x308
cmp esi, 5
jl 0x4050f5
jmp 0x40515a
lea eax, [esi + esi*2]
mov edi, 1
shl eax, 5
add eax, esi
lea esi, [ebp + eax*8]
mov dword [esi + 0x844], edi
mov eax, dword [esi + 0x848]
test eax, eax
jne 0x40515a
lea ecx, [esi + 0x744]
lea edx, [esi + 0x644]
push ecx
lea eax, [esi + 0x544]
push edx
push eax
mov ecx, ebp
call fcn.004011e0
test eax, eax
je 0x40515a
mov dword [esi + 0x848], edi
lea ecx, [esp + 0x18]
lea edx, [esp + 0x14]
push ecx
push 0
push 0
push 0
lea ecx, [esp + 0x30]
mov eax, ebx
push edx
mov edx, dword [esp + 0x24]
push ecx
push eax
push edx
inc ebx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
je 0x4050e5
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp + 0x848]
mov ecx, 5
mov edx, dword [eax - 4]
test edx, edx
jne 0x4051a9
mov dword [eax], 0
add eax, 0x308
dec ecx
jne 0x40519c
pop ebx
pop esi
mov eax, 1
pop edi
pop ebp
add esp, 0x510
ret
xor eax, eax
pop ebp
add esp, 0x510
ret