Function at 0x164f94a00
Capabilities:
Check if file exists

Disassembly:
mov r11, rsp
mov qword [r11 + 0x18], rbx
mov qword [r11 + 0x10], rdx
mov dword [rsp + 8], ecx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
mov rax, qword [0x16514b200]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov esi, dword [r11 + 8]
mov r13, rdx
xor r15d, r15d
mov ebp, r15d
mov qword [r11 - 0x50], r15
call fcn.164e72eb0
mov rcx, rax
test rax, rax
je 0x164f94d33
mov rax, qword [rax]
mov rax, qword [rax + 0x18]
call qword [case.0x164e9d7b8.0]
add rax, 0x18
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x50], r15d
mov edi, r15d
mov r14d, r15d
mov qword [rsp + 0x40], r15
call fcn.164e72eb0
mov rcx, rax
test rax, rax
je 0x164f94d1d
mov rax, qword [rax]
mov rax, qword [rax + 0x18]
call qword [case.0x164e9d7b8.0]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x40], rbx
mov r8d, esi
lea rdx, str..Scsi_u:
lea rcx, [rsp + 0x48]
call fcn.164f96ee0
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0xc0000000
lea r8d, [r15 + 3]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r15, rax
cmp rax, 0xffffffffffffffff
jne 0x164f94aef
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
jmp 0x164f94c9c
mov ecx, 0x3c
call fcn.1650164a0
mov rdi, rax
test rax, rax
jne 0x164f94b09
lea ebp, [rax + 8]
jmp 0x164f94c93
mov ecx, 0x22c
call fcn.1650164a0
mov r14, rax
test rax, rax
jne 0x164f94b23
lea ebp, [rax + 8]
jmp 0x164f94c93
xor sil, sil
nop word [rax + rax]
xor eax, eax
mov qword [rdi + 4], rax
mov dword [rdi + 0x14], eax
mov qword [rdi + 0x1c], rax
mov qword [rdi + 0x24], rax
mov qword [rdi + 0x2c], rax
mov qword [rdi + 0x34], rax
xor edx, edx
mov r8d, 0x22c
mov rcx, r14
call fcn.165040130
mov dword [rdi], 0x1c
mov dword [rdi + 0xc], 0x1388
mov dword [rdi + 0x18], 0x210
mov dword [rdi + 0x10], 0x1b0501
mov r8d, 8
lea rdx, str.SCSIDISK
lea rcx, [rdi + 4]
call fcn.165027b00
mov byte [rdi + 0x26], 0xec
mov byte [rdi + 0x28], sil
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x50]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x22c
mov qword [rsp + 0x20], r14
mov r9d, 0x3c
mov r8, rdi
mov edx, 0x4d008
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x164f94be7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
inc sil
cmp sil, 2
jb 0x164f94b30
jmp 0x164f94c93
lea rax, [r14 + 0x40]
mov r8d, 0xa
nop dword [rax]
nop word [rax + rax]
movzx edx, byte [rax]
movzx ecx, byte [rax + 1]
mov byte [rax], cl
mov byte [rax + 1], dl
lea rax, [rax + 2]
sub r8, 1
jne 0x164f94c00
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, 0x15
or eax, ecx
jge 0x164f94c3b
lea edx, [r8 + 0x15]
lea rcx, [rsp + 0x40]
call fcn.164f968b0
mov rbx, qword [rsp + 0x40]
mov byte [rbx + 0x14], 0
mov r8d, 0x14
lea rdx, [r14 + 0x40]
mov rcx, rbx
call fcn.165027b00
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
call fcn.165028424
test eax, eax
js 0x164f94d28
cmp eax, dword [rbx - 0xc]
jg 0x164f94d28
mov dword [rbx - 0x10], eax
cdqe
mov byte [rax + rbx], 0
lea rcx, [rsp + 0x40]
call fcn.164f961b0
lea rdx, [rsp + 0x40]
mov rcx, r13
call fcn.164f96530
mov rbx, qword [rsp + 0x40]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call fcn.165015e80
mov rcx, r14
call fcn.165015e80
nop
lea rdx, [rbx - 0x18]
mov ebx, 0xffffffff
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x164f94cd3
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x164e9d7b8.0]
nop
mov rdx, qword [rsp + 0x48]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], ebx
sub ebx, 1
jg 0x164f94cf6
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x164e9d7b8.0]
mov eax, ebp
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.165001080
mov rbx, qword [rsp + 0xb0]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov ecx, 0x80004005
call fcn.164e43420
nop
mov ecx, 0x80070057
call fcn.164e43420
nop
mov ecx, 0x80004005
call fcn.164e43420
int3