Function at 0x140012780
Capabilities:
Modify service

Disassembly:
push rbx
push rsi
sub rsp, 0x88
movzx esi, dl
mov rbx, rcx
test rcx, rcx
jne 0x1400127a2
lea eax, [rcx + 1]
add rsp, 0x88
pop rsi
pop rbx
ret
and dword [rcx + 0x8428], 0x100
mov eax, dword [rcx + 0x8400]
or dword [rcx + 0x8428], 0x10
sub eax, 2
mov qword [rsp + 0xa8], rbp
mov qword [rsp + 0x80], rdi
mov qword [rsp + 0x78], r12
mov qword [rsp + 0x70], r13
mov qword [rsp + 0x60], r15
je 0x1400127f0
cmp eax, 1
je 0x1400127e9
mov ebp, 2
jmp 0x1400127f5
mov ebp, 4
jmp 0x1400127f5
mov ebp, 3
lea r13, [rcx + 0x202]
cmp word [r13], 0
jne 0x140012825
lea rax, [rcx + 2]
lea r9, [0x140022870]
or r8, 0xffffffffffffffff
mov edx, 0x100
mov rcx, r13
mov qword [rsp + 0x20], rax
call fcn.140016e78
xor r15d, r15d
mov rdi, r15
mov qword [rsp + 0xb0], r15
mov r12, r15
cmp qword [rbx + 0x8410], r15
je 0x140012875
mov rdi, qword [rbx + 0x8408]
lea rdx, [rsp + 0xb0]
mov rcx, rdi
call fcn.1400015e0
test eax, eax
je 0x140012863
lea eax, [r15 + 5]
jmp 0x140012abe
cmp qword [rbx + 0x8420], r12
je 0x140012889
mov r12, qword [rbx + 0x8418]
jmp 0x140012889
test sil, sil
je 0x140012889
lea rdi, str.LocalSystem
mov qword [rsp + 0xb0], rdi
mov rcx, qword [rsp + 0xb0]
mov qword [rsp + 0x68], r14
call fcn.140001850
lea r14, [0x140023aa8]
test rax, rax
je 0x140012959
mov r12, r14
cmp dword [rbx + 0x40428], r15d
mov rax, qword [rsp + 0xb0]
mov edx, dword [rbx + 0x8428]
mov rcx, qword [rbx + 0x704c8]
mov qword [rsp + 0x50], r13
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x40], rax
cmovne r14, r15
mov r8d, ebp
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r15
or r9d, 0xffffffff
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x1400129b1
cmp qword [rsp + 0xb0], rdi
je 0x140012929
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0xb0]
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.140006fa0
mov rbx, rax
call fcn.140016bd0
mov r8, rbx
lea rcx, [rax + 0x60]
mov edx, 0x4000020b
call fcn.140007220
mov eax, 5
jmp 0x140012ab9
mov rcx, qword [rsp + 0xb0]
call fcn.1400018c0
test eax, eax
je 0x1400128ae
cmp qword [rsp + 0xb0], rdi
je 0x140012991
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0xb0]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
call fcn.140016bd0
mov r8, rdi
mov edx, 0x40000205
lea rcx, [rax + 0x60]
call fcn.140007220
mov eax, 5
jmp 0x140012ab9
cmp qword [rsp + 0xb0], rdi
je 0x1400129d4
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0xb0]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [rbx + 0x40428], r15d
je 0x1400129fc
mov r8, qword [rbx + 0x40420]
mov rdx, qword [rbx + 0x704c8]
lea rcx, [rbx + 2]
call fcn.140010380
test eax, eax
jne 0x14001294f
lea r8, [rbx + 0x402]
cmp word [r8], r15w
jne 0x140012a0e
test sil, sil
je 0x140012a1e
mov rdx, qword [rbx + 0x704c8]
lea rcx, [rbx + 2]
call fcn.140010af0
cmp dword [rbx + 0x8400], 1
mov rcx, qword [rbx + 0x704c8]
mov eax, r15d
sete al
lea r8, [rsp + 0xa0]
mov edx, 3
mov dword [rsp + 0xa0], eax
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x140012a80
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7c
je 0x140012a80
mov ecx, eax
call fcn.140006fa0
lea r8, [rbx + 2]
mov edx, 0x40000429
mov r9, rax
mov eax, 1
mov qword [rsp + 0x20], r15
movzx ecx, ax
call fcn.140007160
cmp byte [rbx], r15b
jne 0x140012ab7
movzx edx, sil
mov rcx, rbx
call fcn.14000e900
test eax, eax
je 0x140012aaf
call fcn.140016bd0
mov edx, 0x4000021d
lea rcx, [rax + 0x60]
call fcn.140007220
mov eax, 6
jmp 0x140012ab9
mov rcx, rbx
call fcn.140011db0
xor eax, eax
mov r14, qword [rsp + 0x68]
mov r13, qword [rsp + 0x70]
mov r12, qword [rsp + 0x78]
mov rdi, qword [rsp + 0x80]
mov rbp, qword [rsp + 0xa8]
mov r15, qword [rsp + 0x60]
add rsp, 0x88
pop rsi
pop rbx
ret