Function at 0x1400407e0
Capabilities:
Create service
Delete service
Write file on windows

Disassembly:
mov rax, rsp
push rbp
lea rbp, [rax - 0x5f]
sub rsp, 0x100
mov qword [rbp - 0x31], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x14009e018]
xor rax, rsp
mov qword [rbp + 0x47], rax
mov esi, ecx
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
jne 0x1400408be
mov ecx, 0x917c17bb
call fcn.14001a490
mov edx, 0x5017
movzx ecx, word [rax]
xor cx, dx
mov word [rbp - 0x29], cx
movzx ecx, word [rax + 2]
xor cx, dx
mov word [rbp - 0x27], cx
movzx ecx, word [rax + 4]
xor cx, dx
mov word [rbp - 0x25], cx
movzx eax, word [rax + 6]
xor ax, dx
mov word [rbp - 0x23], ax
xor ebx, ebx
mov word [rbp - 0x21], bx
mov rcx, qword [0x1400a34c0]
test rcx, rcx
je 0x140040aff
lea rdx, [rbp - 0x29]
or rax, 0xffffffffffffffff
nop word [rax + rax]
lea rax, [rax + 1]
cmp word [rdx + rax*2], bx
jne 0x140040890
lea r8d, [rax*2 + 2]
mov qword [rsp + 0x20], rbx
lea r9, [rbp - 0x39]
lea rdx, [rbp - 0x29]
mov rcx, qword [rcx + 0x70]
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x140040aff
mov rdx, qword [0x1400a34c0]
add rdx, 0x10
cmp qword [rdx + 0x18], 8
jb 0x1400408d3
mov rdx, qword [rdx]
mov r8d, 0xf01ff
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
je 0x140040904
mov rcx, rax
call fcn.1400406f0
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rcx, [rbp + 0x27]
call fcn.14003fe40
mov rbx, rax
lea rcx, [rbp - 0x19]
call fcn.14003fee0
nop
cmp qword [rbx + 0x18], 8
jb 0x140040924
mov rbx, qword [rbx]
cmp qword [rax + 0x18], 8
jb 0x14004092e
mov rax, qword [rax]
mov rdx, rbx
mov rcx, rax
call fcn.14003fb10
nop
mov r8, qword [rbp - 1]
cmp r8, 8
jb 0x140040950
inc r8
mov rdx, qword [rbp - 0x19]
call fcn.140019be0
mov qword [rbp - 1], 7
xor ebx, ebx
mov qword [rbp - 9], rbx
mov word [rbp - 0x19], bx
mov r8, qword [rbp + 0x3f]
cmp r8, 8
jb 0x140040978
inc r8
mov rdx, qword [rbp + 0x27]
call fcn.140019be0
mov qword [rbp + 0x1f], 7
mov qword [rbp + 0x17], rbx
mov word [rbp + 7], bx
lea rcx, [rbp - 0x19]
call fcn.14003fee0
nop
cmp qword [rax + 0x18], 8
jb 0x14004099c
mov rax, qword [rax]
mov r8, rax
lea rdx, str.__ls_
lea rcx, [rbp + 7]
call fcn.140041cd0
nop
mov r8, qword [rbp - 1]
cmp r8, 8
jb 0x1400409c6
inc r8
mov rdx, qword [rbp - 0x19]
call fcn.140019be0
mov qword [rbp - 1], 7
mov qword [rbp - 9], rbx
mov word [rbp - 0x19], bx
lea rax, [rbp + 7]
cmp qword [rbp + 0x1f], 8
cmovae rax, qword [rbp + 7]
mov rdx, qword [0x1400a34c0]
lea r8, [rdx + 0x30]
cmp qword [r8 + 0x18], 8
jb 0x1400409f9
mov r8, qword [r8]
add rdx, 0x10
cmp qword [rdx + 0x18], 8
jb 0x140040a07
mov rdx, qword [rdx]
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], 0x110
mov r9d, 0xf01ff
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rsi, rax
test rax, rax
jne 0x140040ace
mov ecx, 0x92a641d0
call fcn.14001a490
mov edx, 0x5017
movzx ecx, word [rax]
xor cx, dx
mov word [rbp - 0x29], cx
movzx ecx, word [rax + 2]
xor cx, dx
mov word [rbp - 0x27], cx
movzx ecx, word [rax + 4]
xor cx, dx
mov word [rbp - 0x25], cx
movzx eax, word [rax + 6]
xor ax, dx
mov word [rbp - 0x23], ax
mov word [rbp - 0x21], bx
mov rcx, qword [0x1400a34c0]
test rcx, rcx
je 0x140040adf
lea rdx, [rbp - 0x29]
or rax, 0xffffffffffffffff
lea rax, [rax + 1]
cmp word [rdx + rax*2], 0
jne 0x140040aa2
lea r8d, [rax*2 + 2]
mov qword [rsp + 0x20], rbx
lea r9, [rbp - 0x39]
lea rdx, [rbp - 0x29]
mov rcx, qword [rcx + 0x70]
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x140040adf
mov rcx, rsi
call fcn.140040040
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
mov r8, qword [rbp + 0x1f]
cmp r8, 8
jb 0x140040aff
inc r8
mov rdx, qword [rbp + 7]
call fcn.140019be0
mov rcx, qword [rbp + 0x47]
xor rcx, rsp
call fcn.140051aa0
lea r11, [rsp + 0x100]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret