Function at 0x140008798
Capabilities:
Create service
Persist via windows service
Start service

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x890
xor r14d, r14d
mov qword [0x140133a10], rcx
mov ebp, 0x100
lea eax, [r14 + 0x7e]
mov r12b, r14b
cmp ax, word [rcx]
jne 0x1400087e4
add rcx, 2
lea eax, [r14 + 0x49]
mov qword [0x140133a10], rcx
cmp ax, word [rcx]
sete r12b
add rcx, 2
mov esi, 0x20
mov rdi, rcx
lea r15d, [rsi - 0x17]
jmp 0x140008807
cmp r15w, ax
ja 0x1400087fe
cmp ax, 0xd
jbe 0x140008810
cmp si, ax
je 0x140008810
add rcx, 2
movzx eax, word [rcx]
cmp ax, r14w
jne 0x1400087f2
mov rbx, rcx
mov eax, 0x400
mov qword [rsp + 0x8d8], rcx
sub rbx, rdi
lea rcx, [rsp + 0x8d8]
sar rbx, 1
cmp ebx, eax
cmovg ebx, eax
call fcn.140059340
mov rdx, qword [rsp + 0x8d8]
lea rcx, str.__gui_
mov r8d, 6
call fcn.14005a990
cmp al, r14b
je 0x1400088a6
mov rax, qword [rsp + 0x8d8]
lea rcx, [rsp + 0x8e0]
mov ebp, r14d
add rax, 0xc
mov qword [rsp + 0x8e0], rax
call fcn.140059340
mov rcx, qword [rsp + 0x8e0]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rdx, qword [rsp + 0x8e0]
mov rcx, qword [rsp + 0x8d8]
inc eax
movsxd r8, eax
add r8, r8
call fcn.14001d2c8
movsxd rax, ebx
lea rcx, [rsp + 0x70]
mov rdx, rdi
lea rbx, [rax + rax]
mov r8, rbx
call fcn.14001d310
mov rcx, rdi
mov word [rsp + rbx + 0x70], r14w
mov byte [section.flag_dat], r14b
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea r13d, [rax + 1]
lea ecx, [r13 + 0x226]
movsxd rdx, ecx
lea rcx, [rsp + 0x8d0]
call fcn.1400619b4
mov rdx, qword [rsp + 0x8d0]
xor ecx, ecx
add rdx, 2
mov r8d, 0x1cc
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
movsxd r11, eax
cmp r11d, r14d
jle 0x140008a67
mov rax, qword [rsp + 0x8d0]
mov r10d, 0x22
mov r8w, r14w
mov word [rax + r11*2 + 2], r14w
mov rax, qword [rsp + 0x8d0]
lea rcx, [rax + 2]
lea r9, [rax + r11*2 + 2]
mov word [rax], r10w
jmp 0x14000895e
cmp r15w, word [rcx]
ja 0x14000894f
cmp word [rcx], 0xd
jbe 0x140008954
cmp si, word [rcx]
jne 0x14000895a
mov r8d, 1
add rcx, 2
cmp rcx, r9
jb 0x140008943
mov rax, qword [rsp + 0x8d0]
lea rsi, [rax + 2]
cmp r8w, r14w
je 0x140008983
mov word [rax + r11*2 + 2], r10w
sub rsi, 2
add r11d, 2
movsxd rax, r11d
lea rdx, str._EXEC__Service
mov r8d, 0x1e
lea rbx, [rsi + rax*2]
mov rcx, rbx
call fcn.14001d310
movsxd r8, r13d
lea rcx, [rbx + 0x1e]
add r8, r8
mov rdx, rdi
call fcn.14001d310
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
cmp rax, r14
je 0x140008a5e
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x48], r14
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x38], rsi
mov dword [rsp + 0x30], r14d
lea r8, [rsp + 0x70]
lea rdx, [rsp + 0x70]
or ebp, 0x10
mov r9d, 0xf01ff
mov rcx, rax
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], ebp
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
cmp rax, r14
je 0x140008a5e
cmp r12b, r14b
je 0x140008a5e
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rdx, [rsp + 0x70]
mov r8d, 0x20000000
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
cmp rax, r14
je 0x140008a5e
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rcx, [rsp + 0x8d0]
call fcn.140059370
mov rbx, qword [rsp + 0x8e8]
add rsp, 0x890
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret