Function at 0x140012160
Capabilities:
Modify service

Disassembly:
push rbp
push rdi
sub rsp, 0x88
movzx ebp, dl
mov rdi, rcx
test rcx, rcx
jne 0x140012182
lea eax, [rcx + 1]
add rsp, 0x88
pop rdi
pop rbp
ret
and dword [rcx + 0x8428], 0x100
mov eax, dword [rcx + 0x8400]
or dword [rcx + 0x8428], 0x10
sub eax, 2
mov qword [rsp + 0xa8], rbx
mov qword [rsp + 0x80], rsi
mov qword [rsp + 0x78], r12
mov qword [rsp + 0x70], r13
mov qword [rsp + 0x68], r14
mov qword [rsp + 0x60], r15
je 0x1400121d7
cmp eax, 1
je 0x1400121cf
mov r12d, 2
jmp 0x1400121dd
mov r12d, 4
jmp 0x1400121dd
mov r12d, 3
lea r13, [rcx + 0x202]
cmp word [r13], 0
jne 0x14001220d
lea rax, [rcx + 2]
lea r9, [0x140026d5c]
or r8, 0xffffffffffffffff
mov edx, 0x100
mov rcx, r13
mov qword [rsp + 0x20], rax
call fcn.140018170
xor ebx, ebx
lea r15, [0x140026ddc]
mov rsi, rbx
mov qword [rsp + 0xb0], rbx
mov r14, rbx
cmp qword [rdi + 0x8410], rbx
je 0x14001238d
mov rsi, qword [rdi + 0x8408]
lea rcx, [rdi + 2]
mov rdx, rsi
call fcn.140001140
test eax, eax
je 0x140012367
mov rax, qword [rdi + 0x8410]
lea rbx, [rax + rax + 2]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0xb0], rax
test rax, rax
jne 0x1400122a3
call fcn.140017f4c
lea r9, str.edit_service__
lea r8, str.canon
lea rcx, [rax + 0x60]
mov edx, 0xc00001fa
call fcn.1400026b0
lea eax, [r14 + 5]
jmp 0x14001251b
mov r8, qword [rdi + 0x8410]
mov rdx, rsi
mov rcx, rax
lea r8, [r8 + r8 + 2]
call fcn.140018230
xor ebx, ebx
cmp dword [rdi + 0x40428], 0
mov rax, qword [rsp + 0xb0]
mov edx, dword [rdi + 0x8428]
mov rcx, qword [rdi + 0x704f0]
mov qword [rsp + 0x50], r13
mov qword [rsp + 0x48], r14
mov qword [rsp + 0x40], rax
cmovne r15, rbx
mov r8d, r12d
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x30], rbx
or r9d, 0xffffffff
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x140012413
cmp qword [rsp + 0xb0], rsi
je 0x140012337
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.140002430
mov rbx, rax
call fcn.140017f4c
mov r8, rbx
lea rcx, [rax + 0x60]
mov edx, 0x4000020b
call fcn.1400026b0
mov eax, 5
jmp 0x14001251b
lea rdx, [rsp + 0xb0]
mov rcx, rsi
call fcn.140001780
test eax, eax
jne 0x14001235d
cmp qword [rdi + 0x8420], rbx
je 0x1400123a1
mov r14, qword [rdi + 0x8418]
jmp 0x1400123a1
test bpl, bpl
je 0x1400123a1
lea rsi, str.LocalSystem
mov qword [rsp + 0xb0], rsi
mov rcx, qword [rsp + 0xb0]
call fcn.140001a60
test rax, rax
je 0x1400123bb
mov r14, r15
jmp 0x1400122bc
mov rcx, qword [rsp + 0xb0]
call fcn.140001ad0
test eax, eax
je 0x1400122bc
cmp qword [rsp + 0xb0], rsi
je 0x1400123f3
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.140017f4c
mov r8, rsi
mov edx, 0x40000205
lea rcx, [rax + 0x60]
call fcn.1400026b0
mov eax, 5
jmp 0x14001251b
cmp qword [rsp + 0xb0], rsi
je 0x140012436
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 [rdi + 0x40428], 0
je 0x14001245e
mov r8, qword [rdi + 0x40420]
mov rdx, qword [rdi + 0x704f0]
lea rcx, [rdi + 2]
call fcn.14000f500
test eax, eax
jne 0x14001235d
lea r8, [rdi + 0x402]
cmp word [r8], 0
jne 0x140012471
test bpl, bpl
je 0x140012481
mov rdx, qword [rdi + 0x704f0]
lea rcx, [rdi + 2]
call fcn.14000fce0
cmp dword [rdi + 0x8400], 1
mov rcx, qword [rdi + 0x704f0]
mov eax, ebx
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 0x1400124e2
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7c
je 0x1400124e2
mov ecx, eax
call fcn.140002430
lea r8, [rdi + 2]
mov edx, 0x40000429
mov r9, rax
mov eax, 1
mov qword [rsp + 0x20], rbx
movzx ecx, ax
call fcn.1400025f0
cmp byte [rdi], 0
jne 0x140012519
movzx edx, bpl
mov rcx, rdi
call fcn.14000d2d0
test eax, eax
je 0x140012511
call fcn.140017f4c
mov edx, 0x4000021d
lea rcx, [rax + 0x60]
call fcn.1400026b0
mov eax, 6
jmp 0x14001251b
mov rcx, rdi
call fcn.140011130
xor eax, eax
mov r14, qword [rsp + 0x68]
mov r13, qword [rsp + 0x70]
mov r12, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x80]
mov rbx, qword [rsp + 0xa8]
mov r15, qword [rsp + 0x60]
add rsp, 0x88
pop rdi
pop rbp
ret