Function at 0x140001380
Capabilities:
Create service
Persist via windows service
Print debug messages

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rdi
push rbp
lea rbp, [rsp - 0x3d0]
sub rsp, 0x4d0
mov rax, qword [0x14002a010]
xor rax, rsp
mov qword [rbp + 0x3c0], rax
mov ebx, ecx
mov rdi, rdx
lea rcx, str.ETDService:_Enter_wmain
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp ebx, 1
jle 0x140001584
mov rdx, qword [rdi + 8]
mov ecx, 0xfffd
movzx eax, word [rdx]
sub ax, 0x2d
test cx, ax
jne 0x140001584
add rdx, 2
lea rcx, str.install
call fcn.14000b1dc
test eax, eax
jne 0x14000155e
xor edx, edx
mov dword [rsp + 0x70], 0x22
mov r8d, 0x208
lea rcx, [rbp - 0x60]
call fcn.140007fc0
mov r8d, 0x104
lea rdx, [rbp + 0x1b0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x140001442
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.GetModuleFileName_failed_w_err_0x_08lx_n
call fcn.140001320
jmp 0x14000167c
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 3]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
jne 0x140001471
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed_w_err_0x_08lx_n
call fcn.140001320
jmp 0x14000167c
lea r8, [rsp + 0x70]
mov edx, 0x104
lea rcx, [rbp - 0x60]
call fcn.14000d5e4
lea r8, [rbp + 0x1b0]
mov edx, 0x104
lea rcx, [rbp - 0x60]
call fcn.14000d5e4
lea r8, [rsp + 0x70]
mov edx, 0x104
lea rcx, [rbp - 0x60]
call fcn.14000d5e4
xor ebx, ebx
lea rax, [0x140024dc0]
mov qword [rsp + 0x60], rbx
lea r8, [0x140024dc8]
mov qword [rsp + 0x58], rbx
lea rdx, str.ETDService
mov qword [rsp + 0x50], rax
mov rcx, rdi
mov qword [rsp + 0x48], rbx
lea rax, [rbp - 0x60]
mov qword [rsp + 0x40], rbx
lea r9d, [rbx + 4]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0x10
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rbx, rax
test rax, rax
jne 0x140001534
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.CreateService_failed_w_err_0x_08lx_n
call fcn.140001320
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x14000167c
lea rdx, str.ETDService
lea rcx, str._s_is_installed._n
call fcn.140001320
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x14000167c
mov rdx, qword [rdi + 8]
lea rcx, str.remove
add rdx, 2
call fcn.14000b1dc
test eax, eax
jne 0x14000167c
call fcn.140005a30
jmp 0x14000167c
lea rcx, str.Parameters:_n
call fcn.140001320
lea rcx, str.__install__to_install_the_service._n
call fcn.140001320
lea rcx, str.__remove___to_remove_the_service._n
call fcn.140001320
lea rcx, str.ETDService:_CServiceBase::Run
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea rcx, [rbp - 0x60]
call fcn.140001cd0
lea rax, [rbp - 0x60]
xor ebx, ebx
mov qword [0x14002c858], rax
lea rcx, [rsp + 0x78]
mov rax, qword [rbp - 0x58]
mov qword [rsp + 0x78], rax
lea rax, [0x140005540]
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x78], rbx
mov qword [rbp - 0x70], rbx
call qword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x140001617
lea rcx, str.ETDService:_Service_failed_to_run
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Service_failed_to_run_w_err_0x_08lx_n
call fcn.140001320
mov rcx, qword [rbp - 0x28]
lea rax, vtable.CServiceMain.0
mov qword [rbp - 0x60], rax
test rcx, rcx
je 0x140001635
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 0x28], rbx
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x140001648
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 0x10], rbx
mov rcx, qword [rbp - 8]
test rcx, rcx
je 0x14000165b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 8], rbx
mov rcx, qword [rbp]
test rcx, rcx
je 0x14000166e
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp], rbx
mov rcx, qword [rbp + 8]
test rcx, rcx
je 0x14000167c
call fcn.14000d9b8
xor eax, eax
mov rcx, qword [rbp + 0x3c0]
xor rcx, rsp
call fcn.140006060
lea r11, [rsp + 0x4d0]
mov rbx, qword [r11 + 0x10]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret