Function at 0x140009194
Capabilities:
Clear file content

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
sub rsp, 0x40
test byte [rcx + 0x28], 2
mov rdi, r8
mov rbx, rcx
jne 0x140009251
mov ecx, dword [rbx + 0x38]
mov al, byte [rbx + 0x28]
and al, 2
neg al
sbb r8d, r8d
and qword [rsp + 0x28], 0
and r8d, 2
mov dword [rsp + 0x20], ecx
mov rcx, qword [rbx + 0x18]
add r8d, 2
xor r9d, r9d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov rsi, rax
test rax, rax
je 0x1400092a3
test byte [rbx + 0x28], 0x10
jne 0x1400092c5
mov rbp, qword [rbx + 0x40]
mov ecx, dword [rbx + 0x38]
mov al, byte [rbx + 0x28]
and al, 2
mov qword [rsp + 0x28], rbp
neg al
mov qword [rsp + 0x20], rcx
mov rcx, rsi
sbb edx, edx
xor r9d, r9d
and edx, 0xf001b
xor r8d, r8d
add edx, 4
call qword [sym.imp.KERNEL32.dll_MapViewOfFileEx]
mov qword [rbx + 0x30], rax
test rax, rax
je 0x14007aab2
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test byte [rbx + 0x28], 2
jne 0x1400092b0
mov al, 1
mov rbx, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
pop rsi
pop rbp
ret
test dl, dl
je 0x1400091b0
xor eax, eax
lea r8, [rsp + 0x78]
mov dword [rsp + 0x64], eax
xor r9d, r9d
mov eax, dword [rcx + 0x38]
mov rcx, qword [rcx + 0x18]
mov dword [rsp + 0x60], eax
mov rdx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x1400092a3
cmp dword [rsp + 0x7c], 0
jne 0x1400092a3
mov eax, dword [rsp + 0x78]
cmp dword [rbx + 0x38], eax
jne 0x1400092a3
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1400091b0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rdi], eax
jmp 0x14007aaab
cmp byte [0x1401fcad4], 0
mov esi, dword [rbx + 0x38]
mov rdi, qword [rbx + 0x30]
je 0x140009242
jmp 0x14007aad4
and qword [rbx + 0x40], 0
xor ebp, ebp
jmp 0x1400091f8
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x140009244
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rdi], eax
call fcn.1400ba23c
test al, al
jne 0x1400091f8
cmp qword [rbx + 0x30], 0
jne 0x140009233
jmp 0x14007aaa2
mov rbx, qword [0x1401fcd90]
test rbx, rbx
jne 0x14007ab5c
lea rcx, str.kernel32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
test rax, rax
jne 0x14007ab09
cmp byte [0x1401fcad3], al
je 0x14007ab44
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.PrefetchVirtualMemory__:_failed_to_load_kernel32.dll__error_code__u_n
jmp 0x14007ab3d
lea rdx, str.PrefetchVirtualMemory
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1401fcd90], rax
mov rbx, rax
test rax, rax
jne 0x14007ab5c
cmp byte [0x1401fcad3], al
je 0x14007ab50
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.PrefetchVirtualMemory__:_GetProcAddress___failed___error_code__u_n
mov edx, eax
call fcn.1400084a0
mov rbx, qword [0x1401fcd90]
test rbx, rbx
jne 0x14007ab5c
mov byte [0x1401fcad4], 0
jmp 0x140009242
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x38], rsi
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
xor r9d, r9d
lea r8, [rsp + 0x30]
mov rcx, rax
lea edx, [r9 + 1]
call rbx
test eax, eax
jne 0x140009242
cmp byte [0x1401fcad3], al
je 0x140009242
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, [rsi + rdi]
mov rdx, rdi
mov r9d, eax
lea rcx, str.PrefetchVirtualMemory___on_range___p____p__failed__error_code__u_n
call fcn.1400084a0
nop
jmp 0x140009242