Function at 0x140003a10
Capabilities:
Create service
Modify service

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0x2c0
mov rax, qword [0x140032040]
xor rax, rsp
mov qword [rsp + 0x2b0], rax
mov r14, r8
mov rbx, rdx
mov rsi, rcx
mov r8d, 0x104
lea rdx, [rsp + 0xa0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x140003a6c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Cannot_install_service___d__n
call fcn.1400043d0
jmp 0x140003c82
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
mov qword [rsp + 0x88], rax
test rax, rax
jne 0x140003aa5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed___d__n
call fcn.1400043d0
jmp 0x140003c74
mov r8, rbx
cmp qword [rbx + 0x18], 7
jbe 0x140003ab2
mov r8, qword [rbx]
cmp qword [rsi + 0x18], 7
jbe 0x140003abc
mov rsi, qword [rsi]
xor eax, eax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 0x20
mov r9d, 0xf01ff
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rbp, rax
mov qword [rsp + 0x90], rax
test rax, rax
jne 0x140003b37
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.CreateService_failed___d__n
call fcn.1400043d0
jmp 0x140003c65
cmp qword [rbx + 0x18], 7
jbe 0x140003b41
mov rbx, qword [rbx]
mov rdx, rbx
lea rcx, str.Service__s_installed_successfully_n
call fcn.140004720
lea rcx, [rsp + 0x70]
call fcn.140003f50
mov rbx, qword [rsp + 0x70]
mov rbx, qword [rbx]
cmp byte [rbx + 0x19], 0
jne 0x140003be5
nop dword [rax + rax]
lea rdx, [rbx + 0x20]
cmp qword [rdx + 0x18], 7
jbe 0x140003b7e
mov rdx, qword [rdx]
mov rcx, rbp
call fcn.140003710
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], 0
je 0x140003bb8
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x140003bb3
nop word [rax + rax]
cmp rbx, qword [rax + 0x10]
jne 0x140003bb3
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x140003ba0
mov rbx, rax
jmp 0x140003bdf
mov rbx, rax
mov rcx, qword [rax]
cmp byte [rcx + 0x19], 0
jne 0x140003bdf
nop dword [rax]
nop dword [rax + rax]
mov rbx, rcx
mov rax, qword [rcx]
mov rcx, rax
cmp byte [rax + 0x19], 0
je 0x140003bd0
cmp byte [rbx + 0x19], 0
je 0x140003b70
cmp qword [r14 + 0x18], 7
jbe 0x140003bef
mov r14, qword [r14]
mov qword [rsp + 0x80], r14
lea r8, [rsp + 0x80]
mov edx, 1
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
mov rcx, qword [rsp + 0x70]
mov rsi, qword [rcx + 8]
cmp byte [rsi + 0x19], 0
jne 0x140003c5a
nop dword [rax]
mov r8, qword [rsi + 0x10]
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x70]
call fcn.140003420
mov rbx, rsi
mov rsi, qword [rsi]
lea rcx, [rbx + 0x20]
call fcn.140002a50
mov edx, 0x40
mov rcx, rbx
call fcn.140006568
cmp byte [rsi + 0x19], 0
je 0x140003c20
mov rcx, qword [rsp + 0x70]
mov edx, 0x40
call fcn.140006568
nop
test rbp, rbp
je 0x140003c74
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
test rdi, rdi
je 0x140003c82
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [rsp + 0x2b0]
xor rcx, rsp
call fcn.140006840
add rsp, 0x2c0
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret