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

Disassembly:
sub rsp, 0x88
mov rax, qword [0x1800fc080]
xor rax, rsp
mov qword [rsp + 0x78], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x30]
mov edx, Ordinal_41
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x18005c032
lea r8, [rsp + 0x38]
xor ecx, ecx
lea rdx, str.SeDebugPrivilege
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov rcx, qword [rsp + 0x30]
test eax, eax
je 0x18005c02c
mov rax, qword [rsp + 0x38]
lea r8, [rsp + 0x40]
mov qword [rsp + 0x44], rax
xor edx, edx
xor eax, eax
mov dword [rsp + 0x40], 1
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x4c], 2
mov qword [rsp + 0x20], rax
lea r9d, [rax + 0x10]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [0x1800fd658]
mov qword [rsp + 0x90], rbx
mov qword [rsp + 0x98], rbp
mov qword [rsp + 0xa0], rsi
mov rax, qword [rax]
mov qword [rsp + 0xa8], rdi
mov qword [rsp + 0x30], rax
cmp byte [rax + 0x19], 0
jne 0x18005c0e4
nop word [rax + rax]
lea rbx, [rax + 0x20]
mov rcx, rbx
call fcn.18005bd60
mov esi, eax
test eax, eax
je 0x18005c0cf
mov r8d, eax
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
test rax, rax
je 0x18005c0cf
mov rbp, qword [rbx + 0x28]
mov rbx, qword [rbx + 0x20]
cmp rbx, rbp
je 0x18005c0c6
nop word [rax + rax]
mov r8, rdi
mov rdx, rbx
mov ecx, esi
call fcn.18005b840
add rbx, 0x20
cmp rbx, rbp
jne 0x18005c0b0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0x30]
call fcn.180062b00
mov rax, qword [rsp + 0x30]
cmp byte [rax + 0x19], 0
je 0x18005c070
mov rax, qword [0x1800fd648]
mov rax, qword [rax]
mov qword [rsp + 0x38], rax
cmp byte [rax + 0x19], 0
jne 0x18005c202
mov qword [rsp + 0x80], r14
nop word [rax + rax]
xor edx, edx
lea rbx, [rax + 0x20]
xor ecx, ecx
lea r14, [rbx + 0x20]
lea r8d, [rdx + 1]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov rdi, rax
test rax, rax
je 0x18005c1e1
cmp qword [rbx + 0x18], 7
jbe 0x18005c13c
mov rbx, qword [rbx]
mov r8d, 4
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x18005c164
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x18005c1e1
lea rax, [rsp + 0x30]
mov r9d, Ordinal_41
lea r8, [rsp + 0x50]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
mov ebp, dword [rsp + 0x6c]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test ebp, ebp
je 0x18005c1e1
mov r8d, ebp
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
test rax, rax
je 0x18005c1e1
mov rsi, qword [r14 + 8]
mov rbx, qword [r14]
cmp rbx, rsi
je 0x18005c1d8
mov r8, rdi
mov rdx, rbx
mov ecx, ebp
call fcn.18005b840
add rbx, 0x20
cmp rbx, rsi
jne 0x18005c1c2
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0x38]
call fcn.180062b00
mov rax, qword [rsp + 0x38]
cmp byte [rax + 0x19], 0
je 0x18005c110
mov r14, qword [rsp + 0x80]
mov rdi, qword [rsp + 0xa8]
mov rsi, qword [rsp + 0xa0]
mov rbp, qword [rsp + 0x98]
mov rbx, qword [rsp + 0x90]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.1800cb060
add rsp, 0x88
ret