Function at 0x516d30
Capabilities:
Query or enumerate registry key

Disassembly:
push 0xffffffffffffffff
push 0x573f4c
mov eax, dword fs:[0]
push eax
sub esp, 0x650
mov eax, dword [0x5d7050]
xor eax, esp
mov dword [esp + 0x648], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5d7050]
xor eax, esp
push eax
lea eax, [esp + 0x664]
mov dword fs:[0], eax
mov eax, dword [esp + 0x674]
xor ebx, ebx
mov esi, ecx
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], 0x80004005
mov dword [esp + 0x28], ebx
lea ecx, [esp + 0x2c]
push ecx
mov dword [esp + 0x670], ebx
call fcn.0051a800
add esp, 4
lea edx, [esp + 0x20]
push edx
push 0x2001f
push ebx
push str.SYSTEMCurrentControlSetControlClass4D36E972_E325_11CE_BFC1_08002bE10318
mov byte [esp + 0x67c], 1
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x34], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x516f20
mov eax, dword [esp + 0x20]
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], ebx
jmp 0x516de0
push 0x206
lea ecx, [esp + 0x252]
push ebx
push ecx
mov word [esp + 0x258], bx
call sub.MSVCR80.dll_memset
add esp, 0xc
lea edx, [esp + 0x3c]
push edx
mov edx, dword [esp + 0x28]
push ebx
push ebx
push ebx
lea eax, [esp + 0x40]
push eax
mov eax, dword [esp + 0x34]
lea ecx, [esp + 0x260]
push ecx
push edx
mov esi, 0x103
push eax
mov dword [esp + 0x50], esi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
cmp eax, ebx
jne 0x51700b
cmp dword [esp + 0x30], ebx
je 0x51700b
lea ecx, [esp + 0x18]
push ecx
mov ecx, str.SYSTEMCurrentControlSetControlClass4D36E972_E325_11CE_BFC1_08002bE10318
call fcn.0040ff50
lea edx, [esp + 0x24c]
push edx
push 0x5ac83c
lea edi, [esp + 0x20]
mov byte [esp + 0x674], 2
call fcn.00410c20
add esp, 8
lea eax, [esp + 0x14]
push eax
push 0x2001f
mov byte [esp + 0x674], 3
mov ecx, dword [esp + 0x20]
push ebx
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x28], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x516f02
mov ebp, dword [esp + 0x14]
push 0x206
lea ecx, [esp + 0x4a]
push ebx
push ecx
mov dword [esp + 0x20], ebp
mov word [esp + 0x50], bx
call sub.MSVCR80.dll_memset
add esp, 0xc
push str.NetCfgInstanceId
lea edx, [esp + 0x18]
mov dword [esp + 0x20], esi
push edx
lea edi, [esp + 0x24]
lea esi, [esp + 0x4c]
call fcn.0041a310
cmp eax, ebx
jne 0x516f51
cmp dword [esp + 0x1c], ebx
je 0x516f51
mov ecx, dword [esp + 0x2c]
mov eax, esi
push eax
push ecx
call dword [sym.imp.MSVCR80.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x516f8e
cmp ebp, ebx
je 0x516f02
push ebp
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [esp + 0x66c], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x516f78
mov byte [esp + 0x66c], bl
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x516f47
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0x80004005
jmp 0x517058
cmp ebp, ebx
je 0x516f5c
push ebp
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [esp + 0x66c], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x516f84
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add dword [esp + 0x24], 1
jmp 0x516de0
push 0x206
lea ecx, [esp + 0x45a]
push ebx
push ecx
mov word [esp + 0x460], bx
call sub.MSVCR80.dll_memset
add esp, 0xc
push str.ComponentId
lea edx, [esp + 0x18]
push edx
lea edi, [esp + 0x24]
lea esi, [esp + 0x45c]
mov dword [esp + 0x24], 0x103
call fcn.0041a310
cmp eax, ebx
jne 0x516ff7
cmp dword [esp + 0x1c], ebx
je 0x516ff7
mov edi, dword [esp + 0x38]
mov edx, esi
call fcn.00410020
lea esi, [esp + 0x14]
mov dword [esp + 0x34], ebx
call fcn.0041a3b0
call fcn.0041a3d0
jmp 0x517002
cmp ebp, ebx
je 0x517002
push ebp
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x18]
call fcn.00410000
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x51701e
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x28], ebx
mov byte [esp + 0x66c], bl
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x517045
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x28]
cmp eax, ebx
je 0x517054
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x664]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x648]
xor ecx, esp
call fcn.00569ed6
add esp, 0x65c
ret