Function at 0x140041660
Capabilities:
Check if file exists

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xc8
mov r15d, r8d
mov rdi, rdx
mov rsi, rcx
mov rax, qword [0x1401c6b58]
xor rax, rsp
mov qword [rsp + 0xc0], rax
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0xb0], rax
movaps xmm0, xmmword [section..rdata]
movaps xmmword [rsp + 0xa0], xmm0
movaps xmmword [rsp + 0x90], xmm0
movaps xmmword [rsp + 0x80], xmm0
movaps xmmword [rsp + 0x70], xmm0
lea rdx, str.DoInitialize
lea r8, str....._base_files_file_win.cc
lea r14, [rsp + 0x50]
mov rcx, r14
mov r9d, 0x171
call fcn.140059c00
lea rcx, [rsp + 0x70]
mov rdx, r14
xor r8d, r8d
call fcn.140048050
mov eax, r15d
and eax, 1
neg eax
and eax, 3
test r15b, 2
mov ecx, 1
cmove ecx, eax
test r15b, 4
mov eax, 4
cmovne ecx, eax
test r15b, 8
mov edx, 2
cmove edx, ecx
test r15b, 0x10
mov r13d, 5
cmove r13d, edx
test r13d, r13d
je 0x1400417ec
mov ecx, r15d
and ecx, 0x40
shl ecx, 0x18
test r15b, r15b
cmovns eax, ecx
mov ebx, r15d
rol ebx, 0x1a
and ebx, 0x80000100
or ebx, eax
test r15d, 0x40000
je 0x140041776
mov ebp, r15d
and ebp, 0x200000
jne 0x140041933
or ebx, 0x20000000
mov edx, r15d
shr edx, 4
and edx, 0x10000
or edx, ebx
mov eax, r15d
shr eax, 8
and eax, 3
mov r8d, r15d
shr r8d, 0xd
and r8d, 4
or r8d, eax
xor r8d, 3
mov ebx, r15d
and ebx, 0x400
mov eax, ebx
shl eax, 0x14
mov ecx, r15d
shr ecx, 3
and ecx, 0x100
or ecx, eax
mov eax, r15d
shr eax, 0xb
and eax, 2
or eax, ecx
mov ecx, r15d
shl ecx, 0xd
and ecx, 0x4000000
or ecx, eax
mov eax, r15d
shl eax, 8
and eax, 0xa000000
or eax, ecx
test byte [rdi], 1
je 0x14004183c
mov rcx, qword [rdi + 0x10]
jmp 0x140041840
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [rsi + 0x24], 0xffffffff
lea rdx, str.DoInitialize
lea r8, str....._base_files_file_win.cc
lea rsi, [rsp + 0x50]
mov rcx, rsi
mov r9d, 0x192
call fcn.140059c00
lea rdi, [rsp + 0x48]
mov rcx, rdi
mov rdx, rsi
call fcn.140064840
mov rcx, rdi
call fcn.140064810
jmp 0x1400418c3
lea rcx, [rdi + 2]
mov dword [rsp + 0x20], r13d
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x30], 0
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp qword [rsi], rax
je 0x1400418aa
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov rax, qword [rsi]
inc rax
cmp rax, 2
jb 0x14004188b
call fcn.140059c20
mov rcx, qword [rsi]
call fcn.140038f70
mov qword [rsi], 0
mov rax, r14
inc rax
cmp rax, 2
jb 0x14004189f
mov qword [rsi], r14
call fcn.140059c20
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r14, qword [rsi]
inc r14
cmp r14, 2
jae 0x1400418f2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.1400415b0
mov dword [rsi + 0x24], eax
lea rcx, [rsp + 0x70]
call fcn.1400480b0
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.140148650
nop
add rsp, 0xc8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
shr ebx, 0xa
mov dword [rsi + 0x24], 0
mov byte [rsi + 0x29], bl
test r15b, 4
jne 0x140041911
test r15b, 0xa
je 0x140041920
mov byte [rsi + 0x28], 1
jmp 0x140041920
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
setne byte [rsi + 0x28]
test r15d, 0x200000
je 0x1400418c3
mov rcx, rdi
call fcn.140043140
jmp 0x1400418c3
xor ecx, ecx
call fcn.140063f70
mov r14, rax
mov ecx, ebp
call fcn.140063f70
lea rcx, str.flags__FLAG_WIN_NO_EXECUTE__0U
mov rdx, rax
mov r8, r14
call fcn.140064380
test rax, rax
je 0x140041770
mov r14, rax
lea rdx, str.DoInitialize
lea r8, str....._base_files_file_win.cc
lea rbp, [rsp + 0x50]
mov rcx, rbp
mov r9d, 0x1a4
call fcn.140059c00
lea r12, [rsp + 0x40]
mov rcx, r12
mov rdx, r14
mov r8, rbp
call fcn.1400646f0
mov rcx, r12
call fcn.140064810
jmp 0x140041770