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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
xor r13d, r13d
mov r12d, edx
lea rdx, str.SYSPART
mov qword [rax + 0x18], r13
mov ebx, r13d
mov edi, r13d
mov r15, rcx
call fcn.14000bd98
lea r14d, [r13 + 1]
mov rbp, rax
test rax, rax
jne 0x14000515a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x14000534c
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], r13w
jne 0x14000515e
cmp rax, r14
jbe 0x14000517e
cmp word [rbp + 2], 0x5c
jne 0x14000517e
mov eax, 0x3f
mov word [rbp + 2], ax
xor edx, edx
lea r9, [rsp + 0x88]
mov rcx, rbp
mov sil, r13b
lea r8d, [rdx + 8]
call fcn.14001480c
mov rcx, qword [rsp + 0x88]
mov r14d, eax
test eax, eax
js 0x1400051b6
cmp dword [rcx + 0x1c], 0x10
mov eax, 1
movzx esi, r13b
cmove esi, eax
test rcx, rcx
je 0x1400051e0
mov rcx, qword gs:[0x60]
xor edx, edx
mov r8, qword [rsp + 0x88]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
mov rdi, qword [rsp + 0x80]
test r14d, r14d
jns 0x14000520f
mov ecx, r14d
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
lea rdx, str.Failed_to_determine_whether_the_system_partition_is_in_a_space._Last_Error___x
mov ecx, 3
mov r8d, eax
call fcn.14000b134
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x140005346
test sil, sil
jne 0x14000522a
lea rdx, str.System_partition_is_not_in_a_space
mov ecx, 2
call fcn.14000b134
jmp 0x140005346
lea rdx, [rsp + 0x80]
mov rcx, rbp
call fcn.14000540c
test eax, eax
jne 0x14000526d
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Failed_to_retrieve_physical_partitions._Last_Error___x
mov ecx, 3
mov r8d, eax
call fcn.14000b134
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rdi, qword [rsp + 0x80]
jmp 0x140005346
mov rdi, qword [rsp + 0x80]
mov ecx, 2
cmp dword [rdi + 8], r13d
jne 0x140005289
lea rdx, str.No_physical_partitions_found
jmp 0x140005220
lea rdx, str.Servicing_spaces_files
call fcn.14000b134
mov qword [rsp + 0x20], rdi
mov rcx, r15
test r12d, r12d
je 0x1400052db
xor r9d, r9d
lea r8, str.DEST_bootspaces.dll
lea rdx, str.SOURCEMiscFWTYPE_bootspaces.dll
call fcn.140005514
test eax, eax
jne 0x1400052cb
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Failed_to_service_spaces_DLL._Last_Error___x
jmp 0x140005337
lea r8, str.BOOTMGR
lea rdx, str.SYSPARTBOOTMGR
jmp 0x140005316
lea r9, str.bootmgr.exe
lea r8, str.EFIDEFAULTDEFAULTAPP
lea rdx, str.SYSPARTDESTBOOTMGR
call fcn.140005514
test eax, eax
jne 0x140005308
lea rdx, str.Failed_to_service_spaces_default_bootmgr
lea ecx, [rax + 3]
call fcn.14000b134
lea r8, str.DESTBOOTMGR
lea rdx, str.SYSPARTDESTBOOTMGR
xor r9d, r9d
mov qword [rsp + 0x20], rdi
mov rcx, r15
call fcn.140005514
test eax, eax
jne 0x140005346
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Failed_to_service_spaces_bootmgr._Last_Error___x
mov r8d, eax
mov ecx, 4
mov ebx, eax
call fcn.14000b134
mov r14d, 1
lea rdx, str.SYSPARTDEST_bootspaces.dll
mov rcx, r15
call fcn.14000bd98
mov rsi, rax
test rax, rax
jne 0x14000536d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x1400053aa
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400053aa
test al, 0x50
jne 0x1400053aa
mov rcx, rsi
call fcn.14000d694
test eax, eax
jne 0x1400053aa
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, rsi
lea rdx, str.Error_deleting_stale_spaces_dll___s___Last_Error___x
mov r9d, eax
mov ecx, 4
mov ebx, eax
call fcn.14000b134
test rdi, rdi
je 0x1400053c3
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
test rbp, rbp
je 0x1400053dc
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbp
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
test ebx, ebx
je 0x1400053ec
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1400053ef
mov eax, r14d
mov rbx, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret