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

Disassembly:
push 0xffffffffffffffff
push 0x5827e4
mov eax, dword fs:[0]
push eax
mov eax, 0x40d8
call fcn.004b0290
mov eax, dword [0x5eabd8]
xor eax, esp
mov dword [esp + 0x40d4], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5eabd8]
xor eax, esp
push eax
lea eax, [esp + 0x40ec]
mov dword fs:[0], eax
mov edi, ecx
mov eax, 1
xor esi, esi
mov dword [esp + 0x40f4], esi
mov dword [esp + 0x28], eax
mov dword [esp + 0x20], eax
call fcn.0047cfdc
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x51c3b1
push 0x80004005
call fcn.00414da0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x34], eax
mov byte [esp + 0x40f4], 1
call fcn.0047cfdc
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x51c3e3
push 0x80004005
call fcn.00414da0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x4100]
mov edx, dword [esp + 0x40fc]
lea ecx, [esp + 0x14]
push ecx
push 0x20019
neg eax
push esi
sbb eax, eax
add eax, reloc.OLEAUT32.dll_SysReAllocString
push edx
mov ebx, 0x3fac
push eax
mov byte [esp + 0x4108], 2
mov dword [esp + 0x2c], 0x104
mov dword [esp + 0x30], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x51c5a4
mov ebp, dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x140]
push ecx
lea edx, [esp + 0x28]
push edx
mov edx, dword [esp + 0x20]
push esi
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x4c]
push ecx
push esi
push edx
call ebp
test eax, eax
jne 0x51c4e3
lea ecx, [ecx]
push ecx
lea eax, [esp + 0x140]
mov ecx, esp
mov dword [esp + 0x28], esp
push eax
call fcn.00414a70
push ecx
lea edx, [esp + 0x40]
mov ecx, esp
mov dword [esp + 0x34], esp
push edx
mov byte [esp + 0x4100], 3
call fcn.00414a70
mov ecx, edi
mov byte [esp + 0x40fc], 2
call fcn.0051c0a0
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x140]
push ecx
lea edx, [esp + 0x28]
push edx
mov edx, dword [esp + 0x20]
push 0
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x4c]
push ecx
inc esi
push esi
push edx
mov dword [esp + 0x38], 0x104
mov dword [esp + 0x3c], ebx
call ebp
test eax, eax
je 0x51c470
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x3c]
push ecx
xor ebp, ebp
push ebp
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x51c595
mov bl, 4
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x28]
call fcn.00414a70
push eax
mov ecx, edi
mov byte [esp + 0x40f8], bl
call fcn.0051aa90
mov esi, eax
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x40f4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x51c54c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test esi, esi
je 0x51c56e
push esi
push ecx
lea edx, [esp + 0x40]
mov ecx, esp
mov dword [esp + 0x34], esp
push edx
call fcn.00414a70
mov eax, dword [esp + 0x1c]
push eax
mov ecx, edi
call fcn.0051b280
mov edx, dword [esp + 0x14]
push 0x104
lea ecx, [esp + 0x3c]
push ecx
inc ebp
push ebp
push edx
mov dword [esp + 0x28], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
je 0x51c505
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
mov byte [esp + 0x40f4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x51c5cc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
mov byte [esp + 0x40f4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x51c5f4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x40fc]
add eax, 0xfffffff0
mov dword [esp + 0x40f4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x51c622
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x40ec]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x40d4]
xor ecx, esp
call fcn.004adaab
add esp, 0x40e4
ret 8