Function at 0x140005c40
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 [0x14003a018]
xor rax, rsp
mov qword [rbp + 0x390], rax
xor esi, esi
mov qword [rsp + 0x60], rcx
xor edx, edx
mov dword [rsp + 0x6c], esi
xor ecx, ecx
mov dword [rsp + 0x68], esi
mov r15d, esi
mov r14d, esi
lea r8d, [rsi + 5]
mov ebx, esi
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov qword [rsp + 0x50], rax
mov rdi, rax
test rax, rax
jne 0x140005ca6
lea eax, [rsi + 1]
jmp 0x140006237
mov qword [rsp + 0x4d8], r12
mov qword [rsp + 0x4e0], r13
test r15, r15
je 0x140005cc3
mov rcx, r15
call fcn.14000e90c
add ebx, dword [rsp + 0x68]
mov edx, 1
mov ecx, ebx
call fcn.14000d400
mov r15, rax
test rax, rax
je 0x1400061ff
mov qword [rsp + 0x48], rsi
lea rax, [rsp + 0x6c]
mov qword [rsp + 0x40], rsi
xor edx, edx
mov qword [rsp + 0x38], rax
mov rcx, rdi
lea rax, [rsp + 0x68]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ebx
lea r9d, [rdx + 3]
lea r8d, [rdx + 0x3b]
mov qword [rsp + 0x20], r15
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
test eax, eax
jne 0x140005d32
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x140005cb6
test eax, eax
jne 0x1400061ff
mov r13d, esi
cmp dword [rsp + 0x6c], esi
jbe 0x1400061d4
mov ebx, 0x25
nop dword [rax]
nop dword [rax + rax]
mov eax, r13d
mov r8d, 1
imul rdx, rax, 0x38
mov dword [rsp + 0x68], esi
mov rcx, rdi
mov rdx, qword [rdx + r15]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov r12, rax
test rax, rax
je 0x1400061c6
nop word [rax + rax]
test r14, r14
je 0x140005d8d
mov rcx, r14
call fcn.14000e90c
mov ecx, dword [rsp + 0x68]
mov edx, 1
call fcn.14000d400
mov r14, rax
test rax, rax
je 0x1400061f6
mov r8d, dword [rsp + 0x68]
lea r9, [rsp + 0x68]
mov rdx, rax
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x140005dd4
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x140005d80
test eax, eax
jne 0x1400061c6
mov r8, qword [r14 + 0x10]
cmp word [r8], 0
je 0x1400061c6
mov edx, 0x104
lea rcx, [rsp + 0x70]
call fcn.14000e678
mov r8d, 0xc
lea rdx, str.SystemRoot_
lea rcx, [rsp + 0x70]
call fcn.1400117ac
test eax, eax
jne 0x140005e46
mov word [rsp + 0x70], bx
lea rax, [rsp + 0x70]
mov r8, 0xffffffffffffffff
nop
cmp word [rax + r8*2 + 2], 0
lea r8, [r8 + 1]
jne 0x140005e20
lea r8, [r8*2 - 0x14]
lea rdx, [rbp - 0x7a]
lea rcx, [rbp - 0x78]
call fcn.14000c990
mov word [rbp - 0x7a], bx
mov r8d, 4
lea rdx, str.___
lea rcx, [rsp + 0x70]
call fcn.1400117ac
test eax, eax
jne 0x140005e94
lea rax, [rsp + 0x70]
mov r8, 0xffffffffffffffff
nop dword [rax]
cmp word [rax + r8*2 + 2], 0
lea r8, [r8 + 1]
jne 0x140005e70
lea r8, [r8*2 - 6]
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x70]
call fcn.14000c990
mov r8d, 8
lea rdx, str.system32
lea rcx, [rsp + 0x70]
call fcn.1400117ac
test eax, eax
jne 0x140005f07
lea rax, [rsp + 0x70]
mov r8, 0xffffffffffffffff
nop dword [rax + rax]
cmp word [rax + r8*2 + 2], 0
lea r8, [r8 + 1]
jne 0x140005ec0
lea r8, [r8*2 + 2]
lea rdx, [rsp + 0x70]
lea rcx, [rbp - 0x76]
call fcn.14000c990
movups xmm0, xmmword [str._SystemRoot__]
movzx eax, word [0x14002d760]
movsd xmm1, qword [0x14002d758]
movaps xmmword [rsp + 0x70], xmm0
movsd qword [rbp - 0x80], xmm1
mov word [rbp - 0x78], ax
cmp word [rsp + 0x70], 0x22
jne 0x140005f4b
mov edx, 0x22
lea rcx, [rsp + 0x72]
call fcn.14000bdd8
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.14000c990
mov word [rbx - 2], si
jmp 0x140005f62
mov edx, 0x20
lea rcx, [rsp + 0x70]
call fcn.14000bdd8
test rax, rax
je 0x140005f62
mov word [rax], si
mov r8d, 0x104
lea rdx, [rbp + 0x180]
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x1400061f6
lea rcx, [rbp + 0x180]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x14000600b
lea rcx, [rbp + 0x180]
mov rax, 0xffffffffffffffff
inc rax
cmp word [rcx + rax*2], 0
jne 0x140005fa2
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.14000e678
lea rcx, [rbp + 0x180]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x14000600b
lea r8, str..sys
mov rdx, rbx
mov rcx, rdi
call fcn.14000e678
lea rcx, [rbp + 0x180]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400061bc
lea r8, [rsp + 0x58]
mov qword [rsp + 0x58], 0
xor edx, edx
lea rcx, [rbp + 0x180]
call fcn.14000aa80
cmp eax, 1
jne 0x140006055
mov rcx, qword [rsp + 0x58]
lea edx, [rax + 1]
call fcn.14000d400
mov rsi, rax
test rax, rax
je 0x140006093
lea r8, [rsp + 0x58]
mov rdx, rax
lea rcx, [rbp + 0x180]
call fcn.14000aa80
test eax, eax
jne 0x140006093
test rsi, rsi
je 0x140006093
xor edi, edi
lea rbx, str.CarbonBlack
nop word [rax + rax]
mov rdx, qword [rbx]
mov rcx, rsi
call fcn.14000bbc0
test rax, rax
jne 0x1400060c7
inc edi
add rbx, 8
cmp edi, 0xa
jb 0x140006070
mov rcx, rsi
call fcn.14000e90c
xor esi, esi
lea rbx, str.360qpesv.sys
mov edi, esi
nop
mov rdx, qword [rbx]
lea rcx, [rbp + 0x180]
call fcn.14000bbc0
test rax, rax
jne 0x1400060cf
inc edi
add rbx, 8
cmp edi, 0x40c
jb 0x1400060a0
jmp 0x1400061af
mov rcx, rsi
call fcn.14000e90c
mov edx, 0x20
lea ecx, [rdx - 0x1f]
call fcn.14000d400
mov rbx, rax
test rax, rax
je 0x1400061f1
lea rcx, [rbp + 0x180]
call fcn.14000d698
mov qword [rbx], rax
mov r10, rax
test rax, rax
je 0x1400061f1
mov rsi, qword [rsp + 0x60]
mov r11, qword [rsi]
test r11, r11
je 0x1400061a6
mov r8, qword [r11]
mov rcx, rax
sub r8, rax
nop dword [rax]
movzx edx, word [rcx]
movzx eax, word [rcx + r8]
sub edx, eax
jne 0x140006134
add rcx, 2
test eax, eax
jne 0x140006120
test edx, edx
js 0x1400061a6
mov r9, qword [r11 + 0x18]
test r9, r9
je 0x140006174
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 0x140006164
add rax, 2
test ecx, ecx
jne 0x140006150
test edx, edx
jns 0x140006174
mov r11, r9
mov r9, qword [r9 + 0x18]
test r9, r9
jne 0x140006141
mov r8, qword [r11 + 0x18]
test r8, r8
je 0x14000619c
mov rdx, qword [r8]
sub rdx, r10
movzx ecx, word [r10]
movzx eax, word [r10 + rdx]
sub ecx, eax
jne 0x140006198
add r10, 2
test eax, eax
jne 0x140006183
test ecx, ecx
jns 0x1400061ad
mov qword [rbx + 0x18], r8
mov qword [r11 + 0x18], rbx
jmp 0x1400061ad
mov qword [rbx + 0x18], r11
mov qword [rsi], rbx
xor esi, esi
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
je 0x1400061f1
mov rdi, qword [rsp + 0x50]
mov ebx, 0x25
inc r13d
cmp r13d, dword [rsp + 0x6c]
jb 0x140005d50
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r14
call fcn.14000e90c
mov rcx, r15
call fcn.14000e90c
xor eax, eax
jmp 0x140006227
mov rdi, qword [rsp + 0x50]
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test r14, r14
je 0x140006215
mov rcx, r14
call fcn.14000e90c
test r15, r15
je 0x140006222
mov rcx, r15
call fcn.14000e90c
mov eax, 0xffffffff
mov r12, qword [rsp + 0x4d8]
mov r13, qword [rsp + 0x4e0]
mov rcx, qword [rbp + 0x390]
xor rcx, rsp
call fcn.14000b000
mov rbx, qword [rsp + 0x4e8]
add rsp, 0x4a0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret