Function at 0x14006aa50
Capabilities:
Check if file exists

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xc8
mov rbp, qword [0x1400f6e30]
mov r14d, dword [rsp + 0x138]
mov r13d, dword [rsp + 0x130]
mov rax, qword [rbp]
mov qword [rsp + 0xb8], rax
xor eax, eax
mov dword [rcx + 0x3c], 0xffffffff
mov rbx, rcx
mov rsi, r9
cmp edx, 0xff
jbe 0x14006ad18
cmp r8d, 0x19
ja 0x14006acd8
lea r12, [rsp + 0x90]
lea r9d, [r8 + 0x41]
mov edx, 0x1d
lea r8, str.._c:
mov rcx, r12
call fcn.140085d40
cmp byte [rsi], 0
je 0x14006aae9
lea rdx, [0x1400f2182]
mov rcx, rsi
call sub.msvcrt.dll_strspn
cmp byte [rsi + rax], 0
je 0x14006ad78
test r14b, r14b
je 0x14006ae98
mov byte [rbx + 0x39], 0
xor r9d, r9d
mov r8d, 3
xor edx, edx
mov qword [rsp + 0x30], 0
mov rcx, r12
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x14006afa8
mov qword [rbx + 0x10], rdi
mov r14, qword [0x1400f6f00]
cmp byte [r14], 1
jbe 0x14006ab66
cmp byte [rbx + 0x39], 0
lea r8, str.__without_admin_rights_
lea rax, [0x1400f0eda]
cmovne r8, rax
mov rdx, r12
lea rcx, str._s:_successfully_opened_s_n
call fcn.140002a70
mov byte [rbx + 0x38], 0
cmp byte [rsi], 0
lea r15, [rbx + 0x18]
jne 0x14006ad40
test r13d, r13d
js 0x14006ae58
mov qword [rsp + 0x20], 2
mov r8, qword [rbx + 0x20]
lea r9, [0x1400f220f]
xor edx, edx
mov rcx, r15
call fcn.14009ebf0
mov dword [rbx + 0x44], r13d
lea rsi, [rsp + 0x50]
mov rcx, rdi
mov rdx, rsi
call fcn.140065c10
movzx edx, word [rsp + 0x5c]
cmp dx, 0x13c1
sete byte [rbx + 0x41]
test eax, eax
js 0x14006ae24
mov r15d, dword [rsp + 0x58]
cmp dx, 0x13c1
jne 0x14006ae18
lea r8, [rsp + 0x70]
mov rcx, rdi
movabs rax, 0x3e65726177333c
mov dword [rbx + 0x48], 1
mov qword [rsp + 0x74], rax
mov rax, qword [0x1400f3550]
mov edx, 0x4d008
mov r9d, 0x1c
mov qword [rsp + 0x84], 0
mov qword [rsp + 0x7c], rax
lea rax, [rsp + 0x4c]
mov dword [rsp + 0x70], 0x1c
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x1c
mov qword [rsp + 0x20], r8
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x14006b0c4
mov edx, dword [rsp + 0x84]
movzx eax, byte [r14]
test edx, edx
jne 0x14006b0af
cmp al, 1
ja 0x14006ae00
mov rdx, rsi
mov rcx, rdi
call fcn.140065c10
test eax, eax
js 0x14006ac86
cmp word [rsp + 0x5c], 0x13c1
je 0x14006afe8
bt r15d, r13d
jb 0x14006aca8
mov rdx, qword [0x1400f6f20]
movzx eax, byte [rdx]
test al, al
je 0x14006b020
sub eax, 1
mov byte [rdx], al
nop dword [rax + rax]
mov eax, 1
mov rdx, qword [rsp + 0xb8]
sub rdx, qword [rbp]
jne 0x14006b10d
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [rsp + 0xb8]
sub rax, qword [rbp]
jne 0x14006b10d
mov rax, qword [rcx]
mov edx, 2
add rbx, qword [rax - 0x18]
mov rcx, rbx
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.140022610
mov dword [rcx + 0x3c], edx
lea r12, [rsp + 0x90]
mov r9d, edx
lea r8, str..PhysicalDrive_d
mov edx, 0x1d
mov rcx, r12
call fcn.140085d40
jmp 0x14006aacb
mov rcx, rsi
call sub.msvcrt.dll_strlen
mov r9, rsi
xor edx, edx
mov rcx, r15
mov qword [rsp + 0x20], rax
mov r8, qword [rbx + 0x20]
call fcn.14009ebf0
mov byte [rbx + 0x38], 1
mov dword [rbx + 0x44], r13d
test r13d, r13d
jns 0x14006aba2
jmp 0x14006aca8
mov r15, qword [sym.imp.KERNEL32.dll_CreateFileA]
mov byte [rbx + 0x39], 0
xor r9d, r9d
mov r8d, 3
xor edx, edx
mov qword [rsp + 0x30], 0
mov rcx, r12
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
call r15
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x14006afa8
cmp byte [rbx + 0x39], 0
mov qword [rbx + 0x10], rax
jne 0x14006ab34
test r14b, r14b
jne 0x14006ab34
cmp byte [0x1401271a0], 0
jne 0x14006ab34
lea rcx, str.Warning:_Limited_functionality_due_to_missing_admin_rights_n
call fcn.140002a70
mov byte [0x1401271a0], 1
jmp 0x14006ab34
lea rcx, str.__UPDATE_DEVICEMAP_via_IOCTL_SCSI_MINIPORT_succeeded_n
call fcn.140002a70
jmp 0x14006ac6a
lea rcx, str.SMART_GET_VERSION_returns_unknown_Identifier__0x_04x_nThis_is_no_3ware_9000_controller_or_driver_has_no_SMART_support._n
call fcn.140002a70
mov rdx, r12
lea rcx, str._s:_ATA_driver_has_no_SMART_support_n
call fcn.140002a70
mov rdx, qword [0x1400f6f20]
movzx eax, byte [rdx]
test al, al
je 0x14006af10
sub eax, 1
xor r15d, r15d
mov byte [rdx], al
jmp 0x14006abd8
movzx eax, byte [0x140127190]
test al, al
je 0x14006af70
mov rsi, qword [0x140127198]
mov rcx, rsi
call sub.msvcrt.dll_strlen
mov r9, rsi
xor edx, edx
mov rcx, r15
mov qword [rsp + 0x20], rax
mov r8, qword [rbx + 0x20]
call fcn.14009ebf0
mov dword [rbx + 0x44], r13d
jmp 0x14006aca8
mov byte [rbx + 0x39], 1
xor r9d, r9d
mov r8d, 3
mov rcx, r12
mov qword [rsp + 0x30], 0
mov r15, qword [sym.imp.KERNEL32.dll_CreateFileA]
mov edx, 0xc0000000
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
call r15
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x14006ad7f
cmp byte [rbx + 0x39], 0
mov qword [rbx + 0x10], rax
je 0x14006add1
mov r14, qword [0x1400f6f00]
lea r8, [0x1400f0eda]
cmp byte [r14], 1
ja 0x14006ab57
jmp 0x14006ab66
lea rcx, str.To_continue__add_one_or_more__T_permissive_options._n
call fcn.140002a70
mov rax, qword [rbx + 8]
lea rdx, [0x140064ea0]
lea rcx, [rbx + 8]
mov rax, qword [rax + 0x18]
cmp rax, rdx
jne 0x14006b088
mov rcx, qword [rbx + 0x10]
cmp rcx, 0xffffffffffffffff
je 0x14006af50
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x10], 0xffffffffffffffff
mov rax, qword [rbx]
mov edx, 0x28
add rbx, qword [rax - 0x18]
mov rcx, rbx
call fcn.140022610
jmp 0x14006acad
lea rsi, [0x140127190]
mov rcx, rsi
call fcn.1400a4400
test eax, eax
je 0x14006ae67
lea rax, str.pasifm
mov rcx, rsi
mov qword [0x140127198], rax
call fcn.1400a4500
jmp 0x14006ae67
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x14006aff8
mov rdx, qword [rbx]
add rbx, qword [rdx - 0x18]
mov rcx, rbx
cmp eax, 5
je 0x14006b090
mov dword [rsp + 0x20], eax
mov r9, r12
mov edx, 5
lea r8, str._s:_Error_ld
call fcn.140022760
xor eax, eax
jmp 0x14006acad
mov r15d, dword [rsp + 0x58]
jmp 0x14006ac86
mov rax, qword [rbx]
mov r9, r12
mov edx, 2
lea r8, str._s:_not_found
add rbx, qword [rax - 0x18]
mov rcx, rbx
call fcn.140022760
xor eax, eax
jmp 0x14006acad
lea rcx, str.To_continue__add_one_or_more__T_permissive_options._n
call fcn.140002a70
mov rax, qword [rbx + 8]
lea rdx, [0x140064ea0]
lea rcx, [rbx + 8]
mov rax, qword [rax + 0x18]
cmp rax, rdx
jne 0x14006b0ab
mov rcx, qword [rbx + 0x10]
cmp rcx, 0xffffffffffffffff
je 0x14006b05c
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x10], 0xffffffffffffffff
mov rax, qword [rbx]
mov r9, r12
mov edx, 2
lea r8, str._s:_Port__d_is_empty_or_does_not_exist
add rbx, qword [rax - 0x18]
mov dword [rsp + 0x20], r13d
mov rcx, rbx
call fcn.140022760
jmp 0x14006acad
call rax
jmp 0x14006af50
mov r9, r12
lea r8, str._s:_access_denied
mov edx, 0xd
call fcn.140022760
xor eax, eax
jmp 0x14006acad
call rax
jmp 0x14006b05c
test al, al
jne 0x14006b0ef
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], 5
jmp 0x14006ac86
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [r14], 0
mov esi, eax
jne 0x14006b0fd
cmp esi, 1
mov eax, 0x28
mov esi, 5
cmove esi, eax
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], esi
jmp 0x14006ac86
lea rcx, str.__UPDATE_DEVICEMAP_via_IOCTL_SCSI_MINIPORT_failed__ReturnCode0x_08x_n
call fcn.140002a70
jmp 0x14006b0b3
mov edx, eax
lea rcx, str.__UPDATE_DEVICEMAP_via_IOCTL_SCSI_MINIPORT_failed__Error_ld_n
call fcn.140002a70
jmp 0x14006b0d2
call fcn.140082d70
nop
nop
nop word cs:[rax + rax]
nop