Function at 0x140029f50
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 [0x1401f0010]
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.14013ac00
mov edx, 0x5c
lea rcx, [rsp + 0xb0]
call fcn.140133e58
test rax, rax
je 0x140029fba
mov byte [rax + 1], 0
lea rcx, [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea rdi, [0x1401f3c60]
test eax, eax
je 0x14002a05a
lea r8, [0x1401c7f10]
mov edx, 0x104
mov rcx, rdi
call fcn.14013ac00
lea r8, [rsp + 0x1c0]
mov edx, 0x104
mov rcx, rdi
call fcn.14013ac60
lea r8, [0x1401c7f10]
mov edx, 0x104
mov rcx, rdi
call fcn.14013ac60
cmp qword [0x1401f39d8], 0
je 0x14002a046
lea r8, str.__inifile
mov edx, 0x104
mov rcx, rdi
call fcn.14013ac60
mov r8, qword [0x1401f39d8]
mov edx, 0x104
mov rcx, rdi
call fcn.14013ac60
lea r8, str.__service
mov edx, 0x104
mov rcx, rdi
call fcn.14013ac60
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 2]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov rbx, rax
test rax, rax
jne 0x14002a08f
lea r9d, [rax + 0x10]
lea r8, [0x1401c7af8]
lea rdx, str.Failed_to_open_service_control_manager
call fcn.1400208f0
lea eax, [rbx + 1]
jmp 0x14002a25e
lea rax, str.Tcpip
mov qword [rsp + 0x2f0], rsi
xor esi, esi
lea r8, [0x1401f0c50]
mov qword [rsp + 0x60], rsi
lea rdx, [0x1401f0c50]
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 0x14002a142
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x14002a10f
lea rdx, str.Failed:_Permission_denied
jmp 0x14002a11d
cmp eax, 0x431
je 0x14002a12f
lea rdx, str.Failed_to_create_a_new_service
lea r8, [0x1401c7af8]
mov r9d, reloc.WS2_32.dll_recv
call fcn.1400208f0
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
jmp 0x14002a256
mov eax, dword [0x1401c7e10]
lea r9, [0x1401f0c50]
movups xmm0, xmmword [str.Provides_secure_remote_desktop_sharing]
mov dword [rsp + 0xa0], eax
lea r8, str.SYSTEMCurrentControlSetServices_s
movzx eax, word [0x1401c7e14]
lea rcx, [rsp + 0xb0]
movups xmm1, xmmword [0x1401c7e00]
mov word [rsp + 0xa4], ax
mov edx, 0x100
movzx eax, byte [0x1401c7e16]
mov byte [rsp + 0xa6], al
movups xmmword [rsp + 0x80], xmm0
movups xmmword [rsp + 0x90], xmm1
call fcn.14002c1f0
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 0x14002a200
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.140131ef0
mov rbx, qword [rsp + 0x2f8]
add rsp, 0x2e0
pop rdi
ret