Function at 0x140017ca0
Capabilities:
Check if file exists

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x10]
sub rsp, 0x110
mov qword [rbp - 0x68], 0xfffffffffffffffe
mov qword [rsp + 0x150], rbx
mov rsi, rdx
mov r15, rcx
xor r12d, r12d
mov ebx, r12d
call qword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x140017fbd
call fcn.14011a1d0
mov dword [rbp - 0x60], r12d
xor edx, edx
lea r8d, [rdx + 0x60]
lea rcx, [rbp - 0x58]
call fcn.14009c0b0
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x70], r12
mov dword [rbp + 0x60], r12d
mov qword [rsp + 0x78], r12
mov qword [rbp - 0x80], r12
xor eax, eax
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x70], rax
call fcn.14011b2a0
lea rdx, [rsp + 0x68]
mov ecx, eax
call qword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
je 0x140017fbb
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140017fbb
mov qword [rsp + 0x60], r12
lea rax, [rbp + 0x60]
mov qword [rsp + 0x20], rax
mov r9d, 8
lea r8, [rsp + 0x70]
lea edx, [r9 + 0xb]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov rcx, qword [rsp + 0x68]
mov rax, qword [rsp + 0x70]
test rax, rax
cmovne rcx, rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 1
mov r9d, 2
xor r8d, r8d
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x140017fab
xor r8d, r8d
mov rdx, qword [rsp + 0x70]
lea rcx, [rsp + 0x78]
call qword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x140017f86
mov r14d, r12d
or rdi, 0xffffffffffffffff
mov rax, rdi
nop word [rax + rax]
inc rax
cmp byte [rsi + rax], bl
jne 0x140017dd0
test rax, rax
je 0x140017f4a
mov dword [rbp - 0x60], 0x68
mov dword [rbp - 0x24], 1
mov word [rbp - 0x20], r12w
lea r13, vtable.ATL::CAtlStringMgr.0
nop dword [rax + rax]
mov rdx, rsi
lea rcx, [rbp + 0x68]
call fcn.14001f150
nop
mov r8, qword [rbp + 0x68]
mov ecx, 1
sub ecx, dword [r8 - 8]
mov eax, dword [r8 - 0xc]
sub eax, 0x104
or eax, ecx
jge 0x140017e39
mov edx, 0x104
lea rcx, [rbp + 0x68]
call fcn.14001f8b0
mov r8, qword [rbp + 0x68]
lea rax, [rbp - 0x80]
mov qword [rsp + 0x50], rax
lea rax, [rbp - 0x60]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], r12
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 0x480
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
xor r9d, r9d
mov rdx, r15
mov rcx, qword [rsp + 0x60]
call qword [0x1401815a8]
mov r14d, eax
mov rcx, qword [rbp + 0x68]
movsxd rdx, dword [rcx - 0xc]
call fcn.1400a8844
mov rcx, rax
test eax, eax
js 0x140017f3f
mov rax, qword [rbp + 0x68]
cmp ecx, dword [rax - 0xc]
jg 0x140017f3f
mov dword [rax - 0x10], ecx
movsxd rcx, ecx
mov rax, qword [rbp + 0x68]
mov byte [rcx + rax], 0
mov ecx, reloc.WLDAP32.dll_Ordinal_200
call qword [sym.imp.KERNEL32.dll_Sleep]
nop
mov rdx, qword [rbp + 0x68]
add rdx, 0xffffffffffffffe8
test r14d, r14d
jne 0x140017f0c
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140017eff
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov r8, qword [rax + 8]
cmp rax, r13
jne 0x140017efc
mov rcx, qword [rcx + 8]
mov r8, rdx
xor edx, edx
mov rcx, qword [rcx + 8]
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x140017eff
call r8
inc ebx
cmp ebx, 0x32
jl 0x140017e00
jmp 0x140017f4a
lock xadd dword [rdx + 0x10], edi
sub edi, 1
jg 0x140017f4a
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov r8, qword [rax + 8]
cmp rax, r13
jne 0x140017f3a
mov rcx, qword [rcx + 8]
mov r8, rdx
xor edx, edx
mov rcx, qword [rcx + 8]
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x140017f4a
call r8
jmp 0x140017f4a
mov ecx, 0x80070057
call fcn.14001fe40
nop
mov ebx, r12d
test r14d, r14d
setne bl
mov rcx, qword [rbp - 0x80]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140017f67
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x78]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140017f7b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, 0x7d0
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x140017f96
call qword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x140017fab
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x60], r12
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140017fbb
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov rbx, qword [rsp + 0x150]
add rsp, 0x110
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret