Function at 0x140060d60
Capabilities:
Check if file exists
Enumerate services
Query service status
Stop service

Disassembly:
push rbp
push rbx
push rsi
push rdi
lea rbp, [rsp - 0x3b8]
sub rsp, 0x4b8
mov rax, qword [0x1403a8088]
xor rax, rsp
mov qword [rbp + 0x3a0], rax
xor edi, edi
mov rsi, rcx
mov dword [rsp + 0x50], edi
mov ebx, edi
mov dword [rsp + 0x54], edi
mov dword [rsp + 0x58], edi
test rcx, rcx
je 0x14006102b
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x14006102b
mov r9, rsi
mov qword [rsp + 0x4f0], r13
lea r8, [0x140323e40]
mov edx, 0x104
lea rcx, [rbp + 0x190]
call fcn.14004ebd0
xor edx, edx
lea r8d, [rdi + 4]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r13, rax
test rax, rax
je 0x14006101f
xor edx, edx
lea rcx, [rbp - 0x80]
mov r8d, 0x208
call fcn.14027b2c0
mov qword [rsp + 0x48], rdi
lea rax, [rsp + 0x54]
mov qword [rsp + 0x40], rdi
lea r9d, [rdi + 3]
mov qword [rsp + 0x38], rax
lea r8d, [rdi + 0x30]
lea rax, [rsp + 0x50]
xor edx, edx
mov qword [rsp + 0x30], rax
mov rcx, r13
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x140061008
mov ecx, dword [rsp + 0x50]
mov qword [rsp + 0x4e8], r12
call fcn.14012a2dc
mov r8d, dword [rsp + 0x50]
xor edx, edx
mov rcx, rax
mov r12, rax
call fcn.14027b2c0
lea rax, [rbp - 0x80]
xor edx, edx
mov qword [rsp + 0x48], rax
lea r9d, [rdi + 3]
lea rax, [rsp + 0x58]
mov rcx, r13
mov qword [rsp + 0x40], rax
lea r8d, [rdi + 0x30]
lea rax, [rsp + 0x54]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x50]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x50]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r12
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
test eax, eax
je 0x140061000
mov eax, dword [rsp + 0x54]
test eax, eax
je 0x140061000
mov qword [rsp + 0x4b0], r15
mov r15d, edi
mov qword [rsp + 0x4f8], r14
nop dword [rax]
mov rdx, qword [r12]
mov r8d, Ordinal_41
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
je 0x140060fde
xor eax, eax
lea rdx, [rsp + 0x60]
mov rcx, rbx
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], rax
mov dword [rsp + 0x78], eax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x140060fd5
cmp dword [rsp + 0x64], 1
je 0x140060fd5
lea r9, [rsp + 0x50]
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
mov ecx, dword [rsp + 0x50]
call fcn.14012a2dc
mov r8d, dword [rsp + 0x50]
xor edx, edx
mov rcx, rax
mov rsi, rax
call fcn.14027b2c0
mov r8d, dword [rsp + 0x50]
lea r9, [rsp + 0x50]
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
je 0x140060fc8
mov rcx, qword [rsi + 0x10]
call fcn.140054e40
xor r8d, r8d
lea rdx, [rbp + 0x190]
mov rcx, rax
mov r14, rax
call qword [sym.imp.SHLWAPI.dll_PathMatchSpecExW]
test eax, eax
jne 0x140060fbb
lea r8, [rsp + 0x60]
mov rcx, rbx
lea edx, [rax + 1]
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
mov eax, 1
cmovne edi, eax
test r14, r14
je 0x140060fc8
mov rcx, r14
call fcn.14012a2d4
test rsi, rsi
je 0x140060fd5
mov rcx, rsi
call fcn.14012a2d4
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
inc r15d
add r12, 0x38
cmp r15d, dword [rsp + 0x54]
jb 0x140060ee0
mov r14, qword [rsp + 0x4f8]
mov r15, qword [rsp + 0x4b0]
mov r12, qword [rsp + 0x4e8]
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test rbx, rbx
je 0x14006101f
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov r13, qword [rsp + 0x4f0]
mov eax, edi
jmp 0x14006102d
xor eax, eax
mov rcx, qword [rbp + 0x3a0]
xor rcx, rsp
call fcn.14012a2b0
add rsp, 0x4b8
pop rdi
pop rsi
pop rbx
pop rbp
ret