Function at 0x180005e30
Capabilities:
Acquire debug privileges
Enumerate services
Query service status

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push r13
push r14
push r15
lea rbp, [rsp - 0xd8]
sub rsp, 0x1d8
xor r15d, r15d
xor eax, eax
mov rbx, rdx
lea rcx, [rbp - 0x4f]
lea r8d, [r15 + 0x7f]
xor edx, edx
mov qword [rsp + 0x48], r15
mov qword [rsp + 0x58], r15
mov esi, r15d
mov r14d, r15d
mov r13d, r15d
mov dword [rbp - 0x80], r15d
mov qword [rbp - 0x7c], rax
mov qword [rbp - 0x74], rax
mov qword [rbp - 0x6c], rax
mov qword [rbp - 0x64], rax
mov byte [rbp - 0x50], al
call fcn.180006fc0
lea rcx, [rbp + 0x34]
xor edx, edx
mov r8d, 0x90
mov dword [rbp + 0x30], r15d
call fcn.180006fc0
mov rax, qword [0x180021ea8]
mov rcx, rbx
mov dword [rbp + 0x120], r15d
mov dword [rbp + 0x128], r15d
mov dword [rsp + 0x50], r15d
call qword [rax + 0x120]
mov qword [rsp + 0x60], rax
call fcn.1800013f0
cmp eax, 1
je 0x180005edf
mov ebx, 0xa
jmp 0x180006302
lea rcx, [rbp + 0x30]
mov dword [rbp + 0x30], 0x94
call qword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x180005f01
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x180006302
cmp dword [rbp + 0x34], 4
jne 0x180005f0c
cmp dword [rbp + 0x38], esi
je 0x180005ed5
mov rax, qword [0x180021ea8]
mov edx, 0x14ee9
mov rcx, rbx
mov qword [rsp + 0x218], rdi
call qword [rax + 0xc8]
mov rax, qword [0x180021ea8]
mov edx, 0x24eeb
mov rcx, rbx
call qword [rax + pe_nt_image_headers64]
mov edx, 0x14eea
mov rcx, rbx
mov edi, eax
mov dword [rsp + 0x54], eax
mov rax, qword [0x180021ea8]
call qword [rax + 0xc8]
mov qword [rsp + 0x68], rax
test edi, edi
je 0x1800062f5
test rax, rax
je 0x1800062f5
lea rcx, str.SeDebugPrivilege
mov edx, 1
call fcn.180006740
test eax, eax
je 0x180005f9f
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 4]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov rdi, rax
mov qword [rsp + 0x40], rax
test rax, rax
jne 0x180005fac
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x1800062fa
mov qword [rsp + 0x38], r15
xor r9d, r9d
lea rax, [rbp + 0x128]
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0x120]
lea edx, [r9 + 0x30]
mov qword [rsp + 0x28], rax
lea r8d, [r9 + 1]
mov rcx, rdi
mov dword [rsp + 0x20], r15d
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusA]
test eax, eax
jne 0x180006000
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x180006000
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x1800062dd
mov ebx, dword [rbp + 0x120]
mov ecx, ebx
call fcn.18000723c
mov r13, rax
test rax, rax
jne 0x180006022
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x1800062dd
mov qword [rsp + 0x38], r15
lea rax, [rbp + 0x128]
mov edx, 0x30
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0x120]
lea r8d, [rdx - 0x2f]
mov qword [rsp + 0x28], rax
mov r9, r13
mov rcx, rdi
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusA]
test eax, eax
jne 0x180006069
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x1800062dd
mov qword [rsp + 0x1d0], r12
mov ebx, 5
mov r12d, r15d
cmp dword [rbp + 0x128], esi
jbe 0x1800062d5
nop word [rax + rax]
mov eax, r12d
mov r8d, 4
mov rcx, rdi
lea rdx, [rax + rax*2]
add rdx, rdx
mov rdx, qword [r13 + rdx*8]
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov r15, rax
test rax, rax
je 0x18000624f
lea rax, [rbp + 0x120]
lea r8, [rbp - 0x80]
mov r9d, 0x24
xor edx, edx
mov rcx, r15
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x180006246
cmp dword [rbp - 0x7c], 4
jne 0x180006246
mov r8d, dword [rbp - 0x64]
xor edx, edx
mov ecx, 0x43a
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rsi, rax
test rax, rax
je 0x180006246
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, 0x80
lea r9, str._t:0x_08X
lea rcx, [rbp - 0x50]
mov r8d, edx
mov dword [rsp + 0x20], eax
call fcn.1800071ec
lea rax, [rbp - 0x50]
or r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], 0
jne 0x180006134
inc r8
xor edx, edx
mov r9d, 0x3000
mov rcx, rsi
mov dword [rsp + 0x20], 4
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov rdi, rax
test rax, rax
je 0x180006241
lea rax, [rbp - 0x50]
or r9, 0xffffffffffffffff
nop
inc r9
cmp byte [rax + r9], 0
jne 0x180006170
lea r8, [rbp - 0x50]
inc r9
mov rdx, rdi
mov rcx, rsi
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x180006241
mov r9, qword [rsp + 0x60]
mov r8d, dword [rsp + 0x54]
mov rdx, qword [rsp + 0x68]
mov rcx, rsi
mov qword [rsp + 0x20], rdi
call fcn.180006560
mov r14, rax
test rax, rax
je 0x180006241
mov edx, 0x7530
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x180006241
lea rdx, [rsp + 0x50]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x180006241
cmp dword [rsp + 0x50], 0
jne 0x180006241
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
lea r9, [rsp + 0x48]
xor r8d, r8d
mov rcx, rax
mov edx, 0xf00ff
call qword [sym.imp.ADVAPI32.dll_OpenThreadToken]
test eax, eax
je 0x180006241
mov rcx, qword [rsp + 0x48]
lea r8, [rsp + 0x58]
mov edx, 2
call qword [sym.imp.ADVAPI32.dll_DuplicateToken]
test eax, eax
je 0x180006241
mov rax, qword [0x180021ea8]
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rbp + 0x110]
call qword [rax + 0x180]
xor ebx, ebx
mov rdi, qword [rsp + 0x40]
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test rsi, rsi
je 0x180006271
lea rdx, [rsp + 0x78]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x18000626f
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
test r14, r14
je 0x180006294
lea rdx, [rsp + 0x74]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x180006291
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r14d, r14d
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x1800062c1
lea rdx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x1800062b8
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x48], 0
test ebx, ebx
je 0x1800062d5
inc r12d
cmp r12d, dword [rbp + 0x128]
jb 0x180006090
mov r12, qword [rsp + 0x1d0]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test r13, r13
je 0x1800062fa
mov rcx, r13
call fcn.1800068fc
jmp 0x1800062fa
mov ebx, 0xa0
mov rdi, qword [rsp + 0x218]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
add rsp, 0x1d8
pop r15
pop r14
pop r13
pop rsi
pop rbx
pop rbp
ret