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

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x78
lea rax, [rsp + 0x90]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x58]
add rax, 8
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x58]
mov eax, dword [rax - 8]
mov dword [rsp + 0x48], eax
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x50], 0
mov eax, dword [rsp + 0x88]
btr eax, 0xf
test eax, eax
jne 0x140041341
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0xffffffff
jne 0x140041256
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
jne 0x140041256
mov rcx, qword [rsp + 0x80]
call fcn.1400419e0
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
jne 0x140041247
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x16
mov eax, 0xffffffff
jmp 0x1400414c5
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0xffffffff
jne 0x14004127f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140041ed0
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, 0xffffffff
jmp 0x1400414c5
mov eax, dword [rsp + 0x40]
and eax, 0x10
test eax, eax
je 0x140041341
cmp qword [rsp + 0x50], 0
je 0x1400412c9
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x2000001
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x60], rax
jmp 0x1400412fd
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x2000001
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x60], rax
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
cmp qword [rsp + 0x60], 0xffffffffffffffff
jne 0x140041327
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140041ed0
mov eax, 0xffffffff
jmp 0x1400414c5
xor edx, edx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__open_osfhandle]
mov dword [rsp + 0x44], eax
mov eax, dword [rsp + 0x44]
jmp 0x1400414c5
cmp qword [rsp + 0x50], 0
jne 0x14004142f
mov r8d, dword [rsp + 0x48]
mov edx, dword [rsp + 0x88]
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__open]
mov dword [rsp + 0x44], eax
cmp dword [rsp + 0x44], 0
jge 0x1400413e4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [rax], 0xd
jne 0x1400413e4
mov eax, dword [rsp + 0x88]
and eax, 0x100
test eax, eax
je 0x1400413e4
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0xffffffff
jne 0x1400413b5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140041ed0
jmp 0x1400413da
mov eax, dword [rsp + 0x40]
and eax, 0x10
test eax, eax
je 0x1400413ce
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x15
jmp 0x1400413da
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0xd
mov eax, 0xffffffff
jmp 0x1400414c5
cmp dword [rsp + 0x44], 0
jge 0x1400413f6
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [rax], 2
je 0x1400413ff
mov eax, dword [rsp + 0x44]
jmp 0x1400414c5
mov rcx, qword [rsp + 0x80]
call fcn.1400419e0
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
jne 0x14004142f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x16
mov eax, 0xffffffff
jmp 0x1400414c5
mov r8d, dword [rsp + 0x48]
mov edx, dword [rsp + 0x88]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wopen]
mov dword [rsp + 0x44], eax
cmp dword [rsp + 0x44], 0
jge 0x1400414b6
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [rax], 0xd
jne 0x1400414b6
mov eax, dword [rsp + 0x88]
and eax, 0x100
test eax, eax
je 0x1400414b6
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0xffffffff
jne 0x140041491
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140041ed0
jmp 0x1400414b6
mov eax, dword [rsp + 0x40]
and eax, 0x10
test eax, eax
je 0x1400414aa
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x15
jmp 0x1400414b6
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0xd
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [rsp + 0x44]
add rsp, 0x78
ret