Function at 0x140071650
Capabilities:
Get disk size
Get file size
Get volume information via ioctl
Read file on windows
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x70]
sub rsp, 0x170
mov rax, qword [0x14017d2d8]
xor rax, rsp
mov qword [rbp + 0x60], rax
mov r13, rdx
mov qword [rsp + 0x48], rdx
mov r12, rcx
mov qword [rsp + 0x68], rcx
mov qword [rbp - 0x60], rcx
mov qword [rbp - 0x68], rdx
xor r14d, r14d
mov esi, r14d
cmp qword [rcx + 0x18], 8
jb 0x1400716a2
mov rcx, qword [rcx]
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80
lea r8d, [r9 + 7]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
mov qword [rsp + 0x78], rax
cmp rax, 0xffffffffffffffff
je 0x140071e9d
xorps xmm0, xmm0
movups xmmword [rbp - 0x58], xmm0
mov qword [rbp - 0x48], r14
mov qword [rbp - 0x40], r14
mov ebx, 2
cmp qword [r12 + 0x10], rbx
cmovb rbx, qword [r12 + 0x10]
mov r15, r12
cmp qword [r12 + 0x18], 8
jb 0x140071706
mov r15, qword [r12]
movabs r14, 0x7ffffffffffffffe
cmp rbx, r14
ja 0x140071f7d
mov qword [rbp - 0x40], 7
cmp rbx, 8
jae 0x140071748
mov qword [rbp - 0x48], rbx
add rbx, rbx
mov r8, rbx
mov rdx, r15
lea rcx, [rbp - 0x58]
call sub.VCRUNTIME140.dll_memcpy
xor r14d, r14d
mov word [rbp + rbx - 0x58], r14w
jmp 0x140071799
mov rax, rbx
or rax, 7
cmp rax, r14
ja 0x140071763
mov r14, rax
mov ecx, 0xa
cmp rax, rcx
cmovb r14, rcx
lea rdx, [r14 + 1]
call fcn.1400722c0
mov rdi, rax
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x48], rbx
mov qword [rbp - 0x40], r14
add rbx, rbx
mov r8, rbx
mov rdx, r15
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
xor r14d, r14d
mov word [rbx + rdi], r14w
mov rdi, qword [rsp + 0x78]
lea rcx, [rbp - 0x58]
cmp qword [rbp - 0x40], 8
cmovae rcx, qword [rbp - 0x58]
mov qword [rsp + 0x20], r14
xor r9d, r9d
lea r8, [rbp - 0x7c]
lea rdx, [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
test eax, eax
je 0x140071e44
mov ebx, dword [rbp - 0x80]
imul ebx, dword [rbp - 0x7c]
mov dword [rbp - 0x78], ebx
lea rdx, [rsp + 0x5c]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x58], eax
mov edi, ebx
mov rax, qword [rsp + 0x58]
cqo
idiv rdi
lea ebx, [rax + 2]
shl ebx, 4
mov ecx, ebx
call fcn.14013e044
mov r15, rax
mov qword [rsp + 0x70], rax
mov qword [rbp - 0x70], 0
mov qword [rsp + 0x38], r14
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], r15
mov r9d, 8
lea r8, [rbp - 0x70]
mov edx, 0x90073
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x140071b4a
lea r8, [rbp - 0x58]
lea rcx, [rbp - 0x38]
call fcn.140072090
mov rbx, rax
lea rax, [rbp - 0x58]
cmp rax, rbx
je 0x1400718c9
mov rdx, qword [rbp - 0x40]
cmp rdx, 8
jb 0x140071899
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140071894
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140071900
call fcn.14013e000
mov qword [rbp - 0x48], r14
mov qword [rbp - 0x40], 7
mov word [rbp - 0x58], r14w
movups xmm0, xmmword [rbx]
movups xmmword [rbp - 0x58], xmm0
movups xmm1, xmmword [rbx + 0x10]
movups xmmword [rbp - 0x48], xmm1
mov qword [rbx + 0x10], r14
mov qword [rbx + 0x18], 7
mov word [rbx], r14w
mov rdx, qword [rbp - 0x20]
cmp rdx, 8
jb 0x14007190c
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140071907
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140071907
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14013e000
lea rcx, [rbp - 0x58]
cmp qword [rbp - 0x40], 8
cmovae rcx, qword [rbp - 0x58]
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x140071b30
mov rax, qword [rsp + 0x48]
mov rcx, rax
cmp qword [rax + 0x18], 8
jb 0x14007195d
mov rcx, qword [rax]
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], 1
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x140071b12
xor r9d, r9d
lea r8, [rsp + 0x5c]
mov edx, dword [rsp + 0x58]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x140071b01
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x140071b01
mov rcx, rdi
call fcn.14013e044
mov r15, rax
mov rdx, qword [rsp + 0x70]
mov rcx, qword [rdx + 8]
xor r8d, r8d
mov eax, r8d
mov dword [rsp + 0x50], eax
cmp dword [rdx], r8d
jbe 0x140071af2
nop dword [rax]
nop word [rax + rax]
shl rax, 4
add rdx, rax
mov qword [rbp - 0x60], rdx
mov r12d, dword [rdx + 0x10]
mov rax, rdi
imul rax, qword [rdx + 0x18]
mov qword [rbp - 0x68], rax
mov rdx, rdi
imul rdx, rcx
mov qword [rsp + 0x60], rdx
mov ebx, r8d
sub r12d, ecx
je 0x140071ace
xor r9d, r9d
lea r8, [rbp - 0x64]
mov edx, eax
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x140071aab
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x54]
mov r8d, dword [rbp - 0x78]
mov rdx, r15
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140071ac3
xor r9d, r9d
lea r8, [rsp + 0x64]
mov edx, dword [rsp + 0x60]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x140071ac3
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov r8d, dword [rsp + 0x54]
mov rdx, r15
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140071ac3
mov rax, qword [rbp - 0x68]
add rax, rdi
mov qword [rbp - 0x68], rax
add qword [rsp + 0x60], rdi
jmp 0x140071ab7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov rax, qword [rbp - 0x68]
inc ebx
cmp ebx, r12d
jae 0x140071acb
jmp 0x140071a23
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
xor r8d, r8d
mov rcx, qword [rbp - 0x60]
mov rcx, qword [rcx + 0x10]
mov eax, dword [rsp + 0x50]
inc eax
mov dword [rsp + 0x50], eax
mov rdx, qword [rsp + 0x70]
cmp eax, dword [rdx]
jb 0x1400719f0
mov r12, qword [rsp + 0x68]
mov rcx, r15
call fcn.14013e000
mov r15, qword [rsp + 0x70]
jmp 0x140071b09
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r13, qword [rsp + 0x48]
xor r14d, r14d
mov rcx, r15
call fcn.14013e000
jmp 0x140071e4c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov r13, qword [rsp + 0x48]
mov rcx, r15
call fcn.14013e000
jmp 0x140071e4c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp eax, 0x26
jne 0x140071e3a
lea r8, [rbp - 0x58]
lea rcx, [rbp - 0x38]
call fcn.140072090
mov rbx, rax
lea rax, [rbp - 0x58]
cmp rax, rbx
je 0x140071be0
mov rdx, qword [rbp - 0x40]
cmp rdx, 8
jb 0x140071bb0
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140071bab
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140071c17
call fcn.14013e000
mov qword [rbp - 0x48], r14
mov qword [rbp - 0x40], 7
mov word [rbp - 0x58], r14w
movups xmm0, xmmword [rbx]
movups xmmword [rbp - 0x58], xmm0
movups xmm1, xmmword [rbx + 0x10]
movups xmmword [rbp - 0x48], xmm1
mov qword [rbx + 0x10], r14
mov qword [rbx + 0x18], 7
mov word [rbx], r14w
mov rdx, qword [rbp - 0x20]
cmp rdx, 8
jb 0x140071c23
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140071c1e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140071c1e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14013e000
lea rcx, [rbp - 0x58]
cmp qword [rbp - 0x40], 8
cmovae rcx, qword [rbp - 0x58]
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x140071e2f
xor edi, edi
mov qword [rsp + 0x38], rdi
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x60
lea rax, [rbp]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x90064
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x140071e11
lea rdx, [rbp - 0x38]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
je 0x140071e11
mov ebx, dword [rbp + 0x30]
add ebx, 0x10
mov eax, dword [rbp - 8]
mov dword [rsp + 0x48], eax
mov eax, dword [rbp - 0xc]
mov dword [rsp + 0x4c], eax
mov ecx, ebx
call fcn.14013e044
mov r15, rax
mov qword [rsp + 0x38], rdi
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], r15
lea r9d, [rdi + 8]
lea r8, [rsp + 0x48]
mov edx, 0x90068
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x140071e07
lea rcx, [r15 + 0xc]
movzx edx, word [rcx + 0x14]
add rdx, rcx
mov eax, dword [rcx + 0x18]
imul r8, rax, 0x38
add r8, rcx
cmp rdx, r8
jae 0x140071de4
nop word [rax + rax]
cmp dword [rdx], 0x80
je 0x140071d69
mov eax, dword [rdx + 4]
add rdx, rax
cmp rdx, r8
jb 0x140071d30
mov rcx, r15
call fcn.14013e000
mov r15, qword [rsp + 0x70]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r14d, r14d
mov rcx, r15
call fcn.14013e000
jmp 0x140071e4c
movzx ebx, word [rdx + 0x14]
add rbx, rdx
mov r12d, dword [rdx + 0x10]
je 0x140071ddf
mov rcx, r13
cmp qword [r13 + 0x18], 8
jb 0x140071d84
mov rcx, qword [r13]
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], 1
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140071ddf
xor eax, eax
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x40]
mov r8d, r12d
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140071dd6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r12, qword [rsp + 0x68]
mov rcx, r15
call fcn.14013e000
mov r15, qword [rsp + 0x70]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r14d, r14d
mov rcx, r15
call fcn.14013e000
jmp 0x140071e4c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x140071de4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r14d, r14d
mov rcx, r15
call fcn.14013e000
jmp 0x140071e4c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
xor r14d, r14d
mov rcx, r15
call fcn.14013e000
jmp 0x140071e4c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rdx, qword [rbp - 0x40]
cmp rdx, 8
jb 0x140071ea5
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140071e96
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140071e96
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14013e000
jmp 0x140071ea5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov rdx, qword [r12 + 0x18]
cmp rdx, 8
jb 0x140071ee6
mov rcx, qword [r12]
lea rdx, [rdx*2 + 2]
cmp rdx, 0x1000
jb 0x140071ee1
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140071f6f
mov rcx, r8
call fcn.14013e000
mov qword [r12 + 0x10], r14
mov qword [r12 + 0x18], 7
mov word [r12], r14w
mov rdx, qword [r13 + 0x18]
cmp rdx, 8
jb 0x140071f35
lea rdx, [rdx*2 + 2]
mov rcx, qword [r13]
cmp rdx, 0x1000
jb 0x140071f30
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140071f76
mov rcx, r8
call fcn.14013e000
mov qword [r13 + 0x10], r14
mov qword [r13 + 0x18], 7
mov word [r13], r14w
mov eax, esi
mov rcx, qword [rbp + 0x60]
xor rcx, rsp
call fcn.14013dfe0
mov rbx, qword [rsp + 0x1c0]
add rsp, 0x170
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call fcn.140071630
int3