Function at 0x1400045f0
Capabilities:
Enumerate services

Disassembly:
push rbx
push r12
push r15
sub rsp, 0x90
mov rax, qword [0x14001c008]
xor rax, rsp
mov qword [rsp + 0x68], rax
mov r12, rdx
mov qword [rsp + 0x58], rcx
lea rdx, str.ServicesActive
xor ecx, ecx
mov r8d, 5
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
xor ebx, ebx
mov r15, rax
mov dword [rsp + 0x50], ebx
test rax, rax
je 0x1400048ee
mov qword [rsp + 0x48], rbx
lea rax, [rsp + 0x64]
mov qword [rsp + 0x40], rbx
lea r9d, [rbx + 3]
mov qword [rsp + 0x38], rax
lea r8d, [rbx + 0xb]
lea rax, [rsp + 0x60]
xor edx, edx
mov qword [rsp + 0x30], rax
mov rcx, r15
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
test eax, eax
jne 0x1400048e1
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x1400048e1
mov edx, dword [rsp + 0x60]
lea ecx, [rbx + 1]
mov qword [rsp + 0x78], r13
call sub.api_ms_win_crt_heap_l1_1_0.dll_calloc
mov r13, rax
test rax, rax
je 0x1400048dc
mov ecx, dword [rsp + 0x60]
lea rax, [rsp + 0x64]
mov qword [rsp + 0x48], rbx
lea r9d, [rbx + 3]
mov qword [rsp + 0x40], rbx
lea r8d, [rbx + 0xb]
mov qword [rsp + 0x38], rax
xor edx, edx
lea rax, [rsp + 0x60]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ecx
mov rcx, r15
mov qword [rsp + 0x20], r13
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
test eax, eax
je 0x1400048d4
mov qword [rsp + 0x88], rsi
xor esi, esi
cmp dword [rsp + 0x64], ebx
jbe 0x1400048cc
mov qword [rsp + 0xc0], rbp
mov qword [rsp + 0x80], rdi
mov qword [rsp + 0x70], r14
nop word [rax + rax]
mov eax, esi
mov r8d, 1
imul r14, rax, 0x38
mov rcx, r15
mov rdx, qword [r14 + r13]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbp, rax
test rax, rax
je 0x1400048a7
mov rbx, qword [0x14001e6c0]
test rbx, rbx
je 0x14000476f
mov rcx, 0xffffffffffffffff
nop dword [rax + rax]
inc rcx
cmp word [rbx + rcx*2], 0
jne 0x140004760
test rcx, rcx
jne 0x140004793
mov edx, 2
lea ecx, [rdx + 7]
call sub.api_ms_win_crt_heap_l1_1_0.dll_calloc
mov rbx, rax
test rax, rax
je 0x14000478c
mov rcx, rax
call fcn.140007a00
mov qword [0x14001e6c0], rbx
mov rax, qword [r14 + r13]
sub rbx, rax
nop word [rax + rax]
movzx edx, word [rax]
movzx ecx, word [rax + rbx]
sub edx, ecx
jne 0x1400047b3
add rax, 2
test ecx, ecx
jne 0x1400047a0
test edx, edx
je 0x1400048a7
lea r9, [rsp + 0x60]
xor r8d, r8d
xor edx, edx
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x14000489e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x14000489e
mov edx, dword [rsp + 0x60]
lea ecx, [rax - 0x79]
call sub.api_ms_win_crt_heap_l1_1_0.dll_calloc
mov rdi, rax
test rax, rax
je 0x14000489e
mov r8d, dword [rsp + 0x60]
lea r9, [rsp + 0x60]
mov rdx, rax
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
je 0x140004896
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov rcx, qword [rdi + 0x10]
mov rbx, rax
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
sub rbx, rax
movzx r8d, word [rax]
movzx edx, word [rax + rbx]
sub r8d, edx
jne 0x140004847
add rax, 2
test edx, edx
jne 0x140004832
test r8d, r8d
jne 0x140004896
mov dword [rsp + 0x50], 1
test r12, r12
je 0x140004866
mov rcx, qword [r14 + r13]
call sub.api_ms_win_crt_string_l1_1_0.dll__wcsdup
mov qword [r12], rax
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov rdx, qword [rdi + 0x38]
lea rcx, str.____The_service__s_already_started__s_n
mov r8, rax
call fcn.140001430
mov rdx, qword [rdi + 0x38]
lea rcx, str.____If_needed__you_can_manually_stop___delete_:__ncmd__c_sc_stop__s_ncmd__c_sc_delete__s_n
mov r8, rdx
call fcn.140001430
mov rcx, rdi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
inc esi
cmp esi, dword [rsp + 0x64]
jb 0x140004720
mov ebx, dword [rsp + 0x50]
mov r14, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x80]
mov rbp, qword [rsp + 0xc0]
mov rsi, qword [rsp + 0x88]
mov rcx, r13
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov r13, qword [rsp + 0x78]
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, ebx
jmp 0x140004904
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____ERROR_IsDriverServiceRunning___OpenSCManager_create___0x_08x__n
call fcn.140001430
xor eax, eax
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.1400085d0
add rsp, 0x90
pop r15
pop r12
pop rbx
ret