Function at 0x140001350
Capabilities:
Acquire debug privileges
Query service status

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
lea rbp, [rsp - 0x57]
sub rsp, 0xa0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x47], rax
xor edi, edi
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rbp - 1]
mov edx, 0x18
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov esi, 1
test eax, eax
je 0x14000143a
mov rcx, qword [rbp - 1]
lea rax, [rbp - 9]
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov edx, 0x19
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x140001430
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x140001430
mov edx, dword [rbp - 9]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, rax
test rax, rax
je 0x140001430
mov r9d, dword [rbp - 9]
lea rax, [rbp - 9]
mov rcx, qword [rbp - 1]
mov r8, rbx
mov edx, 0x19
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x140001427
mov rcx, qword [rbx]
call qword [sym.imp.ADVAPI32.dll_GetSidSubAuthorityCount]
movzx ecx, byte [rax]
dec cl
movzx edx, cl
mov rcx, qword [rbx]
call qword [sym.imp.ADVAPI32.dll_GetSidSubAuthority]
cmp dword [rax], 0x3000
cmovae edi, esi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rbp - 1]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, esi
jne 0x1400015a9
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rbp - 0x19]
mov edx, 8
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140001516
lea r8, [rbp - 1]
xor ecx, ecx
lea rdx, str.SeDebugPrivilege
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x140001516
mov rax, qword [rbp - 1]
lea r8, [rbp - 9]
mov rcx, qword [rbp - 0x19]
lea rdx, [rbp + 7]
mov qword [rbp + 0xf], rax
mov dword [rbp + 7], esi
mov dword [rbp + 0xb], esi
mov dword [rbp + 0x17], 2
call qword [sym.imp.ADVAPI32.dll_PrivilegeCheck]
cmp dword [rbp - 9], esi
je 0x140001514
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rbp - 0x11]
mov edx, 0xf01ff
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140001516
lea r8, [rbp + 0x2f]
xor ecx, ecx
lea rdx, str.SeDebugPrivilege
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x140001516
mov rax, qword [rbp + 0x2f]
lea r8, [rbp + 0x37]
mov rcx, qword [rbp - 0x11]
mov r9d, 0x10
mov qword [rsp + 0x28], rbx
xor edx, edx
mov qword [rbp + 0x3b], rax
mov dword [rbp + 0x37], esi
mov dword [rbp + 0x43], 2
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x140001516
mov ebx, esi
cmp ebx, esi
jne 0x1400015a9
xorps xmm0, xmm0
xor eax, eax
xor edx, edx
mov dword [rbp + 0x27], eax
xor ecx, ecx
mov dword [rbp - 9], eax
mov r8d, 4
movups xmmword [rbp + 7], xmm0
movups xmmword [rbp + 0x17], xmm0
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov rbx, rax
test rax, rax
je 0x1400015a9
mov r8d, 4
lea rdx, str.EventLog
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov rdi, rax
test rax, rax
je 0x140001592
lea rax, [rbp - 9]
mov r9d, 0x24
lea r8, [rbp + 7]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x14000159d
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1400015a9
mov ecx, dword [rbp + 0x23]
test ecx, ecx
je 0x1400015a9
call fcn.1400010d0
xor eax, eax
mov rcx, qword [rbp + 0x47]
xor rcx, rsp
call fcn.1400015e0
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret