Function at 0x140185c50
Capabilities:
Check os version

Disassembly:
push rbp
push rbx
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xc0
mov rax, qword [0x140415a10]
xor rax, rsp
mov qword [rbp + 0x17], rax
xor bl, bl
xor r14d, r14d
cmp qword [rcx + 0x18], 0xffffffffffffffff
mov r13, r8
mov r12, rdx
mov r15, rcx
je 0x140185dbc
call qword [sym.imp.KERNEL32.dll_GetVersion]
cmp al, 6
jae 0x140185dbc
mov rax, qword [r15 + 0x678]
mov ebx, dword [r15 + 0x698]
xor edx, edx
add rax, r12
lea r8d, [r14 + 0x60]
lea rcx, [rbp - 0x49]
div rbx
xor edx, edx
mov rdi, rax
call fcn.1402bfa30
mov rcx, qword [r15 + 0x18]
mov eax, 0x38
mov qword [rsp + 0x38], r14
lea r9d, [r14 + 0x60]
mov word [rbp - 0x49], ax
mov eax, edi
lea r8, [rbp - 0x49]
shr eax, 0x18
mov edx, 0x4d014
mov dword [rbp - 0x39], 2
mov byte [rbp - 0x23], al
mov eax, edi
mov qword [rbp - 0x31], r13
shr eax, 0x10
mov dword [rbp - 0x29], 0x3c
mov word [rbp - 0x42], 0x20
mov byte [rbp - 0x22], al
mov eax, edi
mov dword [rbp - 0x3d], ebx
shr eax, 8
mov byte [rbp - 0x43], 0xa
mov word [rbp - 0x25], 0x2a
mov byte [rbp - 0x21], al
lea rax, [rbp - 0x59]
mov byte [rbp - 0x20], dil
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x49]
mov dword [rsp + 0x28], 0x60
mov qword [rsp + 0x20], rax
mov dword [rbp - 0x1f], 0x10000
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
setne bl
test bl, bl
jne 0x140185d6b
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.IOCTL_SCSI_PASS_THROUGH_DIRECT_failed_with_error__d_r_n
mov edx, eax
call fcn.1402b7a88
jmp 0x140185dbc
movzx eax, byte [rbp - 0x47]
test al, al
je 0x140185f59
lea rcx, str.IOCTL_SCSI_PASS_THROUGH_DIRECT_failure_r_n_tSCSI_status_code_02x_r_n
movzx edx, al
call fcn.1402b7a88
mov ebx, r14d
lea rdi, [rbp - 0xd]
nop dword [rax]
movzx edx, byte [rdi]
lea rcx, [0x14035ae38]
call fcn.1402b7a88
inc ebx
lea rdi, [rdi + 1]
movsxd rax, ebx
cmp rax, 0x20
jb 0x140185d90
lea rcx, [0x14034bfd0]
call fcn.1402b7a88
xor bl, bl
mov qword [rsp + 0x108], rsi
cmp qword [r15 + 0x10], r14
je 0x140185e9b
mov ecx, dword [r15 + 0x698]
mov rax, qword [r15 + 0x678]
xor edx, edx
add rax, r12
lea r14d, [rcx + 0x20c]
div rcx
mov ecx, r14d
mov ebx, r14d
mov rdi, rax
call fcn.1402b7390
mov r8d, r14d
mov rcx, rax
xor edx, edx
mov rsi, rax
call fcn.1402bfa30
mov dword [rsi + 0x200], edi
mov ecx, dword [r15 + 0x698]
mov dword [rsi + 0x204], ecx
lea r8, [r15 + 0x452]
mov edx, 0x100
mov rcx, rsi
call fcn.1402b6e28
mov r8d, dword [r15 + 0x698]
lea rcx, [rsi + 0x208]
mov rdx, r13
call fcn.1402b7460
xor ecx, ecx
lea rax, [rbp - 0x59]
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rcx
mov rcx, qword [r15 + 0x10]
mov r9d, r14d
mov r8, rsi
mov edx, 0x22e00c
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
lea rcx, str.IOCTL_SECTOR_WRITE_SRB_returned__d_r_n
test eax, eax
setne bl
movzx edx, bl
call fcn.1402b7a88
mov rcx, rsi
call fcn.1402b7350
test bl, bl
jne 0x140185f51
xor r14d, r14d
cmp qword [r15 + 0x10], 0
je 0x140185f51
mov edi, dword [r15 + 0x698]
add edi, 0x210
mov ecx, edi
call fcn.1402b7390
mov r8d, edi
xor edx, edx
mov rcx, rax
mov rsi, rax
call fcn.1402bfa30
mov qword [rsi + 0x200], r12
mov ecx, dword [r15 + 0x698]
mov dword [rsi + 0x208], ecx
lea r8, [r15 + 0x252]
mov edx, 0xff
mov rcx, rsi
call fcn.1402b6e28
mov r8d, dword [r15 + 0x698]
lea rcx, [rsi + 0x20c]
mov rdx, r13
call fcn.1402b7460
mov rcx, qword [r15 + 0x10]
mov qword [rsp + 0x38], r14
lea rax, [rbp - 0x59]
mov r9d, edi
mov r8, rsi
mov qword [rsp + 0x30], rax
mov edx, 0x22e004
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
lea rcx, str.IOCTL_SECTOR_WRITE_returned__d_r_n
test eax, eax
setne bl
movzx edx, bl
call fcn.1402b7a88
mov rcx, rsi
call fcn.1402b7350
mov rsi, qword [rsp + 0x108]
movzx eax, bl
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.1402b6d40
add rsp, 0xc0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rbx
pop rbp
ret