Function at 0x140108af0
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.1401da720
sub rsp, rax
mov rax, qword [0x1402aa5c0]
xor rax, rsp
mov qword [rsp + 0x14dc8], rax
mov rcx, qword [rsp + 0x14de0]
call fcn.1400f9330
mov edi, eax
mov rcx, qword [rsp + 0x14de8]
call fcn.1400f9330
cmp edi, eax
je 0x140108b81
mov rcx, qword [rsp + 0x14de0]
call fcn.1400f9330
cmp eax, 8
jne 0x140108b81
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.140107ff0
jmp 0x1401095ac
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 0x140108bc2
xor eax, eax
jmp 0x1401095ac
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.1400ac0b0
lea rcx, [rsp + 0x268]
call fcn.1400a8944
test rax, rax
je 0x140108c8a
lea rdx, [0x14021f6f8]
lea rcx, [rsp + 0x268]
call fcn.1400a99b0
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 0x140108c79
xor eax, eax
jmp 0x1401095ac
mov eax, dword [rsp + 0x274]
and eax, 0x40
mov dword [rsp + 0x270], eax
cmp dword [rsp + 0x270], 0
je 0x140108d8b
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 0x140108cc3
xor eax, eax
jmp 0x1401095ac
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.1400ac0b0
lea rcx, [rsp + 0x268]
call fcn.1400a8944
test rax, rax
je 0x140108d8b
lea rdx, [0x14021f6fc]
lea rcx, [rsp + 0x268]
call fcn.1400a99b0
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 0x140108d7a
xor eax, eax
jmp 0x1401095ac
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 0x140108dda
xor eax, eax
jmp 0x1401095ac
lea rdx, [rsp + 0x4a8]
mov rcx, qword [rsp + 0x498]
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x140108e09
mov rcx, qword [rsp + 0x498]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1401095ac
cmp dword [rsp + 0x270], 0
je 0x140108e30
mov eax, dword [rsp + 0x4a8]
and eax, 0x200
test eax, eax
je 0x140108e30
mov dword [rsp + 0x14dc0], 1
jmp 0x140108e3b
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 0x140108ea6
mov rcx, qword [rsp + 0x498]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1401095ac
cmp qword [rsp + 0x14df0], 0
je 0x140108ecd
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 0x1401092e7
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 0x140108f3c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x8e4], eax
cmp dword [rsp + 0x8e4], 0
je 0x140108f3c
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 0x1401095ac
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 0x140108fa3
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 0x1401095ac
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 0x140109059
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x8e4], eax
cmp dword [rsp + 0x8e4], 0xea
je 0x140109059
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 0x1401095ac
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 0x14010908f
mov eax, dword [rsp + 0xd1c]
add eax, 1
mov dword [rsp + 0xd1c], eax
mov eax, dword [rsp + 0xd20]
cmp dword [rsp + 0xd1c], eax
jae 0x1401091cd
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.1400f8290
test eax, eax
jne 0x140109121
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 0x1401095ac
cmp qword [rsp + 0x14df0], 0
je 0x1401091c8
cmp qword [rsp + 0xd10], 0
je 0x140109188
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 0x1401091c8
lea rcx, [rsp + 0x4d40]
call qword [sym.imp.USER32.dll_TranslateMessage]
lea rcx, [rsp + 0x4d40]
call qword [sym.imp.USER32.dll_DispatchMessageW]
jmp 0x140109188
jmp 0x14010907e
cmp dword [rsp + 0xd18], 0
jne 0x140109234
cmp dword [rsp + 0xd20], 0
jbe 0x140109234
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 0x140108fbf
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 0x1401092ad
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x8e4], eax
cmp dword [rsp + 0x8e4], 0
je 0x1401092ad
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 0x1401095ac
mov rcx, qword [rsp + 0xd00]
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1401092e2
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 0x1401095ac
jmp 0x140109505
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 0x140109364
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x8e4], eax
cmp dword [rsp + 0x8e4], 0
je 0x140109364
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 0x1401095ac
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 0x1401093b8
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 0x1401095ac
cmp dword [rsp + 0x14d88], 0
je 0x1401094f2
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 0x14010941c
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 0x1401095ac
mov eax, dword [rsp + 0x14d88]
cmp dword [rsp + 0x4d70], eax
jae 0x14010944f
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 0x1401095ac
cmp qword [rsp + 0x14df0], 0
je 0x1401094f2
cmp qword [rsp + 0x4d78], 0
je 0x1401094b2
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 0x1401094f2
lea rcx, [rsp + 0x14d90]
call qword [sym.imp.USER32.dll_TranslateMessage]
lea rcx, [rsp + 0x14d90]
call qword [sym.imp.USER32.dll_DispatchMessageW]
jmp 0x1401094b2
mov eax, dword [rsp + 0x14d88]
cmp rax, 0x10000
je 0x140109364
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 0x14010954f
mov rcx, qword [rsp + 0xd00]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1401095ac
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 0x140109580
xor eax, eax
jmp 0x1401095ac
cmp qword [rsp + 0x14df0], 0
je 0x1401095a7
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.1400a8790
add rsp, 0x14dd0
pop rdi
ret