Function at 0x1400117b0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x820
mov qword [rsp + 0x140], 0xfffffffffffffffe
mov rax, qword [0x14014dcf0]
xor rax, rsp
mov qword [rsp + 0x810], rax
mov edi, r8d
mov r13, rdx
mov rbx, rcx
mov qword [rsp + 0x58], rcx
mov qword [rsp + 0x50], rdx
mov dword [rsp + 0x44], r8d
cmp byte [rcx + 9], 0
jne 0x140011848
mov ecx, dword [rcx + 0x50]
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea r11, [0x1400cc930]
mov qword [rsp + 0x90], r11
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x98], eax
lea rax, str.VeraCrypt::File::Write:899
mov qword [rsp + 0xa0], rax
lea rdx, [0x140143380]
lea rcx, [rsp + 0x90]
call fcn.1400a5d24
nop
cmp byte [rcx + 8], 0
je 0x1400118bd
lea r8, [rcx + 0x28]
movzx edx, byte [rcx + 0x20]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], edi
mov rax, qword [rcx + 0x10]
mov qword [rsp + 0x20], rax
mov r9, r13
mov ecx, 1
call fcn.14000a430
mov ecx, dword [rsp + 0x40]
add qword [rbx + 0x10], rcx
cmp ecx, edi
je 0x140011bd6
lea r11, [0x1400cc930]
mov qword [rsp + 0x60], r11
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x68], eax
lea rax, str.VeraCrypt::File::Write:908
mov qword [rsp + 0x70], rax
lea rdx, [0x140143380]
lea rcx, [rsp + 0x60]
call fcn.1400a5d24
xor r15d, r15d
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x40]
mov rcx, qword [rcx + 0x18]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140011b90
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp eax, 0x57
jne 0x140011b51
cmp byte [rbx + 0x20], r15b
je 0x140011b51
cmp byte [rbx + 0xa], r15b
jne 0x140011b51
mov r14d, edi
and r14d, 0xfff
je 0x140011b51
mov r12d, edi
sub r12d, r14d
mov dword [rsp + 0x48], r15d
mov dword [rsp + 0x40], r15d
je 0x1400119ba
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x40]
mov r8d, r12d
mov rdx, r13
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1400119a1
mov ecx, dword [rsp + 0x40]
cmp ecx, r12d
je 0x14001198d
lea r11, [0x1400cc930]
mov qword [rsp + 0x108], r11
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x110], eax
lea rax, str.VeraCrypt::File::Write:926
mov qword [rsp + 0x118], rax
lea rdx, [0x140143380]
lea rcx, [rsp + 0x108]
call fcn.1400a5d24
mov eax, r12d
add r13, rax
mov qword [rsp + 0x50], r13
sub edi, r12d
mov dword [rsp + 0x44], edi
jmp 0x1400119b2
mov dword [rsp + 0x40], r15d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, dword [rsp + 0x40]
test ecx, ecx
je 0x140011acb
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x48]
mov r8d, 0x1000
lea rdx, [rbx + 0x54]
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140011b12
cmp dword [rsp + 0x48], 0x1000
jne 0x140011b12
mov r9d, 1
xor r8d, r8d
mov rdx, 0xfffffffffffff000
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x140011a4b
lea r11, [0x1400cc930]
mov qword [rsp + 0xd8], r11
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0xe0], eax
lea rax, str.VeraCrypt::File::Write:943
mov qword [rsp + 0xe8], rax
lea rdx, [0x140143380]
lea rcx, [rsp + 0xd8]
call fcn.1400a5d24
mov r8d, r14d
mov rdx, r13
lea rcx, [rbx + 0x54]
call fcn.1400a4990
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x40]
mov r8d, 0x1000
lea rdx, [rbx + 0x54]
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140011ac3
cmp dword [rsp + 0x40], 0x1000
je 0x140011bd6
lea r11, [0x1400cc930]
mov qword [rsp + 0x78], r11
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x80], eax
lea rax, str.VeraCrypt::File::Write:949
mov qword [rsp + 0x88], rax
lea rdx, [0x140143380]
lea rcx, [rsp + 0x78]
call fcn.1400a5d24
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea r11, [0x1400cc930]
mov qword [rsp + 0xc0], r11
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0xc8], eax
lea rax, str.VeraCrypt::File::Write:961
mov qword [rsp + 0xd0], rax
lea rdx, [0x140143380]
lea rcx, [rsp + 0xc0]
call fcn.1400a5d24
lea r11, [0x1400cc930]
mov qword [rsp + 0xf0], r11
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0xf8], eax
lea rax, str.VeraCrypt::File::Write:941
mov qword [rsp + 0x100], rax
lea rdx, [0x140143380]
lea rcx, [rsp + 0xf0]
call fcn.1400a5d24
lea r11, [0x1400cc930]
mov qword [rsp + 0x120], r11
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x128], eax
lea rax, str.VeraCrypt::File::Write:965
mov qword [rsp + 0x130], rax
lea rdx, [0x140143380]
lea rcx, [rsp + 0x120]
call fcn.1400a5d24
cmp dword [rsp + 0x40], edi
je 0x140011bd6
lea r11, [0x1400cc930]
mov qword [rsp + 0xa8], r11
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0xb0], eax
lea rax, str.VeraCrypt::File::Write:968
mov qword [rsp + 0xb8], rax
lea rdx, [0x140143380]
lea rcx, [rsp + 0xa8]
call fcn.1400a5d24
nop
mov rcx, qword [rsp + 0x810]
xor rcx, rsp
call fcn.1400a4e70
add rsp, 0x820
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret