Function at 0x1404a8380
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
movdqa xmmword [rsp + 0x30], xmm6
mov rbx, r8
mov rsi, rcx
mov rdi, qword [rdx + 8]
mov eax, dword [rdi + 0x54]
cmp eax, dword [rdi + 0x58]
jne 0x1404a83ae
cmp byte [rsi + 0x18], 0
je 0x1404a87a8
movzx eax, word [rbx + 4]
rol ax, 8
movzx eax, ax
mov rcx, qword [rdi + 0x68]
mov edx, dword [rsi + 0x1c]
lea rdx, [rdx + rdx*4]
add eax, dword [rcx + rdx*4]
mov rcx, qword [rsi + 0x28]
add eax, eax
mov edx, dword [rsi + 0x20]
mov r8d, ecx
sub r8d, edx
sub eax, r8d
jb 0x1404a87ba
shr eax, 1
mov eax, eax
lea r15, [rcx + rax*2]
mov rax, qword [rsi + 8]
cmp qword [rax + 0x30], r15
ja 0x1404a86b4
mov rcx, qword [rax + 0x38]
cmp rcx, r15
jb 0x1404a86b4
sub ecx, r15d
and ecx, 0xfffffffe
je 0x1404a86b4
mov ecx, dword [rax + 0x40]
add ecx, 0xfffffffe
mov dword [rax + 0x40], ecx
test ecx, ecx
jle 0x1404a86b4
movzx eax, word [r15]
rol ax, 8
test ax, ax
je 0x1404a86b4
mov r9d, dword [rdi + 0x54]
mov ecx, dword [rdi + 0x58]
inc r9d
cmp r9d, ecx
cmovae r9d, ecx
mov r8d, dword [rsi + 0x1c]
mov ecx, r9d
sub ecx, r8d
cmp ecx, 2
jb 0x1404a8642
or byte [rdi + 0xb4], 0x20
mov rdx, qword [rdi + 0x68]
mov r10d, 0xffffffff
cmp r9d, r8d
je 0x1404a8621
cmp dword [rdi + 0x1c], 2
jne 0x1404a8494
cmp r9d, r8d
jbe 0x1404a8621
mov eax, r9d
mov rcx, rax
sub rcx, r8
cmp rcx, 9
jae 0x1404a84b5
mov rcx, r8
jmp 0x1404a85ff
lea eax, [r9 - 1]
lea rax, [rax + rax*4]
lea rcx, [r8 + r8*4]
mov ecx, dword [rdx + rcx*4 + 8]
mov r10d, dword [rdx + rax*4 + 8]
cmp ecx, r10d
cmovb r10d, ecx
jmp 0x1404a8621
mov r11d, ecx
and r11d, 7
mov r10d, 8
cmovne r10, r11
sub rcx, r10
add rcx, r8
add r10, r8
sub r10, rax
lea r11, [r8 + r8*4]
lea r11, [rdx + r11*4]
add r11, 0x94
pcmpeqd xmm1, xmm1
movdqa xmm0, xmmword [0x140599730]
pcmpeqd xmm2, xmm2
movd xmm3, dword [r11 - 0x50]
movd xmm4, dword [r11 - 0x64]
punpckldq xmm4, xmm3
movd xmm3, dword [r11 - 0x78]
movd xmm5, dword [r11 - 0x8c]
punpckldq xmm5, xmm3
punpcklqdq xmm5, xmm4
movd xmm3, dword [r11]
movd xmm4, dword [r11 - 0x14]
punpckldq xmm4, xmm3
movd xmm3, dword [r11 - 0x28]
movd xmm6, dword [r11 - 0x3c]
punpckldq xmm6, xmm3
punpcklqdq xmm6, xmm4
movdqa xmm3, xmm1
movdqa xmm4, xmm5
pxor xmm4, xmm0
pxor xmm1, xmm0
pcmpgtd xmm4, xmm1
pand xmm3, xmm4
pandn xmm4, xmm5
movdqa xmm1, xmm4
por xmm1, xmm3
movdqa xmm3, xmm2
movdqa xmm4, xmm6
pxor xmm4, xmm0
pxor xmm2, xmm0
pcmpgtd xmm4, xmm2
pand xmm3, xmm4
pandn xmm4, xmm6
movdqa xmm2, xmm4
por xmm2, xmm3
add r11, 0xa0
add r10, 8
jne 0x1404a84f1
movdqa xmm3, xmm1
pxor xmm3, xmm0
movdqa xmm4, xmm2
pxor xmm4, xmm0
pcmpgtd xmm4, xmm3
pand xmm1, xmm4
pandn xmm4, xmm2
por xmm4, xmm1
pshufd xmm1, xmm4, 0xee
movdqa xmm2, xmm4
pxor xmm2, xmm0
movdqa xmm3, xmm1
pxor xmm3, xmm0
pcmpgtd xmm3, xmm2
pand xmm4, xmm3
pandn xmm3, xmm1
por xmm3, xmm4
pshufd xmm1, xmm3, 0x55
movdqa xmm2, xmm3
pxor xmm2, xmm0
pxor xmm0, xmm1
pcmpgtd xmm0, xmm2
pand xmm3, xmm0
pandn xmm0, xmm1
por xmm0, xmm3
movd r10d, xmm0
sub rax, rcx
lea rcx, [rcx + rcx*4]
lea rcx, [rdx + rcx*4]
add rcx, 8
mov r11d, dword [rcx]
cmp r10d, r11d
cmovae r10d, r11d
add rcx, 0x14
dec rax
jne 0x1404a860e
mov dword [rsp + 0x20], r10d
mov dword [rsp + 0x28], 3
mov rcx, rdi
call fcn.14034bed0
mov r8d, dword [rsi + 0x1c]
movzx eax, word [r15]
rol ax, 8
movzx eax, ax
mov rcx, qword [rdi + 0x68]
mov edx, r8d
lea rdx, [rdx + rdx*4]
mov dword [rcx + rdx*4], eax
cmp byte [rsi + 0x19], 0
je 0x1404a86b1
mov r14, qword [rsi + 0x10]
movzx eax, word [r15]
rol ax, 8
movzx ebp, ax
mov rcx, r14
mov edx, ebp
call fcn.140484b60
cmp eax, 3
je 0x1404a8687
cmp eax, 2
je 0x1404a8699
cmp eax, 1
jne 0x1404a869f
mov ax, 2
jmp 0x1404a86a1
mov rcx, r14
mov edx, ebp
call fcn.14048e060
shl eax, 8
or eax, 8
jmp 0x1404a86a1
mov ax, 4
jmp 0x1404a86a1
xor eax, eax
mov rcx, qword [rdi + 0x68]
mov edx, dword [rsi + 0x1c]
lea rdx, [rdx + rdx*4]
mov word [rcx + rdx*4 + 0xc], ax
mov byte [rsi], 1
mov eax, dword [rdi + 0x54]
mov ecx, dword [rdi + 0x58]
dec ecx
cmp eax, ecx
cmovb ecx, eax
movzx eax, word [rbx + 6]
rol ax, 8
movzx eax, ax
mov rdx, qword [rdi + 0x68]
lea r15, [rcx + rcx*4]
add eax, dword [rdx + r15*4]
mov rcx, qword [rsi + 0x28]
add eax, eax
mov edx, dword [rsi + 0x20]
mov r8d, ecx
sub r8d, edx
sub eax, r8d
jb 0x1404a87c4
shr eax, 1
mov eax, eax
lea rax, [rcx + rax*2]
mov rcx, qword [rsi + 8]
cmp qword [rcx + 0x30], rax
ja 0x1404a8798
mov rdx, qword [rcx + 0x38]
cmp rdx, rax
jb 0x1404a8798
sub edx, eax
and edx, 0xfffffffe
je 0x1404a8798
mov edx, dword [rcx + 0x40]
add edx, 0xfffffffe
mov dword [rcx + 0x40], edx
test edx, edx
jle 0x1404a8798
movzx ecx, word [rax]
rol cx, 8
test cx, cx
je 0x1404a8798
movzx ecx, cx
mov rdx, qword [rdi + 0x68]
mov dword [rdx + r15*4], ecx
cmp byte [rsi + 0x19], 0
je 0x1404a8795
mov r14, qword [rsi + 0x10]
movzx eax, word [rax]
rol ax, 8
movzx ebp, ax
mov rcx, r14
mov edx, ebp
call fcn.140484b60
cmp eax, 3
je 0x1404a8771
cmp eax, 2
je 0x1404a8783
cmp eax, 1
jne 0x1404a8789
mov ax, 2
jmp 0x1404a878b
mov rcx, r14
mov edx, ebp
call fcn.14048e060
shl eax, 8
or eax, 8
jmp 0x1404a878b
mov ax, 4
jmp 0x1404a878b
xor eax, eax
mov rcx, qword [rdi + 0x68]
mov word [rcx + r15*4 + 0xc], ax
mov byte [rsi], 1
cmp byte [rbx + 2], 0
jns 0x1404a87a8
mov byte [rsi + 0x18], 1
mov eax, dword [rdi + 0x54]
mov dword [rsi + 0x1c], eax
movaps xmm6, xmmword [rsp + 0x30]
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret
mov eax, 0x3fffffff
jmp 0x1404a83e1
mov eax, 0x3fffffff
jmp 0x1404a86f2