Function at 0x140097a20
Capabilities:
Get disk size
Get file size
Read file on windows

Disassembly:
push rbp
push rsi
push rdi
push r13
push r15
lea rbp, [rsp - 0x1c0]
sub rsp, 0x2c0
mov rax, qword [0x140136e20]
xor rax, rsp
mov qword [rbp + 0x1a0], rax
xor esi, esi
mov r15, rdx
mov r13, rcx
mov dword [rsp + 0x44], esi
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor edx, edx
mov r8d, eax
mov ecx, 0x1f0fff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
test rax, rax
je 0x140097adb
lea r8, [rsp + 0x48]
mov edx, 0xf01ff
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
lea r8, [rsp + 0x50]
lea rdx, str.SeManageVolumePrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov rcx, qword [rsp + 0x50]
mov dword [rsp + 0x58], 1
mov qword [rsp + 0x5c], rcx
mov rcx, rdi
mov dword [rsp + 0x64], 2
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x48]
lea r8, [rsp + 0x58]
xor r9d, r9d
xor edx, edx
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x140097aed
or eax, 0xffffffff
jmp 0x140097d09
xor r9d, r9d
mov qword [rsp + 0x30], rsi
mov edx, 0xc0000000
lea r8d, [r9 + 7]
mov rcx, r13
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x300], rbx
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x140097b2b
or eax, eax
jmp 0x140097d01
lea rax, [rbp - 0x70]
mov rdi, r13
mov edx, 0x104
sub rdi, rax
lea rcx, [rbp - 0x70]
nop
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x140097b63
movzx eax, word [rdi + rcx]
test ax, ax
je 0x140097b63
mov word [rcx], ax
add rcx, 2
dec rdx
jne 0x140097b40
jmp 0x140097b68
test rdx, rdx
jne 0x140097b6c
sub rcx, 2
mov word [rcx], si
lea rcx, [rbp - 0x70]
call qword [sym.imp.SHLWAPI.dll_PathStripToRootW]
lea r8, [rsp + 0x40]
lea rcx, [rbp - 0x70]
xor r9d, r9d
xor edx, edx
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
test eax, eax
je 0x140097cf4
xor edx, edx
mov rcx, rbx
mov qword [rsp + 0x2b8], r12
call qword [sym.imp.KERNEL32.dll_GetFileSize]
or rcx, 0xffffffffffffffff
mov rdi, r13
mov r12d, eax
xor eax, eax
mov rdx, r13
repne scasw ax, word [rdi]
mov qword [rbp - 0x80], 7
mov qword [rsp + 0x78], rsi
not rcx
mov word [rsp + 0x68], si
lea r8, [rcx - 1]
lea rcx, [rsp + 0x68]
call fcn.140009a30
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x68]
call fcn.140097390
cmp qword [rbp - 0x80], 8
jb 0x140097c02
mov rcx, qword [rsp + 0x68]
call fcn.14004b088
mov rdi, qword [rsp + 0x48]
cmp rdi, r12
jle 0x140097cec
mov rcx, r13
mov qword [rsp + 0x2b0], r14
call fcn.140097250
mov ecx, dword [rsp + 0x40]
xor r9d, r9d
mov r14d, eax
mov rax, rdi
xor r8d, r8d
cqo
idiv rcx
mov rdx, rdi
mov rcx, rbx
mov r13, rax
sub r13d, r14d
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFileValidData]
imul r14d, dword [rsp + 0x40]
cmp r14d, r12d
jbe 0x140097cbd
xor r9d, r9d
xor r8d, r8d
mov edx, r14d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
imul r13d, dword [rsp + 0x40]
mov ecx, r13d
call fcn.14004af90
mov rdi, rax
test rax, rax
je 0x140097cbd
lea r9, [rsp + 0x44]
mov r8d, r13d
mov rdx, rax
mov rcx, rbx
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov r9d, dword [rsp + 0x44]
mov r8, rdi
mov edx, 0x1000
mov rcx, r15
call fcn.14004c014
xor r9d, r9d
xor r8d, r8d
mov edx, r12d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov rdx, r12
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFileValidData]
mov r14, qword [rsp + 0x2b0]
mov r12, qword [rsp + 0x2b8]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x44]
mov rbx, qword [rsp + 0x300]
mov rcx, qword [rbp + 0x1a0]
xor rcx, rsp
call fcn.14004ae00
add rsp, 0x2c0
pop r15
pop r13
pop rdi
pop rsi
pop rbp
ret