Function at 0x502850
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5f6543
mov eax, dword fs:[0]
push eax
sub esp, 0x9c
mov eax, dword [0x6d4dfc]
xor eax, ebp
mov dword [ebp - 0x28], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 1
lea eax, [ebp - 0x18]
push eax
push 0
lea ecx, [ebp - 0x1c]
push ecx
push 0
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x10], eax
mov byte [ebp - 0x11], 0
cmp dword [ebp - 0x10], 0
jne 0x5029f0
cmp dword [ebp - 0x18], 0
je 0x5029f0
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00465b10
add esp, 4
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x5028e1
xor al, al
jmp 0x502a60
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x20]
push eax
lea ecx, [ebp - 0x1c]
push ecx
push 0
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x50297b
cmp dword [ebp - 0x1c], 4
jne 0x50293d
cmp dword [ebp - 0x18], 4
jne 0x50293d
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x24]
mov eax, dword [edx]
push eax
push 0x652890
lea ecx, [ebp - 0x50]
push ecx
call fcn.005d0139
add esp, 0xc
lea edx, [ebp - 0x50]
push edx
mov ecx, dword [ebp + 0x10]
call fcn.0046a780
jmp 0x502975
cmp dword [ebp - 0x1c], 1
jne 0x502951
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp + 0x10]
call fcn.0046a780
jmp 0x502975
cmp dword [ebp - 0x1c], 2
jne 0x502965
mov ecx, dword [ebp - 0x20]
push ecx
mov ecx, dword [ebp + 0x10]
call fcn.0046a780
jmp 0x502975
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp + 0x10]
call fcn.00469a50
mov byte [ebp - 0x11], 1
jmp 0x5029d6
lea ecx, [ebp - 0x7c]
call fcn.0046b360
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x10]
push ecx
lea ecx, [ebp - 0x7c]
call fcn.0046e650
lea ecx, [ebp - 0x7c]
call fcn.00533050
push eax
push str.RegistryQueryError2
mov edx, dword [ebp + 0x14]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x14]
mov edx, dword [eax + 0x2c]
call edx
mov eax, dword [ebp + 0xc]
push eax
push 0x6528a8
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x14]
mov eax, dword [edx + 0x2c]
call eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x7c]
call fcn.0046b730
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0xa8], ecx
mov edx, dword [ebp - 0xa8]
push edx
call fcn.005aba30
add esp, 4
jmp 0x502a5d
cmp dword [ebp - 0x10], 0
je 0x502a5d
lea ecx, [ebp - 0xa4]
call fcn.0046b360
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0x10]
push eax
lea ecx, [ebp - 0xa4]
call fcn.0046e650
lea ecx, [ebp - 0xa4]
call fcn.00533050
push eax
push str.RegistryQueryError
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x14]
mov eax, dword [edx + 0x2c]
call eax
mov ecx, dword [ebp + 0xc]
push ecx
push str.ValueName
mov edx, dword [ebp + 0x14]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x14]
mov edx, dword [eax + 0x2c]
call edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa4]
call fcn.0046b730
mov al, byte [ebp - 0x11]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x28]
xor ecx, ebp
call fcn.005cfa37
mov esp, ebp
pop ebp
ret