Function at 0x140119830
Capabilities:
Create service
Delete service
Modify service
Persist via windows service
Stop service

Disassembly:
mov rax, rsp
push rdi
sub rsp, 0xc0
mov qword [rax - 0x40], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov rax, qword [0x14041da10]
xor rax, rsp
mov qword [rsp + 0xb0], rax
movzx edi, cl
xor bl, bl
mov r8d, 0xf003f
lea rdx, [0x140356210]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
je 0x140119a82
test dil, dil
je 0x1401199dc
lea rcx, [rsp + 0x70]
call fcn.140119650
nop
mov r8, qword [rsp + 0x70]
lea rdx, [0x140354300]
lea rcx, [rsp + 0x90]
call fcn.140202d40
nop
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x1401199aa
or rax, 0xffffffffffffffff
inc rax
cmp word [rcx + rax*2], 0
jne 0x1401198c3
test rax, rax
je 0x1401199aa
mov edx, 0x133
xor ecx, ecx
lea r8d, [rcx + 0xa]
call qword [sym.imp.KERNEL32.dll_FindResourceW]
test rax, rax
je 0x1401198f9
mov rdx, rax
lea rcx, [rsp + 0x70]
call fcn.140119550
xor eax, eax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x48], rax
lea rax, [0x140356ab0]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0x10
mov r9d, 0xf01ff
lea r8, [0x140356a88]
lea rdx, [0x1403569e8]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rdi, rax
test rax, rax
jne 0x14011997a
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x431
je 0x1401199a8
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1401199aa
lea rax, [0x140356b10]
mov qword [rsp + 0x80], rax
lea r8, [rsp + 0x80]
mov edx, 1
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov bl, 1
cmp dword [rsp + 0x98], 0
jle 0x1401199c2
mov rcx, qword [rsp + 0x90]
call fcn.1402bd0e0
nop
cmp dword [rsp + 0x78], 0
jle 0x140119a79
mov rcx, qword [rsp + 0x70]
call fcn.1402bd0e0
jmp 0x140119a79
mov r8d, 0x10020
lea rdx, [0x1403569e8]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
jne 0x140119a0b
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
jne 0x140119a4b
mov bl, 1
jmp 0x140119a4b
lea r8, [rsp + 0x90]
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x140119a2b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x140119a3c
mov bl, 1
jmp 0x140119a42
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea r8, [0x140356a10]
xor edx, edx
mov ecx, 0x100002
call qword [sym.imp.KERNEL32.dll_OpenEventW]
mov rdi, rax
test rax, rax
je 0x140119a79
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
movzx eax, bl
mov rcx, qword [rsp + 0xb0]
xor rcx, rsp
call fcn.1402bcad0
lea r11, [rsp + 0xc0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rsp, r11
pop rdi
ret