Function at 0x140005360
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 [0x140047038]
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 0x14000544f
mov r8d, 0xa0000000
lea rdx, str.TrustedInstaller
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov rdi, rax
test rax, rax
je 0x140005446
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 0x14000543d
mov ecx, dword [rbp + 0x24]
cmp ecx, 1
jne 0x14000540e
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
je 0x14000543d
mov ecx, dword [rbp + 0x24]
lea eax, [rcx - 2]
cmp eax, 1
jbe 0x140005432
cmp ecx, 4
jne 0x1400053ce
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 0x140005454
mov ecx, dword [rbp + 0x38]
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1400053ce
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, 0xffffffff
xor r14d, r14d
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x70], r14
mov qword [rsp + 0x78], 0xf
lea r8d, [r14 + 0x10]
lea rdx, str.SeDebugPrivilege
lea rcx, [rsp + 0x60]
call fcn.140003290
lea rcx, [rsp + 0x60]
call fcn.1400051c0
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x70], r14
mov qword [rsp + 0x78], 0xf
lea r8d, [r14 + 0x16]
lea rdx, str.SeImpersonatePrivilege
lea rcx, [rsp + 0x60]
call fcn.140003290
lea rcx, [rsp + 0x60]
call fcn.1400051c0
mov qword [rbp + 0x20], r14
mov qword [rbp + 0x30], r14
mov qword [rbp + 0x38], 0xf
lea r8d, [r14 + 0xc]
lea rdx, str.winlogon.exe
lea rcx, [rbp + 0x20]
call fcn.140003290
lea rcx, [rbp + 0x20]
call fcn.1400058e0
mov r8d, eax
xor edx, edx
mov ecx, 0x440
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rsi, rax
test rax, rax
je 0x140005599
lea r8, [rsp + 0x50]
mov edx, 0x2000000
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x140005520
mov rcx, rsi
jmp 0x140005593
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 0x14000558e
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
je 0x140005583
mov rdx, qword [rsp + 0x58]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_SetThreadToken]
test eax, eax
je 0x140005599
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 0x1400055f2
mov rdx, qword [rbx + 0x18]
cmp rdx, 0x10
jb 0x1400055eb
inc rdx
mov rcx, qword [rbx]
cmp rdx, 0x1000
jb 0x1400055e6
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x1400057a0
mov rcx, r8
call fcn.140008ac0
xor al, al
jmp 0x140005767
lea r8, [rbp - 0x80]
mov edx, 0x2000000
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x140005613
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400055b1
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 0x14000565f
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400055b1
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.1400057b0
cmp qword [rax + 0x18], 8
jb 0x1400056ab
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]
test eax, eax
sete dil
mov rdx, qword [rbp + 0x38]
cmp rdx, 8
jb 0x140005726
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140005720
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000579a
call fcn.140008ac0
nop
mov rdx, qword [rbx + 0x18]
test dil, dil
jne 0x1400055b5
cmp rdx, 0x10
jb 0x140005765
inc rdx
mov rcx, qword [rbx]
cmp rdx, 0x1000
jb 0x140005760
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x1400057a0
mov rcx, r8
call fcn.140008ac0
mov al, 1
mov qword [rbx + 0x10], r14
mov qword [rbx + 0x18], 0xf
mov byte [rbx], 0
mov rcx, qword [rbp + 0x60]
xor rcx, rsp
call fcn.140008aa0
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.140011ee0
nop
call fcn.140011ee0
int3