Function at 0x180027b20
Capabilities:
Delete drive layout via ioctl
Get file size
Read file on windows
Write file on windows

Disassembly:
push rbx
push rbp
push r12
push r13
sub rsp, 0x888
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x870], rax
xor r13d, r13d
mov ebx, edx
xor r9d, r9d
mov qword [rsp + 0x30], r13
lea r8d, [r13 + 1]
mov edx, 0x80000000
mov dword [rsp + 0x28], r13d
mov r12d, r13d
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbp, rax
cmp rax, 0xffffffffffffffff
je 0x180027e51
lea rax, [rsp + 0x48]
test rax, rax
je 0x180027e48
lea rcx, [rsp + 0x48]
call fcn.180001a60
test eax, eax
je 0x180027e48
mov qword [rsp + 0x8c8], rdi
mov rdi, qword [rsp + 0x48]
lea r8d, [r13 + 1]
mov rcx, rdi
mov edx, ebx
call fcn.180002620
test eax, eax
je 0x180027e0b
lea rdx, [rsp + 0x54]
mov rcx, rbp
mov qword [rsp + 0x50], r13
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov qword [rsp + 0x38], r13
xor r9d, r9d
mov dword [rsp + 0x50], eax
mov rcx, qword [rdi + 0x30]
lea rax, [rsp + 0x44]
mov qword [rsp + 0x30], rax
xor r8d, r8d
mov edx, 0x7c100
mov dword [rsp + 0x28], r13d
lea r12d, [r13 + 1]
mov dword [rsp + 0x44], r13d
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov r11, qword [rsp + 0x50]
test r11, r11
je 0x180027e0b
mov qword [rsp + 0x8c0], rsi
mov qword [rsp + 0x880], r14
mov r14d, 0x800
nop
sub r11, 0xc
lea r9, [rsp + 0x44]
lea rdx, [rsp + 0x48]
mov r8d, 8
mov rcx, rbp
mov dword [rsp + 0x44], r13d
mov dword [rsp + 0x40], r13d
mov qword [rsp + 0x48], 0xffffffffffffffff
mov qword [rsp + 0x50], r11
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180027df8
cmp dword [rsp + 0x44], 8
jne 0x180027df8
lea r9, [rsp + 0x44]
lea rdx, [rsp + 0x40]
mov r8d, 4
mov rcx, rbp
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180027df8
cmp dword [rsp + 0x44], 4
jne 0x180027df8
mov ebx, dword [rsp + 0x40]
mov r11, qword [rsp + 0x50]
cmp r11, rbx
jb 0x180027df8
sub r11, rbx
mov qword [rsp + 0x50], r11
test ebx, ebx
je 0x180027ded
cmp ebx, r14d
lea r9, [rsp + 0x44]
lea rdx, [rsp + 0x70]
cmova ebx, r14d
mov rcx, rbp
mov qword [rsp + 0x20], r13
mov r8d, ebx
mov esi, ebx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180027de8
cmp dword [rsp + 0x44], esi
jne 0x180027de8
mov rcx, qword [rsp + 0x48]
mov ebx, dword [rsp + 0x40]
lea rax, [rsp + 0x64]
mov qword [rsp + 0x58], rcx
mov dword [rsp + 0x60], r13d
test rax, rax
je 0x180027dd7
bt dword [rdi + 0x10], 0x1f
jb 0x180027dd7
add rcx, qword [rdi + 0x28]
mov qword [rsp + 0x58], rcx
lea rax, [rcx + rbx]
cmp rax, qword [rdi + 0x18]
jbe 0x180027d5d
lea rdx, str.CachedDrive_Read:_Last_byte_to_read_is_out_of_drive._n
mov rcx, rdi
call fcn.180001970
mov ebx, dword [rsp + 0x40]
jmp 0x180027dd7
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [rsp + 0x58]
mov rcx, qword [rdi + 0x30]
lea r8, [rsp + 0x5c]
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x58], eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x180027d9e
lea rdx, str.CachedDrive_Read:_Error_positioning._n
mov rcx, rdi
call fcn.180001970
mov ebx, dword [rsp + 0x40]
jmp 0x180027dd7
mov rcx, qword [rdi + 0x30]
lea r9, [rsp + 0x60]
lea rdx, [rsp + 0x70]
mov r8d, ebx
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x180027dd3
lea rdx, str.CachedDrive_Read:_WriteFile_error._n
mov rcx, rdi
call fcn.180001970
mov ebx, dword [rsp + 0x40]
jmp 0x180027dd7
mov ebx, dword [rsp + 0x40]
add qword [rsp + 0x48], rsi
sub ebx, esi
mov dword [rsp + 0x40], ebx
jne 0x180027cd0
mov r11, qword [rsp + 0x50]
test r11, r11
jne 0x180027c30
jmp 0x180027dfb
mov r12d, r13d
mov rsi, qword [rsp + 0x8c0]
mov r14, qword [rsp + 0x880]
test rdi, rdi
je 0x180027e40
mov rcx, rdi
call fcn.180001b80
mov rcx, qword [rdi + 0x77]
test rcx, rcx
je 0x180027e2f
xor edx, edx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rdi, qword [rsp + 0x8c8]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, r12d
mov rcx, qword [rsp + 0x870]
xor rcx, rsp
call fcn.18002d590
add rsp, 0x888
pop r13
pop r12
pop rbp
pop rbx
ret