Function at 0x140012870
Capabilities:
Modify service
Query or enumerate registry value

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x290
mov rax, qword [0x14002dda0]
xor rax, rsp
mov qword [rsp + 0x280], rax
xor r15d, r15d
mov rsi, r8
mov rbp, rdx
lea r13, [0x140025cbc]
mov r14d, r15d
test r8, r8
je 0x140012ccd
cmp word [r8], r14w
je 0x140012ccd
lea ecx, [r15 + 5]
call fcn.140012420
mov rbx, rax
mov qword [rsp + 0x70], rax
test rax, rax
jne 0x1400128f0
call fcn.140019be0
mov edx, 0x400001fb
lea rcx, [rax + 0x60]
call fcn.140007250
lea eax, [rbx + 1]
jmp 0x140012da1
movzx ecx, word [rsi]
mov r12, r15
mov rax, rsi
test cx, cx
je 0x140012b04
inc r14d
cmp cx, 0x2b
jne 0x140012910
mov r12, rax
jmp 0x140012915
test cx, cx
je 0x14001291f
add rax, 2
cmp word [rax], r15w
jne 0x140012915
mov cx, word [rax + 2]
add rax, 2
test cx, cx
jne 0x140012902
test r12, r12
je 0x140012b04
lea rax, [rsp + 0x60]
lea rdx, str.SYSTEMCurrentControlSetControlServiceGroupOrder
mov r9d, 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x140012999
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, eax
call fcn.140006fd0
mov rdi, rax
call fcn.140019be0
lea r8, str.SYSTEMCurrentControlSetControlServiceGroupOrder
lea rdx, str._s:__s_n
lea rcx, [rax + 0x60]
mov r9, rdi
call fcn.14001a97c
mov eax, 2
jmp 0x140012da1
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x68]
lea r9, [rsp + 0x6c]
mov qword [rsp + 0x28], rax
lea rdx, str.List
xor r8d, r8d
mov qword [rsp + 0x20], r15
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140012aa7
mov edi, dword [rsp + 0x68]
call qword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov r8, rdi
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.DLL_HeapAlloc]
mov r12, rax
test rax, rax
jne 0x140012a15
call fcn.140019be0
lea r9, str.set_service_dependencies__
lea r8, str.groups
lea rcx, [rax + 0x60]
mov edx, 0xc00001fa
call fcn.140007250
lea eax, [r12 + 3]
jmp 0x140012da1
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x68]
lea r9, [rsp + 0x6c]
mov qword [rsp + 0x28], rax
lea rdx, str.List
xor r8d, r8d
mov qword [rsp + 0x20], r12
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x140012af9
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, eax
call fcn.140006fd0
mov rdi, rax
call fcn.140019be0
lea r9, str.List
lea r8, str.SYSTEMCurrentControlSetControlServiceGroupOrder
lea rdx, str._s_s:__s
lea rcx, [rax + 0x60]
mov qword [rsp + 0x20], rdi
call fcn.14001a97c
call qword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov rcx, rax
mov r8, r12
xor edx, edx
call qword [sym.imp.KERNEL32.DLL_HeapFree]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 4
jmp 0x140012da1
cmp eax, 2
je 0x140012af9
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, eax
call fcn.140006fd0
mov rdi, rax
call fcn.140019be0
lea r9, str.List
lea r8, str.SYSTEMCurrentControlSetControlServiceGroupOrder
lea rdx, str._s_s:__s
lea rcx, [rax + 0x60]
mov qword [rsp + 0x20], rdi
call fcn.14001a97c
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 4
jmp 0x140012da1
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, r14d
shl edi, 8
add edi, 2
add rdi, rdi
call qword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov r8, rdi
mov rcx, rax
mov edx, 8
call qword [sym.imp.KERNEL32.DLL_HeapAlloc]
mov r13, rax
cmp word [rsi], r15w
je 0x140012ca8
cmp word [rsi], 0x2b
jne 0x140012c2c
cmp word [rsi + 2], 0
je 0x140012b84
cmp word [r12], 0
mov rbx, r12
je 0x140012b84
lea rdx, [rsi + 2]
mov rcx, rbx
call fcn.14000e140
test eax, eax
jne 0x140012be3
cmp word [rbx], ax
je 0x140012b7a
nop dword [rax]
add rbx, 2
cmp word [rbx], 0
jne 0x140012b70
add rbx, 2
cmp word [rbx], 0
jne 0x140012b50
call qword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov r8, r13
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_HeapFree]
test r12, r12
je 0x140012bb1
call qword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov r8, r12
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_HeapFree]
mov ecx, 0x433
call fcn.140006fd0
mov rdi, rax
call fcn.140019be0
lea rdx, str._s:__s
lea rcx, [rax + 0x60]
mov r9, rdi
mov r8, rsi
call fcn.14001a97c
mov eax, 5
jmp 0x140012da1
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rbx
repne scasw ax, word [rdi]
mov rdx, rbx
not rcx
lea r8, [rcx + rcx - 2]
lea rcx, [rsi + 2]
call fcn.140019ec0
lea r9, [0x140025890]
lea rcx, [rsp + 0x80]
or r8, 0xffffffffffffffff
mov edx, 0x100
mov qword [rsp + 0x20], rsi
call fcn.140019e88
mov rbx, qword [rsp + 0x70]
jmp 0x140012c56
lea r9, [rsp + 0x80]
mov r8d, 4
mov rdx, rsi
mov rcx, rbx
mov dword [rsp + 0x20], 0x100
call fcn.140012460
test rax, rax
je 0x140012d4b
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rsp + 0x80]
repne scasw ax, word [rdi]
lea rdx, [rsp + 0x80]
not rcx
mov rdi, rcx
lea r8, [rcx + rcx]
lea rcx, [r13 + r15*2]
call fcn.140019ec0
add r15, rdi
cmp word [rsi], 0
je 0x140012c9a
nop dword [rax]
add rsi, 2
cmp word [rsi], 0
jne 0x140012c90
add rsi, 2
cmp word [rsi], 0
jne 0x140012b34
test r12, r12
je 0x140012cc1
call qword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov r8, r12
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_HeapFree]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor r15d, r15d
mov qword [rsp + 0x50], r15
mov qword [rsp + 0x48], r15
mov qword [rsp + 0x40], r15
or r9d, 0xffffffff
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r15
mov rcx, rbp
or r8d, r9d
or edx, r9d
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x140012d86
test r14d, r14d
je 0x140012d20
call qword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov r8, r13
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_HeapFree]
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, eax
call fcn.140006fd0
mov rdi, rax
call fcn.140019be0
mov r8, rdi
lea rcx, [rax + 0x60]
mov edx, 0x4000020b
call fcn.140007250
or eax, 0xffffffff
jmp 0x140012da1
call qword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov r8, r13
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_HeapFree]
test r12, r12
je 0x140012d78
call qword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov r8, r12
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_HeapFree]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140012bb1
test r14d, r14d
je 0x140012d9f
call qword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov r8, r13
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_HeapFree]
xor eax, eax
mov rcx, qword [rsp + 0x280]
xor rcx, rsp
call fcn.14001a490
mov rbx, qword [rsp + 0x2d0]
add rsp, 0x290
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret