Function at 0x140003c60
Capabilities:
Create service
Modify service
Start service
Write file on windows

Disassembly:
push rdi
sub rsp, 0xa0
mov rax, qword [0x140018040]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov rdi, rcx
call fcn.1400039f0
test al, al
je 0x140003c8f
mov byte [rdi + 0x78], 1
mov al, 1
jmp 0x140003efc
xor edx, edx
mov qword [rsp + 0xc0], rbp
xor ecx, ecx
mov byte [rdi + 0x78], 0
mov r8d, 2
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov rbp, rax
test rax, rax
je 0x140003ef4
cmp qword [rdi + 0x60], 0xf
lea rdx, [rdi + 0x48]
mov qword [rsp + 0xb8], rbx
mov qword [rsp + 0x90], r12
jbe 0x140003cd5
mov rdx, qword [rdx]
mov r8d, 0x10
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
xor r12d, r12d
mov rbx, rax
test rax, rax
jne 0x140003e25
cmp qword [rdi + 0x20], 0xf
mov rbx, qword [rdi + 0x68]
mov qword [rsp + 0x98], rsi
lea rsi, [rdi + 8]
mov qword [rsp + 0x88], r14
mov rcx, rsi
mov r14d, dword [rdi + 0x70]
mov qword [rsp + 0x80], r15
jbe 0x140003d24
mov rcx, qword [rsi]
mov qword [rsp + 0x30], r12
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
xor r8d, r8d
mov edx, 0xc0000000
mov dword [rsp + 0x20], 1
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x140003d8b
lea r9, [rsp + 0x70]
mov dword [rsp + 0x70], r12d
mov r8d, r14d
mov qword [rsp + 0x20], r12
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, r15
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x140003d8b
cmp dword [rsp + 0x70], r14d
jne 0x140003d8b
mov al, 1
jmp 0x140003d8d
xor al, al
mov byte [rdi + 0x7b], al
cmp qword [rsi + 0x18], 0xf
mov r15, qword [rsp + 0x80]
mov r14, qword [rsp + 0x88]
jbe 0x140003daa
mov rsi, qword [rsi]
cmp qword [rdi + 0x60], 0xf
lea rdx, [rdi + 0x48]
jbe 0x140003db8
mov rdx, qword [rdx]
mov qword [rsp + 0x60], r12
lea r8, [0x140007638]
mov qword [rsp + 0x58], r12
mov r9d, 0x10
mov qword [rsp + 0x50], r12
mov rcx, rbp
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], rsi
mov dword [rsp + 0x30], r12d
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 1
call qword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov rsi, qword [rsp + 0x98]
mov rbx, rax
test rax, rax
jne 0x140003e21
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
jmp 0x140003ee4
xor al, al
jmp 0x140003e27
mov al, 1
xor r8d, r8d
mov byte [rdi + 0x79], al
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x140003eca
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x422
jne 0x140003eca
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp qword [rdi + 0x60], 0xf
lea rdx, [rdi + 0x48]
jbe 0x140003e64
mov rdx, qword [rdx]
mov r8d, 0x12
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov qword [rsp + 0x50], r12
mov edx, 0xffffffff
mov qword [rsp + 0x48], r12
mov r9d, edx
mov qword [rsp + 0x40], r12
mov r8d, 3
mov qword [rsp + 0x38], r12
mov rcx, rax
mov qword [rsp + 0x30], r12
mov rbx, rax
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
test eax, eax
je 0x140003eca
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
setne al
mov byte [rdi + 0x7a], al
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call fcn.1400039f0
mov rbx, qword [rsp + 0xb8]
mov r12, qword [rsp + 0x90]
mov rbp, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.1400051a0
add rsp, 0xa0
pop rdi
ret