Function at 0x14005c520
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x98
mov dword [rsp + 0x38], 0x103
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, str.SYSTEMCurrentControlSetEnum
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14005c7c9
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x3c], 0
lea rax, [rsp + 0x3c]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rsp + 0xb0]
mov rcx, qword [rsp + 0xa8]
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstanceIdW]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x3c], 0
jbe 0x14005c7be
mov ecx, dword [rsp + 0x3c]
add rcx, 1
mov eax, 2
mul rcx
mov rcx, rax
mov rax, 0xffffffffffffffff
cmovo rcx, rax
call fcn.140006748
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x14005c7be
lea rax, [rsp + 0x3c]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x3c]
mov r8, qword [rsp + 0x48]
mov rdx, qword [rsp + 0xb0]
mov rcx, qword [rsp + 0xa8]
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstanceIdW]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
je 0x14005c79c
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14005c79c
mov dword [rsp + 0x58], 0
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
lea rdx, str.Service
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp dword [rsp + 0x58], 0
jbe 0x14005c791
mov eax, dword [rsp + 0x58]
add rax, 2
mov dword [rsp + 0x58], eax
mov ecx, dword [rsp + 0x58]
call fcn.140006748
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0
je 0x14005c791
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, str.Service
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14005c775
mov rdx, qword [rsp + 0xb8]
mov rcx, qword [rsp + 0x60]
call fcn.140001a80
test rax, rax
je 0x14005c750
cmp qword [rsp + 0xc0], 0
je 0x14005c750
mov ecx, dword [rsp + 0x3c]
add rcx, 2
mov eax, dword [rsp + 0xc8]
cmp rcx, rax
ja 0x14005c750
mov edx, dword [rsp + 0xc8]
mov r8, qword [rsp + 0x48]
mov rcx, qword [rsp + 0xc0]
call fcn.140001c10
mov dword [rsp + 0x38], 0
jmp 0x14005c758
mov dword [rsp + 0x38], 0x7a
cmp qword [rsp + 0xd0], 0
je 0x14005c775
mov ecx, dword [rsp + 0x3c]
add rcx, 1
mov rax, qword [rsp + 0xd0]
mov dword [rax], ecx
cmp qword [rsp + 0x60], 0
je 0x14005c791
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x78], rax
mov rcx, qword [rsp + 0x78]
call fcn.140006750
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp qword [rsp + 0x48], 0
je 0x14005c7be
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x80], rax
mov rcx, qword [rsp + 0x80]
call fcn.140006750
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [rsp + 0x38]
add rsp, 0x98
ret