Function at 0x140038490
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x78
movdqa xmmword [rsp + 0x60], xmm6
mov rdi, rcx
movzx esi, byte [rcx + 0x17]
test sil, sil
jns 0x1400384b9
mov rsi, qword [rdi + 8]
mov rdi, qword [rdi]
cmp rsi, 0x20
ja 0x1400384f4
cmp rsi, 0x10
ja 0x1400385d8
cmp rsi, 9
jb 0x1400387ee
mov rax, qword [rdi]
mov rdi, qword [rdi + rsi - 8]
lea rdx, [rdi + rsi]
mov ecx, esi
ror rdx, cl
mov rcx, rax
call 0x140038ba0
xor rax, rdi
jmp 0x1400385c2
cmp rsi, 0x40
ja 0x14003863d
mov rcx, qword [rdi + 0x10]
mov r9, qword [rdi + 0x18]
mov r11, qword [rdi + rsi - 0x10]
lea rdx, [r11 + rsi]
movabs rax, 0xc3a5c85c97cb3127
imul rdx, rax
add rdx, qword [rdi]
lea r8, [rdx + r9]
mov r14, rdx
add rdx, qword [rdi + 8]
mov r10, rdx
add rdx, rcx
add rcx, qword [rdi + rsi - 0x20]
mov rbx, qword [rdi + rsi - 8]
add rbx, r9
lea r15, [rbx + rcx]
mov r12, rcx
add rcx, qword [rdi + rsi - 0x18]
rol r8, 0xc
rol r14, 0x1b
rol r10, 0x39
rol r15, 0xc
rol r12, 0x1b
add r10, r14
mov rsi, rcx
rol rsi, 0x39
add rcx, r11
add rbx, rcx
rol rcx, 0x21
add r12, r9
add r12, rsi
add r12, r15
add r12, rcx
add r12, rdx
rol rdx, 0x21
add r10, r8
add rdx, r10
movabs rcx, 0x9ae16a3b2f90404f
imul r12, rcx
add rbx, rdx
imul rbx, rax
add rbx, r12
mov r8, rbx
shr r8, 0x2f
xor r8, rbx
imul r8, rax
add r8, rdx
mov rax, r8
shr rax, 0x2f
xor rax, r8
imul rax, rcx
movaps xmm6, xmmword [rsp + 0x60]
add rsp, 0x78
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
movabs rdx, 0xb492b66fbe98f273
imul rdx, qword [rdi]
mov rax, qword [rdi + 8]
movabs rcx, 0x9ae16a3b2f90404f
imul rcx, qword [rdi + rsi - 8]
movabs r8, 0xc3a5c85c97cb3127
imul r8, qword [rdi + rsi - 0x10]
mov r9, rdx
sub r9, rax
rol r9, 0x15
movabs r10, 0xc949d7c7509e6557
xor r10, rax
rol r10, 0x2c
add rdx, rsi
add rdx, r10
sub rdx, rcx
rol rcx, 0x22
add rcx, r8
add rcx, r9
jmp 0x1400387d4
lea r15, [rdi + rsi]
movabs r13, 0xb492b66fbe98f273
mov rbp, qword [rdi + rsi - 0x38]
add rbp, qword [rdi + rsi - 0x10]
mov rbx, qword [rdi + rsi - 0x28]
mov rcx, qword [rdi + rsi - 0x30]
add rcx, rsi
mov rdx, qword [rdi + rsi - 0x18]
call 0x140038ba0
mov r14, rax
lea rdx, [r15 - 0x40]
lea r12, [rsp + 0x40]
mov rcx, r12
mov r8, rsi
mov r9, rax
call fcn.140038bce
add r15, 0xffffffffffffffe0
mov r8, rbp
add r8, r13
lea r13, [rsp + 0x50]
mov rcx, r13
mov rdx, r15
mov r9, rbx
call fcn.140038bce
movabs rax, 0xb492b66fbe98f273
imul rbx, rax
add rbx, qword [rdi]
dec rsi
mov r9, qword [r13]
mov r15, qword [r13 + 8]
mov r13, qword [r12]
mov r12, qword [r12 + 8]
and rsi, 0xffffffffffffffc0
neg rsi
add rdi, 0x20
mov qword [rsp + 0x38], rsi
mov rax, r14
add rbx, rbp
add rbx, r13
add rbx, qword [rdi - 0x18]
lea rdx, [rdi - 0x20]
rol rbx, 0x1b
add rbp, r12
add rbp, qword [rdi + 0x10]
rol rbp, 0x16
movabs r8, 0xb492b66fbe98f273
imul rbx, r8
mov rcx, rbp
imul rcx, r8
mov r14, rbx
xor r14, r15
add r13, qword [rdi + 8]
mov rbp, r13
add rbp, rcx
add rax, r9
rol rax, 0x1f
mov rbx, rax
imul rbx, r8
imul r12, r8
add r9, r14
lea rsi, [rsp + 0x20]
mov rcx, rsi
mov r8, r12
call fcn.140038bce
mov r13, qword [rsp + 0x20]
movdqa xmm6, xmmword [rsp + 0x20]
movdqa xmmword [rsp + 0x40], xmm6
add r15, rbx
mov r9, qword [rdi - 0x10]
add r9, rbp
mov rcx, rsi
mov rsi, qword [rsp + 0x38]
mov rdx, rdi
mov r8, r15
call fcn.140038bce
mov r9, qword [rsp + 0x20]
mov r15, qword [rsp + 0x28]
mov qword [rsp + 0x50], r9
pshufd xmm0, xmm6, 0xee
movq r12, xmm0
add rdi, 0x40
add rsi, 0x40
jne 0x1400386d3
mov rcx, r13
mov rdx, r9
call 0x140038ba0
mov rcx, rbp
shr rcx, 0x2f
xor rcx, rbp
movabs rdx, 0xb492b66fbe98f273
imul rcx, rdx
add r14, rax
add r14, rcx
mov rcx, r12
mov rdx, r15
call 0x140038ba0
add rbx, rax
mov rcx, r14
mov rdx, rbx
movaps xmm6, xmmword [rsp + 0x60]
add rsp, 0x78
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp 0x140038ba0
cmp rsi, 4
jb 0x140038800
mov eax, dword [rdi]
mov edx, dword [rdi + rsi - 4]
lea rcx, [rsi + rax*8]
jmp 0x1400387d4
movabs rax, 0x9ae16a3b2f90404f
test rsi, rsi
je 0x1400385c2
movzx ecx, byte [rdi]
mov rdx, rsi
shr rdx, 1
movzx edx, byte [rdi + rdx]
movzx r8d, byte [rsi + rdi - 1]
shl rdx, 8
or rdx, rcx
lea rcx, [rsi + r8*4]
imul rdx, rax
movabs r8, 0xc949d7c7509e6557
imul r8, rcx
xor r8, rdx
mov rcx, r8
shr rcx, 0x2f
xor rcx, r8
jmp 0x1400385be
xor rcx, rdx
movabs r8, 0x9ddfea08eb382d69
imul rcx, r8
xor rdx, rcx
shr rcx, 0x2f
xor rcx, rdx
imul rcx, r8
mov rax, rcx
shr rax, 0x2f
xor rax, rcx
imul rax, r8
ret