Function at 0x140298660
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x98
movdqa xmmword [rsp + 0x80], xmm9
movdqa xmmword [rsp + 0x70], xmm8
movdqa xmmword [rsp + 0x60], xmm7
movdqa xmmword [rsp + 0x50], xmm6
mov edi, r9d
mov rsi, r8
test ecx, ecx
je 0x1402986de
test edx, edx
je 0x140298b29
mov r9d, dword [rsp + 0x118]
mov r8d, dword [rsp + 0x110]
mov rdx, qword [rsp + 0x108]
mov eax, dword [rsp + 0x100]
mov rcx, rsi
test edi, edi
je 0x140298b3e
test eax, eax
je 0x140298bd2
call fcn.140356ab4
jmp 0x140298c16
test edx, edx
je 0x140298b50
mov r15d, dword [rsi + 0x44]
movd xmm0, r15d
lea eax, [r15 - 0x106]
mov dword [rsp + 0x4c], eax
pshufd xmm6, xmm0, 0x50
xor r12d, r12d
movdqa xmm7, xmmword [0x1403d2740]
movdqa xmm8, xmmword [0x1403d2750]
pcmpeqd xmm9, xmm9
nop dword [rax + rax]
mov r13d, dword [rsi + 0x58]
mov eax, dword [rsi + 0x94]
mov ecx, dword [rsi + 0x9c]
add ecx, eax
sub r13d, ecx
mov ecx, dword [rsi + 0x44]
add ecx, dword [rsp + 0x4c]
cmp eax, ecx
jb 0x14029893e
mov rcx, qword [rsi + 0x50]
lea rdx, [rcx + r15]
mov r8d, r15d
sub r8d, r13d
call fcn.14039e2f0
movq xmm0, qword [rsi + 0x94]
psubd xmm0, xmm6
movq qword [rsi + 0x94], xmm0
sub dword [rsi + 0x84], r15d
movd eax, xmm0
cmp dword [rsi + 0x1708], eax
jbe 0x140298784
mov dword [rsi + 0x1708], eax
mov eax, dword [rsi + 0x44]
mov r11d, dword [rsi + 0x74]
mov rbx, qword [rsi + 0x68]
lea rcx, [rbx + r11*2]
lea r8d, [r11 - 1]
movd xmm0, eax
cmp r8d, 7
jae 0x1402987b0
mov edx, r11d
jmp 0x140298838
inc r8
mov r9, r8
and r9, 0xfffffffffffffff8
sub rcx, r9
sub rcx, r9
mov edx, r11d
sub edx, r9d
pshufd xmm1, xmm0, 0
mov r10, r9
neg r10
lea r11, [rbx + r11*2]
add r11, 0xfffffffffffffff0
xor ebx, ebx
nop dword [rax + rax]
movdqu xmm2, xmmword [r11 + rbx*2]
movdqa xmm3, xmm1
pxor xmm3, xmm7
movdqa xmm4, xmm8
pcmpgtd xmm4, xmm3
movdqa xmm3, xmm1
pand xmm3, xmm4
pxor xmm4, xmm9
por xmm4, xmm3
pslld xmm4, 0x10
psrad xmm4, 0x10
packssdw xmm4, xmm4
pshuflw xmm3, xmm4, 0x1b
pshufhw xmm3, xmm3, 0x1b
psubusw xmm2, xmm3
movdqu xmmword [r11 + rbx*2], xmm2
add rbx, 0xfffffffffffffff8
cmp r10, rbx
jne 0x1402987e0
cmp r8, r9
je 0x14029885b
neg edx
xor r8d, r8d
nop dword [rax]
movzx r9d, word [rcx + r8*2 - 2]
sub r9d, eax
cmovb r9d, r12d
mov word [rcx + r8*2 - 2], r9w
dec r8
cmp edx, r8d
jne 0x140298840
mov r11, qword [rsi + 0x60]
lea rcx, [r11 + rax*2]
lea r8d, [rax - 1]
cmp r8d, 7
jae 0x140298880
mov edx, eax
jmp 0x140298918
inc r8
mov r9, r8
and r9, 0xfffffffffffffff8
sub rcx, r9
sub rcx, r9
mov r10d, dword [0x1404f02ac]
add r10d, r9d
mov edx, eax
sub edx, r10d
pshufd xmm0, xmm0, 0
mov r10, r9
neg r10
lea r11, [r11 + rax*2]
add r11, 0xfffffffffffffff0
xor ebx, ebx
nop word cs:[rax + rax]
movdqu xmm1, xmmword [r11 + rbx*2]
movdqa xmm2, xmm0
pxor xmm2, xmm7
movdqa xmm3, xmm8
pcmpgtd xmm3, xmm2
movdqa xmm2, xmm0
pand xmm2, xmm3
pxor xmm3, xmm9
por xmm3, xmm2
pslld xmm3, 0x10
psrad xmm3, 0x10
packssdw xmm3, xmm3
pshuflw xmm2, xmm3, 0x1b
pshufhw xmm2, xmm2, 0x1b
psubusw xmm1, xmm2
movdqu xmmword [r11 + rbx*2], xmm1
add rbx, 0xfffffffffffffff8
cmp r10, rbx
jne 0x1402988c0
cmp r8, r9
je 0x14029893b
neg edx
xor r8d, r8d
nop dword [rax]
movzx r9d, word [rcx + r8*2 - 2]
sub r9d, eax
cmovb r9d, r12d
mov word [rcx + r8*2 - 2], r9w
dec r8
cmp edx, r8d
jne 0x140298920
add r13d, r15d
mov rbp, qword [rsi]
mov eax, dword [rbp + 8]
test eax, eax
je 0x140298add
cmp eax, r13d
cmovb r13d, eax
test r13d, r13d
je 0x1402989eb
mov ecx, dword [rsi + 0x94]
mov r14d, dword [rsi + 0x9c]
add rcx, qword [rsi + 0x50]
add r14, rcx
sub eax, r13d
mov dword [rbp + 8], eax
mov rdx, qword [rbp]
mov ebx, r13d
mov rcx, r14
mov r8, rbx
call fcn.14039e2f0
mov rax, qword [rbp + 0x28]
mov eax, dword [rax + 0x2c]
cmp eax, 2
je 0x1402989c0
cmp eax, 1
jne 0x1402989e3
mov r8d, dword [rbp + 0x4c]
mov eax, edi
xor eax, 0xf62cfff6
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], r13d
xor ecx, ecx
mov edx, 1
jmp 0x1402989d8
mov r8d, dword [rbp + 0x4c]
mov eax, edi
xor eax, 0xf62cfff6
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], r13d
xor ecx, ecx
xor edx, edx
mov r9, r14
call fcn.140297b50
mov dword [rbp + 0x4c], eax
add qword [rbp], rbx
add dword [rbp + 0xc], r13d
add r13d, dword [rsi + 0x9c]
mov dword [rsi + 0x9c], r13d
mov ecx, dword [rsi + 0x1708]
lea eax, [rcx + r13]
cmp eax, 3
jb 0x140298ac7
mov eax, dword [0x1404eeea4]
add eax, dword [rsi + 0x94]
sub eax, ecx
mov rdx, qword [rsi + 0x50]
movzx ecx, byte [0x1404eebc8]
add cl, byte [rdx + rax]
movzx r8d, cl
mov dword [rsi + 0x70], r8d
movzx ecx, byte [rsi + 0x80]
shl r8d, cl
lea ecx, [rax + 1]
movzx ecx, byte [rdx + rcx]
xor ecx, r8d
and ecx, dword [rsi + 0x7c]
mov dword [rsi + 0x70], ecx
mov ecx, dword [rsi + 0x1708]
test ecx, ecx
je 0x140298ac0
mov edx, dword [rsi + 0x70]
movzx ecx, byte [rsi + 0x80]
shl edx, cl
lea ecx, [rax + 2]
mov r8, qword [rsi + 0x50]
mov r9, qword [rsi + 0x60]
movzx ecx, byte [r8 + rcx]
xor ecx, edx
and ecx, dword [rsi + 0x7c]
mov dword [rsi + 0x70], ecx
mov rdx, qword [rsi + 0x68]
movzx ecx, word [rdx + rcx*2]
mov edx, dword [rsi + 0x4c]
and edx, eax
mov word [r9 + rdx*2], cx
mov rcx, qword [rsi + 0x68]
mov edx, dword [rsi + 0x70]
mov word [rcx + rdx*2], ax
inc eax
mov edx, dword [rsi + 0x1708]
lea ecx, [rdx - 1]
mov dword [rsi + 0x1708], ecx
mov r13d, dword [rsi + 0x9c]
add edx, r13d
dec edx
cmp edx, 3
jae 0x140298a50
jmp 0x140298ac7
mov r13d, dword [rsi + 0x9c]
cmp r13d, 0x105
ja 0x140298add
mov rax, qword [rsi]
cmp dword [rax + 8], 0
jne 0x140298720
mov ecx, dword [rsi + 0x1714]
mov edi, dword [rsi + 0x58]
cmp edi, ecx
jbe 0x140298c16
mov ebp, dword [rsi + 0x9c]
add ebp, dword [rsi + 0x94]
cmp ecx, ebp
jae 0x140298be0
sub edi, ebp
cmp edi, 0x102
mov ebx, 0x102
cmovb ebx, edi
mov ecx, ebp
add rcx, qword [rsi + 0x50]
xor edx, edx
mov r8, rbx
call fcn.14039e9a0
add ebx, ebp
jmp 0x140298c09
mov rcx, rsi
test edi, edi
je 0x140298bd9
call fcn.14029dc00
jmp 0x140298c16
test eax, eax
je 0x140298c11
call fcn.14029da80
jmp 0x140298c16
mov rbx, qword [rsi + 0x28]
xor edi, 0x3f05edd5
mov dword [rsp + 0x20], edi
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov ecx, 1
xor edx, edx
mov r8, rbx
mov r9d, 1
call fcn.140298660
mov eax, dword [rbx + 0x28]
mov ebp, dword [rsi + 0x18]
cmp eax, ebp
cmovb ebp, eax
test ebp, ebp
je 0x140298c16
mov rcx, qword [rsi + 0x10]
mov rdx, qword [rbx + 0x20]
mov edi, ebp
mov r8, rdi
call fcn.14039e2f0
add qword [rsi + 0x10], rdi
add qword [rbx + 0x20], rdi
add dword [rsi + 0x1c], ebp
sub dword [rsi + 0x18], ebp
sub dword [rbx + 0x28], ebp
jne 0x140298c16
mov rax, qword [rbx + 0x10]
mov qword [rbx + 0x20], rax
jmp 0x140298c16
call fcn.14029de20
jmp 0x140298c16
call fcn.14029dcb0
jmp 0x140298c16
add ebp, 0x102
cmp ebp, ecx
jbe 0x140298c16
sub ebp, ecx
sub edi, ecx
cmp ebp, edi
cmovb edi, ebp
add rcx, qword [rsi + 0x50]
xor edx, edx
mov r8, rdi
call fcn.14039e9a0
add edi, dword [rsi + 0x1714]
mov ebx, edi
mov dword [rsi + 0x1714], ebx
jmp 0x140298c16
call fcn.14029da00
movaps xmm6, xmmword [rsp + 0x50]
movaps xmm7, xmmword [rsp + 0x60]
movaps xmm8, xmmword [rsp + 0x70]
movaps xmm9, xmmword [rsp + 0x80]
add rsp, 0x98
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret