Function at 0x140051178
Capabilities:
Set file attributes

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x40]
sub rsp, 0x140
mov rax, qword [0x1400b8288]
xor rax, rsp
mov qword [rbp + 0x38], rax
xorps xmm0, xmm0
mov qword [rbp - 0x70], rcx
xor eax, eax
mov byte [rsp + 0x60], 1
xor edi, edi
mov dword [rbp + 0x30], eax
mov qword [rbp - 8], rax
mov r9d, 0x200000
lea rax, [rsp + 0x68]
mov qword [rsp + 0x68], rdi
mov r8d, 0x80000100
mov qword [rsp + 0x20], rax
mov r13, rdx
mov qword [rsp + 0x70], rdi
mov rsi, rcx
mov r14d, edi
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp], xmm0
movups xmmword [rbp + 0x10], xmm0
movups xmmword [rbp + 0x20], xmm0
movups xmmword [rbp - 0x28], xmm0
movups xmmword [rbp - 0x18], xmm0
call fcn.1400518f4
mov ebx, eax
test eax, eax
jns 0x140051221
xor esi, esi
mov r9d, eax
mov r8d, 0x15e
mov qword [rsp + 0x20], rsi
lea rdx, str.onecore_base_ntsetupopktoolsosimagelibutility_fileio.c
jmp 0x140051581
mov rcx, qword [rsp + 0x68]
lea rdx, [rbp]
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
nop dword [rax + rax]
test eax, eax
jne 0x140051283
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
xor esi, esi
movzx ecx, ax
mov edi, 0x80070000
or ecx, edi
test eax, eax
cmovle ecx, eax
test ecx, ecx
jns 0x140051273
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ebx, ax
or ebx, edi
test eax, eax
cmovle ebx, eax
jmp 0x140051278
mov ebx, 0x80004005
mov r9d, ebx
mov r8d, 0x167
jmp 0x140051210
mov r12d, dword [rbp + 0x28]
mov r15d, edi
test r12d, r12d
je 0x14005158d
lea rdi, str.onecore_base_ntsetupopktoolsosimagelibutility_fileio.c
mov rcx, qword [rsp + 0x68]
test rcx, rcx
jne 0x1400512db
lea rax, [rsp + 0x68]
mov r9d, 0x200000
mov r8d, 0x80000000
mov qword [rsp + 0x20], rax
mov rdx, r13
mov rcx, rsi
call fcn.1400518f4
xor esi, esi
mov ebx, eax
test eax, eax
jns 0x14005131b
mov r9d, eax
mov r8d, 0x17c
jmp 0x140051579
mov r9d, 0x28
mov dword [rbp - 8], 0x80
lea r8, [rbp - 0x28]
mov dword [rsp + 0x20], 4
lea rdx, [rbp - 0x80]
call qword [sym.imp.ntdll.dll_NtSetInformationFile]
nop dword [rax + rax]
xor esi, esi
mov ebx, eax
test eax, eax
js 0x14005156c
mov ebx, dword [rbp - 0x80]
test ebx, ebx
js 0x140051564
mov rcx, qword [rsp + 0x68]
lea rdx, [rsp + 0x70]
call fcn.140051ac8
mov ebx, eax
test eax, eax
js 0x140051540
mov r14, qword [rsp + 0x70]
test r14, r14
je 0x140051533
cmp si, word [r14]
je 0x140051533
lea rbx, [r14 + 2]
cmp si, word [rbx]
je 0x140051533
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
xorps xmm1, xmm1
mov qword [rsp + 0x68], rsi
xor eax, eax
xorps xmm0, xmm0
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rbp - 0x68], xmm1
movups xmmword [rbp - 0x58], xmm1
movups xmmword [rbp - 0x48], xmm1
test rbx, rbx
je 0x1400514fd
test r13, r13
je 0x1400514fd
mov rdx, rbx
lea rcx, [rsp + 0x70]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
nop dword [rax + rax]
xor ebx, ebx
mov qword [rbp - 0x68], 0x30
mov dword [rsp + 0x50], ebx
lea rax, [rsp + 0x70]
mov qword [rsp + 0x48], rbx
lea r9, [rbp - 0x38]
mov dword [rsp + 0x40], 0x200000
lea r8, [rbp - 0x68]
mov dword [rsp + 0x38], 1
lea rcx, [rsp + 0x68]
xorps xmm0, xmm0
mov dword [rsp + 0x30], 3
mov dword [rsp + 0x28], 0x80
mov edx, 0xc0110000
mov qword [rsp + 0x20], rbx
mov qword [rbp - 0x50], rbx
movups xmmword [rbp - 0x38], xmm0
mov qword [rbp - 0x60], r13
mov qword [rbp - 0x58], rax
movdqu xmmword [rbp - 0x48], xmm0
call qword [sym.imp.ntdll.dll_NtCreateFile]
nop dword [rax + rax]
test eax, eax
jns 0x14005142d
mov r8d, 0x4b5
jmp 0x14005143a
mov eax, dword [rbp - 0x38]
test eax, eax
jns 0x140051457
mov r8d, 0x4b6
mov esi, eax
mov qword [rsp + 0x20], rbx
bts esi, 0x1c
lea rcx, str.FIOFileOpenRelative
mov r9d, esi
mov rdx, rdi
call fcn.140046874
xor eax, eax
mov ebx, esi
test esi, esi
js 0x140051523
mov rcx, qword [rsp + 0x68]
lea r9d, [rax + 1]
lea r8, [rsp + 0x60]
mov dword [rsp + 0x20], FDICreate
lea rdx, [rbp - 0x80]
call qword [sym.imp.ntdll.dll_NtSetInformationFile]
nop dword [rax + rax]
xor esi, esi
test eax, eax
js 0x1400514f3
mov eax, dword [rbp - 0x80]
test eax, eax
js 0x1400514e9
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov qword [rsp + 0x68], rsi
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]
inc r15d
mov qword [rsp + 0x70], rsi
mov r14d, esi
cmp r15d, r12d
jae 0x14005158d
mov rsi, qword [rbp - 0x70]
jmp 0x14005129a
mov ebx, eax
mov r8d, 0x1bb
jmp 0x140051572
mov ebx, eax
mov r8d, 0x1ba
jmp 0x140051572
mov ebx, 0x80070057
mov qword [rsp + 0x20], rax
mov r9d, ebx
lea rcx, str.FIOFileOpenRelative
mov r8d, 0x497
mov rdx, rdi
mov esi, ebx
call fcn.140046874
xor eax, eax
mov qword [rsp + 0x20], rax
mov r9d, esi
mov r8d, 0x1b3
jmp 0x14005157e
mov ebx, 0x80004005
mov r8d, 0x19e
jmp 0x140051576
mov r9d, eax
mov qword [rsp + 0x20], rsi
mov r8d, 0x195
lea rcx, str.FIODeleteFileById
mov rdx, rdi
call fcn.140046874
mov r14, qword [rsp + 0x70]
jmp 0x14005158d
mov r8d, 0x18c
jmp 0x140051572
mov r8d, 0x18b
bts ebx, 0x1c
mov r9d, ebx
mov qword [rsp + 0x20], rsi
mov rdx, rdi
lea rcx, str.FIODeleteFileById
call fcn.140046874
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x1400515a3
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
test r14, r14
je 0x1400515c8
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]
mov eax, ebx
mov rcx, qword [rbp + 0x38]
xor rcx, rsp
call fcn.140096bd0
mov rbx, qword [rsp + 0x190]
add rsp, 0x140
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret