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

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r12
push r13
push r15
lea rbp, [rsp - 0x280]
sub rsp, 0x380
mov rax, qword [0x140029008]
xor rax, rsp
mov qword [rbp + 0x270], rax
mov r13, qword [0x14002af60]
lea rcx, [0x140025240]
mov rdi, rdx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.NtQuerySystemInformation
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rcx, [0x140025240]
mov r12, rax
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.NtDuplicateObject
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rcx, [0x140025240]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.NtQueryObject
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor ebx, ebx
lea r8, [0x14002af70]
lea rdx, str._sdefault
mov qword [rsp + 0x68], rax
lea rcx, [rbp + 0x70]
mov qword [rbp - 0x78], rbx
mov r15d, 0x10000
call qword [sym.imp.USER32.dll_wsprintfW]
xorps xmm0, xmm0
lea rdx, str.SeAssignPrimaryTokenPrivilege
xor eax, eax
mov rcx, rdi
mov qword [rbp + 0x10], rax
lea rax, [rbp + 0x70]
movups xmmword [rbp - 0x50], xmm0
mov dword [rbp - 0x50], 0x68
movups xmmword [rbp - 0x40], xmm0
mov qword [rbp - 0x40], rax
movups xmmword [rbp - 0x30], xmm0
movups xmmword [rbp - 0x20], xmm0
movups xmmword [rbp - 0x10], xmm0
movups xmmword [rbp], xmm0
call fcn.140002b10
lea rdx, str.SeImpersonatePrivilege
mov rcx, rdi
call fcn.140002b10
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rcx, rax
lea r8d, [rbx + 4]
lea rdx, str.rpcss
mov rsi, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
xorps xmm0, xmm0
mov dword [rbp + 0x20], ebx
mov rdi, rax
lea r9d, [rbx + 0x24]
xor eax, eax
lea r8, [rbp + 0x30]
mov dword [rbp + 0x50], eax
xor edx, edx
lea rax, [rbp + 0x20]
mov rcx, rdi
mov qword [rsp + 0x20], rax
movups xmmword [rbp + 0x30], xmm0
movups xmmword [rbp + 0x40], xmm0
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, dword [rbp + 0x4c]
xor edx, edx
mov r8d, edi
mov ecx, 0x2000000
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rsp + 0x60], rax
mov rsi, rax
test rax, rax
jne 0x140002dea
mov edx, edi
lea rcx, str.____Could_not_open_PID__d___n
call fcn.140001720
xor eax, eax
jmp 0x14000317d
mov rcx, r15
mov qword [rsp + 0x3b0], r14
call fcn.14000c424
xor r9d, r9d
mov r8d, r15d
mov rdx, rax
mov r14, rax
lea ecx, [r9 + 0x10]
call r12
cmp eax, 0xc0000004
jne 0x140002e3f
lea ecx, [r15 + r15]
mov r15d, ecx
mov edx, ecx
mov rcx, r14
call fcn.14000cc3c
xor r9d, r9d
mov r8d, r15d
mov rdx, rax
mov r14, rax
lea ecx, [r9 + 0x10]
call r12
cmp eax, 0xc0000004
je 0x140002e14
test eax, eax
jns 0x140002e56
lea rcx, str.NtQuerySystemInformation_failed__n
call fcn.140001720
xor eax, eax
jmp 0x140003175
mov r12d, ebx
cmp dword [r14], ebx
jbe 0x140003160
mov eax, r12d
lea rcx, [rax + rax*2]
movups xmm1, xmmword [r14 + rcx*8 + 8]
movd eax, xmm1
movups xmmword [rbp - 0x70], xmm1
cmp eax, edi
jne 0x140003128
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], ebx
pextrw edx, xmm0, 3
mov rcx, rsi
mov dword [rsp + 0x20], 0x2000000
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x140003128
mov ecx, 0x1000
call fcn.14000c424
mov rcx, qword [rbp - 0x78]
mov r9d, 0x1000
mov r8, rax
mov qword [rsp + 0x20], rbx
mov edx, 2
mov r15, rax
call qword [rsp + 0x68]
test eax, eax
js 0x14000311e
movzx r8d, word [r15]
lea rdx, str.Token
mov rcx, qword [r15 + 8]
shr r8, 1
call fcn.14000cc44
test eax, eax
jne 0x140003116
mov rdi, qword [rbp - 0x78]
lea rax, [rbp - 0x70]
mov qword [rsp + 0x50], rax
lea rcx, [rbp + 0x24]
mov dword [rsp + 0x48], ebx
xor r9d, r9d
mov dword [rsp + 0x40], ebx
mov dl, 1
mov dword [rsp + 0x38], ebx
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], ebx
lea r8d, [r9 + 0x12]
mov dword [rsp + 0x20], ebx
mov qword [rbp - 0x70], rbx
mov dword [rbp + 0x24], ebx
mov word [rbp + 0x28], 0x500
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x140003113
xor r9d, r9d
mov dword [rbp + 0x20], ebx
lea rax, [rbp + 0x20]
xor r8d, r8d
mov rcx, rdi
mov qword [rsp + 0x20], rax
lea edx, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov eax, dword [rbp + 0x20]
test eax, eax
je 0x140003113
mov ecx, eax
call fcn.14000c424
mov r9d, dword [rbp + 0x20]
mov rsi, rax
lea rax, [rbp + 0x20]
mov r8, rsi
mov edx, 1
mov qword [rsp + 0x20], rax
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov rdx, qword [rsi]
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_EqualSid]
mov rcx, rsi
mov edi, eax
call fcn.14000c410
mov rcx, qword [rbp - 0x70]
call fcn.14000c410
test edi, edi
je 0x14000310e
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
je 0x14000310e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.___Got_SYSTEM_Token____n
call fcn.140001720
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 0x14000314c
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 0x14000313d
mov rcx, qword [rbp - 0x60]
lea rdx, str.SeAssignPrimaryTokenPrivilege
call fcn.140002b10
mov dword [0x14002af54], eax
mov rdx, r13
test eax, eax
je 0x1400030c2
lea rcx, str.___Token_has_SE_ASSIGN_PRIMARY_NAME__using_CreateProcessAsUser___for_launching:__S_n
call fcn.140001720
mov rcx, qword [rbp - 0x60]
lea rax, [rbp + 0x58]
mov qword [rsp + 0x50], rax
xor r9d, r9d
lea rax, [rbp - 0x50]
mov r8, r13
mov qword [rsp + 0x48], rax
xor edx, edx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], 0x10
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
jmp 0x14000310a
lea rcx, str.___Token_does_NOT_have_SE_ASSIGN_PRIMARY_NAME__using_CreateProcessAsWithToken___for_launching:__S_n
call fcn.140001720
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov rcx, qword [rbp - 0x58]
lea rax, [rbp + 0x58]
mov qword [rsp + 0x40], rax
mov r9, r13
lea rax, [rbp - 0x50]
xor r8d, r8d
mov qword [rsp + 0x38], rax
xor edx, edx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], 0x8000000
call qword [sym.imp.ADVAPI32.dll_CreateProcessWithTokenW]
test eax, eax
jne 0x140003136
mov rsi, qword [rsp + 0x60]
mov edi, dword [rbp + 0x4c]
mov rcx, r15
call fcn.14000c410
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
inc r12d
cmp r12d, dword [r14]
jb 0x140002e62
jmp 0x140003160
mov ebx, 1
jmp 0x140003160
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.____Error_duplicating_ImpersonationToken:_d_n
jmp 0x140003159
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.____Error_duplicating_Primary_Token:_d_n
mov edx, eax
call fcn.140001720
mov rcx, r14
call fcn.14000c410
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov r14, qword [rsp + 0x3b0]
mov rcx, qword [rbp + 0x270]
xor rcx, rsp
call fcn.1400031c0
lea r11, [rsp + 0x380]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r13
pop r12
pop rdi
pop rbp
ret