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 0x140001581
mov rdx, qword [rdi + 8]
mov ecx, 0xfffd
movzx eax, word [rdx]
sub ax, 0x2d
test cx, ax
jne 0x140001581
add rdx, 2
lea rcx, str.install
call fcn.14000a78c
test eax, eax
jne 0x14000155b
xor edx, edx
mov dword [rsp + 0x70], 0x22
mov r8d, 0x208
lea rcx, [rbp - 0x60]
call fcn.140007ff0
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 0x140001679
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 0x140001679
lea r8, [rsp + 0x70]
mov edx, 0x104
lea rcx, [rbp - 0x60]
call fcn.14000cb94
lea r8, [rbp + 0x1b0]
mov edx, 0x104
lea rcx, [rbp - 0x60]
call fcn.14000cb94
lea r8, [rsp + 0x70]
mov edx, 0x104
lea rcx, [rbp - 0x60]
call fcn.14000cb94
xor ebx, ebx
lea rax, [0x140024a10]
mov qword [rsp + 0x60], rbx
lea r8, [0x140024a18]
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 0x140001528
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.CreateService_failed_w_err_0x_08lx_n
call fcn.140001320
jmp 0x14000153b
lea rdx, str.ETDService
lea rcx, str._s_is_installed._n
call fcn.140001320
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test rbx, rbx
je 0x140001679
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140001679
mov rdx, qword [rdi + 8]
lea rcx, str.remove
add rdx, 2
call fcn.14000a78c
test eax, eax
jne 0x140001679
call fcn.140005b20
jmp 0x140001679
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.140001cc0
lea rax, [rbp - 0x60]
xor ebx, ebx
mov qword [0x14002c868], rax
lea rcx, [rsp + 0x78]
mov rax, qword [rbp - 0x58]
mov qword [rsp + 0x78], rax
lea rax, [0x140005600]
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 0x140001614
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 0x140001632
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 0x28], rbx
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x140001645
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 0x10], rbx
mov rcx, qword [rbp - 8]
test rcx, rcx
je 0x140001658
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 8], rbx
mov rcx, qword [rbp]
test rcx, rcx
je 0x14000166b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp], rbx
mov rcx, qword [rbp + 8]
test rcx, rcx
je 0x140001679
call fcn.14000cf68
xor eax, eax
mov rcx, qword [rbp + 0x3c0]
xor rcx, rsp
call fcn.140006180
lea r11, [rsp + 0x4d0]
mov rbx, qword [r11 + 0x10]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret