Function at 0x140031f60
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 + 0xf0]
mov rcx, qword [rsp + 0x8e0]
call fcn.140032e00
lea rdx, [0x140041420]
mov qword [rsp + 0x20], rdx
mov r9, qword [rsp + 0x8e0]
lea r8, str._s_s
mov edx, 0x105
lea rcx, [rsp + 0x100]
call fcn.14001d240
movzx edx, word [0x140040cd4]
mov word [rsp + 0x70], dx
lea rdi, [rsp + 0x72]
xor eax, eax
mov ecx, 0x7e
rep stosb byte [rdi], al
mov r8, qword [rsp + 0x8e0]
mov edx, 0x40
lea rcx, [rsp + 0x70]
call fcn.14001d538
cmp dword [rsp + 0xf4], 1
jne 0x14003201c
mov eax, dword [rsp + 0xf0]
mov dword [rsp + 0x20], eax
lea r9, str.DpShadow
lea r8, str.._s_x
mov edx, 0x40
lea rcx, [rsp + 0x70]
call fcn.14001d240
call fcn.140033830
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 + 0x70]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0xffffffffffffffff
jne 0x14003209f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x544], eax
mov r8d, dword [rsp + 0x544]
lea rdx, [rsp + 0x70]
lea rcx, [0x140041460]
call fcn.1400356f0
call fcn.140033970
mov ecx, dword [rsp + 0x544]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140032b9f
call fcn.140033970
mov dword [rsp + 0x33c], 0
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x33c]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x18
lea rax, [rsp + 0x320]
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 0x140032133
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x548], eax
mov edx, dword [rsp + 0x548]
lea rcx, str.SdSetVolumeFlag:_IOCTL_DISK_GET_DRIVE_GEOMETRY_failed__d_
call fcn.1400356f0
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [rsp + 0x548]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140032b9f
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x33c]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x20
lea rax, [rsp + 0x40]
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 0x14003221b
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x33c]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x90
lea rax, [rsp + 0x550]
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 0x14003220e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x5e0], eax
mov edx, dword [rsp + 0x5e0]
lea rcx, str.SdSetVolumeFlag:_IOCTL_DISK_GET_PARTITION_INFO_failed__d_
call fcn.1400356f0
mov edx, dword [rsp + 0x334]
mov rax, qword [rsp + 0x320]
imul rax, rdx
mov ecx, dword [rsp + 0x330]
imul rax, rcx
mov ecx, dword [rsp + 0x32c]
imul rax, rcx
mov qword [rsp + 0x48], rax
jmp 0x14003221b
mov rax, qword [rsp + 0x560]
mov qword [rsp + 0x48], rax
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x334], 0x1000
jbe 0x140032251
lea rcx, str.SdSetVolumeFlag:_BytesPerSector_is_not_valid
call fcn.1400356f0
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140032b9f
mov dword [rsp + 0x338], 0x1000
movabs rax, 0x100000000
cmp qword [rsp + 0x48], rax
jle 0x14003227d
mov eax, dword [rsp + 0x338]
shl eax, 1
mov dword [rsp + 0x338], eax
movabs rax, 0x200000000
cmp qword [rsp + 0x48], rax
jle 0x14003229e
mov eax, dword [rsp + 0x338]
shl eax, 1
mov dword [rsp + 0x338], eax
movabs rax, 0x4000000000
cmp qword [rsp + 0x48], rax
jle 0x1400322bf
mov eax, dword [rsp + 0x338]
shl eax, 1
mov dword [rsp + 0x338], eax
movabs rax, 0x8000000000
cmp qword [rsp + 0x48], rax
jle 0x1400322e0
mov eax, dword [rsp + 0x338]
shl eax, 1
mov dword [rsp + 0x338], eax
mov dword [rsp + 0x540], 0
mov ecx, dword [rsp + 0x338]
mov rax, qword [rsp + 0x48]
cqo
idiv rcx
add rax, 8
mov dword [rsp + 0x540], eax
xor edx, edx
mov eax, dword [rsp + 0x540]
mov ecx, 8
div ecx
mov dword [rsp + 0x540], eax
mov eax, dword [rsp + 0x540]
add eax, 1
mov dword [rsp + 0x540], eax
mov eax, dword [rsp + 0x540]
add eax, 0xfff
xor edx, edx
mov ecx, 0x1000
div ecx
imul eax, eax, 0x1000
mov dword [rsp + 0x540], eax
mov dword [rsp + 0x318], 0x800
mov eax, dword [rsp + 0x334]
cmp rax, 0x2000
jbe 0x140032383
mov eax, dword [rsp + 0x334]
xor edx, edx
mov ecx, 4
div rcx
mov dword [rsp + 0x318], eax
mov qword [rsp + 0x310], 0xffffffffffffffff
cmp dword [rsp + 0xf4], 1
je 0x14003281d
call fcn.140033830
mov edx, 0x80
lea rcx, [rsp + 0x100]
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 + 0x100]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x310], rax
cmp qword [rsp + 0x310], 0xffffffffffffffff
jne 0x14003257b
mov dword [rsp + 0x800], 0
xor eax, eax
cmp eax, 1
je 0x1400324f1
cmp dword [rsp + 0x800], 0
jne 0x14003243f
lea r8, [rsp + 0x100]
lea rdx, str._s.bak
lea rcx, [rsp + 0x5f0]
call fcn.140035650
jmp 0x140032463
mov r9d, dword [rsp + 0x800]
lea r8, [rsp + 0x100]
lea rdx, str._s.bak._03d
lea rcx, [rsp + 0x5f0]
call fcn.140035650
lea rdx, [rsp + 0x5f0]
lea rcx, [rsp + 0x100]
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x14003247f
jmp 0x1400324f1
mov eax, dword [rsp + 0x800]
add eax, 1
mov dword [rsp + 0x800], eax
cmp dword [rsp + 0x800], 0x3e8
jb 0x1400324ec
lea rcx, [rsp + 0x5f0]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea r9, [rsp + 0x5f0]
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x5f0]
call qword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea rcx, [rsp + 0x5f0]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea rdx, [rsp + 0x5f0]
lea rcx, [rsp + 0x100]
call qword [sym.imp.KERNEL32.dll_MoveFileW]
jmp 0x1400324f1
jmp 0x14003240c
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 + 0x100]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x310], rax
cmp qword [rsp + 0x310], 0xffffffffffffffff
jne 0x14003257b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x804], eax
mov r8d, dword [rsp + 0x804]
lea rdx, [rsp + 0x100]
lea rcx, str.SdSetVolumeFlag:_CreateFile__s__failed__d_
call fcn.1400356f0
call fcn.140033970
mov ecx, dword [rsp + 0x804]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140032b9f
call fcn.140033970
xor edx, edx
mov word [rsp + 0x5e8], dx
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x33c]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 2
lea r8, [rsp + 0x5e8]
mov edx, 0x9c040
mov rcx, qword [rsp + 0x310]
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [rsp + 0x5e4], 0
mov ecx, dword [rsp + 0x338]
mov rax, qword [rsp + 0x48]
cqo
idiv rcx
mov eax, eax
shl rax, 2
mov dword [rsp + 0x5e4], eax
mov eax, dword [rsp + 0x5e4]
xor edx, edx
mov ecx, 0x2000
div rcx
imul rax, rax, 0x2000
mov dword [rsp + 0x5e4], eax
mov eax, dword [rsp + 0x5e4]
add rax, 0x8000
mov dword [rsp + 0x5e4], eax
mov eax, dword [rsp + 0x8f0]
and eax, 3
test eax, eax
je 0x14003264c
mov eax, dword [rsp + 0x5e4]
add eax, eax
mov dword [rsp + 0x5e4], eax
mov ecx, dword [rsp + 0x540]
imul ecx, ecx, 5
mov eax, dword [rsp + 0x5e4]
lea eax, [rax + rcx + 0x1000]
mov dword [rsp + 0x5e4], eax
xor r9d, r9d
xor r8d, r8d
mov edx, dword [rsp + 0x5e4]
mov rcx, qword [rsp + 0x310]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, qword [rsp + 0x310]
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1400326e3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x808], eax
mov rcx, qword [rsp + 0x310]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8d, dword [rsp + 0x808]
lea rdx, [rsp + 0x100]
lea rcx, str.SdSetVolumeFlag:_SetEndOfFile__s__failed__d_
call fcn.1400356f0
mov ecx, dword [rsp + 0x808]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140032b9f
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x310]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x33c]
mov r8d, 0x200
lea rdx, [rsp + 0x340]
mov rcx, qword [rsp + 0x310]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140032775
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x80c], eax
mov rcx, qword [rsp + 0x310]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8d, dword [rsp + 0x80c]
lea rdx, [rsp + 0x100]
lea rcx, str.SdSetVolumeFlag:_ReadFile__s__failed__d_
call fcn.1400356f0
mov ecx, dword [rsp + 0x80c]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140032b9f
mov dword [rsp + 0x344], 0
mov dword [rsp + 0x34c], 0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x310]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x33c]
mov r8d, 0x200
lea rdx, [rsp + 0x340]
mov rcx, qword [rsp + 0x310]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x14003281d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x810], eax
mov rcx, qword [rsp + 0x310]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8d, dword [rsp + 0x810]
lea rdx, [rsp + 0x100]
lea rcx, [0x140041770]
call fcn.1400356f0
mov ecx, dword [rsp + 0x810]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140032b9f
jmp 0x1400c1478
add rsp, 0x8d0
pop rdi
ret