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

Disassembly:
push rbp
push r14
sub rsp, 0x98
mov rax, qword [0x1403705b0]
xor rax, rsp
mov qword [rsp + 0x78], rax
xor edx, edx
mov byte [rcx + 0x78], 0
mov rbp, rcx
xor ecx, ecx
lea r8d, [rdx + 2]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov r14, rax
test rax, rax
je 0x14008ffef
cmp qword [rbp + 0x60], 0x10
mov qword [rsp + 0xc0], rsi
mov qword [rsp + 0xc8], rdi
lea rdi, [rbp + 0x48]
mov qword [rsp + 0x88], r13
mov rdx, rdi
jb 0x14008fd84
mov rdx, qword [rdi]
mov r8d, reloc.WS2_32.dll_recv
mov qword [rsp + 0xb8], rbx
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
xor r13d, r13d
mov rsi, rax
test rax, rax
jne 0x14008fecb
cmp qword [rbp + 0x20], 0x10
lea rsi, [rbp + 8]
mov rbx, qword [rbp + 0x68]
mov rcx, rsi
mov qword [rsp + 0x90], r12
mov r12d, dword [rbp + 0x70]
mov qword [rsp + 0x80], r15
jb 0x14008fdd3
mov rcx, qword [rsi]
mov qword [rsp + 0x30], r13
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 0x14008fe3a
lea r9, [rsp + 0x70]
mov dword [rsp + 0x70], r13d
mov r8d, r12d
mov qword [rsp + 0x20], r13
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 0x14008fe3a
cmp dword [rsp + 0x70], r12d
jne 0x14008fe3a
mov al, 1
jmp 0x14008fe3c
xor al, al
mov byte [rbp + 0x7b], al
cmp qword [rsi + 0x18], 0x10
mov r15, qword [rsp + 0x80]
mov r12, qword [rsp + 0x90]
jb 0x14008fe59
mov rsi, qword [rsi]
cmp qword [rdi + 0x18], 0x10
mov rdx, rdi
jb 0x14008fe66
mov rdx, qword [rdi]
mov qword [rsp + 0x60], r13
lea r8, [0x14033719b]
mov qword [rsp + 0x58], r13
mov r9d, reloc.WS2_32.dll_recv
mov qword [rsp + 0x50], r13
mov rcx, r14
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x38], rsi
mov dword [rsp + 0x30], r13d
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 1
call qword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov rsi, rax
test rax, rax
jne 0x14008fec7
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
jmp 0x14008ffcf
xor al, al
jmp 0x14008fecd
mov al, 1
xor r8d, r8d
mov byte [rbp + 0x79], al
xor edx, edx
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x14008ffbb
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x422
jne 0x14008ffbb
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp qword [rdi + 0x18], 0x10
jb 0x14008ff0a
mov rdi, qword [rdi]
mov r8d, reloc.WS2_32.dll_select
mov rdx, rdi
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov qword [rsp + 0x50], r13
mov edx, 0xffffffff
mov qword [rsp + 0x48], r13
mov r9d, edx
mov qword [rsp + 0x40], r13
mov r8d, 3
mov qword [rsp + 0x38], r13
mov rcx, rax
mov qword [rsp + 0x30], r13
mov rsi, rax
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], r13
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
lea rdx, str.GLE_
mov edi, eax
lea rcx, [0x14037a010]
call fcn.1400a0200
mov rbx, rax
mov rcx, qword [rax]
movsxd rdx, dword [rcx + 4]
add rdx, rax
and dword [rdx + 0x18], 0xfffff3ff
or dword [rdx + 0x18], 0x200
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov rcx, rbx
call fcn.14009e730
mov rcx, rax
call fcn.140067610
test edi, edi
je 0x14008ffbb
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
setne al
mov byte [rbp + 0x7a], al
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, 1
mov rbx, qword [rsp + 0xb8]
mov rsi, qword [rsp + 0xc0]
mov rdi, qword [rsp + 0xc8]
mov r13, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140251820
add rsp, 0x98
pop r14
pop rbp
ret