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

Disassembly:
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x30
mov rdi, rcx
xor ecx, ecx
xor esi, esi
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
test rdi, rdi
je 0x14000454d
mov rcx, rdi
call fcn.140001940
test eax, eax
jne 0x14000454d
mov rcx, rdi
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x48], rbp
call fcn.140004080
mov rbp, rax
test rax, rax
je 0x14000445e
mov qword [rsp + 0x50], r12
call fcn.140001b00
mov r12, rax
test rax, rax
je 0x14000444b
mov rcx, rbp
call fcn.140001940
test eax, eax
je 0x140004434
lea rax, str.system32_
lea rbx, [rsp + 0x20]
mov qword [rsp + 0x20], rax
lea rax, str.SystemRoot_system32_
mov qword [rsp + 0x28], rax
mov rdx, qword [rbx]
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
lea rdi, [rcx - 1]
mov rcx, rbp
call fcn.14001fd60
test eax, eax
je 0x140004407
lea rax, [rsp + 0x30]
add rbx, 8
cmp rbx, rax
jb 0x1400043d1
jmp 0x140004417
lea rdx, [rbp + rdi*2]
mov rcx, r12
call fcn.140003db0
mov rsi, rax
lea rax, [rsp + 0x30]
cmp rbx, rax
jne 0x140004442
mov rcx, rbp
call fcn.1400019a0
test eax, eax
je 0x140004442
mov rsi, rbp
xor ebp, ebp
jmp 0x140004442
mov rdx, rbp
mov rcx, r12
call fcn.140003db0
mov rsi, rax
mov rcx, r12
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
mov rcx, rbp
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
mov r12, qword [rsp + 0x50]
jmp 0x1400044fd
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
cmp eax, 0x7e
jne 0x140004522
mov rcx, rdi
call fcn.140003050
mov rbx, rax
test rax, rax
je 0x140004522
mov ecx, 0x37e4
call fcn.140002c30
test eax, eax
je 0x14000449b
xor ecx, ecx
call fcn.140003ae0
mov rdi, rax
jmp 0x1400044a3
call fcn.140001b00
mov rdi, rax
test rdi, rdi
je 0x1400044f4
mov rdx, rbx
mov rcx, rdi
call fcn.140003db0
mov rsi, rax
test rax, rax
je 0x1400044eb
mov rcx, rax
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400044cd
test al, 0x50
je 0x1400044eb
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
cmp eax, 2
jne 0x1400044e0
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
xor esi, esi
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
test rsi, rsi
je 0x140004522
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
mov rbp, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x40]
mov rax, rsi
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
test eax, eax
jne 0x140004535
lea ecx, [rax + 0x7e]
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
mov rbp, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x40]
mov rax, rsi
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret
mov ecx, 0xa0
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
mov rsi, qword [rsp + 0x58]
xor eax, eax
add rsp, 0x30
pop rdi
ret