Function at 0x518e9c
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdc0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x240], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 8], ecx
mov esi, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
call fcn.00404ed0
xor eax, eax
push ebp
push 0x5190d3
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0xc]
push eax
push 0x20019
push 0
mov eax, dword [ebp + 0x10]
call fcn.00404ee0
push eax
mov eax, dword [ebp + 0x14]
push eax
call sub.advapi32.dll_RegOpenKeyExA_1
test eax, eax
jne 0x51909c
push 0
push 0
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
push 0
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x134]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryInfoKeyA
mov dword [ebp - 0x10], 0x3e8
mov ebx, dword [ebp - 0x18]
dec ebx
test ebx, ebx
jl 0x51909c
inc ebx
xor edi, edi
mov eax, dword [0x581040]
mov eax, dword [eax]
call fcn.0048d8b8
mov eax, dword [0x580cd8]
cmp byte [eax], 2
je 0x51909c
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x234]
push eax
push edi
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegEnumKeyExA
cmp dword [ebp + 0x10], 0
jne 0x518fa9
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x234]
mov dword [ebp - 0x23c], eax
mov byte [ebp - 0x238], 6
lea edx, [ebp - 0x23c]
xor ecx, ecx
mov eax, 0x5190ec
call fcn.0040a520
jmp 0x518ff0
push dword [ebp + 0x10]
push 0x5190f8
lea eax, [ebp - 0x240]
push eax
lea eax, [ebp - 0x234]
mov dword [ebp - 0x23c], eax
mov byte [ebp - 0x238], 6
lea edx, [ebp - 0x23c]
xor ecx, ecx
mov eax, 0x5190ec
call fcn.0040a520
push dword [ebp - 0x240]
lea eax, [ebp - 0x30]
mov edx, 3
call fcn.00404da0
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x234]
mov dword [ebp - 0x23c], eax
mov byte [ebp - 0x238], 6
lea edx, [ebp - 0x23c]
xor ecx, ecx
mov eax, 0x5190ec
call fcn.0040a520
mov eax, dword [0x581058]
inc dword [eax]
mov eax, dword [0x581058]
mov eax, dword [eax]
mov ecx, 0xc8
cdq
idiv ecx
test edx, edx
jne 0x51903d
mov edx, dword [ebp - 0x30]
mov eax, esi
call fcn.0046cef4
call fcn.0057b47c
mov edx, dword [ebp - 0x30]
mov eax, 0x519104
call fcn.00405024
test eax, eax
jle 0x519070
mov eax, dword [ebp + 0x14]
push eax
mov eax, dword [ebp - 0x30]
push eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 8]
mov edx, esi
mov eax, dword [ebp - 4]
call fcn.00519688
mov eax, dword [ebp + 0x14]
push eax
mov eax, dword [ebp - 0x30]
push eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 8]
mov edx, esi
mov eax, dword [ebp - 4]
call fcn.00518e9c
mov dword [ebp - 0x10], 0x3e8
inc edi
dec ebx
jne 0x518f41
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegCloseKey_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5190da
lea eax, [ebp - 0x240]
call fcn.00404a20
lea eax, [ebp - 0x34]
mov edx, 2
call fcn.00404a44
lea eax, [ebp + 0x10]
call fcn.00404a20
ret