Function at 0x140003f70
Capabilities:
Get common file path

Disassembly:
mov r11, rsp
push rbx
push rsi
push r13
push r15
sub rsp, 0x268
mov rax, qword [0x140020018]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov qword [r11 + 0x18], rbp
xor r15d, r15d
mov qword [r11 - 0x30], r12
mov rbx, rcx
mov qword [r11 - 0x38], r14
mov ebp, r15d
mov r14, rdx
mov dword [rsp + 0x20], r15d
mov esi, r15d
call fcn.140003d50
xor edx, edx
lea r8d, [r15 + 1]
xor ecx, ecx
mov r13, rax
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r12, rax
test rax, rax
je 0x14000417d
lea r8d, [r15 + 1]
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbp, rax
test rax, rax
je 0x14000417d
lea r9, [rsp + 0x20]
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x140004016
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x14000417d
mov ecx, dword [rsp + 0x20]
call fcn.140008710
mov rsi, rax
test rax, rax
je 0x14000417d
mov r8d, dword [rsp + 0x20]
lea r9, [rsp + 0x20]
mov rdx, rax
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
je 0x14000417d
mov qword [rsp + 0x260], rdi
lea rcx, [rsp + 0x30]
mov rdi, qword [rsi + 0x10]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x140004175
mov r8d, 0xb
lea rdx, str.SystemRoot
mov rcx, rdi
call fcn.140008998
test eax, eax
jne 0x1400040d9
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea rcx, [rsp + 0x30]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_lstrlenW]
add ebx, eax
movsxd rcx, ebx
add rcx, rcx
call fcn.140008710
mov qword [r14], rax
test rax, rax
je 0x140004175
mov word [rax], r15w
lea rdx, [rsp + 0x30]
mov rcx, qword [r14]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
mov rcx, qword [r14]
lea rdx, [rdi + 0x16]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x14000416f
cmp word [rdi + 2], 0x3a
je 0x140004147
cmp word [rdi + 0xa], 0x3a
je 0x140004147
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea rcx, [rsp + 0x30]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_lstrlenW]
add ebx, eax
movsxd rcx, ebx
lea rcx, [rcx*2 + 4]
call fcn.140008710
mov qword [r14], rax
test rax, rax
je 0x140004175
mov word [rax], r15w
lea rdx, [rsp + 0x30]
mov rcx, qword [r14]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
mov rcx, qword [r14]
lea rdx, [0x1400155b4]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
mov rcx, qword [r14]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x14000416f
lea rdx, [0x1400156e0]
mov rcx, rdi
call fcn.1400063d0
cmp rax, rdi
jne 0x14000415f
add rdi, 8
mov rcx, rdi
call fcn.140008718
mov qword [r14], rax
test rax, rax
je 0x140004175
mov r15d, 1
mov rdi, qword [rsp + 0x260]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14, qword [rsp + 0x250]
mov ebx, eax
test rbp, rbp
je 0x14000419b
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rbp, qword [rsp + 0x2a0]
test r12, r12
je 0x1400041b1
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov r12, qword [rsp + 0x258]
test rsi, rsi
je 0x1400041c6
mov rcx, rsi
call fcn.1400086fc
mov rcx, r13
call fcn.140004990
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, r15d
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.140005250
add rsp, 0x268
pop r15
pop r13
pop rsi
pop rbx
ret