Function at 0x140002a84
Capabilities:
Compare security identifiers
Create process on windows
Query service status

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x2a8]
sub rsp, 0x380
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x270], rax
mov r12, qword [0x14002afa0]
lea rdi, [0x140024cf0]
mov rcx, rdi
mov rbx, rdx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.NtQuerySystemInformation
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rdi
mov r13, rax
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.NtDuplicateObject
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.NtQueryObject
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor esi, esi
lea r8, [0x14002afb0]
lea rdx, str._sdefault
mov qword [rsp + 0x68], rax
lea rcx, [rbp + 0x70]
mov qword [rbp - 0x78], rsi
mov r15d, 0x10000
call qword [sym.imp.USER32.dll_wsprintfW]
lea edi, [rsi + 0x68]
xor edx, edx
mov r8d, edi
lea rcx, [rbp - 0x50]
call fcn.140019f00
lea rax, [rbp + 0x70]
mov dword [rbp - 0x50], edi
lea rdx, str.SeAssignPrimaryTokenPrivilege
mov qword [rbp - 0x40], rax
mov rcx, rbx
call fcn.1400029a0
lea rdx, str.SeImpersonatePrivilege
mov rcx, rbx
call fcn.1400029a0
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rcx, rax
lea r8d, [rsi + 4]
lea rdx, str.rpcss
mov rdi, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
xorps xmm0, xmm0
mov dword [rbp + 0x20], esi
mov rbx, rax
lea r9d, [rsi + 0x24]
xor eax, eax
lea r8, [rbp + 0x30]
mov dword [rbp + 0x50], eax
xor edx, edx
lea rax, [rbp + 0x20]
mov rcx, rbx
mov qword [rsp + 0x20], rax
movups xmmword [rbp + 0x30], xmm0
movups xmmword [rbp + 0x40], xmm0
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov r8d, dword [rbp + 0x4c]
xor edx, edx
mov ecx, 0x2000000
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rsp + 0x60], rax
mov rbx, rax
test rax, rax
jne 0x140002c19
mov edx, dword [rbp + 0x4c]
lea rcx, str.____Could_not_open_PID__d___n
call fcn.14000173c
xor eax, eax
jmp 0x140002f92
mov rcx, r15
call fcn.14000c7b4
xor r9d, r9d
mov r8d, r15d
mov rdx, rax
mov r14, rax
lea ecx, [r9 + 0x10]
call r13
mov edi, 0xc0000004
jmp 0x140002c5f
lea ecx, [r15 + r15]
mov r15d, ecx
mov edx, ecx
mov rcx, r14
call fcn.14000cfcc
xor r9d, r9d
mov r8d, r15d
mov rdx, rax
mov r14, rax
lea ecx, [r9 + 0x10]
call r13
cmp eax, edi
je 0x140002c3b
test eax, eax
jns 0x140002c75
lea rcx, str.NtQuerySystemInformation_failed__n
call fcn.14000173c
jmp 0x140002c12
mov r15d, esi
cmp dword [r14], esi
jbe 0x140002f7d
mov eax, r15d
lea rcx, [rax + rax*2]
movups xmm1, xmmword [r14 + rcx*8 + 8]
movd eax, xmm1
movups xmmword [rbp - 0x70], xmm1
cmp eax, dword [rbp + 0x4c]
jne 0x140002f45
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
movups xmm0, xmmword [rbp - 0x70]
mov dword [rsp + 0x30], 2
lea r9, [rbp - 0x78]
mov r8, rax
mov dword [rsp + 0x28], esi
pextrw edx, xmm0, 3
mov rcx, rbx
mov dword [rsp + 0x20], 0x2000000
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x140002f45
mov ecx, 0x1000
call fcn.14000c7b4
mov rcx, qword [rbp - 0x78]
mov r9d, 0x1000
mov r8, rax
mov qword [rsp + 0x20], rsi
mov edx, 2
mov r13, rax
call qword [rsp + 0x68]
test eax, eax
js 0x140002f3b
movzx r8d, word [r13]
lea rdx, str.Token
mov rcx, qword [r13 + 8]
shr r8, 1
call fcn.14000cfd4
test eax, eax
jne 0x140002f33
mov rbx, qword [rbp - 0x78]
lea rax, [rbp - 0x70]
mov qword [rsp + 0x50], rax
lea rcx, [rbp + 0x24]
mov dword [rsp + 0x48], esi
xor r9d, r9d
mov dword [rsp + 0x40], esi
mov dl, 1
mov dword [rsp + 0x38], esi
mov dword [rsp + 0x30], esi
mov dword [rsp + 0x28], esi
lea r8d, [r9 + 0x12]
mov dword [rsp + 0x20], esi
mov qword [rbp - 0x70], rsi
mov dword [rbp + 0x24], esi
mov word [rbp + 0x28], 0x500
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x140002f2e
xor r9d, r9d
mov dword [rbp + 0x20], esi
lea rax, [rbp + 0x20]
xor r8d, r8d
mov rcx, rbx
mov qword [rsp + 0x20], rax
lea edx, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
cmp dword [rbp + 0x20], esi
je 0x140002f2e
mov ecx, dword [rbp + 0x20]
call fcn.14000c7b4
mov r9d, dword [rbp + 0x20]
mov rdi, rax
lea rax, [rbp + 0x20]
mov r8, rdi
mov edx, 1
mov qword [rsp + 0x20], rax
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov rdx, qword [rdi]
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_EqualSid]
mov rcx, rdi
mov ebx, eax
call fcn.14000c7a0
mov rcx, qword [rbp - 0x70]
call fcn.14000c7a0
test ebx, ebx
je 0x140002f2e
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
je 0x140002f2e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.___Got_SYSTEM_Token____n
call fcn.14000173c
mov rcx, qword [rbp - 0x78]
lea rax, [rbp - 0x60]
mov qword [rsp + 0x28], rax
mov r9d, 2
xor r8d, r8d
mov dword [rsp + 0x20], 1
mov edx, 0xf01ff
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x140002f69
mov rcx, qword [rbp - 0x78]
lea rax, [rbp - 0x58]
mov qword [rsp + 0x28], rax
mov r9d, 2
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0xf01ff
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x140002f5a
mov rcx, qword [rbp - 0x60]
lea rdx, str.SeAssignPrimaryTokenPrivilege
call fcn.1400029a0
mov dword [0x14002af94], eax
mov rdx, r12
test eax, eax
je 0x140002ee2
lea rcx, str.___Token_has_SE_ASSIGN_PRIMARY_NAME__using_CreateProcessAsUser___for_launching:__S_n
call fcn.14000173c
mov rcx, qword [rbp - 0x60]
lea rax, [rbp + 0x58]
mov qword [rsp + 0x50], rax
xor r9d, r9d
lea rax, [rbp - 0x50]
mov r8, r12
mov qword [rsp + 0x48], rax
xor edx, edx
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x38], rsi
mov dword [rsp + 0x30], 0x10
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
jmp 0x140002f2a
lea rcx, str.___Token_does_NOT_have_SE_ASSIGN_PRIMARY_NAME__using_CreateProcessAsWithToken___for_launching:__S_n
call fcn.14000173c
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov rcx, qword [rbp - 0x58]
lea rax, [rbp + 0x58]
mov qword [rsp + 0x40], rax
mov r9, r12
lea rax, [rbp - 0x50]
xor r8d, r8d
mov qword [rsp + 0x38], rax
xor edx, edx
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x28], rsi
mov dword [rsp + 0x20], 0x8000000
call qword [sym.imp.ADVAPI32.dll_CreateProcessWithTokenW]
test eax, eax
jne 0x140002f53
mov rbx, qword [rsp + 0x60]
mov rcx, r13
call fcn.14000c7a0
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
inc r15d
cmp r15d, dword [r14]
jb 0x140002c81
jmp 0x140002f7d
mov esi, 1
jmp 0x140002f7d
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.____Error_duplicating_ImpersonationToken:_d_n
jmp 0x140002f76
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.____Error_duplicating_Primary_Token:_d_n
mov edx, eax
call fcn.14000173c
mov rcx, r14
call fcn.14000c7a0
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov rcx, qword [rbp + 0x270]
xor rcx, rsp
call fcn.140002fe0
lea r11, [rsp + 0x380]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret