Function at 0x140029fb0
Capabilities:
Create service
Persist via windows service
Set current directory
Set registry value

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x2e0
mov rax, qword [0x1401ef010]
xor rax, rsp
mov qword [rsp + 0x2d0], rax
mov r8d, 0x104
lea rdx, [rsp + 0x1c0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea r8, [rsp + 0x1c0]
mov edx, 0x104
lea rcx, [rsp + 0xb0]
call fcn.140139ff0
mov edx, 0x5c
lea rcx, [rsp + 0xb0]
call fcn.140133248
test rax, rax
je 0x14002a01a
mov byte [rax + 1], 0
lea rcx, [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea rdi, [0x1401f2c60]
test eax, eax
je 0x14002a0ba
lea r8, [0x1401c7630]
mov edx, 0x104
mov rcx, rdi
call fcn.140139ff0
lea r8, [rsp + 0x1c0]
mov edx, 0x104
mov rcx, rdi
call fcn.14013a050
lea r8, [0x1401c7630]
mov edx, 0x104
mov rcx, rdi
call fcn.14013a050
cmp qword [0x1401f29d8], 0
je 0x14002a0a6
lea r8, str.__inifile
mov edx, 0x104
mov rcx, rdi
call fcn.14013a050
mov r8, qword [0x1401f29d8]
mov edx, 0x104
mov rcx, rdi
call fcn.14013a050
lea r8, str.__service
mov edx, 0x104
mov rcx, rdi
call fcn.14013a050
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 2]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov rbx, rax
test rax, rax
jne 0x14002a0ef
lea r9d, [rax + 0x10]
lea r8, [0x1401c7218]
lea rdx, str.Failed_to_open_service_control_manager
call fcn.1400208f0
lea eax, [rbx + 1]
jmp 0x14002a2be
lea rax, str.Tcpip
mov qword [rsp + 0x2f0], rsi
xor esi, esi
lea r8, [0x1401efc50]
mov qword [rsp + 0x60], rsi
lea rdx, [0x1401efc50]
mov qword [rsp + 0x58], rsi
mov r9d, 0xf01ff
mov qword [rsp + 0x50], rax
mov rcx, rbx
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], reloc.WS2_32.dll_recv
call qword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov rdi, rax
test rax, rax
jne 0x14002a1a2
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x14002a16f
lea rdx, str.Failed:_Permission_denied
jmp 0x14002a17d
cmp eax, 0x431
je 0x14002a18f
lea rdx, str.Failed_to_create_a_new_service
lea r8, [0x1401c7218]
mov r9d, reloc.WS2_32.dll_recv
call fcn.1400208f0
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
jmp 0x14002a2b6
mov eax, dword [0x1401c7530]
lea r9, [0x1401efc50]
movups xmm0, xmmword [str.Provides_secure_remote_desktop_sharing]
mov dword [rsp + 0xa0], eax
lea r8, str.SYSTEMCurrentControlSetServices_s
movzx eax, word [0x1401c7534]
lea rcx, [rsp + 0xb0]
movups xmm1, xmmword [0x1401c7520]
mov word [rsp + 0xa4], ax
mov edx, 0x100
movzx eax, byte [0x1401c7536]
mov byte [rsp + 0xa6], al
movups xmmword [rsp + 0x80], xmm0
movups xmmword [rsp + 0x90], xmm1
call fcn.14002c250
lea rax, [rsp + 0x78]
xor r9d, r9d
mov qword [rsp + 0x40], rax
lea rdx, [rsp + 0xb0]
lea rax, [rsp + 0x70]
xor r8d, r8d
mov qword [rsp + 0x38], rax
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x2001f
mov dword [rsp + 0x20], esi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
lea rcx, [rsp + 0x80]
mov rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp byte [rcx + rax], sil
jne 0x14002a260
mov rcx, qword [rsp + 0x70]
lea rdx, str.Description
inc eax
mov r9d, 1
mov dword [rsp + 0x28], eax
xor r8d, r8d
lea rax, [rsp + 0x80]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
mov rsi, qword [rsp + 0x2f0]
mov rcx, qword [rsp + 0x2d0]
xor rcx, rsp
call fcn.1401312e0
mov rbx, qword [rsp + 0x2f8]
add rsp, 0x2e0
pop rdi
ret