Function at 0x65f490
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x198
movaps xmmword [rsp + 0x110], xmm6
movaps xmmword [rsp + 0x120], xmm7
movaps xmmword [rsp + 0x130], xmm8
movaps xmmword [rsp + 0x140], xmm9
movaps xmmword [rsp + 0x150], xmm10
movaps xmmword [rsp + 0x160], xmm11
movaps xmmword [rsp + 0x170], xmm12
movaps xmmword [rsp + 0x180], xmm13
mov rbx, qword [rsp + 0x208]
mov rsi, qword [rsp + 0x200]
test rbx, rbx
mov qword [rsp + 0x1e8], rdx
sete dl
mov r13, r8
cmp qword [rsp + 0x210], 0
sete al
mov qword [rsp + 0x1e0], rcx
or dl, al
jne 0x65feb0
cmp rsi, 1
jbe 0x65feb0
lea rax, [rsi - 1]
xor r12d, r12d
test rax, rsi
jne 0x65feb3
mov eax, 0x3fffffff
xor edx, edx
div rbx
cmp rax, qword [rsp + 0x210]
jb 0x65ff10
mov rax, rbx
shl rax, 4
cmp rax, 0x3f
ja 0x65f57b
mov ecx, ebx
mov eax, 1
shl ecx, 4
shl rax, cl
cmp rax, rsi
jbe 0x65ff70
mov rbp, qword [rsp + 0x210]
imul rbp, rbx
mov rax, rbp
shl rax, 7
mov qword [rsp + 0x98], rax
cmp rax, 0x7fffffff
ja 0x65ff40
movabs rax, 0x1ffffffffffffff
xor edx, edx
lea rdi, [rsi + 2]
div rbx
cmp rdi, rax
ja 0x660064
shl rdi, 7
mov rax, rbx
imul rax, rdi
mov rdx, rax
not rdx
cmp rdx, qword [rsp + 0x98]
jb 0x660080
cmp qword [rsp + 0x218], 0
mov edx, 0x2000000
cmovne rdx, qword [rsp + 0x218]
add rax, qword [rsp + 0x98]
mov qword [rsp + 0x218], rdx
mov qword [rsp + 0x108], rax
cmp rax, rdx
ja 0x660090
cmp qword [rsp + 0x220], 0
mov qword [rsp + 0x1f8], r9
mov r12d, 1
je 0x65feb3
mov rcx, rax
mov r8d, 0xf0
lea rdx, str.crypto_evp_pbe_scrypt.c
call fcn.0054a3f0
mov r9, qword [rsp + 0x1f8]
test rax, rax
mov qword [rsp + 0x48], rax
je 0x6600a0
mov qword [rsp + 0x1f8], r9
call fcn.0053e920
mov rcx, qword [rsp + 0x48]
mov r8, r13
mov dword [rsp + 0x20], 1
mov qword [rsp + 0x28], rax
mov r9, qword [rsp + 0x1f8]
mov qword [rsp + 0x38], rcx
mov ecx, dword [rsp + 0x98]
mov edx, dword [rsp + 0x1e8]
mov dword [rsp + 0x30], ecx
mov rcx, qword [rsp + 0x1e0]
call fcn.0065e160
test eax, eax
je 0x65ff80
mov r11, qword [rsp + 0x48]
mov r9, rbx
mov r8, rbx
mov r15, qword [rsp + 0x98]
shl r9, 7
sub rdi, 0x180
shl r8, 5
movdqa xmm6, xmmword [0x008f3ba0]
mov r13, r11
imul rdi, rbx
mov qword [rsp + 0xb0], r9
add r13, r15
movdqa xmm7, xmm6
mov qword [rsp + 0xa8], r8
lea rax, [r13 + r9 - 0x40]
lea r10, [r13 + r9]
mov qword [rsp + 0xa0], 0
mov qword [rsp + 0x60], rax
lea rax, [rbp + rbx*2]
mov rcx, rax
mov qword [rsp + 0xc8], r10
add r10, r9
shl rcx, 7
add rdi, r10
mov qword [rsp + 0x88], rax
sub rax, rbx
mov qword [rsp + 0xd0], rdi
lea rdi, [rcx + 0x40]
shl rax, 7
mov qword [rsp + 0xf0], rdi
mov rdi, r8
shr rdi, 4
mov qword [rsp + 0x58], r10
add r10, r9
lea r9, [rax + 0x10]
mov qword [rsp + 0x100], rdi
mov rdi, r11
add rdi, rcx
mov qword [rsp + 0xe8], rcx
mov rcx, rax
mov qword [rsp + 0x68], rax
lea rax, [r15 + 0x10]
cmp rcx, rax
mov qword [rsp + 0xd8], r10
setge dl
cmp r9, r15
mov qword [rsp + 0x70], r9
setle al
add r11, rcx
mov qword [rsp + 0x90], 0
or edx, eax
lea rax, [r15 + 0x40]
mov qword [rsp + 0x80], r11
mov qword [rsp + 0xe0], rax
lea rax, [r8 - 1]
mov byte [rsp + 0x7f], dl
mov qword [rsp + 0xf8], rax
mov qword [rsp + 0x200], rsi
mov rsi, r13
mov r14, qword [rsp + 0x48]
mov rcx, qword [rsp + 0xa0]
add r14, rcx
cmp qword [rsp + 0xa8], 0
mov r12, r14
je 0x660071
lea rax, [rcx + 0x40]
cmp rax, qword [rsp + 0xe8]
setle dl
cmp rcx, qword [rsp + 0xf0]
setge al
or dl, al
mov eax, 0
je 0x660013
cmp qword [rsp + 0xf8], 0xe
jbe 0x660013
mov rcx, qword [rsp + 0x100]
xor edx, edx
pxor xmm5, xmm5
pxor xmm3, xmm3
nop dword [rax + rax]
movdqu xmm2, xmmword [r14 + rax]
movdqu xmm0, xmmword [r14 + rax + 0x10]
movdqa xmm8, xmm6
movdqa xmm10, xmm6
movdqu xmm1, xmmword [r14 + rax + 0x10]
movdqu xmm9, xmmword [r14 + rax + 0x20]
add rdx, 1
pand xmm0, xmm6
pand xmm2, xmm6
movdqu xmm4, xmmword [r14 + rax + 0x20]
packuswb xmm2, xmm0
movdqu xmm0, xmmword [r14 + rax]
psrlw xmm1, 8
pand xmm9, xmm6
pand xmm8, xmm2
psrlw xmm4, 8
psrlw xmm0, 8
psrlw xmm2, 8
packuswb xmm0, xmm1
movdqu xmm1, xmmword [r14 + rax + 0x30]
pand xmm1, xmm6
packuswb xmm9, xmm1
movdqu xmm1, xmmword [r14 + rax + 0x30]
pand xmm10, xmm9
psrlw xmm9, 8
psrlw xmm1, 8
packuswb xmm2, xmm9
movdqa xmm9, xmm6
packuswb xmm4, xmm1
movdqa xmm1, xmm6
packuswb xmm8, xmm10
pand xmm9, xmm4
pand xmm1, xmm0
movdqa xmm12, xmm8
packuswb xmm1, xmm9
psrlw xmm4, 8
punpcklbw xmm12, xmm5
psrlw xmm0, 8
movdqa xmm11, xmm2
movdqa xmm13, xmm12
packuswb xmm0, xmm4
movdqa xmm4, xmm1
punpcklbw xmm11, xmm5
punpcklbw xmm4, xmm5
punpcklwd xmm13, xmm3
movdqa xmm10, xmm0
movdqa xmm9, xmm4
punpckhwd xmm4, xmm3
punpcklbw xmm10, xmm5
punpcklwd xmm9, xmm3
pslld xmm4, 8
punpckhwd xmm12, xmm3
pslld xmm9, 8
por xmm4, xmm12
punpckhbw xmm1, xmm5
por xmm9, xmm13
movdqa xmm13, xmm11
punpckhwd xmm11, xmm3
punpcklwd xmm13, xmm3
pslld xmm11, 0x10
punpckhbw xmm8, xmm5
pslld xmm13, 0x10
por xmm4, xmm11
punpckhbw xmm2, xmm5
por xmm9, xmm13
movdqa xmm13, xmm10
punpckhwd xmm10, xmm3
punpcklwd xmm13, xmm3
pslld xmm10, 0x18
punpckhbw xmm0, xmm5
por xmm4, xmm10
pslld xmm13, 0x18
por xmm9, xmm13
movups xmmword [rdi + rax + 0x10], xmm4
movdqa xmm4, xmm1
punpckhwd xmm1, xmm3
movups xmmword [rdi + rax], xmm9
punpcklwd xmm4, xmm3
movdqa xmm9, xmm8
punpckhwd xmm8, xmm3
pslld xmm4, 8
pslld xmm1, 8
punpcklwd xmm9, xmm3
por xmm4, xmm9
movdqa xmm9, xmm2
punpckhwd xmm2, xmm3
punpcklwd xmm9, xmm3
pslld xmm2, 0x10
por xmm1, xmm8
pslld xmm9, 0x10
por xmm1, xmm2
por xmm4, xmm9
movdqa xmm9, xmm0
punpckhwd xmm0, xmm3
punpcklwd xmm9, xmm3
pslld xmm0, 0x18
pslld xmm9, 0x18
por xmm0, xmm1
por xmm4, xmm9
movups xmmword [rdi + rax + 0x30], xmm0
movups xmmword [rdi + rax + 0x20], xmm4
add rax, 0x40
cmp rdx, rcx
jne 0x65f850
mov rbp, qword [rsp + 0xa8]
mov r13, qword [rsp + 0xd8]
mov qword [rsp + 0x50], rsi
mov rsi, r13
mov r13, qword [rsp + 0xb0]
mov r15d, 1
nop dword [rax + rax]
mov rdx, rsi
mov rcx, rsi
mov r8, rbx
add r15, 1
sub rdx, r13
add rsi, r13
call fcn.0065eda0
cmp qword [rsp + 0x200], r15
ja 0x65fa80
mov rsi, qword [rsp + 0x50]
mov r8, rbx
xor r13d, r13d
lea r15, [rbp - 1]
mov rdx, qword [rsp + 0xd0]
mov rcx, rsi
call fcn.0065eda0
lea rax, [rbp*4]
mov qword [rsp + 0xb8], r12
mov r12, rbx
mov qword [rsp + 0x50], rax
mov rbx, r13
mov r13, qword [rsp + 0x200]
mov qword [rsp + 0xc0], rdi
mov rdi, r15
mov r15, qword [rsp + 0xc8]
nop word [rax + rax]
mov rax, qword [rsp + 0x60]
xor edx, edx
mov eax, dword [rax]
div r13
imul rdx, r12
mov rax, rdx
shl rax, 7
add rax, qword [rsp + 0x58]
test rbp, rbp
je 0x65fb85
add rdx, qword [rsp + 0x88]
shl rdx, 7
lea rcx, [rdx + 0x10]
cmp rcx, qword [rsp + 0x68]
setle cl
cmp qword [rsp + 0x70], rdx
setle r8b
or ecx, r8d
test byte [rsp + 0x7f], cl
je 0x65ffb0
cmp rdi, 2
jbe 0x65ffb0
add rdx, qword [rsp + 0x48]
xor eax, eax
movdqu xmm0, xmmword [rsi + rax]
movdqu xmm3, xmmword [rdx + rax]
mov rcx, qword [rsp + 0x80]
pxor xmm0, xmm3
movups xmmword [rcx + rax], xmm0
add rax, 0x10
cmp rax, qword [rsp + 0x50]
jne 0x65fb60
mov r8, r12
mov rdx, r15
mov rcx, rsi
add rbx, 1
call fcn.0065eda0
cmp r13, rbx
ja 0x65fb00
mov rbx, r12
mov rdi, qword [rsp + 0xc0]
mov r12, qword [rsp + 0xb8]
test rbp, rbp
je 0x65fe06
mov rcx, qword [rsp + 0xa0]
lea rax, [rcx + 0x40]
cmp rax, qword [rsp + 0x98]
setle dl
cmp rcx, qword [rsp + 0xe0]
setge al
or dl, al
je 0x65ffd0
lea rax, [rbp - 1]
cmp rax, 0xe
jbe 0x65ffd0
lea rdx, [rsi + rbp*4]
mov rax, rsi
nop dword [rax + rax]
movdqu xmm0, xmmword [rax]
movdqu xmm9, xmmword [rax + 0x10]
add rax, 0x40
add r14, 0x40
movdqu xmm2, xmmword [rax - 0x20]
movdqu xmm8, xmmword [rax - 0x10]
movdqa xmm3, xmm0
movdqa xmm1, xmm0
punpcklwd xmm3, xmm9
punpckhwd xmm1, xmm9
movdqa xmm10, xmm8
movdqa xmm4, xmm3
punpcklwd xmm3, xmm1
movdqa xmm11, xmm8
psrld xmm10, 8
psrld xmm11, 0x10
punpckhwd xmm4, xmm1
movdqa xmm1, xmm2
punpcklwd xmm3, xmm4
movdqa xmm4, xmm2
punpcklwd xmm1, xmm8
punpckhwd xmm4, xmm8
pand xmm3, xmm7
movdqa xmm5, xmm1
psrld xmm8, 0x18
punpcklwd xmm1, xmm4
punpckhwd xmm5, xmm4
punpcklwd xmm1, xmm5
movdqa xmm5, xmm9
pand xmm1, xmm7
psrld xmm5, 8
packuswb xmm3, xmm1
movdqa xmm1, xmm0
psrld xmm1, 8
movdqa xmm4, xmm1
punpcklwd xmm1, xmm5
punpckhwd xmm4, xmm5
movdqa xmm5, xmm1
punpckhwd xmm5, xmm4
punpcklwd xmm1, xmm4
movdqa xmm4, xmm2
psrld xmm4, 8
punpcklwd xmm1, xmm5
movdqa xmm5, xmm4
punpcklwd xmm4, xmm10
pand xmm1, xmm7
punpckhwd xmm5, xmm10
movdqa xmm10, xmm4
punpckhwd xmm10, xmm5
punpcklwd xmm4, xmm5
movdqa xmm5, xmm0
psrld xmm5, 0x10
psrld xmm0, 0x18
punpcklwd xmm4, xmm10
movdqa xmm10, xmm9
psrld xmm9, 0x18
pand xmm4, xmm7
psrld xmm10, 0x10
packuswb xmm1, xmm4
movdqa xmm4, xmm5
punpcklwd xmm5, xmm10
punpckhwd xmm4, xmm10
movdqa xmm10, xmm5
punpcklwd xmm5, xmm4
punpckhwd xmm10, xmm4
movdqa xmm4, xmm2
psrld xmm4, 0x10
psrld xmm2, 0x18
punpcklwd xmm5, xmm10
movdqa xmm10, xmm4
punpcklwd xmm4, xmm11
pand xmm5, xmm7
punpckhwd xmm10, xmm11
movdqa xmm11, xmm4
punpckhwd xmm11, xmm10
punpcklwd xmm4, xmm10
punpcklwd xmm4, xmm11
pand xmm4, xmm7
packuswb xmm5, xmm4
movdqa xmm4, xmm0
punpcklwd xmm0, xmm9
punpckhwd xmm4, xmm9
movdqa xmm9, xmm0
punpckhwd xmm9, xmm4
punpcklwd xmm0, xmm4
movdqa xmm4, xmm2
punpcklwd xmm2, xmm8
punpckhwd xmm4, xmm8
punpcklwd xmm0, xmm9
movdqa xmm8, xmm2
punpcklwd xmm2, xmm4
pand xmm0, xmm7
punpckhwd xmm8, xmm4
movdqa xmm4, xmm1
punpcklwd xmm2, xmm8
pand xmm2, xmm7
packuswb xmm0, xmm2
movdqa xmm2, xmm3
punpckhbw xmm3, xmm5
punpcklbw xmm2, xmm5
punpcklbw xmm4, xmm0
punpckhbw xmm1, xmm0
movdqa xmm0, xmm2
punpckhbw xmm2, xmm4
punpcklbw xmm0, xmm4
movups xmmword [r14 - 0x30], xmm2
movups xmmword [r14 - 0x40], xmm0
movdqa xmm0, xmm3
punpckhbw xmm3, xmm1
punpcklbw xmm0, xmm1
movups xmmword [r14 - 0x10], xmm3
movups xmmword [r14 - 0x20], xmm0
cmp rax, rdx
jne 0x65fc00
add qword [rsp + 0x90], 1
mov rdx, qword [rsp + 0xb0]
mov rax, qword [rsp + 0x90]
add qword [rsp + 0xa0], rdx
cmp qword [rsp + 0x210], rax
ja 0x65f7e1
call fcn.0053e920
mov rdx, qword [rsp + 0x228]
mov rdi, qword [rsp + 0x220]
mov dword [rsp + 0x20], 1
mov qword [rsp + 0x28], rax
mov r9d, dword [rsp + 0x98]
mov dword [rsp + 0x30], edx
mov r8, qword [rsp + 0x48]
mov qword [rsp + 0x38], rdi
mov edx, dword [rsp + 0x1e8]
mov rcx, qword [rsp + 0x1e0]
call fcn.0065e160
test eax, eax
je 0x65ff80
mov r12d, 1
mov rdx, qword [rsp + 0x108]
mov rcx, qword [rsp + 0x48]
mov r9d, 0x107
lea r8, str.crypto_evp_pbe_scrypt.c
call fcn.0054a800
jmp 0x65feb3
xor r12d, r12d
movaps xmm6, xmmword [rsp + 0x110]
mov eax, r12d
movaps xmm7, xmmword [rsp + 0x120]
movaps xmm8, xmmword [rsp + 0x130]
movaps xmm9, xmmword [rsp + 0x140]
movaps xmm10, xmmword [rsp + 0x150]
movaps xmm11, xmmword [rsp + 0x160]
movaps xmm12, xmmword [rsp + 0x170]
movaps xmm13, xmmword [rsp + 0x180]
add rsp, 0x198
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov dword [rsp + 0x20], 0xae
mov r8d, 0xac
mov edx, 0xb5
mov ecx, 6
lea r9, str.crypto_evp_pbe_scrypt.c
call fcn.005292e0
jmp 0x65feb3
mov dword [rsp + 0x20], 0xcb
lea r9, str.crypto_evp_pbe_scrypt.c
mov r8d, 0xac
mov edx, 0xb5
xor r12d, r12d
mov ecx, 6
call fcn.005292e0
jmp 0x65feb3
mov dword [rsp + 0x20], 0xb9
jmp 0x65ff18
mov dword [rsp + 0x20], 0x105
lea r9, str.crypto_evp_pbe_scrypt.c
mov r8d, 0xb5
xor r12d, r12d
mov edx, 0xb5
mov ecx, 6
call fcn.005292e0
jmp 0x65fe8f
xor edx, edx
mov ecx, dword [rsi + rdx*4]
xor ecx, dword [rax + rdx*4]
mov dword [r15 + rdx*4], ecx
add rdx, 1
cmp rbp, rdx
jne 0x65ffb2
jmp 0x65fb85
lea r8, [r14 + rbp*4]
mov rdx, rsi
nop word [rax + rax]
mov eax, dword [rdx]
add r12, 4
add rdx, 4
movzx ecx, ah
mov byte [r12 - 4], al
mov byte [r12 - 3], cl
mov ecx, eax
shr eax, 0x18
shr ecx, 0x10
mov byte [r12 - 2], cl
mov byte [r12 - 1], al
cmp r8, r12
jne 0x65ffe0
jmp 0x65fe06
mov r8, qword [rsp + 0x58]
mov r9, qword [rsp + 0xa8]
movzx ecx, byte [r14 + rax*4]
mov dword [r8 + rax*4], ecx
movzx edx, byte [r14 + rax*4 + 1]
shl edx, 8
or ecx, edx
mov dword [r8 + rax*4], ecx
movzx edx, byte [r14 + rax*4 + 2]
shl edx, 0x10
or edx, ecx
mov dword [r8 + rax*4], edx
movzx ecx, byte [r14 + rax*4 + 3]
shl ecx, 0x18
or edx, ecx
mov dword [r8 + rax*4], edx
add rax, 1
cmp r9, rax
jne 0x660020
jmp 0x65fa55
mov dword [rsp + 0x20], 0xd5
jmp 0x65ff48
xor ebp, ebp
mov r13, qword [rsp + 0x58]
jmp 0x65fa65
mov dword [rsp + 0x20], 0xdc
jmp 0x65ff48
mov dword [rsp + 0x20], 0xe8
jmp 0x65ff48
mov dword [rsp + 0x20], 0xf2
lea r9, str.crypto_evp_pbe_scrypt.c
mov r8d, 0x41
xor r12d, r12d
mov edx, 0xb5
mov ecx, 6
call fcn.005292e0
jmp 0x65feb3