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

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push r12
push r14
push r15
lea rbp, [rsp - 0x3a0]
sub rsp, 0x4a0
mov rax, qword [0x140051018]
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 r12, rax
test rax, rax
jne 0x140006bf0
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, [r15 + 1]
jmp 0x140007212
mov qword [rsp + 0x4d8], rdi
mov qword [rsp + 0x4e0], r13
test r14, r14
je 0x140006c0d
mov rcx, r14
call fcn.1400183e4
add ebx, dword [rsp + 0x60]
mov edx, 1
mov ecx, ebx
mov edi, ebx
call fcn.1400119fc
mov r14, rax
test rax, rax
je 0x14000726e
mov qword [rsp + 0x48], r15
lea rax, [rsp + 0x64]
mov qword [rsp + 0x40], r15
xor edx, edx
mov qword [rsp + 0x38], rax
mov rcx, r12
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 0x140006c8d
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x140006c00
test eax, eax
je 0x140006c8d
mov edx, eax
lea rcx, str.____Could_not_enumerate_EDR_services__EnumServicesStatusEx_failed:_0x_08lx__n
call fcn.140001010
jmp 0x1400071c2
mov edx, dword [rsp + 0x64]
imul rcx, rdx, 0x38
cmp rdi, rcx
jae 0x140006cab
lea rcx, str.____Could_not_enumerate_EDR_services__problem_in_allocation_
call fcn.1400184e0
jmp 0x1400071c2
mov r13d, r15d
test edx, edx
je 0x140007239
mov ebx, 0x25
nop dword [rax + rax]
mov dword [rsp + 0x60], r15d
mov r8d, 1
mov eax, r13d
mov rcx, r12
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 0x140006d01
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 0x140007121
test rsi, rsi
je 0x140006d0e
mov rcx, rsi
call fcn.1400183e4
mov ecx, dword [rsp + 0x60]
mov edx, 1
call fcn.1400119fc
mov rsi, rax
test rax, rax
je 0x140007190
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 0x140006d6c
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x140006d01
test eax, eax
je 0x140006d6c
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 0x140007121
mov r8, qword [rsi + 0x10]
cmp word [r8], 0
je 0x140007121
mov edx, 0x104
lea rcx, [rsp + 0x70]
call fcn.140018148
mov r8d, 0xc
lea rdx, str.SystemRoot_
lea rcx, [rsp + 0x70]
call fcn.1400197a4
test eax, eax
jne 0x140006de6
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 0x140006dc0
lea r8, [r8*2 - 0x14]
lea rdx, [rbp - 0x7a]
lea rcx, [rbp - 0x78]
call fcn.14000f7d0
mov word [rbp - 0x7a], bx
mov r8d, 4
lea rdx, str.___
lea rcx, [rsp + 0x70]
call fcn.1400197a4
test eax, eax
jne 0x140006e34
lea rax, [rsp + 0x70]
mov r8, 0xffffffffffffffff
nop dword [rax]
cmp word [rax + r8*2 + 2], 0
lea r8, [r8 + 1]
jne 0x140006e10
lea r8, [r8*2 - 6]
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x70]
call fcn.14000f7d0
mov r8d, 8
lea rdx, str.system32
lea rcx, [rsp + 0x70]
call fcn.1400197a4
test eax, eax
jne 0x140006ea7
lea rax, [rsp + 0x70]
mov r8, 0xffffffffffffffff
nop dword [rax + rax]
cmp word [rax + r8*2 + 2], 0
lea r8, [r8 + 1]
jne 0x140006e60
lea r8, [r8*2 + 2]
lea rdx, [rsp + 0x70]
lea rcx, [rbp - 0x76]
call fcn.14000f7d0
movups xmm0, xmmword [str._SystemRoot__]
movzx eax, word [0x14003fc00]
mov word [rbp - 0x78], ax
movaps xmmword [rsp + 0x70], xmm0
movsd xmm0, qword [0x14003fbf8]
movsd qword [rbp - 0x80], xmm0
cmp word [rsp + 0x70], 0x22
jne 0x140006eed
mov edx, 0x22
lea rcx, [rsp + 0x72]
call fcn.14000e354
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.14000f7d0
xor ecx, ecx
mov word [rbx - 2], cx
jmp 0x140006f06
mov edx, 0x20
lea rcx, [rsp + 0x70]
call fcn.14000e354
test rax, rax
je 0x140006f06
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 0x140007174
lea rcx, [rbp + 0x180]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140006fd1
lea rcx, [rbp + 0x180]
mov rax, 0xffffffffffffffff
nop word [rax + rax]
inc rax
cmp word [rcx + rax*2], 0
jne 0x140006f50
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.140018148
lea rcx, [rbp + 0x180]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140006fd1
lea r8, str..sys
mov rdx, rbx
mov rcx, rdi
call fcn.140018148
lea rcx, [rbp + 0x180]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140006fd1
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 0x14000711c
lea rcx, [rbp + 0x180]
call fcn.14000c490
test eax, eax
jne 0x140007017
xor eax, eax
lea rbx, str.360qpesv.sys
mov edi, eax
nop dword [rax]
mov rdx, qword [rbx]
lea rcx, [rbp + 0x180]
call fcn.14000e140
test rax, rax
jne 0x140007017
inc edi
add rbx, 8
cmp edi, 0x405
jb 0x140006ff0
jmp 0x14000710f
mov edx, 0x20
lea ecx, [rdx - 0x1f]
call fcn.1400119fc
mov rbx, rax
test rax, rax
je 0x140007163
lea rcx, [rbp + 0x180]
call fcn.140011e48
mov qword [rbx], rax
mov r10, rax
test rax, rax
je 0x140007152
mov r9, qword [rsp + 0x58]
mov r11, qword [r9]
test r11, r11
je 0x1400070f6
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 0x140007084
add rcx, 2
test eax, eax
jne 0x140007070
test edx, edx
js 0x1400070f6
mov r9, qword [r11 + 0x18]
test r9, r9
je 0x1400070c4
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 0x1400070b4
add rax, 2
test ecx, ecx
jne 0x1400070a0
test edx, edx
jns 0x1400070c4
mov r11, r9
mov r9, qword [r9 + 0x18]
test r9, r9
jne 0x140007091
mov r8, qword [r11 + 0x18]
test r8, r8
je 0x1400070ec
mov rdx, qword [r8]
sub rdx, r10
movzx ecx, word [r10]
movzx eax, word [r10 + rdx]
sub ecx, eax
jne 0x1400070e8
add r10, 2
test eax, eax
jne 0x1400070d3
test ecx, ecx
jns 0x1400070fd
mov qword [rbx + 0x18], r8
mov qword [r11 + 0x18], rbx
jmp 0x1400070fd
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 0x14000713c
mov ebx, 0x25
mov r12, qword [rsp + 0x50]
inc r13d
cmp r13d, dword [rsp + 0x64]
jae 0x140007239
xor r15d, r15d
jmp 0x140006cc0
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 0x14000719c
mov rdx, qword [r15]
lea rcx, str.____Couldnt_alloc_memory_for_binary_path__slistNewEntry__binaryPath__for_service___s__n
call fcn.140001010
jmp 0x14000719c
mov rdx, qword [r15]
lea rcx, str.____Couldnt_alloc_memory_for_binary_path__slistNewEntry__for_service___s__n
call fcn.140001010
jmp 0x14000719c
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 0x14000719c
lea rcx, str.____Failed_to_allocate_memory_to_retrieve_service_configuration
call fcn.1400184e0
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
jne 0x1400071bd
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 r12, qword [rsp + 0x50]
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
jne 0x1400071e3
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 0x1400071f0
mov rcx, rsi
call fcn.1400183e4
test r14, r14
je 0x1400071fd
mov rcx, r14
call fcn.1400183e4
mov eax, 0xffffffff
mov r13, qword [rsp + 0x4e0]
mov rdi, qword [rsp + 0x4d8]
mov rcx, qword [rbp + 0x390]
xor rcx, rsp
call fcn.14000d570
mov rbx, qword [rsp + 0x4e8]
add rsp, 0x4a0
pop r15
pop r14
pop r12
pop rsi
pop rbp
ret
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
jne 0x14000725a
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.1400183e4
mov rcx, r14
call fcn.1400183e4
xor eax, eax
jmp 0x140007202
lea rcx, str.____Failed_to_allocate_memory_to_enumerate_services
call fcn.1400184e0
jmp 0x1400071c2