Function at 0x140024e50
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x248
mov rbp, qword [0x1400f6e30]
mov rax, rdx
lea rsi, [rsp + 0x30]
mov r15, rcx
mov r14, r9
mov rdx, qword [rbp]
mov qword [rsp + 0x238], rdx
xor edx, edx
movzx edx, byte [rcx + 0x20]
mov dword [rsp + 0x20], r8d
mov r9, rax
mov r8d, dword [rcx + 0x28]
mov rcx, rsi
call 0x140024080
mov rax, qword [0x1400f6f00]
cmp byte [rax], 0
jne 0x140025001
lea rdi, [0x1400bdb80]
mov rbx, rsi
lea r13, [rsp + 0x230]
mov rax, rsi
mov r12, rdi
mov rdx, rdi
nop dword [rax]
movdqu xmm0, xmmword [rax]
pxor xmm0, xmmword [rdx]
add rax, 0x10
add rdx, 0x10
movups xmmword [rax - 0x10], xmm0
cmp rax, r13
jne 0x140024ed0
mov rdx, rsi
mov rcx, r15
call fcn.140024c60
test al, al
jne 0x140024f30
mov byte [r15 + 0x24], 1
xor ebx, ebx
mov rax, qword [rsp + 0x238]
sub rax, qword [rbp]
jne 0x140025122
mov eax, ebx
add rsp, 0x248
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
movdqu xmm0, xmmword [rbx]
pxor xmm0, xmmword [rdi]
add rbx, 0x10
add rdi, 0x10
movups xmmword [rbx - 0x10], xmm0
cmp rbx, r13
jne 0x140024f30
lea rdi, [r14 + 8]
mov rcx, r14
xor eax, eax
mov qword [r14], 0
and rdi, 0xfffffffffffffff8
mov rdx, r14
mov qword [r14 + 0x1f8], 0
sub rcx, rdi
add ecx, 0x200
shr ecx, 3
rep stosq qword [rdi], rax
mov rcx, r15
call fcn.140024a40
mov ebx, eax
test al, al
je 0x140024ef8
xor eax, eax
nop
movdqu xmm0, xmmword [r14 + rax]
pxor xmm0, xmmword [r12 + rax]
movups xmmword [r14 + rax], xmm0
add rax, 0x10
cmp rax, 0x200
jne 0x140024f90
mov rax, qword [0x1400f6f00]
cmp byte [rax], 0
jne 0x14002505d
mov r8d, 0x200
mov rdx, r14
mov rcx, rsi
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x140025036
mov esi, dword [r14 + 0x1fc]
mov rcx, r14
call fcn.140023d90
cmp esi, eax
jne 0x140025092
mov rax, qword [rsp + 0x30]
cmp qword [r14], rax
jne 0x1400250fb
add dword [r15 + 0x28], 1
jmp 0x140024eff
mov edx, dword [r15 + 0x28]
lea rcx, str.JMB39x:_Write_request_sector__d_n
call fcn.140002a70
mov rax, qword [0x1400f6f00]
cmp byte [rax], 1
jbe 0x140024eae
xor r8d, r8d
mov edx, 0x200
mov rcx, rsi
call fcn.1400386c0
jmp 0x140024eae
mov rax, qword [r15]
mov byte [r15 + 0x24], 1
mov edx, 5
lea r8, str.No_JMB39x_response_detected
mov rcx, qword [rax - 0x18]
add rcx, r15
call fcn.140022760
mov ebx, eax
jmp 0x140024eff
mov edx, dword [r15 + 0x28]
lea rcx, str.JMB39x:_Read_response_sector__d_n
call fcn.140002a70
mov rax, qword [0x1400f6f00]
cmp byte [rax], 1
jbe 0x140024fbd
xor r8d, r8d
mov edx, 0x200
mov rcx, r14
call fcn.1400386c0
jmp 0x140024fbd
mov byte [r15 + 0x24], 1
xor eax, eax
movdqu xmm0, xmmword [r14 + rax]
pxor xmm0, xmmword [r12 + rax]
movups xmmword [r14 + rax], xmm0
add rax, 0x10
cmp rax, 0x200
jne 0x140025099
mov rax, qword [r15]
mov ebx, dword [r14 + 0x1fc]
mov rcx, r14
add r15, qword [rax - 0x18]
call fcn.140023d90
lea r9, str.JMB39x_response_contains_a_wakeup_sector
mov edx, 5
mov rcx, r15
cmp ebx, eax
lea rax, str.CRC_error_in_JMB39x_response
lea r8, [0x1400bd33e]
cmovne r9, rax
call fcn.140022760
mov ebx, eax
jmp 0x140024eff
mov rax, qword [r15]
mov byte [r15 + 0x24], 1
mov edx, 5
lea r8, str.Invalid_header_in_JMB39x_response
mov rcx, qword [rax - 0x18]
add rcx, r15
call fcn.140022760
mov ebx, eax
jmp 0x140024eff
call fcn.140082d70
nop
nop dword [rax + rax]
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x258
mov rbp, qword [0x1400f6e30]
mov rax, qword [rbp]
mov qword [rsp + 0x248], rax
xor eax, eax
mov rbx, rcx
mov rsi, rdx
lea rcx, [rcx + 8]
mov rax, qword [rbx + 8]
call qword [rax + 0x10]
test al, al
je 0x140025438
movzx edi, byte [rbx + 0x24]
test dil, dil
jne 0x140025348
mov eax, dword [rsi + 0xa8]
test eax, eax
jne 0x1400251c0
mov rax, qword [rsp + 0x248]
sub rax, qword [rbp]
jne 0x140025433
mov rax, qword [rbx]
lea r8, str.NO_DATA_ATA_commands_not_implemented__JMB39x_
add rbx, qword [rax - 0x18]
mov rcx, rbx
mov edx, 0x28
add rsp, 0x258
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp fcn.140022760
xor r8d, r8d
lea r9, str.JMB39x
mov rdx, rsi
mov rcx, rbx
call fcn.1400228e0
test al, al
je 0x140025320
movzx eax, byte [rsi + 0xc]
cmp al, 0xb0
je 0x140025378
cmp al, 0xec
jne 0x140025385
mov r13d, 1
cmp dword [rsi + 0xa8], 1
jne 0x140025449
lea r9, [rsp + 0x40]
mov r8d, 0x18
mov rcx, rbx
movabs rdx, 0xe0000200ff030200
mov qword [rsp + 0x20], rdx
movabs rdx, 0xa000000000
mov qword [rsp + 0x30], rdx
movzx edx, byte [rbx + 0x21]
mov qword [rsp + 0x28], 0
mov byte [rsp + 0x24], dl
movzx edx, byte [rsi]
mov byte [rsp + 0x36], al
mov byte [rsp + 0x2a], dl
movzx edx, byte [rsi + 2]
mov byte [rsp + 0x2c], dl
movzx edx, byte [rsi + 4]
mov byte [rsp + 0x2e], dl
movzx edx, byte [rsi + 6]
mov byte [rsp + 0x30], dl
movzx edx, byte [rsi + 8]
mov byte [rsp + 0x32], dl
lea rdx, [rsp + 0x20]
call fcn.140024e50
mov r12d, eax
test al, al
je 0x140025320
movzx r9d, byte [rsp + 0x5f]
test r9b, r9b
je 0x140025408
mov eax, r9d
and eax, 0xffffffc1
cmp al, 0x40
jne 0x1400253d0
cmp dword [rsi + 0xb8], 0x200
jne 0x14002545a
mov rax, qword [rsi + 0xb0]
lea rdx, [rsp + 0x60]
lea rdi, [rax + 8]
mov qword [rax], 0
mov qword [rax + 0x1f8], 0
and rdi, 0xfffffffffffffff8
sub rax, rdi
lea ecx, [rax + 0x200]
xor eax, eax
shr ecx, 3
rep stosq qword [rdi], rax
mov eax, dword [rsi + 0xb8]
mov rcx, qword [rsi + 0xb0]
lea r8d, [rax - 0x30]
call sub.msvcrt.dll_memcpy
cmp r13d, 2
jne 0x14002531c
mov rcx, qword [rsi + 0xb0]
call fcn.14000a010
mov edx, eax
mov rax, qword [rsi + 0xb0]
sub byte [rax + 0x1ff], dl
mov edi, r12d
nop
mov rax, qword [rsp + 0x248]
sub rax, qword [rbp]
jne 0x140025433
mov eax, edi
add rsp, 0x258
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov rax, qword [rsp + 0x248]
sub rax, qword [rbp]
jne 0x140025433
mov rax, qword [rbx]
lea r8, str.Device_blocked_due_to_previous_errors
mov edx, 5
add rbx, qword [rax - 0x18]
mov rcx, rbx
jmp 0x1400251ac
movzx edx, byte [rsi]
cmp dl, 0xd1
ja 0x1400253b0
cmp dl, 0xcf
ja 0x1400253f8
mov rax, qword [rsp + 0x248]
sub rax, qword [rbp]
jne 0x140025433
mov rax, qword [rbx]
lea r8, str.ATA_command_not_implemented_due_to_truncated_response__JMB39x_
add rbx, qword [rax - 0x18]
mov rcx, rbx
jmp 0x1400251a7
cmp dl, 0xd5
jne 0x140025385
movzx edx, byte [rsi + 4]
cmp dl, 1
je 0x1400253f8
cmp dl, 0xe0
je 0x1400251f1
test dl, dl
jne 0x140025385
jmp 0x1400251f1
mov rax, qword [rbx]
lea r8, str.ATA_command_failed__status0x_02x_
mov edx, 5
add rbx, qword [rax - 0x18]
mov rcx, rbx
call fcn.140022760
mov edi, eax
jmp 0x140025320
mov r13d, 2
jmp 0x1400251f7
mov rax, qword [rbx]
mov byte [rbx + 0x24], 1
lea r8, str.No_device_connected_to_JMB39x_port__d
mov edx, 5
movzx r9d, byte [rbx + 0x21]
mov rcx, qword [rax - 0x18]
add rcx, rbx
call fcn.140022760
mov edi, eax
jmp 0x140025320
call fcn.140082d70
lea rdx, str.is_open__
mov ecx, 0x26f
call fcn.140023e10
lea rdx, str.in.direction__ata_cmd_in::data_in
mov ecx, 0x27a
call fcn.140023e10
lea rdx, str.in.size__sizeof_response_
mov ecx, 0x29f
call fcn.140023e10
nop
nop dword [rax]