Function at 0x402bc0
Capabilities:
Encode data using xor

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
test rcx, rcx
mov rsi, rcx
mov rbx, rdx
je 0x402c25
cmp qword [rcx + 8], 0
mov r8, qword [rcx]
jns 0x402c30
test r8, r8
jle 0x402c25
mov rcx, rsi
add r8, rbx
sub rcx, rbx
nop word [rax + rax]
mov rax, rbx
mov rdx, rbx
sar rax, 8
sar rdx, 0x10
xor eax, ebx
and edx, 0xffffffee
and eax, 0xffffffee
xor al, byte [rcx + rbx + 0x10]
xor eax, edx
mov rdx, rbx
sar rdx, 0x18
and edx, 0xffffffee
xor eax, edx
mov byte [rcx + rbx + 0x10], al
add rbx, 1
cmp r8, rbx
jne 0x402bf0
mov rax, rsi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
cmp r8, 7
mov edi, 7
cmovge rdi, r8
lea rcx, [rdi + 0x21]
call fcn.00412ed0
lea r9, [rsi + 0x10]
lea r11, [rax + 0x10]
mov qword [rax + 8], 1
mov qword [r11 + 8], rdi
lea rcx, [rax + 0x20]
mov qword [rax + 0x10], 0
mov r8, qword [rsi]
test r8, r8
mov qword [rax + 0x10], r8
js 0x402e53
lea rdx, [rax + 0x30]
cmp r9, rdx
lea rdx, [rsi + 0x20]
setae r10b
cmp rcx, rdx
setae dl
or r10b, dl
je 0x402e2c
cmp r8, 0xe
jbe 0x402e2c
lea rdi, [r8 + 1]
sub rsi, rax
mov rdx, rdi
and rdx, 0xfffffffffffffff0
lea r10, [rax + rdx + 0x20]
mov rdx, rcx
nop
nop word cs:[rax + rax]
movdqu xmm0, xmmword [rdx + rsi - 0x10]
add rdx, 0x10
movups xmmword [rdx - 0x10], xmm0
cmp rdx, r10
jne 0x402cc0
mov rdx, rdi
and rdx, 0xfffffffffffffff0
cmp rdx, rdi
je 0x402e20
movzx r10d, byte [r9 + rdx]
cmp r8, rdx
mov byte [rax + rdx + 0x20], r10b
lea r10, [rdx + 1]
jle 0x402e20
movzx esi, byte [r9 + rdx + 1]
cmp r8, r10
mov byte [rax + rdx + 0x21], sil
lea rsi, [rdx + 2]
jle 0x402e20
movzx r10d, byte [r9 + rdx + 2]
cmp rsi, r8
mov byte [rcx + rdx + 2], r10b
lea r10, [rdx + 3]
jge 0x402e20
movzx esi, byte [r9 + rdx + 3]
cmp r10, r8
mov byte [rcx + rdx + 3], sil
lea rcx, [rdx + 4]
jge 0x402e20
movzx r10d, byte [r9 + rdx + 4]
cmp r8, rcx
mov byte [rax + rdx + 0x24], r10b
lea r10, [rdx + 5]
jle 0x402e20
movzx ecx, byte [r9 + rdx + 5]
cmp r8, r10
mov byte [rax + rdx + 0x25], cl
lea rcx, [rdx + 6]
jle 0x402e20
movzx r10d, byte [r9 + rdx + 6]
cmp r8, rcx
mov byte [rax + rdx + 0x26], r10b
lea r10, [rdx + 7]
jle 0x402e20
movzx ecx, byte [r9 + rdx + 7]
cmp r8, r10
mov byte [rax + rdx + 0x27], cl
lea rcx, [rdx + 8]
jle 0x402e20
movzx r10d, byte [r9 + rdx + 8]
cmp r8, rcx
mov byte [rax + rdx + 0x28], r10b
lea r10, [rdx + 9]
jle 0x402e20
movzx ecx, byte [r9 + rdx + 9]
lea rsi, [rdx + 0xa]
cmp r8, r10
mov byte [rax + rdx + 0x29], cl
jle 0x402e20
movzx ecx, byte [r9 + rdx + 0xa]
cmp r8, rsi
mov byte [rax + rdx + 0x2a], cl
lea rcx, [rdx + 0xb]
jle 0x402e20
movzx r10d, byte [r9 + rdx + 0xb]
cmp r8, rcx
mov byte [rax + rdx + 0x2b], r10b
lea r10, [rdx + 0xc]
jle 0x402e20
movzx ecx, byte [r9 + rdx + 0xc]
cmp r8, r10
mov byte [rax + rdx + 0x2c], cl
lea rcx, [rdx + 0xd]
jle 0x402e20
movzx r10d, byte [r9 + rdx + 0xd]
cmp r8, rcx
mov byte [rax + rdx + 0x2d], r10b
lea r10, [rdx + 0xe]
jle 0x402e20
movzx edx, byte [r9 + rdx + 0xe]
mov byte [rax + r10 + 0x20], dl
mov r8, qword [rax + 0x10]
mov rsi, r11
jmp 0x402bdc
lea r8, [rax + r8 + 0x21]
mov rdx, rcx
sub rsi, rax
nop word [rax + rax]
movzx ecx, byte [rsi + rdx - 0x10]
add rdx, 1
mov byte [rdx - 1], cl
cmp rdx, r8
jne 0x402e40
jmp 0x402e20
mov rsi, r11
jmp 0x402bdc