Function at 0x140005c30
Capabilities:
Check if file exists
Enumerate services
Get file attributes
Query environment variable

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x3a0]
sub rsp, 0x4a0
mov rax, qword [0x14004c018]
xor rax, rsp
mov qword [rbp + 0x390], rax
xor r15d, r15d
mov qword [rsp + 0x58], rcx
xor edx, edx
mov dword [rsp + 0x64], r15d
xor ecx, ecx
mov dword [rsp + 0x60], r15d
mov r14d, r15d
mov esi, r15d
lea r8d, [r15 + 5]
mov ebx, r15d
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov qword [rsp + 0x50], rax
mov rdi, rax
test rax, rax
jne 0x140005cae
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Error_while_opening_handle_on_the_SCM__OpenSCManager_failed:_0x_08lx__n
call fcn.140001010
lea eax, [rdi + 1]
jmp 0x1400062ff
mov qword [rsp + 0x4d8], r12
mov qword [rsp + 0x4e0], r13
nop
test r14, r14
je 0x140005ccd
mov rcx, r14
call fcn.1400164d4
add ebx, dword [rsp + 0x60]
mov edx, 1
mov ecx, ebx
call fcn.14000f700
mov r14, rax
test rax, rax
je 0x1400062a3
mov qword [rsp + 0x48], r15
lea rax, [rsp + 0x64]
mov qword [rsp + 0x40], r15
xor edx, edx
mov qword [rsp + 0x38], rax
mov rcx, rdi
lea rax, [rsp + 0x60]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ebx
lea r9d, [rdx + 3]
lea r8d, [rdx + 0x3b]
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
test eax, eax
jne 0x140005d4b
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x140005cc0
test eax, eax
je 0x140005d4b
mov edx, eax
lea rcx, str.____Could_not_enumerate_EDR_services__EnumServicesStatusEx_failed:_0x_08lx__n
call fcn.140001010
jmp 0x1400062af
mov r13d, r15d
cmp dword [rsp + 0x64], esi
jbe 0x14000626e
mov ebx, 0x25
nop dword [rax]
mov dword [rsp + 0x60], r15d
mov r8d, 1
mov eax, r13d
mov rcx, rdi
imul r15, rax, 0x38
add r15, r14
mov rdx, qword [r15]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov r12, rax
test rax, rax
jne 0x140005da1
mov r8, qword [r15 + 8]
lea rcx, str.____Could_not_open_handle_on_service___s_____s___n
mov rdx, qword [r15]
call fcn.140001010
jmp 0x1400061c6
test rsi, rsi
je 0x140005dae
mov rcx, rsi
call fcn.1400164d4
mov ecx, dword [rsp + 0x60]
mov edx, 1
call fcn.14000f700
mov rsi, rax
test rax, rax
je 0x14000623f
mov r8d, dword [rsp + 0x60]
lea r9, [rsp + 0x60]
mov rdx, rax
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x140005e0c
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x140005da1
test eax, eax
je 0x140005e0c
mov r8, qword [r15 + 8]
lea rcx, str.____Could_not_query_information_of_service___s_____s____QueryServiceConfig_failed:_0x_08lx__n
mov rdx, qword [r15]
mov r9d, eax
call fcn.140001010
jmp 0x1400061c6
mov r8, qword [rsi + 0x10]
cmp word [r8], 0
je 0x1400061c6
mov edx, 0x104
lea rcx, [rsp + 0x70]
call fcn.140016230
mov r8d, 0xc
lea rdx, str.SystemRoot_
lea rcx, [rsp + 0x70]
call fcn.140017888
test eax, eax
jne 0x140005e86
mov word [rsp + 0x70], bx
lea rax, [rsp + 0x70]
mov r8, 0xffffffffffffffff
nop word [rax + rax]
cmp word [rax + r8*2 + 2], 0
lea r8, [r8 + 1]
jne 0x140005e60
lea r8, [r8*2 - 0x14]
lea rdx, [rbp - 0x7a]
lea rcx, [rbp - 0x78]
call fcn.14000d4c0
mov word [rbp - 0x7a], bx
mov r8d, 4
lea rdx, str.___
lea rcx, [rsp + 0x70]
call fcn.140017888
test eax, eax
jne 0x140005ed4
lea rax, [rsp + 0x70]
mov r8, 0xffffffffffffffff
nop dword [rax]
cmp word [rax + r8*2 + 2], 0
lea r8, [r8 + 1]
jne 0x140005eb0
lea r8, [r8*2 - 6]
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x70]
call fcn.14000d4c0
mov r8d, 8
lea rdx, str.system32
lea rcx, [rsp + 0x70]
call fcn.140017888
test eax, eax
jne 0x140005f47
lea rax, [rsp + 0x70]
mov r8, 0xffffffffffffffff
nop dword [rax + rax]
cmp word [rax + r8*2 + 2], 0
lea r8, [r8 + 1]
jne 0x140005f00
lea r8, [r8*2 + 2]
lea rdx, [rsp + 0x70]
lea rcx, [rbp - 0x76]
call fcn.14000d4c0
movups xmm0, xmmword [str._SystemRoot__]
movzx eax, word [0x140039660]
movsd xmm1, qword [0x140039658]
movaps xmmword [rsp + 0x70], xmm0
movsd qword [rbp - 0x80], xmm1
mov word [rbp - 0x78], ax
cmp word [rsp + 0x70], 0x22
jne 0x140005f8d
mov edx, 0x22
lea rcx, [rsp + 0x72]
call fcn.14000c0c4
mov rbx, rax
lea rdx, [rsp + 0x72]
lea rax, [rsp + 0x70]
mov r8, rbx
sub r8, rax
lea rcx, [rsp + 0x70]
sub r8, 2
sar r8, 1
add r8, r8
call fcn.14000d4c0
xor ecx, ecx
mov word [rbx - 2], cx
jmp 0x140005fa6
mov edx, 0x20
lea rcx, [rsp + 0x70]
call fcn.14000c0c4
test rax, rax
je 0x140005fa6
xor ecx, ecx
mov word [rax], cx
mov r8d, 0x104
lea rdx, [rbp + 0x180]
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x140006223
lea rcx, [rbp + 0x180]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140006071
lea rcx, [rbp + 0x180]
mov rax, 0xffffffffffffffff
nop word [rax + rax]
inc rax
cmp word [rcx + rax*2], 0
jne 0x140005ff0
mov ebx, 0x104
lea rdi, [rbp + 0x180]
sub rbx, rax
lea rdi, [rdi + rax*2]
mov rdx, rbx
lea r8, str..exe
mov rcx, rdi
call fcn.140016230
lea rcx, [rbp + 0x180]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140006071
lea r8, str..sys
mov rdx, rbx
mov rcx, rdi
call fcn.140016230
lea rcx, [rbp + 0x180]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140006071
mov rdx, qword [rsi + 0x10]
lea r8, [rbp + 0x180]
lea rcx, str.____Did_not_find_service_binary__s__sanitized_path:__s__n
call fcn.140001010
jmp 0x1400061bc
lea rcx, [rbp + 0x180]
call fcn.140009d70
test eax, eax
jne 0x1400060b7
xor eax, eax
lea rbx, str.360qpesv.sys
mov edi, eax
nop dword [rax]
mov rdx, qword [rbx]
lea rcx, [rbp + 0x180]
call fcn.14000beb0
test rax, rax
jne 0x1400060b7
inc edi
add rbx, 8
cmp edi, 0x3f7
jb 0x140006090
jmp 0x1400061af
mov edx, 0x20
lea ecx, [rdx - 0x1f]
call fcn.14000f700
mov rbx, rax
test rax, rax
je 0x14000620d
lea rcx, [rbp + 0x180]
call fcn.14000fb40
mov qword [rbx], rax
mov r10, rax
test rax, rax
je 0x1400061f7
mov r9, qword [rsp + 0x58]
mov r11, qword [r9]
test r11, r11
je 0x140006196
mov r8, qword [r11]
mov rcx, rax
sub r8, rax
nop word [rax + rax]
movzx edx, word [rcx]
movzx eax, word [rcx + r8]
sub edx, eax
jne 0x140006124
add rcx, 2
test eax, eax
jne 0x140006110
test edx, edx
js 0x140006196
mov r9, qword [r11 + 0x18]
test r9, r9
je 0x140006164
mov rax, qword [r9]
mov r8, r10
sub r8, rax
nop word [rax + rax]
movzx edx, word [rax]
movzx ecx, word [rax + r8]
sub edx, ecx
jne 0x140006154
add rax, 2
test ecx, ecx
jne 0x140006140
test edx, edx
jns 0x140006164
mov r11, r9
mov r9, qword [r9 + 0x18]
test r9, r9
jne 0x140006131
mov r8, qword [r11 + 0x18]
test r8, r8
je 0x14000618c
mov rdx, qword [r8]
sub rdx, r10
movzx ecx, word [r10]
movzx eax, word [r10 + rdx]
sub ecx, eax
jne 0x140006188
add r10, 2
test eax, eax
jne 0x140006173
test ecx, ecx
jns 0x14000619d
mov qword [rbx + 0x18], r8
mov qword [r11 + 0x18], rbx
jmp 0x14000619d
mov qword [rbx + 0x18], r11
mov qword [r9], rbx
mov r8, qword [rbx]
lea rcx, str.___Found_EDR_binary_executed_through_a_service_name___s___path___s__n
mov rdx, qword [r15]
call fcn.140001010
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
je 0x1400061dc
mov rdi, qword [rsp + 0x50]
mov ebx, 0x25
inc r13d
cmp r13d, dword [rsp + 0x64]
jae 0x14000626e
xor r15d, r15d
jmp 0x140005d60
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Error_while_closing_service_handle__CloseServiceHandle_failed:_0x_08lx__n
call fcn.140001010
mov rdi, qword [rsp + 0x50]
jmp 0x14000624b
mov rdx, qword [r15]
lea rcx, str.____Couldnt_alloc_memory_for_binary_path__slistNewEntry__binaryPath__for_service___s__n
call fcn.140001010
mov rdi, qword [rsp + 0x50]
jmp 0x14000624b
mov rdx, qword [r15]
lea rcx, str.____Couldnt_alloc_memory_for_binary_path__slistNewEntry__for_service___s__n
call fcn.140001010
mov rdi, qword [rsp + 0x50]
jmp 0x14000624b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [rsp + 0x70]
lea rcx, str.____Error_while_attempting_to_expand_service_binary_path___s___ExpandEnvironmentStrings_failed:_:_0x_08lx__n
call fcn.140001010
jmp 0x14000624b
lea rcx, str.____Failed_to_allocate_memory_to_retrieve_service_configuration
call fcn.1400165d0
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
jne 0x1400062af
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Error_while_closing_service_handle__CloseServiceHandle_failed:_0x_08lx__n
call fcn.140001010
jmp 0x1400062af
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
jne 0x14000628f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Error_while_closing_handle_on_the_SCM__CloseServiceHandle_failed:_0x_08lx__n
call fcn.140001010
mov rcx, rsi
call fcn.1400164d4
mov rcx, r14
call fcn.1400164d4
xor eax, eax
jmp 0x1400062ef
lea rcx, str.____Failed_to_allocate_memory_to_enumerate_services
call fcn.1400165d0
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
jne 0x1400062d0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Error_while_closing_handle_on_the_SCM__CloseServiceHandle_failed:_0x_08lx__n
call fcn.140001010
test rsi, rsi
je 0x1400062dd
mov rcx, rsi
call fcn.1400164d4
test r14, r14
je 0x1400062ea
mov rcx, r14
call fcn.1400164d4
mov eax, 0xffffffff
mov r12, qword [rsp + 0x4d8]
mov r13, qword [rsp + 0x4e0]
mov rcx, qword [rbp + 0x390]
xor rcx, rsp
call fcn.14000b2e0
mov rbx, qword [rsp + 0x4e8]
add rsp, 0x4a0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret