Function at 0x140034390
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x40
movsxd rsi, dword [rsp + 0x90]
xor ebp, ebp
mov qword [rsp + 0x70], rbx
mov edi, r9d
mov qword [rsp + 0x78], r13
mov ebx, ebp
mov r13d, ebp
sub edi, r8d
mov r14, rdx
mov r15, rcx
mov ecx, ebp
mov r9d, ebp
test esi, esi
jle 0x1400343fa
mov r10, r14
mov eax, dword [r10]
lea r10, [r10 + 4]
cdq
xor eax, edx
sub eax, edx
mov edx, r9d
cmp eax, ecx
mov r8d, eax
cmovle r8d, ecx
cmovle edx, ebx
inc r9d
mov ebx, edx
mov ecx, r8d
cmp r9d, esi
jl 0x1400343d2
mov edx, ecx
cmp edi, 1
jne 0x140034409
sar edx, 1
and ecx, edi
add edx, ecx
jmp 0x140034412
lea ecx, [rdi - 1]
sar edx, cl
inc edx
sar edx, 1
cmp edx, 0x7fff
jle 0x140034458
mov eax, 0x27ffe
lea ecx, [rbx + 1]
cmp edx, eax
mov r8d, 0xffbe
cmovl eax, edx
imul ecx, eax
add eax, 0xffff8001
shl eax, 0xe
cdq
sar ecx, 2
idiv ecx
mov edx, esi
mov rcx, r14
sub r8d, eax
call fcn.140034330
inc r13d
cmp r13d, 0xa
jl 0x1400343c6
mov rbx, qword [rsp + 0x70]
cmp r13d, 0xa
mov r13, qword [rsp + 0x78]
jne 0x140034520
test esi, esi
jle 0x140034681
mov r11d, esi
nop word [rax + rax]
mov eax, dword [r14]
lea ecx, [rdi - 1]
mov edx, eax
mov r8d, eax
mov r9d, eax
sar edx, 1
and r8d, 1
sar r9d, cl
cmp edi, 1
jne 0x1400344a2
lea r10d, [r8 + rdx]
jmp 0x1400344a9
lea r10d, [r9 + 1]
sar r10d, 1
cmp r10d, 0x7fff
jle 0x1400344b9
mov eax, 0x7fff
jmp 0x1400344fd
cmp edi, 1
jne 0x1400344c9
lea ecx, [rdi - 1]
sar eax, cl
lea r10d, [r8 + rdx]
jmp 0x1400344de
mov edx, eax
lea r10d, [r9 + 1]
mov r8d, eax
sar r10d, 1
sar edx, 1
mov eax, r9d
and r8d, 1
cmp r10d, 0xffff8000
jge 0x1400344ee
mov eax, 0xffff8000
jmp 0x1400344fd
cmp edi, 1
jne 0x1400344f9
lea eax, [r8 + rdx]
jmp 0x1400344fd
inc eax
sar eax, 1
mov word [r15], ax
mov ecx, edi
cwde
add r15, 2
shl eax, cl
mov dword [r14], eax
add r14, 4
sub r11, 1
jne 0x140034480
jmp 0x140034681
test esi, esi
jle 0x140034681
movaps xmmword [rsp + 0x20], xmm7
cmp esi, 8
jb 0x14003463f
lea eax, [rdi - 1]
movd xmm7, eax
lea rcx, [rsi - 1]
lea rax, [rsi - 1]
lea rax, [r14 + rax*4]
lea rcx, [r15 + rcx*2]
cmp r15, rax
ja 0x14003455b
cmp rcx, r14
jae 0x14003463f
mov eax, esi
movaps xmmword [rsp + 0x30], xmm6
and eax, 0xfffffff8
movdqa xmm5, xmmword [0x140084d00]
mov ecx, 1
movd xmm4, edi
mov rdx, r15
pshufd xmm4, xmm4, 0
mov r8, r14
pcmpeqd xmm4, xmm5
movd xmm6, ecx
nop dword [rax]
movdqu xmm3, xmmword [r8]
lea rdx, [rdx + 0x10]
add ebp, 8
movdqa xmm1, xmm5
lea r8, [r8 + 0x20]
pand xmm1, xmm3
movdqa xmm0, xmm3
movdqa xmm2, xmm4
psrad xmm0, xmm7
psrad xmm3, xmm6
paddd xmm0, xmm5
paddd xmm1, xmm3
pand xmm1, xmm4
movdqu xmm3, xmmword [r8 - 0x10]
psrad xmm0, xmm6
pandn xmm2, xmm0
por xmm2, xmm1
pshuflw xmm0, xmm2, 0xd8
pshufhw xmm1, xmm0, 0xd8
movdqa xmm0, xmm3
pshufd xmm2, xmm1, 0xd8
movdqa xmm1, xmm5
movq qword [rdx - 0x10], xmm2
pand xmm1, xmm3
movdqa xmm2, xmm4
psrad xmm0, xmm7
psrad xmm3, xmm6
paddd xmm0, xmm5
paddd xmm1, xmm3
pand xmm1, xmm4
psrad xmm0, xmm6
pandn xmm2, xmm0
por xmm2, xmm1
pshuflw xmm0, xmm2, 0xd8
pshufhw xmm1, xmm0, 0xd8
pshufd xmm2, xmm1, 0xd8
movq qword [rdx - 8], xmm2
cmp ebp, eax
jl 0x140034590
movaps xmm6, xmmword [rsp + 0x30]
cmp ebp, esi
jge 0x14003467c
movsxd rax, ebp
sub esi, ebp
mov r9d, esi
lea r8, [r15 + rax*2]
lea rdx, [r14 + rax*4]
nop
mov ecx, dword [rdx]
mov eax, ecx
cmp edi, 1
jne 0x140034661
sar eax, 1
and ecx, edi
add eax, ecx
jmp 0x14003466a
lea ecx, [rdi - 1]
sar eax, cl
inc eax
sar eax, 1
mov word [r8], ax
add rdx, 4
add r8, 2
sub r9, 1
jne 0x140034650
movaps xmm7, xmmword [rsp + 0x20]
mov rbp, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret