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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x680
mov rax, qword [0x1400b8288]
xor rax, rsp
mov qword [rsp + 0x670], rax
mov rdi, r8
mov r12, rdx
mov rbp, rcx
xorps xmm0, xmm0
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x618
mov rsi, r9
movups xmmword [rsp + 0x40], xmm0
xor r15d, r15d
call sub.msvcrt.dll_memset
lea r8, [rsp + 0x50]
mov rdx, rsi
mov rcx, rbp
call fcn.140041e14
lea r14d, [r15 + 1]
test eax, eax
je 0x14004ae85
lea rsi, [rsp + 0x50]
mov r15d, r14d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
nop dword [rax + rax]
cmp eax, 0xffffffff
je 0x14004aea1
mov rcx, rsi
call fcn.140042b60
xor r9d, r9d
lea rdx, [rsp + 0x40]
xor r8d, r8d
mov rcx, rsi
call qword [sym.imp.ntdll.dll_RtlDosPathNameToNtPathName_U]
nop dword [rax + rax]
test al, al
je 0x14004b092
movzx ebx, word [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
lea r8, [rbx + 0x18]
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
nop dword [rax + rax]
mov r14, rax
test rax, rax
je 0x14004afda
movzx r8d, word [rsp + 0x40]
lea rcx, [rax + 0x14]
mov rdx, qword [rsp + 0x48]
call sub.msvcrt.dll_memmove
and qword [r14 + 8], 0
mov r8, r14
mov byte [r14], 0
mov rdx, rdi
movzx ecx, word [rsp + 0x40]
mov dword [r14 + 0x10], ecx
mov rcx, rbp
movzx r9d, word [rsp + 0x40]
add r9d, 0x18
mov dword [rsp + 0x20], 0xb
call fcn.140044c98
mov ebx, eax
test eax, eax
jns 0x14004afb5
mov dword [rsp + 0x30], 0x31f
lea rdi, str.RestoreHardlink
mov qword [rsp + 0x28], rdi
lea r9, str.setting_hardlink_failed
mov r8, r12
mov dword [rsp + 0x20], eax
mov rdx, rbp
mov ecx, 1
call fcn.14002aaa0
test r15d, r15d
je 0x14004afb5
cmp ebx, 0x80070011
je 0x14004af8d
lea eax, [rbx + 0x3fffff2c]
test eax, 0xefffffff
jne 0x14004afb5
xor ebx, ebx
mov dword [rsp + 0x30], 0x325
mov qword [rsp + 0x28], rdi
lea r9, str.Reset_setting_hardlink_failure_because_of_folder_redirection
and dword [rsp + 0x20], ebx
mov r8, r12
mov rdx, rbp
lea ecx, [rbx + 2]
call fcn.14002aaa0
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
jmp 0x14004b06a
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ecx, ax
mov r14d, 0x80070000
or ecx, r14d
lea rdi, str.RestoreHardlink
test eax, eax
cmovle ecx, eax
test ecx, ecx
jns 0x14004b01f
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ebx, ax
or ebx, r14d
test eax, eax
cmovle ebx, eax
test ebx, ebx
jns 0x14004b042
jmp 0x14004b024
mov ebx, 0x80004005
and qword [rsp + 0x20], 0
lea rdx, str.onecore_base_ntsetupopktoolsosimagelibmain_restoreworker.c
mov r9d, ebx
mov r8d, 0x32f
mov rcx, rdi
call fcn.140046874
mov dword [rsp + 0x30], 0x330
lea r9, str.MALLOC_failed
mov qword [rsp + 0x28], rdi
mov r8, rsi
mov rdx, rbp
mov dword [rsp + 0x20], ebx
mov ecx, 1
call fcn.14002aaa0
mov rcx, qword gs:[0x60]
xor edx, edx
mov r8, qword [rsp + 0x48]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
nop dword [rax + rax]
test ebx, ebx
js 0x14004b0e2
xor eax, eax
jmp 0x14004b0e4
and qword [rsp + 0x20], 0
lea rdi, str.RestoreHardlink
mov ebx, 0x80070003
lea rdx, str.onecore_base_ntsetupopktoolsosimagelibmain_restoreworker.c
mov r9d, ebx
mov rcx, rdi
mov r8d, 0x339
call fcn.140046874
mov dword [rsp + 0x30], 0x33a
lea r9, str.Converting_to_NT_filename_failed
mov qword [rsp + 0x28], rdi
mov r8, rsi
mov rdx, rbp
mov dword [rsp + 0x20], ebx
mov ecx, r14d
call fcn.14002aaa0
mov eax, ebx
mov rcx, qword [rsp + 0x670]
xor rcx, rsp
call fcn.140096bd0
add rsp, 0x680
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret