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

Disassembly:
sub esp, 0x52c
mov eax, dword [0x6aae14]
xor eax, esp
mov dword [esp + 0x528], eax
push ebx
push esi
mov esi, dword [esp + 0x53c]
push edi
mov edi, dword [esp + 0x53c]
xor ebx, ebx
push 0x103
lea eax, [esp + 0x331]
push ebx
push eax
mov byte [esp + 0x338], bl
call fcn.005dfd60
push 0x103
lea ecx, [esp + 0x239]
push ebx
push ecx
mov dword [esp + 0x24], ebx
mov byte [esp + 0x240], bl
call fcn.005dfd60
add esp, 0x18
cmp esi, ebx
je 0x51691f
cmp byte [esi], bl
je 0x51691f
cmp edi, ebx
je 0x51691f
cmp byte [edi], bl
je 0x51691f
push esi
lea edx, [esp + 0x22c]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x5c
push esi
call fcn.005e0940
add esp, 8
test eax, eax
je 0x51670a
lea eax, [esp + 0x228]
push eax
mov dword [esp + 0x1c], 1
call fcn.004ebde0
add esp, 4
jmp 0x51670e
mov dword [esp + 0x18], ebx
push edi
lea ecx, [esp + 0x330]
push 0x64e068
push ecx
call fcn.005dfb23
add esp, 0xc
lea edx, [esp + 0x10]
push edx
push 9
push ebx
lea eax, [esp + 0x338]
push eax
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp esi, ebx
jne 0x516903
push ebp
push 0x103
lea ecx, [esp + 0x439]
push ebx
push ecx
mov byte [esp + 0x440], bl
call fcn.005dfd60
push 0x207
lea edx, [esp + 0x35]
push ebx
push edx
call fcn.005dfd60
mov ecx, dword [esp + 0x2c]
add esp, 0x18
push 0x208
lea eax, [esp + 0x28]
push eax
push ebx
push ecx
xor ebp, ebp
mov byte [esp + 0x34], bl
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x5168f7
lea edx, [esp + 0x24]
push edx
push edi
lea eax, [esp + 0x43c]
push 0x64e050
push eax
call fcn.005dfb23
add esp, 0x10
lea ecx, [esp + 0x18]
push ecx
push 1
push ebx
lea edx, [esp + 0x440]
push edx
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp esi, ebx
jne 0x5168a4
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x28]
push ecx
push ebx
push ebx
push ebx
push edx
mov dword [esp + 0x38], 0x208
mov byte [esp + 0x3c], bl
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [esp + 0x24], bl
je 0x5168a4
cmp dword [esp + 0x1c], ebx
je 0x516842
push ebx
push 1
lea ecx, [esp + 0x2c]
push ecx
call fcn.005127a0
lea edx, [esp + 0x24]
push edx
call fcn.004ebde0
add esp, 4
push ebx
lea eax, [esp + 0x230]
push eax
lea ecx, [esp + 0x2c]
push ecx
call fcn.004f5880
add esp, 0xc
cmp eax, 0xffffffff
jne 0x5168ef
lea edx, [esp + 0x24]
push 0x2e
push edx
call fcn.005e0a00
add esp, 8
cmp eax, ebx
je 0x5168a0
push 0x5c
push eax
call fcn.005e0940
add esp, 8
cmp eax, ebx
je 0x5168a0
mov byte [eax], bl
push ebx
lea eax, [esp + 0x230]
push eax
lea ecx, [esp + 0x2c]
push ecx
call fcn.004f5880
add esp, 0xc
cmp eax, 0xffffffff
jne 0x5168ef
mov dword [esp + 0x10], ebx
mov eax, dword [esp + 0x14]
push 0x208
lea edx, [esp + 0x28]
push edx
inc ebp
push ebp
push eax
mov byte [esp + 0x34], bl
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
je 0x5167a2
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x10]
pop ebp
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x528]
xor ecx, esp
call fcn.005dfbbe
add esp, 0x52c
ret
mov dword [esp + 0x10], 1
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebp
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x528]
xor ecx, esp
call fcn.005dfbbe
add esp, 0x52c
ret
mov ecx, dword [esp + 0x534]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.005dfbbe
add esp, 0x52c
ret