Function at 0x18007ffc0
Capabilities:
Clear file content

Disassembly:
mov qword [rsp + 0x18], r8
push rdi
push r14
sub rsp, 0x78
mov rdi, rdx
mov r14, rcx
test rcx, rcx
jne 0x18007ffe4
mov eax, 0xfffffffe
add rsp, 0x78
pop r14
pop rdi
ret
mov qword [rcx], 0xffffffffffffffff
test rdx, rdx
je 0x18007ffd7
lea rcx, [rsp + 0xa0]
call fcn.18006c0b0
test eax, eax
js 0x1800802cd
mov rdx, qword [rsp + 0xa0]
mov qword [rsp + 0xa8], rbp
mov qword [rsp + 0x68], r12
mov rax, rdx
mov r12d, 3
and eax, 0x700
lea r9d, [r12 + 2]
cmp rax, 0x100
je 0x180080073
cmp rax, 0x200
je 0x18008006c
cmp rax, 0x300
je 0x180080065
cmp rax, 0x700
je 0x180080057
lea eax, [r12 - 5]
jmp 0x1800802c0
bt rdx, 0xc
mov ebp, r12d
cmovb ebp, r9d
jmp 0x180080078
mov ebp, 2
jmp 0x180080078
mov ebp, 1
jmp 0x180080078
mov ebp, 4
mov rcx, rdx
mov qword [rsp + 0x98], rbx
and ecx, r12d
mov eax, ecx
dec rax
je 0x1800800c1
dec rax
je 0x1800800ae
dec rax
jne case.0x18008014b.17
mov rbx, rdx
shr rbx, 1
not ebx
and ebx, 2
or ebx, 0x12019d
jmp 0x1800800c6
mov rbx, rdx
shr rbx, 1
not ebx
and ebx, 2
or ebx, 0x120114
jmp 0x1800800c6
mov ebx, 0x120089
cmp ebp, r9d
jne 0x1800800cf
bts ebx, 0x1e
mov rax, rdx
and eax, 0x30000
cmp rax, 0x10000
je 0x180080112
cmp rax, 0x20000
je 0x18008010a
cmp rax, 0x30000
je 0x180080102
dec rcx
je 0x180080112
dec rcx
je 0x18008010a
dec rcx
jne case.0x18008014b.17
or ebx, 0x100180
jmp 0x180080118
or ebx, 0x100100
jmp 0x180080118
or ebx, 0x100080
mov rax, rdx
and eax, 0xf0
add rax, 0xfffffffffffffff0
cmp rax, 0xb0
ja case.0x18008014b.17
lea r8, [0x180000000]
movzx eax, byte [r8 + rax + 0x8033c]
mov ecx, dword [r8 + rax*4 + 0x80318]
add rcx, r8
jmp rcx
mov r12d, 2
jmp case.0x18008014b.128
mov r12d, 1
jmp case.0x18008014b.128
xor r12d, r12d
jmp case.0x18008014b.128
mov r12d, 7
jmp case.0x18008014b.128
mov r12d, 6
jmp case.0x18008014b.128
mov r12d, r9d
jmp case.0x18008014b.128
mov r12d, 4
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x60], r13
xor r13d, r13d
bt rdx, 0xd
jae 0x1800801ab
mov qword [rsp + 0x48], r13
mov dword [rsp + 0x40], 0x18
mov dword [rsp + 0x50], 1
lea r13, [rsp + 0x40]
bt rdx, 0xf
mov esi, 0x80
mov eax, 0x80000080
cmovb esi, eax
bt rdx, 0x12
jae 0x1800801c8
bts esi, 0x1e
bt rdx, 0x13
jae 0x1800801d6
bts esi, 0x1d
and ebx, 0xfffffffb
lea r8, str.D:_tinderboxwin_4.2_srcVBoxRuntime_r3win_fileio_win.cpp
lea rdx, [rsp + 0x90]
mov rcx, rdi
call sym.VBoxRT.dll_RTStrToUtf16Tag
mov edi, eax
test eax, eax
js 0x1800802ae
mov rcx, qword [rsp + 0x90]
mov qword [rsp + 0x30], 0
mov r9, r13
mov r8d, r12d
mov edx, ebx
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], ebp
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1800802ef
cmp ebp, 2
je 0x180080264
cmp ebp, 1
je 0x180080264
cmp ebp, 4
jne 0x180080244
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x180080264
mov rax, qword [rsp + 0xa0]
and eax, 0x1700
cmp rax, 0x1100
jne 0x180080298
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
jmp 0x180080285
test qword [rsp + 0xa0], 0x800
je 0x180080298
mov rcx, qword [rsp + 0x90]
mov edx, 0x2000
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x180080298
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call sym.VBoxRT.dll_RTErrConvertFromWin32
mov edi, eax
test edi, edi
js 0x1800802d5
mov rcx, qword [rsp + 0x90]
mov qword [r14], rbx
call sym.VBoxRT.dll_RTUtf16Free
xor eax, eax
mov rsi, qword [rsp + 0x70]
mov r13, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x98]
mov rbp, qword [rsp + 0xa8]
mov r12, qword [rsp + 0x68]
add rsp, 0x78
pop r14
pop rdi
ret
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x90]
call sym.VBoxRT.dll_RTUtf16Free
mov eax, edi
jmp 0x1800802ae
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call sym.VBoxRT.dll_RTErrConvertFromWin32
mov rcx, qword [rsp + 0x90]
mov edi, eax
call sym.VBoxRT.dll_RTUtf16Free
mov eax, edi
jmp 0x1800802ae
mov eax, 0xfffffffe
jmp 0x1800802b8