Function at 0x1800013a0
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x20], rbx
push rsi
push rdi
push r12
push r15
mov r9d, dword [rcx]
mov r11, rdx
mov eax, dword [rcx + 8]
mov r10, rcx
mov ecx, dword [rcx + 0xc]
cdq
xor r12d, r12d
lea r8d, [r9 + r9]
idiv r8d
movsxd rbx, eax
lea eax, [rcx + rcx]
mov r15d, ebx
cmp r9d, 2
jne 0x180001439
xor esi, esi
xor r9d, r9d
test eax, eax
jle 0x180001488
xor edi, edi
lea r8, [r11 + 4]
nop word [rax + rax]
movsx eax, word [r8 - 2]
lea rdi, [rdi + 2]
movsx ecx, word [r8 - 4]
lea r8, [r8 + 8]
add ecx, eax
add esi, 4
movsx eax, word [r8 - 6]
add ecx, eax
movsx eax, word [r8 - 8]
add ecx, eax
mov rax, qword [r10 + 0x28]
sar ecx, 2
mov word [rdi + rax - 2], cx
movsx eax, cx
mov ecx, dword [r10 + 0xc]
cdq
xor eax, edx
sub eax, edx
add r9d, eax
lea eax, [rcx + rcx]
cmp esi, eax
jl 0x1800013f0
jmp 0x180001488
xor edi, edi
xor r9d, r9d
test eax, eax
jle 0x180001706
xor r8d, r8d
nop dword [rax]
movsx eax, word [r11]
lea r8, [r8 + 2]
movsx ecx, word [r11 + 2]
lea r11, [r11 + 4]
add ecx, eax
add edi, 2
mov rax, qword [r10 + 0x28]
sar ecx, 1
mov word [r8 + rax - 2], cx
movsx eax, cx
mov ecx, dword [r10 + 0xc]
cdq
xor eax, edx
sub eax, edx
add r9d, eax
lea eax, [rcx + rcx]
cmp edi, eax
jl 0x180001450
test r9d, r9d
je 0x180001706
xor edx, edx
mov qword [rsp + 0x28], rbp
mov eax, 0xfffffffe
mov qword [rsp + 0x30], r13
div r9d
xor edx, edx
mov qword [rsp + 0x38], r14
xor ebp, ebp
mov r13d, eax
test ebx, ebx
jle 0x18000157f
cmp ebx, 8
jb 0x18000157f
cmp dword [section..data], 2
jl 0x18000157f
mov r9, qword [r10 + 0x28]
mov ecx, ebx
xorps xmm5, xmm5
xorps xmm4, xmm4
and ecx, 0x80000007
jge 0x1800014ea
dec ecx
or ecx, 0xfffffff8
inc ecx
mov eax, ebx
xor r8d, r8d
sub eax, ecx
lea rcx, [r9 + rbx*2]
movsxd r11, eax
mov eax, 4
sub rax, rbx
lea r9, [rax + rax]
mov rax, rbx
neg rax
add rax, rax
nop dword [rax]
pmovsxwd xmm1, qword [rax + rcx]
pabsd xmm3, xmm1
add edx, 8
add r8, 8
pmovsxwd xmm1, qword [rcx]
lea rcx, [rcx + 0x10]
pabsd xmm2, xmm1
paddd xmm3, xmm2
paddd xmm5, xmm3
pmovsxwd xmm1, qword [r9 + rcx - 0x10]
pabsd xmm3, xmm1
pmovsxwd xmm1, qword [rcx - 8]
pabsd xmm2, xmm1
paddd xmm3, xmm2
paddd xmm4, xmm3
cmp r8, r11
jl 0x180001510
paddd xmm4, xmm5
movdqa xmm0, xmm4
psrldq xmm0, 8
paddd xmm4, xmm0
movdqa xmm0, xmm4
psrldq xmm0, 4
paddd xmm4, xmm0
movd ebp, xmm4
movsxd rcx, edx
cmp rcx, rbx
jge 0x1800015c4
mov rax, qword [r10 + 0x28]
mov r9, rbx
sub r9, rcx
lea r8, [rax + rcx*2]
nop word [rax + rax]
movsx eax, word [r8 + rbx*2]
lea r8, [r8 + 2]
cdq
mov ecx, eax
movsx eax, word [r8 - 2]
xor ecx, edx
sub ecx, edx
cdq
xor eax, edx
sub eax, edx
add ebp, eax
add ebp, ecx
sub r9, 1
jne 0x1800015a0
mov rsi, qword [r10 + 0x38]
lea rdi, [rbx*4]
lea r14d, [rbx + rbx]
nop dword [rax]
nop dword [rax + rax]
mov r11, qword [r10 + 0x28]
xor r9d, r9d
movsxd rax, ebx
lea rcx, [r11 + rax*2]
cmp rcx, r11
je 0x18000162e
movsxd r8, r14d
add r8, r8
sub r8, rcx
add r8, r11
nop
movsx edx, word [r8 + rcx - 2]
sub rcx, 2
movsx eax, word [rcx]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
add r9d, eax
cmp rcx, r11
jne 0x180001600
test r9d, r9d
je 0x18000162e
mov eax, r13d
xor edx, edx
imul eax, ebp
div r9d
jmp 0x180001633
mov eax, 0xffffffff
mov dword [rdi + rsi], eax
mov rsi, qword [r10 + 0x38]
mov eax, dword [rdi + rsi]
cmp eax, r12d
jb 0x180001648
mov r12d, eax
mov r15d, ebx
mov ecx, dword [r10]
mov eax, ecx
mov edx, dword [r10 + 0xc]
imul eax, ebx
add eax, eax
cmp eax, edx
je 0x18000168a
mov rcx, qword [r10 + 0x28]
inc ebx
add r14d, 2
movsx eax, word [rcx + rdi + 2]
cdq
mov r8d, eax
movsx eax, word [rcx + rdi]
xor r8d, edx
sub r8d, edx
cdq
xor eax, edx
sub eax, edx
add ebp, eax
add ebp, r8d
add rdi, 4
jmp 0x1800015e0
mov r14, qword [rsp + 0x38]
mov eax, ecx
mov r13, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x28]
imul eax, r15d
add eax, eax
cmp eax, dword [r10 + 8]
je 0x1800016ff
cmp eax, edx
je 0x1800016ff
movsxd rax, r15d
lea edx, [r15 + r15]
mov r8d, dword [rsi + rax*4]
mov r9d, r8d
sub r8d, dword [rsi + rax*4 - 4]
sub r9d, dword [rsi + rax*4 + 4]
lea eax, [r8 + 1]
shr eax, 1
cmp eax, r9d
jbe 0x1800016e1
inc edx
imul ecx, edx
mov eax, ecx
mov rbx, qword [rsp + 0x40]
pop r15
pop r12
pop rdi
pop rsi
ret
lea eax, [r9 + 1]
shr eax, 1
cmp eax, r8d
jbe 0x180001703
dec edx
imul ecx, edx
mov eax, ecx
mov rbx, qword [rsp + 0x40]
pop r15
pop r12
pop rdi
pop rsi
ret
lea edx, [r15 + r15]
imul ecx, edx
mov rbx, qword [rsp + 0x40]
mov eax, ecx
pop r15
pop r12
pop rdi
pop rsi
ret