Function at 0x14004bcd4
Capabilities:
Clear file content
Set file attributes

Disassembly:
mov rax, rsp
mov qword [rax + 0x20], r9
mov qword [rax + 0x18], r8
mov qword [rax + 0x10], rdx
mov qword [rax + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x48
mov r13, qword [r8 + 0x60]
xor r12d, r12d
mov eax, r12d
mov rbx, r9
mov qword [rsp + 0x38], rax
mov r14, rdx
mov edi, r12d
test rcx, rcx
je 0x14004bd29
cmp qword [rcx + 0x48], r12
mov rax, rcx
cmovne rax, qword [rcx + 0x48]
mov rax, qword [rax + 0x28]
mov qword [rsp + 0x38], rax
test r13, r13
je 0x14004c15c
test rax, rax
je 0x14004c15c
test dword [rax], 0x40000
je 0x14004c15c
mov edx, 0x80
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
nop dword [rax + rax]
test r13, r13
je 0x14004c13e
mov r9, qword [r13]
mov ebp, r12d
mov r15, r12
mov qword [rsp + 0x30], r12
mov rsi, r12
cmp word [r9], r12w
je 0x14004be3c
mov r8, r14
lea rdx, str._s:_s
lea rcx, [rsp + 0x30]
mov ebp, 1
call fcn.14000ca00
mov edi, eax
test eax, eax
jns 0x14004bdc0
mov r9d, eax
mov qword [rsp + 0x20], r12
mov r8d, 0x603
lea rdx, str.onecore_base_ntsetupopktoolsosimagelibmain_restoreworker.c
lea rcx, str.RestoreStreams
call fcn.140046874
mov r15, qword [rsp + 0x30]
mov rbx, r12
mov qword [rsp + 0xa8], rbx
test edi, edi
js 0x14004c0e0
test r15, r15
je 0x14004c057
xor r8d, r8d
xor edx, edx
mov rcx, r15
call fcn.14002f2f8
mov rsi, rax
test rax, rax
jne 0x14004bea6
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
test ecx, ecx
jns 0x14004be96
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
jns 0x14004c057
jmp 0x14004be9b
test rbx, rbx
je 0x14004bdd0
cmp qword [rbx], 0xffffffffffffffff
je 0x14004bdd0
mov r8, r14
lea rdx, [0x14009bcbc]
lea rcx, [rsp + 0x30]
call fcn.14000ca00
mov edi, eax
test eax, eax
jns 0x14004be8c
mov r9d, eax
mov qword [rsp + 0x20], r12
mov r8d, 0x60d
lea rdx, str.onecore_base_ntsetupopktoolsosimagelibmain_restoreworker.c
lea rcx, str.RestoreStreams
call fcn.140046874
mov r15, qword [rsp + 0x30]
jmp 0x14004c0e0
mov r15, qword [rsp + 0x30]
jmp 0x14004bdd8
mov edi, 0x80004005
mov r8d, 0x61a
jmp 0x14004c0c5
xor ebx, ebx
mov r14, rax
test ebp, ebp
jne 0x14004c04c
mov rbp, qword [rsp + 0xa0]
test dword [rbp + 0x1c], 0x200
je 0x14004c04c
mov rsi, qword [rsp + 0x90]
mov rcx, rsi
call fcn.14002e0d0
mov rcx, rax
lea r8d, [rbx + 1]
xor r9d, r9d
lea rdx, [r13 + 0x18]
call fcn.140038bd8
test rax, rax
jne 0x14004bf12
mov rcx, rsi
call fcn.14002e0d0
mov rcx, rax
lea rdx, [r13 + 0x18]
xor r8d, r8d
call fcn.140033218
test rax, rax
je 0x14004bf2f
mov rbx, qword [rax + 8]
jmp 0x14004bf2f
test byte [rax + 0xf], 0x10
je 0x14004bf2b
mov rbx, qword [rax + 8]
movabs rax, 0xffffffffffffff
and rbx, rax
jmp 0x14004bf2f
mov rbx, qword [rax + 0x18]
mov rax, qword [rsp + 0x38]
test byte [rax], 0x40
je 0x14004c049
test dword [rbp + 0x1c], 0x200
je 0x14004c049
mov rax, qword [rbp + 0x68]
test rax, rax
je 0x14004c049
cmp qword [rax], 0
jne 0x14004c049
cmp rbx, qword [rax + 8]
je 0x14004bf70
test rbx, rbx
jne 0x14004c049
mov rdx, rbx
xor r9d, r9d
mov rbx, qword [rsp + 0xa8]
xor r8d, r8d
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
nop dword [rax + rax]
test eax, eax
je 0x14004bfd3
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
nop dword [rax + rax]
test eax, eax
je 0x14004bfd3
mov rdx, qword [0x1400bac90]
xor r9d, r9d
mov rcx, qword [rbx]
xor r8d, r8d
mov rsi, r14
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
nop dword [rax + rax]
xor r12d, r12d
test eax, eax
jne 0x14004c0e0
jmp 0x14004bfd6
xor r12d, r12d
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
test ecx, ecx
jns 0x14004c01b
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx edi, ax
mov rsi, r14
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
jns 0x14004c0e0
jmp 0x14004c020
mov edi, 0x80004005
mov r9d, edi
mov qword [rsp + 0x20], r12
mov r8d, 0x650
lea rdx, str.onecore_base_ntsetupopktoolsosimagelibmain_restoreworker.c
lea rcx, str.RestoreStreams
call fcn.140046874
mov rsi, r14
jmp 0x14004c0e0
mov rsi, r14
mov rbx, qword [rsp + 0xa8]
xor r12d, r12d
mov rcx, qword [rsp + 0x90]
lea rdx, [r13 + 0x18]
mov dword [rsp + 0x28], r12d
xor r9d, r9d
mov r8, rsi
mov qword [rsp + 0x20], rbx
call fcn.140046fd0
test eax, eax
jne 0x14004c0e0
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
test ecx, ecx
jns 0x14004c0ba
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
jns 0x14004c0e0
jmp 0x14004c0bf
mov edi, 0x80004005
mov r8d, 0x661
mov r9d, edi
mov qword [rsp + 0x20], r12
lea rdx, str.onecore_base_ntsetupopktoolsosimagelibmain_restoreworker.c
lea rcx, str.RestoreStreams
call fcn.140046874
test r15, r15
je 0x14004c105
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, r15
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
test rsi, rsi
je 0x14004c12a
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, rsi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
mov r13, qword [r13 + 0x30]
mov r14, qword [rsp + 0x98]
test edi, edi
jns 0x14004bd5b
mov rax, qword [rsp + 0xa0]
mov rcx, r14
mov edx, dword [rax + 0x1c]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
nop dword [rax + rax]
mov eax, edi
jmp 0x14004c15e
xor eax, eax
add rsp, 0x48
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret