Function at 0x140028c30
Capabilities:
Delete file
Get common file path
Move file
Read file on windows
Set file attributes
Write file on windows

Disassembly:
mov dword [rsp + 0x18], r8d
mov word [rsp + 0x10], dx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x8d0
lea rdx, [rsp + 0xa0]
mov rcx, qword [rsp + 0x8e0]
call fcn.1400287b0
lea rax, str.diskpt0.sys
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x8e0]
lea r8, str._s_s
mov edx, 0x105
lea rcx, [rsp + 0x420]
call fcn.1400026e0
movzx eax, word [0x14004bc58]
mov word [rsp + 0x310], ax
lea rax, [rsp + 0x312]
mov rdi, rax
xor eax, eax
mov ecx, 0x7e
rep stosb byte [rdi], al
mov r8, qword [rsp + 0x8e0]
mov edx, 0x40
lea rcx, [rsp + 0x310]
call fcn.140030bb0
cmp dword [rsp + 0xa4], 1
jne 0x140028cfb
mov eax, dword [rsp + 0xa0]
mov dword [rsp + 0x20], eax
lea r9, str.DpShadow
lea r8, str.._s_x
mov edx, 0x40
lea rcx, [rsp + 0x310]
call fcn.1400026e0
call fcn.140027e80
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, 3
mov edx, 1
lea rcx, [rsp + 0x310]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0xffffffffffffffff
jne 0x140028d7b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x70], eax
mov r8d, dword [rsp + 0x70]
lea rdx, [rsp + 0x310]
lea rcx, str.SdSetVolumeFlag:_CreateFile__s__failed__d_
call fcn.140029f10
call fcn.140027d70
mov ecx, dword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140029805
call fcn.140027d70
mov dword [rsp + 0x58], 0
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x58]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x18
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x70000
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x140028e00
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x74], eax
mov edx, dword [rsp + 0x74]
lea rcx, str.SdSetVolumeFlag:_IOCTL_DISK_GET_DRIVE_GEOMETRY_failed__d_
call fcn.140029f10
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [rsp + 0x74]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140029805
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x58]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x20
lea rax, [rsp + 0xc8]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x74004
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x140028eee
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x58]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x90
lea rax, [rsp + 0x840]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x70048
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x140028ede
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x94], eax
mov edx, dword [rsp + 0x94]
lea rcx, str.SdSetVolumeFlag:_IOCTL_DISK_GET_PARTITION_INFO_failed__d_
call fcn.140029f10
mov eax, dword [rsp + 0xc4]
mov rcx, qword [rsp + 0xb0]
imul rcx, rax
mov rax, rcx
mov ecx, dword [rsp + 0xc0]
imul rax, rcx
mov ecx, dword [rsp + 0xbc]
imul rax, rcx
mov qword [rsp + 0xd0], rax
jmp 0x140028eee
mov rax, qword [rsp + 0x850]
mov qword [rsp + 0xd0], rax
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0xc4], 0x1000
jbe 0x140028f24
lea rcx, str.SdSetVolumeFlag:_BytesPerSector_is_not_valid
call fcn.140029f10
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140029805
mov dword [rsp + 0x40], 0x1000
movabs rax, 0x100000000
cmp qword [rsp + 0xd0], rax
jle 0x140028f4a
mov eax, dword [rsp + 0x40]
shl eax, 1
mov dword [rsp + 0x40], eax
movabs rax, 0x200000000
cmp qword [rsp + 0xd0], rax
jle 0x140028f68
mov eax, dword [rsp + 0x40]
shl eax, 1
mov dword [rsp + 0x40], eax
movabs rax, 0x4000000000
cmp qword [rsp + 0xd0], rax
jle 0x140028f86
mov eax, dword [rsp + 0x40]
shl eax, 1
mov dword [rsp + 0x40], eax
movabs rax, 0x8000000000
cmp qword [rsp + 0xd0], rax
jle 0x140028fa4
mov eax, dword [rsp + 0x40]
shl eax, 1
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x48], 0
mov eax, dword [rsp + 0x40]
mov qword [rsp + 0xf0], rax
mov rax, qword [rsp + 0xd0]
cqo
mov rcx, qword [rsp + 0xf0]
idiv rcx
add rax, 8
mov dword [rsp + 0x48], eax
xor edx, edx
mov eax, dword [rsp + 0x48]
mov ecx, 8
div ecx
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x48]
inc eax
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x48]
add eax, 0xfff
xor edx, edx
mov ecx, 0x1000
div ecx
imul eax, eax, 0x1000
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x88], 0x800
mov eax, dword [rsp + 0xc4]
cmp rax, 0x2000
jbe 0x14002903e
mov eax, dword [rsp + 0xc4]
xor edx, edx
mov ecx, 4
div rcx
mov dword [rsp + 0x88], eax
mov qword [rsp + 0x50], 0xffffffffffffffff
cmp dword [rsp + 0xa4], 1
je 0x140029461
call fcn.140027e80
mov edx, 0x80
lea rcx, [rsp + 0x420]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80000006
mov dword [rsp + 0x20], 4
xor r9d, r9d
mov r8d, 3
mov edx, 0xc0000000
lea rcx, [rsp + 0x420]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0xffffffffffffffff
jne 0x14002920b
mov dword [rsp + 0x5c], 0
xor eax, eax
cmp eax, 1
je 0x140029190
cmp dword [rsp + 0x5c], 0
jne 0x1400290eb
lea r8, [rsp + 0x420]
lea rdx, str._s.bak
lea rcx, [rsp + 0x630]
call fcn.140026960
jmp 0x14002910c
mov r9d, dword [rsp + 0x5c]
lea r8, [rsp + 0x420]
lea rdx, str._s.bak._03d
lea rcx, [rsp + 0x630]
call fcn.140026960
lea rdx, [rsp + 0x630]
lea rcx, [rsp + 0x420]
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x140029128
jmp 0x140029190
mov eax, dword [rsp + 0x5c]
inc eax
mov dword [rsp + 0x5c], eax
cmp dword [rsp + 0x5c], 0x3e8
jb 0x14002918b
lea rcx, [rsp + 0x630]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea r9, [rsp + 0x630]
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x630]
call qword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea rcx, [rsp + 0x630]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea rdx, [rsp + 0x630]
lea rcx, [rsp + 0x420]
call qword [sym.imp.KERNEL32.dll_MoveFileW]
jmp 0x140029190
jmp 0x1400290bb
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80000006
mov dword [rsp + 0x20], 4
xor r9d, r9d
mov r8d, 3
mov edx, 0xc0000000
lea rcx, [rsp + 0x420]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0xffffffffffffffff
jne 0x14002920b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x78], eax
mov r8d, dword [rsp + 0x78]
lea rdx, [rsp + 0x420]
lea rcx, str.SdSetVolumeFlag:_CreateFile__s__failed__d_
call fcn.140029f10
call fcn.140027d70
mov ecx, dword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140029805
call fcn.140027d70
xor eax, eax
mov word [rsp + 0x6c], ax
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x58]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 2
lea r8, [rsp + 0x6c]
mov edx, 0x9c040
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [rsp + 0x44], 0
mov eax, dword [rsp + 0x40]
mov qword [rsp + 0xf8], rax
mov rax, qword [rsp + 0xd0]
cqo
mov rcx, qword [rsp + 0xf8]
idiv rcx
mov eax, eax
shl rax, 2
mov dword [rsp + 0x44], eax
mov eax, dword [rsp + 0x44]
xor edx, edx
mov ecx, 0x2000
div rcx
imul rax, rax, 0x2000
mov dword [rsp + 0x44], eax
mov eax, dword [rsp + 0x44]
add rax, 0x8000
mov dword [rsp + 0x44], eax
mov eax, dword [rsp + 0x8f0]
and eax, 3
test eax, eax
je 0x1400292c8
mov eax, dword [rsp + 0x44]
add eax, eax
mov dword [rsp + 0x44], eax
imul eax, dword [rsp + 0x48], 5
mov ecx, dword [rsp + 0x44]
lea eax, [rcx + rax + 0x1000]
mov dword [rsp + 0x44], eax
xor r9d, r9d
xor r8d, r8d
mov edx, dword [rsp + 0x44]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x14002933f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x7c], eax
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8d, dword [rsp + 0x7c]
lea rdx, [rsp + 0x420]
lea rcx, str.SdSetVolumeFlag:_SetEndOfFile__s__failed__d_
call fcn.140029f10
mov ecx, dword [rsp + 0x7c]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140029805
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x58]
mov r8d, 0x200
lea rdx, [rsp + 0x110]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400293c5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x80], eax
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8d, dword [rsp + 0x80]
lea rdx, [rsp + 0x420]
lea rcx, str.SdSetVolumeFlag:_ReadFile__s__failed__d_
call fcn.140029f10
mov ecx, dword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140029805
mov dword [rsp + 0x114], 0
mov dword [rsp + 0x11c], 0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x58]
mov r8d, 0x200
lea rdx, [rsp + 0x110]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140029461
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x84], eax
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8d, dword [rsp + 0x84]
lea rdx, [rsp + 0x420]
lea rcx, str.SdSetVolumeFlag:_WriteFile__s__failed__d_
call fcn.140029f10
mov ecx, dword [rsp + 0x84]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140029805
jmp 0x1400b5791
add rsp, 0x8d0
pop rdi
ret