Function at 0x140005490
Capabilities:
Acquire debug privileges
Create process on windows
Impersonate user
Query service status
Start service

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x70]
sub rsp, 0x170
mov rax, qword [0x140044040]
xor rax, rsp
mov qword [rbp + 0x60], rax
mov rbx, rcx
mov qword [rbp - 0x58], rcx
mov r8d, 0x20000000
lea rdx, str.ServicesActive
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov rsi, rax
test rax, rax
je 0x14000557f
mov r8d, 0xa0000000
lea rdx, str.TrustedInstaller
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov rdi, rax
test rax, rax
je 0x140005576
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov r9d, 0x24
lea r8, [rbp + 0x20]
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x14000556d
mov ecx, dword [rbp + 0x24]
cmp ecx, 1
jne 0x14000553e
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
je 0x14000556d
mov ecx, dword [rbp + 0x24]
lea eax, [rcx - 2]
cmp eax, 1
jbe 0x140005562
cmp ecx, 4
jne 0x1400054fe
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, dword [rbp + 0x3c]
jmp 0x140005584
mov ecx, dword [rbp + 0x38]
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1400054fe
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, 0xffffffff
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
xor r14d, r14d
mov qword [rsp + 0x70], r14
mov qword [rsp + 0x78], r14
lea r8d, [r14 + 0x10]
lea rdx, str.SeDebugPrivilege
lea rcx, [rsp + 0x60]
call fcn.1400040f0
lea rcx, [rsp + 0x60]
call fcn.1400052e0
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x70], r14
mov qword [rsp + 0x78], r14
lea r8d, [r14 + 0x16]
lea rdx, str.SeImpersonatePrivilege
lea rcx, [rsp + 0x60]
call fcn.1400040f0
lea rcx, [rsp + 0x60]
call fcn.1400052e0
xorps xmm0, xmm0
movups xmmword [rbp + 0x20], xmm0
mov qword [rbp + 0x30], r14
mov qword [rbp + 0x38], r14
lea r8d, [r14 + 0xc]
lea rdx, str.winlogon.exe
lea rcx, [rbp + 0x20]
call fcn.1400040f0
lea rcx, [rbp + 0x20]
call fcn.140005a10
mov r8d, eax
xor edx, edx
mov ecx, 0x440
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rsi, rax
test rax, rax
je 0x1400056c6
lea r8, [rsp + 0x50]
mov edx, 0x2000000
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x14000564d
mov rcx, rsi
jmp 0x1400056c0
mov dword [rsp + 0x60], 0x18
mov qword [rsp + 0x68], r14
mov dword [rsp + 0x70], r14d
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 2
mov r9d, 2
lea r8, [rsp + 0x60]
mov edx, 0x2000000
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x1400056bb
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
je 0x1400056b0
mov rdx, qword [rsp + 0x58]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_SetThreadToken]
test eax, eax
je 0x1400056c6
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8d, edi
xor edx, edx
mov ecx, 0x440
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
test rax, rax
jne 0x14000571f
mov rdx, qword [rbx + 0x18]
cmp rdx, 0x10
jb 0x140005718
inc rdx
mov rcx, qword [rbx]
cmp rdx, 0x1000
jb 0x140005713
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x1400058c8
mov rcx, r8
call fcn.140008eb0
xor al, al
jmp 0x14000588f
lea r8, [rbp - 0x80]
mov edx, 0x2000000
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x140005740
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400056de
mov dword [rbp - 0x70], 0x18
mov qword [rbp - 0x68], r14
mov dword [rbp - 0x60], r14d
lea rax, [rbp - 0x78]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 2
mov r9d, 2
lea r8, [rbp - 0x70]
mov edx, 0x2000000
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x14000578c
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400056de
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
movups xmmword [rbp - 0x30], xmm0
movups xmmword [rbp - 0x20], xmm0
movups xmmword [rbp - 0x10], xmm0
movups xmmword [rbp], xmm0
mov qword [rbp + 0x10], rax
lea rax, str.Winsta0Default
mov qword [rbp - 0x40], rax
xor eax, eax
movups xmmword [rbp + 0x48], xmm0
mov qword [rbp + 0x58], rax
mov rdx, rbx
lea rcx, [rbp + 0x20]
call fcn.1400058d0
cmp qword [rax + 0x18], 8
jb 0x1400057d8
mov rax, qword [rax]
lea rcx, [rbp + 0x48]
mov qword [rsp + 0x40], rcx
lea rcx, [rbp - 0x50]
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], 0x400
mov r9, rax
xor r8d, r8d
lea edx, [r8 + 1]
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.ADVAPI32.dll_CreateProcessWithTokenW]
mov edi, eax
mov rdx, qword [rbp + 0x38]
cmp rdx, 8
jb 0x14000584f
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140005849
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400058c2
call fcn.140008eb0
nop
mov rdx, qword [rbx + 0x18]
test edi, edi
je 0x1400056e2
cmp rdx, 0x10
jb 0x14000588d
inc rdx
mov rcx, qword [rbx]
cmp rdx, 0x1000
jb 0x140005888
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x1400058c8
mov rcx, r8
call fcn.140008eb0
mov al, 1
mov byte [rbx], 0
mov qword [rbx + 0x18], 0xf
mov qword [rbx + 0x10], r14
mov rcx, qword [rbp + 0x60]
xor rcx, rsp
call fcn.140008e90
lea r11, [rsp + 0x170]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
call fcn.140013e90
nop
call fcn.140013e90
int3