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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x890
mov edi, 0x20
mov ebp, pe_nt_image_headers64
mov qword [0x1400f1938], rcx
mov rsi, rcx
xor r13d, r13d
lea r14d, [rdi - 0x17]
jmp 0x140006e88
cmp r14w, ax
ja 0x140006e7f
cmp ax, 0xd
jbe 0x140006e91
cmp di, ax
je 0x140006e91
add rcx, 2
movzx eax, word [rcx]
cmp ax, r13w
jne 0x140006e73
mov rbx, rcx
mov eax, 0x400
mov qword [rsp + 0x8d8], rcx
sub rbx, rsi
lea rcx, [rsp + 0x8d8]
sar rbx, 1
cmp ebx, eax
cmovg ebx, eax
call fcn.140044ef4
mov rdx, qword [rsp + 0x8d8]
lea rcx, str.__gui_
mov r8d, 6
call fcn.140045f78
cmp al, r13b
je 0x140006f27
mov rax, qword [rsp + 0x8d8]
lea rcx, [rsp + 0x8e0]
mov ebp, r13d
add rax, 0xc
mov qword [rsp + 0x8e0], rax
call fcn.140044ef4
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.1400177b0
movsxd rax, ebx
lea rcx, [rsp + 0x70]
mov rdx, rsi
lea rbx, [rax + rax]
mov r8, rbx
call fcn.1400177f8
mov rcx, rsi
mov word [rsp + rbx + 0x70], r13w
mov byte [section.flag_dat], r13b
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea rcx, [rsp + 0x8d0]
lea r12d, [rax + 1]
lea edx, [r12 + 0x226]
call fcn.14004bedc
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, r13d
jle 0x14000710f
mov rax, qword [rsp + 0x8d0]
mov r10d, 0x22
mov dx, r13w
mov word [rax + r11*2 + 2], r13w
mov rax, qword [rsp + 0x8d0]
lea rcx, [rax + 2]
lea r9, [rax + r11*2 + 2]
mov word [rax], r10w
jmp 0x140006fdc
cmp r14w, word [rcx]
ja 0x140006fce
cmp word [rcx], 0xd
jbe 0x140006fd3
cmp di, word [rcx]
jne 0x140006fd8
mov edx, 1
add rcx, 2
cmp rcx, r9
jb 0x140006fc2
mov rax, qword [rsp + 0x8d0]
lea rdi, [rax + 2]
cmp dx, r13w
je 0x140007001
mov word [rax + r11*2 + 2], r10w
sub rdi, 2
add r11d, 2
movsxd rax, r11d
lea rdx, str._EXEC__Service
mov r8d, 0x1e
lea rbx, [rdi + rax*2]
mov rcx, rbx
call fcn.1400177f8
movsxd r8, r12d
lea rcx, [rbx + 0x1e]
add r8, r8
mov rdx, rsi
call fcn.1400177f8
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
cmp rax, r13
je 0x1400070fa
mov qword [rsp + 0x60], r13
mov qword [rsp + 0x58], r13
mov qword [rsp + 0x50], r13
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], r13d
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, r13
je 0x1400070fa
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rdx, [rsp + 0x70]
mov r8d, 0x20000000
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
cmp rax, r13
je 0x1400070f1
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
lea rcx, [0x1400d6bb0]
cmp eax, r13d
jne 0x1400070e1
lea rcx, [0x1400d6ba0]
call fcn.14000443c
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140007106
lea rcx, [0x1400d6b90]
jmp 0x140007101
lea rcx, [0x1400d6b80]
call fcn.14000443c
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rcx, [rsp + 0x8d0]
call fcn.140044f24
add rsp, 0x890
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret