Function at 0x140306830
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov rax, qword [rsp + 0xa0]
mov rbp, rcx
xor edi, edi
mov rcx, r9
test rax, rax
mov r14, rdx
mov esi, edi
mov r12d, edi
cmovne rcx, rax
mov qword [rsp + 0x30], rcx
mov rcx, r9
call fcn.140242b20
mov ebx, dword [rsp + 0xa8]
movsxd r15, eax
test eax, eax
js 0x140306b6d
cmp ebx, 0xffffffff
jne 0x1403068f2
mov ebx, r15d
mov rcx, qword [rbp + 0x18]
call fcn.1401bba40
mov rcx, rbp
lea r13d, [rax - 1]
call fcn.1401c2030
mov dword [rsp + 0xa8], eax
mov ecx, eax
and r13d, 7
jne 0x1403068c7
mov byte [r14], sil
inc r14
dec ecx
mov dword [rsp + 0xa8], ecx
lea eax, [r15 + 2]
cmp ecx, eax
jge 0x140306926
mov edx, 0x98
mov dword [rsp + 0x20], edi
lea r9, [0x140400f91]
mov ecx, 4
lea r8d, [rdx - 0x2a]
call fcn.1401d6280
jmp 0x140306b6d
cmp ebx, 0xfffffffe
jne 0x1403068fe
mov ebx, 0xfffffffd
jmp 0x140306894
cmp ebx, 0xfffffffd
jge 0x140306894
mov edx, 0x98
mov dword [rsp + 0x20], edi
lea r9, [0x140400f91]
mov ecx, 4
lea r8d, [rdx - 0x10]
call fcn.1401d6280
jmp 0x140306b6d
mov ebp, ecx
sub ebp, r15d
lea eax, [rbp - 2]
cmp ebx, 0xfffffffd
jne 0x140306937
mov ebx, eax
jmp 0x14030693b
cmp ebx, eax
jg 0x1403068cf
test ebx, ebx
jle 0x14030698c
movsxd rcx, ebx
lea rdx, [0x140400f91]
xor r8d, r8d
call fcn.1401b7cd0
mov rsi, rax
test rax, rax
jne 0x14030697a
lea r9, [0x140400f91]
mov dword [rsp + 0x20], edi
mov edx, 0x98
lea ecx, [rax + 4]
lea r8d, [rax + 0x41]
call fcn.1401d6280
jmp 0x140306b6d
mov edx, ebx
mov rcx, rax
call fcn.1401d3cc0
test eax, eax
jle 0x140306b6d
lea eax, [rbp - 1]
cdqe
add rax, r14
mov qword [rsp + 0xa0], rax
call fcn.1401c01e0
mov r12, rax
test rax, rax
je 0x140306b6d
mov rdx, qword [rsp + 0x98]
xor r8d, r8d
mov rcx, rax
call fcn.1401c0560
test eax, eax
je 0x140306b6d
mov r8d, 8
lea rdx, [0x1403e05d0]
mov rcx, r12
call fcn.1401c0740
test eax, eax
je 0x140306b6d
mov rdx, qword [rsp + 0x90]
mov r8, r15
mov rcx, r12
call fcn.1401c0740
test eax, eax
je 0x140306b6d
test ebx, ebx
je 0x140306a1a
movsxd r8, ebx
mov rdx, rsi
mov rcx, r12
call fcn.1401c0740
test eax, eax
je 0x140306b6d
mov rdx, qword [rsp + 0xa0]
xor r8d, r8d
mov rcx, r12
call fcn.1401c0750
test eax, eax
je 0x140306b6d
mov rax, qword [rsp + 0x30]
lea edx, [rbp - 1]
mov r8, qword [rsp + 0xa0]
mov r9d, r15d
mov rcx, r14
mov qword [rsp + 0x20], rax
call fcn.1402b4da0
test eax, eax
jne 0x140306b6d
sub ebp, ebx
movsxd rax, ebp
add rax, r14
xor byte [rax - 2], 1
dec rax
test ebx, ebx
jle 0x140306b43
cmp ebx, 0x40
jb 0x140306b1a
lea ecx, [rbx - 1]
movsxd rdx, ecx
lea rcx, [rdx + rsi]
lea r8, [rdx + rax]
cmp rax, rcx
ja 0x140306a99
cmp r8, rsi
jae 0x140306b1a
mov edx, ebx
and edx, 0x8000003f
jge 0x140306aaa
dec edx
or edx, 0xffffffc0
inc edx
mov ecx, ebx
mov r8, 0xffffffffffffffe0
sub ecx, edx
lea rdx, [rsi + 0x20]
movsxd r9, ecx
sub r8, rsi
nop
movdqu xmm0, xmmword [rax]
add edi, 0x40
movdqu xmm1, xmmword [rdx - 0x20]
lea rdx, [rdx + 0x40]
lea rcx, [r8 + rdx]
xorps xmm1, xmm0
movdqu xmmword [rax], xmm1
movdqu xmm0, xmmword [rax + 0x10]
movdqu xmm1, xmmword [rdx - 0x50]
xorps xmm1, xmm0
movdqu xmm0, xmmword [rdx - 0x40]
movdqu xmmword [rax + 0x10], xmm1
movdqu xmm1, xmmword [rax + 0x20]
xorps xmm1, xmm0
movdqu xmmword [rax + 0x20], xmm1
movdqu xmm0, xmmword [rax + 0x30]
movdqu xmm1, xmmword [rdx - 0x30]
xorps xmm1, xmm0
movdqu xmmword [rax + 0x30], xmm1
add rax, 0x40
cmp rcx, r9
jl 0x140306ac0
movsxd r8, edi
movsxd r9, ebx
cmp r8, r9
jge 0x140306b43
nop word [rax + rax]
movzx edx, byte [r8 + rsi]
inc r8
xor byte [rax], dl
lea rax, [rax + 1]
cmp r8, r9
jl 0x140306b30
test r13d, r13d
je 0x140306b5a
mov ecx, 8
mov eax, 0xff
sub ecx, r13d
sar eax, cl
and byte [r14], al
movsxd rax, dword [rsp + 0xa8]
mov edi, 1
mov byte [rax + r14 - 1], 0xbc
mov rcx, r12
call fcn.1401c02c0
movsxd rdx, ebx
lea r8, [0x140400f91]
xor r9d, r9d
mov rcx, rsi
call fcn.1401b7ea0
mov rbx, qword [rsp + 0x80]
mov eax, edi
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret