Function at 0x140020d80
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x28
mov rsi, rdx
cmp word [rcx], 0
je 0x140021021
mov r9, 0xffffffffffffffff
xor ebx, ebx
mov rax, rcx
inc rbx
add r9, 2
cmp word [rax + 2], 0
lea rax, [rax + 2]
jne 0x140020da9
lea rdx, [rbx + rbx]
cmp rdx, 0x20
jbe 0x140021038
mov qword [rsp + 0x20], rsi
cmp rdx, 0x40
jbe 0x1400210e1
movabs rax, 0xb492b66fbe98f273
mov r11, qword [rcx + rbx*2 - 0x10]
mov r8, r11
xor r8, rax
mov r10, qword [rcx + rbx*2 - 0x38]
mov rsi, qword [rcx + rbx*2 - 0x28]
movabs r15, 0xc3a5c85c97cb3127
mov r14, r10
xor r14, r15
add rdx, qword [rcx + rbx*2 - 0x40]
lea r12, [rsi + r8]
add r12, rdx
rol r12, 0x2b
add r10, qword [rcx + rbx*2 - 0x30]
add r10, rdx
mov rdi, r10
rol rdi, 0x14
add rdi, rdx
add rdi, r12
add r10, rsi
movabs rdx, 0x69256cdf7d31e4e6
imul rdx, rbx
mov rsi, qword [rcx + rbx*2 - 8]
add rdx, qword [rcx + rbx*2 - 0x20]
add r15, rsi
add r15, rdx
rol r15, 0x2b
add r11, qword [rcx + rbx*2 - 0x18]
add r11, rdx
mov rbx, r11
rol rbx, 0x14
add rbx, rdx
add rbx, r15
add r11, rsi
mov rdx, rdi
shr rdx, 0x2f
xor rdx, rdi
imul rdx, rax
add rdx, r14
mov r14, qword [rcx]
add r14, rdx
rol r14, 0x19
rol r8, 0x1f
imul r14, rax
imul r8, rax
and r9, 0xffffffffffffffc0
xor r15d, r15d
mov rsi, rdx
add r14, r10
add r14, r8
mov rbp, qword [rcx + r15 + 0x10]
mov r13, qword [rcx + r15 + 0x18]
add r14, rbp
rol r14, 0x1b
imul r14, rax
add r8, rdi
mov r12, qword [rcx + r15 + 0x30]
add r8, r12
rol r8, 0x16
imul r8, rax
mov rdx, r14
xor rsi, r11
mov r14, rsi
rol r14, 0x1f
xor rdx, rbx
imul rdi, rax
add rdi, qword [rcx + r15]
xor r8, r10
add r11, r13
add r11, rdi
add r11, rdx
rol r11, 0x2b
add rbp, qword [rcx + r15 + 8]
add rbp, rdi
mov rsi, rbp
rol rsi, 0x14
mov r10, rbp
add rdi, rsi
add rdi, r11
add r10, r13
add rbx, r14
mov rsi, qword [rcx + r15 + 0x38]
add rbx, qword [rcx + r15 + 0x20]
lea r13, [rsi + rbx]
add r13, r8
rol r13, 0x2b
add r12, qword [rcx + r15 + 0x28]
add r12, rbx
mov r11, r12
rol r12, 0x14
add rbx, r12
add rbx, r13
add r11, rsi
add r15, 0x40
cmp r9, r15
jne 0x140020e97
xor rdi, rbx
movabs rcx, 0x9ddfea08eb382d69
imul rdi, rcx
xor rbx, rdi
shr rdi, 0x2f
xor rdi, rbx
imul rdi, rcx
mov r9, rdi
shr r9, 0x2f
xor r9, rdi
imul r9, rcx
add r9, r14
xor r10, r11
imul r10, rcx
xor r11, r10
shr r10, 0x2f
xor r10, r11
imul r10, rcx
mov r11, r10
shr r11, 0x2f
xor r11, r10
imul r11, rcx
mov r10, r8
shr r10, 0x2f
xor r10, r8
imul r10, rax
add r10, rdx
add r10, r11
xor r10, r9
imul r10, rcx
xor r9, r10
shr r10, 0x2f
xor r10, r9
imul r10, rcx
mov rdi, r10
shr rdi, 0x2f
xor rdi, r10
imul rdi, rcx
mov rsi, qword [rsp + 0x20]
mov ecx, 0x22
call qword [sym.imp.mozglue.dll_moz_xmalloc]
xorps xmm0, xmm0
movups xmmword [rax], xmm0
movups xmmword [rax + 0x10], xmm0
mov word [rax + 0x20], 0
mov rcx, qword [rsi]
mov qword [rsi], rax
test rcx, rcx
jne 0x14002102d
mov rcx, rax
mov r9, rdi
call fcn.140031da0
dec eax
cmp eax, 0x10
setb al
add rsp, 0x28
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
xor edx, edx
call fcn.140031e20
mov rdi, rax
jmp 0x140020fd7
call qword [sym.imp.mozglue.dll_free]
mov rax, qword [rsi]
jmp 0x140020ffd
cmp rdx, 0x10
jbe 0x140021023
movabs rax, 0xb492b66fbe98f273
imul rax, qword [rcx]
mov r9, qword [rcx + 8]
mov r10, qword [rcx + rdx - 8]
movabs r8, 0x9ae16a3b2f90404f
movabs r11, 0xc3a5c85c97cb3127
imul r11, qword [rcx + rdx - 0x10]
movabs rcx, 0xc949d7c7509e6557
xor rcx, r9
rol rcx, 0x2c
imul r8, r10
add rdx, rax
add rdx, rcx
sub rdx, r8
sub rax, r9
rol rax, 0x15
shr r8, 0x1e
add r8, r11
movabs rcx, 0xbe41013c00000000
imul rcx, r10
add rcx, rax
add rcx, r8
xor rcx, rdx
movabs rax, 0x9ddfea08eb382d69
imul rcx, rax
xor rdx, rcx
shr rcx, 0x2f
xor rcx, rdx
imul rcx, rax
mov rdi, rcx
shr rdi, 0x2f
xor rdi, rcx
imul rdi, rax
jmp 0x140020fd7
mov r9, qword [rcx + 0x10]
mov r11, qword [rcx + 0x18]
mov rbx, qword [rcx + rdx - 0x10]
mov r8, qword [rcx + rdx - 8]
lea r10, [rbx + rdx]
movabs rax, 0xc3a5c85c97cb3127
imul r10, rax
add r10, qword [rcx]
lea rdi, [r10 + r11]
mov rsi, r10
add r10, qword [rcx + 8]
mov r14, r10
add r10, r9
add r9, qword [rcx + rdx - 0x20]
lea r15, [r9 + r8]
mov r12, r9
add r9, qword [rcx + rdx - 0x18]
rol rdi, 0xc
rol rsi, 0x1b
rol r14, 0x39
rol r15, 0xc
rol r12, 0x1b
add r14, rsi
mov rcx, r9
rol rcx, 0x39
add r9, rbx
add r8, r9
rol r9, 0x21
add r12, r11
add r12, r15
add r12, rcx
add r12, r9
add r12, r10
rol r10, 0x21
add r14, rdi
add r10, r14
movabs rcx, 0x9ae16a3b2f90404f
imul r12, rcx
add r8, r10
imul r8, rax
add r8, r12
mov rdx, r8
shr rdx, 0x2f
xor rdx, r8
imul rdx, rax
add rdx, r10
mov rdi, rdx
shr rdi, 0x2f
xor rdi, rdx
jmp 0x140020fce