Function at 0x1400ad2f0
Capabilities:
Check if file exists
Get file attributes
Query environment variable

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0xc20
mov rax, qword [0x1401737a8]
xor rax, rsp
mov qword [rsp + 0xc10], rax
mov rdi, r8
xor r14d, r14d
mov rbp, r9
mov r8, rdx
mov rsi, rcx
mov qword [rdi], r14
test rcx, rcx
jne 0x1400ad4e4
test byte [r9 + 0xf8], 0x20
je 0x1400ad4dd
mov edx, dword [0x1401a0844]
mov eax, r14d
test edx, edx
je 0x1400ad4dd
mov r9, qword [0x1401a0888]
lea rcx, [r9 + 0x2c]
cmp dword [rcx], r8d
je 0x1400ad36b
inc eax
add rcx, 0x38
cmp eax, edx
jb 0x1400ad355
xor al, al
jmp 0x1400ad6d1
mov rcx, qword [0x14018f9b0]
mov r8d, 5
imul rdx, rax, 0x38
mov rbx, r14
mov rdx, qword [rdx + r9]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rsi, rax
test rax, rax
je 0x1400ad4d5
lea r9, [rsp + 0x30]
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
mov ecx, dword [rsp + 0x30]
call fcn.1400e8270
mov r8d, dword [rsp + 0x30]
lea r9, [rsp + 0x30]
mov rdx, rax
mov rcx, rsi
mov rbx, rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test rbx, rbx
je 0x1400ad4d5
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x1400ad4d5
cmp qword [rbp + 0x390], r14
jne 0x1400ad3fe
call fcn.1400e81d8
mov qword [rbp + 0x390], rax
mov rcx, qword [rbx + 0x10]
lea rdx, [0x14011f428]
call fcn.1400e3cd4
test rax, rax
je 0x1400ad41f
cmp word [rax + 8], r14w
je 0x1400ad41f
mov word [rax + 8], r14w
mov rax, qword [rbx + 0x10]
cmp word [rax], 0x22
jne 0x1400ad431
add rax, 2
mov qword [rbx + 0x10], rax
mov rdx, 0xffffffffffffffff
nop dword [rax + rax]
inc rdx
cmp word [rax + rdx*2], r14w
jne 0x1400ad440
add edx, 5
mov esi, edx
lea rcx, [rdx + rdx]
call fcn.1400e8270
mov qword [rdi], rax
mov edx, esi
mov r8, qword [rbx + 0x10]
mov rcx, rax
call fcn.1400e86e4
mov rcx, rbx
call fcn.1400e825c
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1400ad6cf
mov rcx, qword [rdi]
cmp word [rcx], 0x22
je 0x1400ad4ac
mov edx, 0x20
call fcn.1400e3bac
test rax, rax
je 0x1400ad4ac
mov rcx, qword [rdi]
mov edx, 0x20
call fcn.1400e3bac
mov word [rax], r14w
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1400ad6cf
mov rcx, qword [rdi]
lea r8, [0x14011f428]
mov rdx, rsi
call fcn.1400f7f64
jmp 0x1400ad6cf
mov rcx, rbx
call fcn.1400e825c
xor al, al
jmp 0x1400ad6d1
lea rax, [rsp + 0x30]
mov r9d, gethostbyaddr
lea r8, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor edx, edx
call sub.ntdll.dll_NtQueryInformationProcess
test eax, eax
jne 0x1400ad5c1
mov rdx, qword [rsp + 0x48]
test rdx, rdx
je 0x1400ad5c1
lea rax, [rsp + 0x38]
mov r9d, 0x570
lea r8, [rsp + 0x490]
mov qword [rsp + 0x20], rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x1400ad5c1
mov rdx, qword [rsp + 0x4b0]
lea rax, [rsp + 0x38]
mov r9d, 0x420
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x70]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x1400ad5c1
cmp qword [rsp + 0xd8], r14
je 0x1400ad5c1
movzx ebp, word [rsp + 0xd0]
lea rcx, [rbp + 2]
call fcn.1400e8270
movzx r9d, word [rsp + 0xd0]
mov rbx, rax
mov rdx, qword [rsp + 0xd8]
lea rax, [rsp + 0x38]
mov r8, rbx
mov qword [rsp + 0x20], rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov rcx, rbx
test eax, eax
jne 0x1400ad673
lea edx, [rax + 2]
call fcn.1400e0fb8
mov r9d, 2
lea r8, [rsp + 0x30]
xor edx, edx
mov rcx, rsi
call sub.KERNEL32.dll_K32GetModuleFileNameExW
mov ebx, eax
test eax, eax
je 0x1400ad5fe
lea rcx, [rbx*2 + 2]
call fcn.1400e8270
mov r9d, ebx
mov qword [rdi], rax
mov r8, rax
xor edx, edx
mov rcx, rsi
call sub.KERNEL32.dll_K32GetModuleFileNameExW
mov ebx, eax
test rbx, rbx
je 0x1400ad4dd
mov rcx, qword [rdi]
lea rdx, str.SystemRoot_
mov r8d, reloc.OLEAUT32.dll_VariantTimeToDosDateTime
call fcn.1400e8bbc
mov rcx, qword [rdi]
test eax, eax
jne 0x1400ad698
lea r8, [rcx + 0x18]
lea rcx, [rsp + 0xa00]
lea rdx, str.__SystemRoot___s
call fcn.1400358d0
xor r8d, r8d
lea rcx, [rsp + 0xa00]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ecx, eax
add rcx, rcx
mov ebx, eax
call fcn.1400e8270
mov r8d, ebx
mov qword [rdi], rax
mov rdx, rax
lea rcx, [rsp + 0xa00]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
jmp 0x1400ad6cf
mov rax, rbp
shr rax, 1
mov word [rbx + rax*2], r14w
call fcn.1400e81d8
mov edx, 2
mov qword [rdi], rax
mov rcx, rbx
call fcn.1400e0fb8
jmp 0x1400ad607
mov r8d, 4
lea rdx, [0x14011f338]
call fcn.1400e8940
test eax, eax
jne 0x1400ad6cf
mov rcx, qword [rdi]
mov rdx, 0xffffffffffffffff
lea r8, [rcx + 8]
nop dword [rax]
inc rdx
cmp word [rcx + rdx*2], r14w
jne 0x1400ad6c0
call fcn.1400e86e4
mov al, 1
mov rcx, qword [rsp + 0xc10]
xor rcx, rsp
call fcn.1400e17a0
add rsp, 0xc20
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret