Function at 0x140008940
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
mov rbp, rsp
sub rsp, 0x80
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0xb8], rbx
xor esi, esi
mov qword [rbp - 0x18], rsi
mov dword [rbp - 0x10], esi
mov qword [rbp - 8], rsi
mov dword [rbp + 0x20], esi
mov ebx, 1
mov r9d, ebx
lea r8, str.SOFTWARERealtekAudioRtkAudioService
lea rcx, [rbp - 0x18]
call fcn.1400015b0
test eax, eax
jne 0x1400089e2
mov dword [rbp + 0x28], 4
lea rax, [rbp + 0x28]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x20]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x30]
xor r8d, r8d
lea rdx, str.SetServiceDependency
mov rdi, qword [rbp - 0x18]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140008b13
cmp dword [rbp + 0x30], 4
jne 0x140008b13
cmp dword [rbp + 0x20], ebx
jne 0x140008b13
jmp 0x140008b81
mov qword [rbp + 0x30], rsi
mov rdi, qword [rbp - 8]
test rdi, rdi
je 0x140008a79
cmp qword [rdi], 0
je 0x140008a6f
lea rcx, [0x140031a88]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
jne 0x140008a12
mov eax, ebx
jmp 0x140008ab6
lea rdx, str.RegCreateKeyTransactedW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140008a75
mov qword [rsp + 0x50], rsi
mov rcx, qword [rdi]
mov qword [rsp + 0x48], rcx
lea rcx, [rbp + 0x28]
mov qword [rsp + 0x40], rcx
lea rcx, [rbp + 0x30]
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], esi
xor r9d, r9d
xor r8d, r8d
lea rdx, str.SOFTWARERealtekAudioRtkAudioService
mov rcx, 0xffffffff80000002
call rax
jmp 0x140008ab6
cmp dword [rdi + 8], 0
jne 0x140008a79
mov eax, ebx
jmp 0x140008ab6
lea rax, [rbp + 0x28]
mov qword [rsp + 0x40], rax
lea rax, [rbp + 0x30]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], esi
xor r9d, r9d
xor r8d, r8d
lea rdx, str.SOFTWARERealtekAudioRtkAudioService
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x140008b0f
mov eax, esi
mov rcx, qword [rbp - 0x18]
test rcx, rcx
je 0x140008acb
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdi, qword [rbp + 0x30]
mov qword [rbp - 0x18], rdi
mov dword [rbp - 0x10], esi
test eax, eax
jne 0x140008b13
mov dword [rbp + 0x28], ebx
mov dword [rsp + 0x28], 4
lea rax, [rbp + 0x28]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.SetServiceDependency
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x140008b13
mov ebx, esi
jmp 0x140008b81
mov rdi, qword [rbp - 0x18]
lea rax, [rbp + 0x28]
mov qword [rbp + 0x30], rax
call fcn.140001230
mov rcx, rax
test rax, rax
je 0x140008ba4
mov rax, qword [rax]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
add rax, 0x18
mov qword [rbp + 0x28], rax
lea rdx, str.sc_config_RtkAudioService_dependaudiosrv
cmp rdx, 0x10000
jae 0x140008b54
movzx edx, dx
lea rcx, [rbp + 0x28]
call fcn.140002e30
jmp 0x140008b77
mov rax, 0xffffffffffffffff
nop dword [rax + rax]
inc rax
cmp word [rdx + rax*2], 0
jne 0x140008b60
mov r8d, eax
lea rcx, [rbp + 0x28]
call fcn.1400030e0
nop
lea rcx, [rbp + 0x28]
call fcn.1400028e0
nop
test rdi, rdi
je 0x140008b8f
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
mov rbx, qword [rsp + 0xb8]
add rsp, 0x80
pop rdi
pop rsi
pop rbp
ret
mov ecx, 0x80004005
call fcn.1400014c0
int3