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

Disassembly:
push r15
sub rsp, 0xa0
mov rax, qword [0x1800ef080]
xor rax, rsp
mov qword [rsp + 0x88], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x40]
mov edx, Ordinal_41
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
xor r15d, r15d
test eax, eax
je 0x18004e638
lea r8, [rsp + 0x48]
xor ecx, ecx
lea rdx, str.SeDebugPrivilege
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov rcx, qword [rsp + 0x40]
test eax, eax
je 0x18004e632
mov rax, qword [rsp + 0x48]
lea r9d, [r15 + 0x10]
mov qword [rsp + 0x28], r15
lea r8, [rsp + 0x50]
xor edx, edx
mov qword [rsp + 0x54], rax
mov dword [rsp + 0x50], 1
mov dword [rsp + 0x5c], 2
mov qword [rsp + 0x20], r15
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [0x1800ffe68]
mov qword [rsp + 0xb0], rbx
mov qword [rsp + 0xb8], rbp
mov qword [rsp + 0xc0], rsi
mov rax, qword [rax]
mov qword [rsp + 0x98], rdi
mov qword [rsp + 0x40], rax
cmp byte [rax + 0x19], r15b
jne 0x18004e6e4
nop dword [rax]
lea rbx, [rax + 0x20]
mov rcx, rbx
call fcn.18004e360
mov esi, eax
test eax, eax
je 0x18004e6cf
mov r8d, eax
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
test rax, rax
je 0x18004e6cf
mov rbp, qword [rbx + 0x28]
mov rbx, qword [rbx + 0x20]
cmp rbx, rbp
je 0x18004e6c6
nop word [rax + rax]
mov r8, rdi
mov rdx, rbx
mov ecx, esi
call fcn.18004df10
add rbx, 0x20
cmp rbx, rbp
jne 0x18004e6b0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0x40]
call fcn.1800535a0
mov rax, qword [rsp + 0x40]
cmp byte [rax + 0x19], r15b
je 0x18004e670
mov rax, qword [0x1800ffb60]
mov rax, qword [rax]
mov qword [rsp + 0x48], rax
cmp byte [rax + 0x19], r15b
jne 0x18004e882
mov qword [rsp + 0x90], r14
nop word [rax + rax]
xor edx, edx
lea rbx, [rax + 0x20]
xor ecx, ecx
lea r14, [rbx + 0x20]
lea r8d, [rdx + 4]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
je 0x18004e861
cmp qword [rbx + 0x18], 7
mov r8, rbx
jbe 0x18004e73f
mov r8, qword [rbx]
mov qword [rsp + 0x38], r15
xor edx, edx
mov qword [rsp + 0x30], r15
xor ecx, ecx
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], r15
lea r9d, [rdx - 1]
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
movsxd rbp, eax
mov rcx, rbp
call fcn.1800c08ac
cmp qword [rbx + 0x18], 7
mov rsi, rax
jbe 0x18004e779
mov rbx, qword [rbx]
mov qword [rsp + 0x38], r15
mov r9d, 0xffffffff
mov qword [rsp + 0x30], r15
mov r8, rbx
mov dword [rsp + 0x28], ebp
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov r8d, 4
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov rcx, rsi
mov rbx, rax
call fcn.1800c0530
test rbx, rbx
jne 0x18004e7cf
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x18004e861
lea rax, [rsp + 0x40]
mov r9d, Ordinal_41
lea r8, [rsp + 0x60]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
mov rcx, rbx
test eax, eax
jne 0x18004e807
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x18004e861
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, dword [rsp + 0x7c]
test esi, esi
je 0x18004e861
mov r8d, esi
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
test rax, rax
je 0x18004e861
mov rbp, qword [r14 + 8]
mov rbx, qword [r14]
cmp rbx, rbp
je 0x18004e858
mov r8, rdi
mov rdx, rbx
mov ecx, esi
call fcn.18004df10
add rbx, 0x20
cmp rbx, rbp
jne 0x18004e842
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0x48]
call fcn.1800535a0
mov rax, qword [rsp + 0x48]
cmp byte [rax + 0x19], r15b
je 0x18004e710
mov r14, qword [rsp + 0x90]
mov rdi, qword [rsp + 0x98]
mov rsi, qword [rsp + 0xc0]
mov rbp, qword [rsp + 0xb8]
mov rbx, qword [rsp + 0xb0]
mov rcx, qword [rsp + 0x88]
xor rcx, rsp
call fcn.1800bffb0
add rsp, 0xa0
pop r15
ret