Function at 0x140106930
Capabilities:
Get disk information
Get file size
Read file on windows
Set file attributes
Write file on windows

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
mov eax, 0x14dd0
call fcn.1401d5c30
sub rsp, rax
mov rax, qword [0x1402a25c0]
xor rax, rsp
mov qword [rsp + 0x14dc8], rax
mov rcx, qword [rsp + 0x14de0]
call fcn.1400f8fa0
mov edi, eax
mov rcx, qword [rsp + 0x14de8]
call fcn.1400f8fa0
cmp edi, eax
je 0x1401069c1
mov rcx, qword [rsp + 0x14de0]
call fcn.1400f8fa0
cmp eax, 8
jne 0x1401069c1
mov dword [rsp + 0x20], 1
mov r9d, 1
mov r8, qword [rsp + 0x14df0]
mov rdx, qword [rsp + 0x14de8]
mov rcx, qword [rsp + 0x14de0]
call fcn.140105ef0
jmp 0x1401073ec
mov dword [rsp + 0x8e0], 0
mov dword [rsp + 0x270], 1
lea r9, [rsp + 0x490]
lea r8, [rsp + 0x50]
mov edx, 0x104
mov rcx, qword [rsp + 0x14de0]
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
jne 0x140106a02
xor eax, eax
jmp 0x1401073ec
lea rax, [rsp + 0x8f0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x6e0]
lea r8, [rsp + 0x4e0]
lea rdx, [rsp + 0x268]
lea rcx, [rsp + 0x50]
call fcn.1400ab94c
lea rcx, [rsp + 0x268]
call fcn.1400a81f4
test rax, rax
je 0x140106aca
lea rdx, [0x1402199c8]
lea rcx, [rsp + 0x268]
call fcn.1400a9434
mov dword [rsp + 0x38], 0x104
lea rax, [rsp + 0xaf0]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x274]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x4a0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x260]
mov r8d, 0x104
lea rdx, [rsp + 0x280]
lea rcx, [rsp + 0x268]
call qword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
test eax, eax
jne 0x140106ab9
xor eax, eax
jmp 0x1401073ec
mov eax, dword [rsp + 0x274]
and eax, 0x40
mov dword [rsp + 0x270], eax
cmp dword [rsp + 0x270], 0
je 0x140106bcb
lea r9, [rsp + 0x490]
lea r8, [rsp + 0x50]
mov edx, 0x104
mov rcx, qword [rsp + 0x14de8]
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
jne 0x140106b03
xor eax, eax
jmp 0x1401073ec
lea rax, [rsp + 0x8f0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x6e0]
lea r8, [rsp + 0x4e0]
lea rdx, [rsp + 0x268]
lea rcx, [rsp + 0x50]
call fcn.1400ab94c
lea rcx, [rsp + 0x268]
call fcn.1400a81f4
test rax, rax
je 0x140106bcb
lea rdx, [0x1402199cc]
lea rcx, [rsp + 0x268]
call fcn.1400a9434
mov dword [rsp + 0x38], 0x104
lea rax, [rsp + 0xaf0]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x274]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x4a0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x260]
mov r8d, 0x104
lea rdx, [rsp + 0x280]
lea rcx, [rsp + 0x268]
call qword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
test eax, eax
jne 0x140106bba
xor eax, eax
jmp 0x1401073ec
mov eax, dword [rsp + 0x274]
and eax, 0x40
mov dword [rsp + 0x270], eax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x8000000
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, 1
mov edx, 0x80000000
mov rcx, qword [rsp + 0x14de0]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x498], rax
cmp qword [rsp + 0x498], 0xffffffffffffffff
jne 0x140106c1a
xor eax, eax
jmp 0x1401073ec
lea rdx, [rsp + 0x4a8]
mov rcx, qword [rsp + 0x498]
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x140106c49
mov rcx, qword [rsp + 0x498]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1401073ec
cmp dword [rsp + 0x270], 0
je 0x140106c70
mov eax, dword [rsp + 0x4a8]
and eax, 0x200
test eax, eax
je 0x140106c70
mov dword [rsp + 0x14dc0], 1
jmp 0x140106c7b
mov dword [rsp + 0x14dc0], 0
mov eax, dword [rsp + 0x14dc0]
mov dword [rsp + 0x270], eax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x8000080
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov r8d, 1
mov edx, 0x40000000
mov rcx, qword [rsp + 0x14de8]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0xd00], rax
cmp qword [rsp + 0xd00], 0xffffffffffffffff
jne 0x140106ce6
mov rcx, qword [rsp + 0x498]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1401073ec
cmp qword [rsp + 0x14df0], 0
je 0x140106d0d
mov r9d, 0x640000
xor r8d, r8d
mov edx, 0x401
mov rcx, qword [rsp + 0x14df0]
call qword [sym.imp.USER32.dll_SendMessageW]
cmp dword [rsp + 0x270], 0
je 0x140107127
lea rdx, [rsp + 0xd14]
mov rcx, qword [rsp + 0x498]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0xd10], eax
cmp dword [rsp + 0xd10], 0xffffffff
jne 0x140106d7c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x8e4], eax
cmp dword [rsp + 0x8e4], 0
je 0x140106d7c
mov rcx, qword [rsp + 0x498]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0xd00]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1401073ec
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0xd08]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 0x900c4
mov rcx, qword [rsp + 0xd00]
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x140106de3
mov rcx, qword [rsp + 0x498]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0xd00]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1401073ec
mov qword [rsp + 0xd28], 0
mov rax, qword [rsp + 0xd10]
mov qword [rsp + 0xd30], rax
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0xd38]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x4000
lea rax, [rsp + 0xd40]
mov qword [rsp + 0x20], rax
mov r9d, reloc.OLEAUT32.dll_SafeArrayGetDim
lea r8, [rsp + 0xd28]
mov edx, 0x940cf
mov rcx, qword [rsp + 0x498]
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [rsp + 0xd18], eax
cmp dword [rsp + 0xd18], 0
jne 0x140106e99
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x8e4], eax
cmp dword [rsp + 0x8e4], 0xea
je 0x140106e99
mov rcx, qword [rsp + 0x498]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0xd00]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1401073ec
mov eax, dword [rsp + 0xd38]
xor edx, edx
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
div rcx
mov dword [rsp + 0xd20], eax
mov dword [rsp + 0xd1c], 0
jmp 0x140106ecf
mov eax, dword [rsp + 0xd1c]
add eax, 1
mov dword [rsp + 0xd1c], eax
mov eax, dword [rsp + 0xd20]
cmp dword [rsp + 0xd1c], eax
jae 0x14010700d
mov r9d, dword [rsp + 0xd1c]
imul r9, r9, 0x10
mov r8d, dword [rsp + 0xd1c]
imul r8, r8, 0x10
mov rax, qword [rsp + 0x14df0]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0xd10]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + r9 + 0xd48]
mov r8, qword [rsp + r8 + 0xd40]
mov rdx, qword [rsp + 0xd00]
mov rcx, qword [rsp + 0x498]
call fcn.1400f7f00
test eax, eax
jne 0x140106f61
mov rcx, qword [rsp + 0x498]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0xd00]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1401073ec
cmp qword [rsp + 0x14df0], 0
je 0x140107008
cmp qword [rsp + 0xd10], 0
je 0x140106fc8
mov eax, dword [rsp + 0xd1c]
imul rax, rax, 0x10
mov ecx, dword [rsp + 0xd1c]
imul rcx, rcx, 0x10
mov rax, qword [rsp + rax + 0xd40]
add rax, qword [rsp + rcx + 0xd48]
imul rax, rax, 0x64
cqo
idiv qword [rsp + 0xd10]
xor r9d, r9d
mov r8, rax
mov edx, 0x402
mov rcx, qword [rsp + 0x14df0]
call qword [sym.imp.USER32.dll_SendMessageW]
mov dword [rsp + 0x20], 1
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x4d40]
call qword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x140107008
lea rcx, [rsp + 0x4d40]
call qword [sym.imp.USER32.dll_TranslateMessage]
lea rcx, [rsp + 0x4d40]
call qword [sym.imp.USER32.dll_DispatchMessageW]
jmp 0x140106fc8
jmp 0x140106ebe
cmp dword [rsp + 0xd18], 0
jne 0x140107074
cmp dword [rsp + 0xd20], 0
jbe 0x140107074
mov eax, dword [rsp + 0xd20]
sub eax, 1
mov edx, eax
imul rdx, rdx, 0x10
mov eax, dword [rsp + 0xd20]
sub eax, 1
mov ecx, eax
imul rcx, rcx, 0x10
mov rax, qword [rsp + rdx + 0xd40]
add rax, qword [rsp + rcx + 0xd48]
mov qword [rsp + 0xd28], rax
mov rcx, qword [rsp + 0xd28]
mov rax, qword [rsp + 0xd10]
sub rax, rcx
mov qword [rsp + 0xd30], rax
cmp dword [rsp + 0xd18], 0
je 0x140106dff
xor r9d, r9d
lea r8, [rsp + 0xd14]
mov edx, dword [rsp + 0xd10]
mov rcx, qword [rsp + 0xd00]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x8e4], eax
cmp dword [rsp + 0x8e4], 0xffffffff
jne 0x1401070ed
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x8e4], eax
cmp dword [rsp + 0x8e4], 0
je 0x1401070ed
mov rcx, qword [rsp + 0x498]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0xd00]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1401073ec
mov rcx, qword [rsp + 0xd00]
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140107122
mov rcx, qword [rsp + 0x498]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0xd00]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1401073ec
jmp 0x140107345
mov dword [rsp + 0x14d80], 0
lea rdi, [rsp + 0x14d84]
xor eax, eax
mov ecx, 4
rep stosb byte [rdi], al
lea rdx, [rsp + 0x4d7c]
mov rcx, qword [rsp + 0x498]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x4d78], eax
cmp dword [rsp + 0x4d78], 0xffffffff
jne 0x1401071a4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x8e4], eax
cmp dword [rsp + 0x8e4], 0
je 0x1401071a4
mov rcx, qword [rsp + 0x498]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0xd00]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1401073ec
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x14d88]
mov r8d, 0x10000
lea rdx, [rsp + 0x4d80]
mov rcx, qword [rsp + 0x498]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1401071f8
mov rcx, qword [rsp + 0x498]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0xd00]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1401073ec
cmp dword [rsp + 0x14d88], 0
je 0x140107332
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x4d70]
mov r8d, dword [rsp + 0x14d88]
lea rdx, [rsp + 0x4d80]
mov rcx, qword [rsp + 0xd00]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x14010725c
mov rcx, qword [rsp + 0x498]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0xd00]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1401073ec
mov eax, dword [rsp + 0x14d88]
cmp dword [rsp + 0x4d70], eax
jae 0x14010728f
mov rcx, qword [rsp + 0x498]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0xd00]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1401073ec
cmp qword [rsp + 0x14df0], 0
je 0x140107332
cmp qword [rsp + 0x4d78], 0
je 0x1401072f2
mov ecx, dword [rsp + 0x14d88]
mov rax, qword [rsp + 0x14d80]
add rax, rcx
mov qword [rsp + 0x14d80], rax
mov rax, qword [rsp + 0x14d80]
imul rax, rax, 0x64
cqo
idiv qword [rsp + 0x4d78]
xor r9d, r9d
mov r8, rax
mov edx, 0x402
mov rcx, qword [rsp + 0x14df0]
call qword [sym.imp.USER32.dll_SendMessageW]
mov dword [rsp + 0x20], 1
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x14d90]
call qword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x140107332
lea rcx, [rsp + 0x14d90]
call qword [sym.imp.USER32.dll_TranslateMessage]
lea rcx, [rsp + 0x14d90]
call qword [sym.imp.USER32.dll_DispatchMessageW]
jmp 0x1401072f2
mov eax, dword [rsp + 0x14d88]
cmp rax, 0x10000
je 0x1401071a4
mov rcx, qword [rsp + 0x498]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea r9, [rsp + 0x4bc]
lea r8, [rsp + 0x4b4]
lea rdx, [rsp + 0x4ac]
mov rcx, qword [rsp + 0xd00]
call qword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
jne 0x14010738f
mov rcx, qword [rsp + 0xd00]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1401073ec
mov rcx, qword [rsp + 0xd00]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [rsp + 0x4a8]
and edx, 0x2027
mov rcx, qword [rsp + 0x14de8]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x1401073c0
xor eax, eax
jmp 0x1401073ec
cmp qword [rsp + 0x14df0], 0
je 0x1401073e7
xor r9d, r9d
mov r8d, 0x64
mov edx, 0x402
mov rcx, qword [rsp + 0x14df0]
call qword [sym.imp.USER32.dll_SendMessageW]
mov eax, 1
mov rcx, qword [rsp + 0x14dc8]
xor rcx, rsp
call fcn.1400a8040
add rsp, 0x14dd0
pop rdi
ret