Function at 0x51fdd8
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x494
mov eax, 0x5f64e9
call fcn.0044ea40
mov eax, dword [ebp + 8]
xor ebx, ebx
mov edi, dword [ebp + 0x14]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x494], eax
mov eax, dword [ebp + 0x10]
push eax
lea eax, [ebp - 0x470]
mov dword [ebp - 0x4a0], edi
push eax
mov dword [ebp - 0x490], ebx
call fcn.0052bf7a
pop ecx
pop ecx
cmp dword [eax + 0x14], 8
jb 0x51fe1e
mov eax, dword [eax]
lea ecx, [ebp - 0x490]
push ecx
push 0x109
push ebx
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push ebx
push 1
lea ecx, [ebp - 0x470]
mov esi, eax
call fcn.004037bf
test esi, esi
je 0x51fe4e
xor eax, eax
jmp 0x520349
mov ecx, edi
mov dword [ebp - 0x49c], ebx
call fcn.0051b48b
test eax, eax
je 0x52033a
push ebx
mov ecx, edi
call fcn.0051a7b9
mov esi, eax
mov ecx, esi
call fcn.0051b27d
test al, al
jne 0x52033a
mov ecx, esi
call fcn.0051b285
test al, al
je 0x52033a
push 0x622f04
mov ecx, esi
call fcn.0051a809
push str.type
mov ecx, esi
mov ebx, eax
call fcn.0051a809
push 0x64b858
mov ecx, esi
mov edi, eax
call fcn.0051a809
mov ecx, ebx
mov esi, eax
call fcn.0051b27d
test al, al
jne 0x52033a
mov ecx, ebx
call fcn.0051b297
test al, al
je 0x52033a
mov ecx, edi
call fcn.0051b27d
test al, al
jne 0x51fee9
mov ecx, edi
call fcn.0051b297
test al, al
jne 0x51ff03
mov ecx, esi
call fcn.0051b27d
test al, al
jne 0x51ff03
mov ecx, esi
call fcn.0051b297
test al, al
jne 0x52033a
lea eax, [ebp - 0x470]
mov ecx, ebx
push eax
call fcn.0051ac8c
push eax
lea eax, [ebp - 0x440]
xor ebx, ebx
push eax
mov dword [ebp - 4], ebx
call fcn.0052bf7a
pop ecx
pop ecx
push ebx
push 1
lea ecx, [ebp - 0x470]
mov byte [ebp - 4], 2
call fcn.0040376a
mov ecx, edi
call fcn.0051b27d
test al, al
jne 0x51ff63
mov ecx, edi
call fcn.0051b297
test al, al
je 0x51ff63
mov ecx, esi
call fcn.0051b27d
test al, al
jne 0x51ff63
mov ecx, esi
call fcn.0051b297
test al, al
jne 0x51ff9a
cmp dword [ebp - 0x42c], 8
lea eax, [ebp - 0x440]
push ebx
cmovae eax, dword [ebp - 0x440]
push ebx
push ebx
push ebx
push eax
push dword [ebp - 0x490]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x52032c
mov ebx, dword [ebp - 0x494]
inc dword [ebx]
jmp 0x51ffa0
mov ebx, dword [ebp - 0x494]
and dword [ebp - 0x48c], 0
lea eax, [ebp - 0x428]
push eax
mov ecx, edi
call fcn.0051ac8c
push str.REG_SZ
lea ecx, [ebp - 0x428]
mov byte [ebp - 4], 3
call fcn.00403c58
test eax, eax
jne 0x51ffdc
mov dword [ebp - 0x48c], 1
jmp 0x520168
push str.REG_EXPAND_SZ
lea ecx, [ebp - 0x428]
call fcn.00403c58
test eax, eax
jne 0x51ffff
mov dword [ebp - 0x48c], 2
jmp 0x520168
push str.REG_BINARY
lea ecx, [ebp - 0x428]
call fcn.00403c58
test eax, eax
jne 0x520022
mov dword [ebp - 0x48c], 3
jmp 0x520168
push str.REG_DWORD
lea ecx, [ebp - 0x428]
call fcn.00403c58
test eax, eax
je 0x52004a
push str.REG_DWORD_LITTLE_ENDIAN
lea ecx, [ebp - 0x428]
call fcn.00403c58
test eax, eax
jne 0x520059
mov dword [ebp - 0x48c], 4
jmp 0x520168
push str.REG_DWORD_BIG_ENDIAN
lea ecx, [ebp - 0x428]
call fcn.00403c58
test eax, eax
jne 0x52007c
mov dword [ebp - 0x48c], 5
jmp 0x520168
push str.REG_LINK
lea ecx, [ebp - 0x428]
call fcn.00403c58
test eax, eax
jne 0x52009f
mov dword [ebp - 0x48c], 6
jmp 0x520168
push str.REG_MULTI_SZ
lea ecx, [ebp - 0x428]
call fcn.00403c58
test eax, eax
jne 0x5200c2
mov dword [ebp - 0x48c], 7
jmp 0x520168
push str.REG_RESOURCE_LIST
lea ecx, [ebp - 0x428]
call fcn.00403c58
test eax, eax
jne 0x5200e5
mov dword [ebp - 0x48c], 8
jmp 0x520168
push str.REG_FULL_RESOURCE_DESCRIPTOR
lea ecx, [ebp - 0x428]
call fcn.00403c58
test eax, eax
jne 0x520105
mov dword [ebp - 0x48c], 9
jmp 0x520168
push str.REG_RESOURCE_REQUIREMENTS_LIST
lea ecx, [ebp - 0x428]
call fcn.00403c58
test eax, eax
jne 0x520125
mov dword [ebp - 0x48c], 0xa
jmp 0x520168
push str.REG_QWORD
lea ecx, [ebp - 0x428]
call fcn.00403c58
test eax, eax
jne 0x520144
push 0xb
pop eax
mov dword [ebp - 0x48c], eax
jmp 0x520168
push str.REG_QWORD_LITTLE_ENDIAN
lea ecx, [ebp - 0x428]
call fcn.00403c58
mov ecx, dword [ebp - 0x48c]
test eax, eax
push 0xb
pop eax
cmove ecx, eax
mov dword [ebp - 0x48c], ecx
push 0x400
xor edi, edi
lea eax, [ebp - 0x410]
push edi
push eax
call fcn.00543220
add esp, 0xc
mov dword [ebp - 0x498], 0x200
lea eax, [ebp - 0x488]
mov ecx, esi
push eax
call fcn.0051ac8c
push eax
lea eax, [ebp - 0x458]
mov byte [ebp - 4], 4
push eax
call fcn.0052bf7a
pop ecx
pop ecx
push edi
push 1
lea ecx, [ebp - 0x488]
mov byte [ebp - 4], 3
call fcn.0040376a
mov eax, dword [ebp - 0x48c]
cmp eax, 2
je 0x520272
cmp eax, 1
je 0x520272
cmp eax, 7
je 0x520272
cmp eax, 4
je 0x5201e7
cmp eax, 3
jne 0x520250
cmp dword [ebp - 0x42c], 8
lea ecx, [ebp - 0x498]
push ecx
lea ecx, [ebp - 0x410]
push ecx
lea ecx, [ebp - 0x48c]
push ecx
lea eax, [ebp - 0x440]
cmovae eax, dword [ebp - 0x440]
push edi
push eax
push dword [ebp - 0x490]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x5202da
cmp dword [ebp - 0x444], 8
lea eax, [ebp - 0x458]
movsx esi, word [ebp - 0x410]
cmovae eax, dword [ebp - 0x458]
push eax
call fcn.0054fc97
pop ecx
cmp eax, esi
je 0x5202d8
push edi
push 1
lea ecx, [ebp - 0x458]
call fcn.004037bf
push edi
push 1
lea ecx, [ebp - 0x428]
call fcn.0040376a
push edi
jmp 0x52032d
cmp dword [ebp - 0x42c], 8
lea ecx, [ebp - 0x498]
push ecx
lea ecx, [ebp - 0x410]
push ecx
lea ecx, [ebp - 0x48c]
push ecx
lea eax, [ebp - 0x440]
cmovae eax, dword [ebp - 0x440]
push edi
push eax
push dword [ebp - 0x490]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x5202da
cmp dword [ebp - 0x444], 8
lea eax, [ebp - 0x458]
cmovae eax, dword [ebp - 0x458]
push eax
lea eax, [ebp - 0x410]
push eax
call fcn.005437be
pop ecx
pop ecx
test eax, eax
je 0x520250
inc dword [ebx]
push edi
push 1
lea ecx, [ebp - 0x458]
call fcn.004037bf
push edi
push 1
lea ecx, [ebp - 0x428]
call fcn.0040376a
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x440]
push edi
push 1
call fcn.004037bf
mov ebx, dword [ebp - 0x49c]
mov edi, dword [ebp - 0x4a0]
inc ebx
mov ecx, edi
mov dword [ebp - 0x49c], ebx
call fcn.0051b48b
cmp ebx, eax
jb 0x51fe63
jmp 0x52033a
push ebx
push 1
lea ecx, [ebp - 0x440]
call fcn.004037bf
push dword [ebp - 0x490]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
call fcn.0044e9ea
ret 0x10