Function at 0x180058374
Capabilities:
Enumerate services
Stop service

Disassembly:
mov qword [rsp + 0x18], rsi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0x90
mov rax, qword [0x18008ab58]
xor rax, rsp
mov qword [rbp + 0x2f], rax
xor esi, esi
mov qword [rbp - 0x21], rcx
mov r15, rdx
lea r8d, [rsi + 0x2c]
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenServiceW]
nop dword [rax + rax]
mov qword [rbp - 0x19], rax
mov r14, rax
test rax, rax
je 0x1800585df
and dword [rbp - 0x29], esi
lea rax, [rbp - 0x25]
and dword [rbp - 0x25], esi
lea edx, [rsi + 3]
mov qword [rsp + 0x28], rax
xor r9d, r9d
lea rax, [rbp - 0x29]
xor r8d, r8d
mov rcx, r14
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_service_core_l1_1_1.dll_EnumDependentServicesW]
nop dword [rax + rax]
test eax, eax
jne 0x180058423
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
cmp eax, 0xea
je 0x180058423
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov r8d, 0x1c05
jmp 0x1800585f1
mov edx, dword [rbp - 0x29]
mov ecx, 0x40
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalAlloc]
nop dword [rax + rax]
mov rsi, rax
test rax, rax
jne 0x18005844d
lea edx, [rax + 8]
mov r8d, 0x1c05
jmp 0x1800585f3
mov r9d, dword [rbp - 0x29]
lea rax, [rbp - 0x25]
mov qword [rsp + 0x28], rax
mov r8, rsi
lea rax, [rbp - 0x29]
mov edx, 3
mov rcx, r14
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_service_core_l1_1_1.dll_EnumDependentServicesW]
nop dword [rax + rax]
test eax, eax
je 0x18005840c
xor r12d, r12d
cmp dword [rbp - 0x25], r12d
jbe 0x18005855f
mov r14, qword [rbp - 0x21]
lea r13, [r12 + r12*2]
mov r8d, 0x24
add r13, r13
mov rcx, r14
mov rdx, qword [rsi + r13*8]
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenServiceW]
nop dword [rax + rax]
mov qword [rbp - 0x21], rax
test rax, rax
je 0x18005852c
lea r8, [rbp - 0x11]
mov edx, 1
mov rcx, rax
call qword [sym.imp.api_ms_win_service_winsvc_l1_1_0.dll_ControlService]
nop dword [rax + rax]
test eax, eax
jne 0x1800584f5
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
cmp eax, 0x426
je 0x18005851a
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
jmp 0x180058504
mov rdx, qword [rbp - 0x21]
xor ecx, ecx
call fcn.18005814c
test eax, eax
je 0x18005851a
mov r9, qword [rsi + r13*8]
mov r8d, 0x1c05
mov edx, eax
mov ecx, 2
call fcn.180038d90
mov rcx, qword [rbp - 0x21]
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
nop dword [rax + rax]
jmp 0x18005854e
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov r9, qword [rsi + r13*8]
mov ecx, 2
mov edx, eax
mov r8d, 0x1c07
call fcn.180038d90
inc r12d
cmp r12d, dword [rbp - 0x25]
jb 0x18005848f
mov r14, qword [rbp - 0x19]
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
nop dword [rax + rax]
lea r8, [rbp + 0xf]
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_service_winsvc_l1_1_0.dll_ControlService]
nop dword [rax + rax]
test eax, eax
jne 0x1800585ab
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
cmp eax, 0x426
je 0x1800585ce
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
jmp 0x1800585b9
mov rdx, r14
xor ecx, ecx
call fcn.18005814c
test eax, eax
je 0x1800585ce
mov r9, r15
mov r8d, 0x1c05
mov edx, eax
mov ecx, 2
call fcn.180038d90
mov rcx, r14
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
nop dword [rax + rax]
jmp 0x180058628
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov r8d, 0x1c07
mov edx, eax
mov r9, r15
mov ecx, 2
call fcn.180038d90
test r14, r14
je 0x180058614
mov rcx, r14
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
nop dword [rax + rax]
test rsi, rsi
je 0x180058628
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
nop dword [rax + rax]
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.180002a90
mov rsi, qword [rsp + 0xd0]
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rbp
ret