Function at 0x180068130
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov r11, rsp
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x70]
sub rsp, 0x170
mov rax, qword [0x1801610c0]
xor rax, rsp
mov qword [rbp + 0x40], rax
mov qword [r11 + 0x18], rbx
mov qword [r11 - 0x20], r12
mov r12, rcx
mov qword [r11 - 0x28], r13
xor r13d, r13d
mov qword [r11 - 0x30], r14
mov esi, r13d
mov dword [rsp + 0x78], r13d
mov edi, r13d
mov dword [rsp + 0x74], r13d
mov r14, rdx
mov dword [rsp + 0x70], r13d
mov qword [rsp + 0x60], r13
mov qword [rsp + 0x68], r13
mov qword [r11 - 0x38], r15
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1800684cf
test al, 0x50
jne 0x1800684cf
call fcn.180067cd0
cmp eax, 1
je 0x1800681b6
lea esi, [r13 + 0x7e]
jmp 0x1800684d4
mov ecx, 0x23f0
call fcn.180066f20
test eax, eax
jne 0x180068340
mov rcx, r12
call fcn.180066c50
test eax, eax
je 0x180068340
xor eax, eax
mov r15d, r13d
mov qword [rbp + 0x20], rax
mov qword [rbp + 0x28], rax
mov qword [rbp + 0x30], rax
mov dword [rbp + 0x38], eax
mov rax, qword [0x18016a0a0]
test rax, rax
jne 0x180068216
xor edx, edx
lea rcx, str.Advapi32.dll
call fcn.180067140
mov qword [0x18016a0a0], rax
test rax, rax
je 0x180068336
cmp qword [0x18016a020], rsi
jne 0x180068246
lea rdx, str.OpenSCManagerW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x18016a020], rax
test rax, rax
je 0x180068336
mov rax, qword [0x18016a0a0]
cmp qword [0x18016a028], rsi
jne 0x180068276
lea rdx, str.OpenServiceW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x18016a028], rax
test rax, rax
je 0x180068336
mov rax, qword [0x18016a0a0]
cmp qword [0x18016a038], rsi
jne 0x1800682a6
lea rdx, str.QueryServiceStatus
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x18016a038], rax
test rax, rax
je 0x180068336
mov rax, qword [0x18016a0a0]
cmp qword [0x18016a040], rsi
jne 0x1800682cb
lea rdx, str.CloseServiceHandle
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x18016a040], rax
test rax, rax
je 0x180068336
xor edx, edx
xor ecx, ecx
mov r8d, 0x80000000
call qword [0x18016a020]
mov rbx, rax
test rax, rax
je 0x180068331
mov r8d, 4
lea rdx, str.CryptSvc
mov rcx, rax
call qword [0x18016a028]
mov rdi, rax
test rax, rax
je 0x180068328
lea rdx, [rbp + 0x20]
mov rcx, rax
call qword [0x18016a038]
test eax, eax
je 0x18006831f
mov eax, dword [rbp + 0x24]
add eax, 0xfffffffc
cmp eax, 3
setbe r15b
mov rcx, rdi
call qword [0x18016a040]
mov rcx, rbx
call qword [0x18016a040]
test r15d, r15d
jne 0x180068340
mov edi, 1
jmp 0x1800684d4
mov qword [rsp + 0x50], r13
lea rax, [rsp + 0x68]
mov qword [rsp + 0x48], rax
mov r9d, 2
lea rax, [rsp + 0x60]
mov r8d, 0x400
mov qword [rsp + 0x40], rax
mov rdx, r12
lea rax, [rsp + 0x70]
mov qword [rsp + 0x38], rax
lea ecx, [r9 - 1]
lea rax, [rsp + 0x74]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x78]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r13d
call qword [0x180169fe0]
mov edi, eax
test eax, eax
jne 0x1800683a8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x1800684d4
xor eax, eax
lea rcx, [rbp - 0x40]
xor edx, edx
mov qword [rbp - 0x60], rax
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], rax
lea r8d, [rax + 0x58]
call fcn.1800b2150
or dword [rbp + 8], 0x1000
lea rax, [rbp - 0x60]
mov ecx, 0x23f0
mov qword [rbp - 0x18], rax
mov dword [rbp - 0x60], 0x20
mov qword [rbp - 0x58], r12
mov dword [rbp - 0x40], 0x58
mov dword [rbp - 0x10], 1
mov dword [rbp - 0x28], 2
mov dword [rbp - 0x24], 1
mov dword [rbp - 0x20], 1
call fcn.180066f20
mov r8, qword [rsp + 0x68]
mov r9, r14
mov rdx, qword [rsp + 0x60]
lea rcx, [rbp - 0x40]
test eax, eax
jne 0x18006843d
call fcn.1800674f0
mov edi, eax
test eax, eax
jne 0x1800684d4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x1800684d4
xor eax, eax
mov qword [rbp - 0x80], 0x20
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x70], rax
mov qword [rbp - 0x68], rax
lea rax, [rbp - 0x80]
mov qword [rbp + 0x10], rax
mov dword [rbp - 0x78], 3
call fcn.1800674f0
mov edi, eax
test eax, eax
jne 0x1800684d4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ebx, 1
mov rax, qword [rbp + 0x10]
cmp dword [rax + 0xc], ebx
jb 0x1800684d4
nop dword [rax]
nop word [rax + rax]
mov qword [rbp - 8], r13
lea rcx, [rbp - 0x40]
mov dword [rbp - 0x10], 1
mov r9, r14
mov dword [rax + 4], ebx
mov r8, qword [rsp + 0x68]
mov rdx, qword [rsp + 0x60]
call fcn.1800674f0
mov edi, eax
test eax, eax
jne 0x1800684d4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
inc ebx
mov rax, qword [rbp + 0x10]
cmp ebx, dword [rax + 0xc]
jbe 0x180068490
jmp 0x1800684d4
mov esi, 2
mov rcx, qword [rsp + 0x60]
mov r15, qword [rsp + 0x150]
mov r14, qword [rsp + 0x158]
mov r13, qword [rsp + 0x160]
mov r12, qword [rsp + 0x168]
mov rbx, qword [rsp + 0x1a0]
test rcx, rcx
je 0x18006850e
xor edx, edx
call qword [0x180169fc0]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x18006851e
call qword [0x180169fb8]
test edi, edi
jne 0x180068526
mov ecx, esi
jmp 0x180068528
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
mov rcx, qword [rbp + 0x40]
xor rcx, rsp
call fcn.1800916f0
add rsp, 0x170
pop rdi
pop rsi
pop rbp
ret