Function at 0x164c9e640
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 [0x164cf5010]
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.164ca23d0
mov rcx, rax
test rax, rax
je 0x164c9e977
mov rax, qword [rax]
mov rax, qword [rax + 0x18]
call qword [0x164cdeeb8]
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.164ca23d0
mov rcx, rax
test rax, rax
je 0x164c9e961
mov rax, qword [rax]
mov rax, qword [rax + 0x18]
call qword [0x164cdeeb8]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x40], rbx
mov r8d, esi
lea rdx, str..Scsi_u:
lea rcx, [rsp + 0x48]
call fcn.164ca12d0
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 0x164c9e72f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
jmp 0x164c9e8de
mov ecx, 0x3c
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
jne 0x164c9e74a
lea ebp, [rax + 8]
jmp 0x164c9e8d5
mov ecx, 0x22c
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r14, rax
test rax, rax
jne 0x164c9e765
lea ebp, [rax + 8]
jmp 0x164c9e8d5
xor sil, sil
nop dword [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 sub.VCRUNTIME140.dll_memset
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 qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
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 0x164c9e828
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
inc sil
cmp sil, 2
jb 0x164c9e770
jmp 0x164c9e8d5
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 0x164c9e840
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, 0x15
or eax, ecx
jge 0x164c9e87b
lea edx, [r8 + 0x15]
lea rcx, [rsp + 0x40]
call fcn.164ca0c80
mov rbx, qword [rsp + 0x40]
mov byte [rbx + 0x14], 0
mov r8d, 0x14
lea rdx, [r14 + 0x40]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strnlen]
test eax, eax
js 0x164c9e96c
cmp eax, dword [rbx - 0xc]
jg 0x164c9e96c
mov dword [rbx - 0x10], eax
cdqe
mov byte [rax + rbx], 0
lea rcx, [rsp + 0x40]
call fcn.164ca03c0
lea rdx, [rsp + 0x40]
mov rcx, r13
call fcn.164ca0890
mov rbx, qword [rsp + 0x40]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
lea rdx, [rbx - 0x18]
mov ebx, 0xffffffff
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x164c9e917
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x164cdeeb8]
nop
mov rdx, qword [rsp + 0x48]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], ebx
sub ebx, 1
jg 0x164c9e93a
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x164cdeeb8]
mov eax, ebp
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.164cd6f70
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.164ca2080
nop
mov ecx, 0x80070057
call fcn.164ca2080
nop
mov ecx, 0x80004005
call fcn.164ca2080
int3