Function at 0x140017370
Capabilities:
Check if file exists
Get disk size

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], r8
push rbp
push rsi
push rdi
sub rsp, 0x80
and dword [rsp + 0x58], 0
xor eax, eax
mov rbx, rdx
mov ebp, ecx
lea esi, [rax + 3]
mov qword [rsp + 0x60], rax
test rdx, rdx
jne 0x1400173c7
mov edx, 0xc0000000
call qword [0x1400f1e00]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140017542
mov edx, 0x80000000
mov ecx, ebp
call qword [0x1400f1e00]
jmp 0x140017497
mov rcx, rdx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebp, 0x3a
cmp eax, 2
jne 0x1400173e2
xor ecx, ecx
cmp word [rbx + 2], bp
jmp 0x140017403
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, esi
jne 0x140017408
lea rcx, [rbx + 2]
lea rdx, [0x1400d8a78]
call fcn.1400ba7bc
xor ecx, ecx
test eax, eax
sete cl
jmp 0x14001740a
xor ecx, ecx
mov edx, 0xc0000000
test ecx, ecx
je 0x1400174cd
mov rax, qword [str.._:]
and qword [rsp + 0x30], 0
lea rcx, [rsp + 0x48]
mov qword [rcx], rax
mov eax, dword [0x1400d8a70]
mov ebp, 0x20000000
mov dword [rcx + 8], eax
movzx eax, word [0x1400d8a74]
xor r9d, r9d
mov word [rcx + 0xc], ax
movzx eax, word [rbx]
lea rcx, [rsp + 0x48]
mov r8d, esi
mov dword [rsp + 0x28], ebp
mov word [rsp + 0x50], ax
mov dword [rsp + 0x20], esi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140017542
and qword [rsp + 0x30], 0
lea rcx, [rsp + 0x48]
xor r9d, r9d
mov r8d, esi
mov edx, 0x80000000
mov dword [rsp + 0x28], ebp
mov dword [rsp + 0x20], esi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140017542
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x1400174b7
lea eax, [rdi + 2]
jmp 0x14001769e
lea rcx, str.Error_opening_device:
call fcn.1400167b0
mov eax, 2
jmp 0x14001769e
mov rcx, rbx
call qword [0x1400f1e08]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140017542
mov edx, 0x80000000
mov rcx, rbx
call qword [0x1400f1e08]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140017542
call qword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 1
je 0x140017538
sub eax, 0x56
je 0x140017538
sub eax, ebp
je 0x140017520
sub eax, 0x7a
je 0x140017520
cmp eax, 0x101b
je 0x140017520
mov rcx, rbx
call fcn.1400167b0
jmp 0x140017538
call fcn.1400ba598
lea rdx, str.Not_a_mount_point:__1_ws__n
mov r8, rbx
lea rcx, [rax + 0x60]
call fcn.140016728
mov eax, 9
jmp 0x14001769e
mov rax, qword [rsp + 0xb0]
and qword [rsp + 0x38], 0
lea r8, [rsp + 0x58]
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0xa8]
mov r9d, 0x10
mov qword [rsp + 0x30], rax
and dword [rsp + 0x28], 0
and qword [rsp + 0x20], 0
mov edx, 0x7c0d0
mov rcx, rdi
mov dword [rsp + 0x58], 1
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x14001759f
mov rcx, rbx
call fcn.1400167b0
jmp 0x140017693
and qword [rsp + 0x38], 0
lea rax, [rsp + 0xa8]
mov esi, 8
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0xb8]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x7405c
mov rcx, rdi
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x14001760a
mov rcx, rbx
call fcn.1400167b0
call fcn.1400ba598
lea rdx, str._1_ws_:_Is_that_drive_really_an_ImDisk_drive_
lea rcx, [rax + 0x60]
mov r8, rbx
call fcn.140016728
mov esi, 2
jmp 0x140017693
and qword [rsp + 0x38], 0
lea rax, [rsp + 0xa8]
xor r9d, r9d
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x68]
xor r8d, r8d
mov edx, 0x70000
mov rcx, rdi
mov dword [rsp + 0x28], 0x18
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x1400175e0
mov ecx, dword [rsp + 0x7c]
mov rax, qword [rsp + 0xb8]
and qword [rsp + 0x38], 0
cqo
lea r8, [rsp + 0x40]
mov r9d, esi
idiv rcx
mov edx, 0x900f0
mov rcx, rdi
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x30], rax
and dword [rsp + 0x28], 0
and qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
xor esi, esi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov rbx, qword [rsp + 0xa0]
add rsp, 0x80
pop rdi
pop rsi
pop rbp
ret