Function at 0x24e460
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x58
movaps xmmword [rsp + 0x40], xmm7
movdqa xmmword [rsp + 0x30], xmm6
mov r15, rcx
mov r12d, dword [r15 + 0x44]
mov r10d, dword [r15 + 0x9c]
lea eax, [r12 - 0x106]
mov dword [rsp + 0x24], eax
xor r13d, r13d
pxor xmm6, xmm6
movdqa xmm7, xmmword [0x002f4300]
mov eax, r12d
mov qword [rsp + 0x28], r12
jmp 0x24e4ce
cmp r10d, 0x105
ja 0x24e8e2
mov rax, qword [r15]
cmp dword [rax + 8], 0
je 0x24e8e2
mov eax, dword [r15 + 0x44]
add eax, dword [rsp + 0x24]
mov edi, dword [r15 + 0x58]
sub edi, r10d
mov r9d, dword [r15 + 0x94]
sub edi, r9d
cmp r9d, eax
jb 0x24e78c
mov rcx, qword [r15 + 0x50]
mov r8d, r12d
sub r8d, edi
lea rdx, [rcx + r12]
call sub.msvcrt.dll_memcpy
sub dword [r15 + 0x98], r12d
mov r9d, dword [r15 + 0x94]
sub r9d, r12d
mov dword [r15 + 0x94], r9d
sub dword [r15 + 0x84], r12d
mov ecx, dword [r15 + 0x44]
mov eax, dword [r15 + 0x74]
mov r10, qword [r15 + 0x68]
lea rdx, [r10 + rax*2]
lea ebx, [rax - 1]
lea rbp, [rbx + 1]
cmp rbp, 8
jae 0x24e550
mov ebx, eax
jmp 0x24e62f
mov r8d, eax
and r8d, 7
sub rbp, r8
neg rbx
lea rbx, [r8 + rbx - 1]
lea rdx, [rdx + rbx*2]
mov ebx, eax
sub ebx, ebp
movd xmm0, ecx
pshufd xmm0, xmm0, 0
lea rax, [r10 + rax*2 - 0x10]
nop dword [rax + rax]
movdqu xmm1, xmmword [rax]
pshufd xmm1, xmm1, 0x4e
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm2, xmm1, 0x1b
movdqa xmm1, xmm2
punpcklwd xmm1, xmm6
punpckhwd xmm2, xmm6
movdqa xmm3, xmm0
pxor xmm3, xmm7
movdqa xmm4, xmm2
pxor xmm4, xmm7
movdqa xmm5, xmm3
pcmpgtd xmm5, xmm4
pshuflw xmm4, xmm5, 0xe8
pshufhw xmm4, xmm4, 0xe8
pshufd xmm4, xmm4, 0xe8
movdqa xmm5, xmm1
pxor xmm5, xmm7
pcmpgtd xmm3, xmm5
pshuflw xmm3, xmm3, 0xe8
pshufhw xmm3, xmm3, 0xe8
pshufd xmm3, xmm3, 0xe8
punpcklqdq xmm3, xmm4
psubd xmm1, xmm0
psubd xmm2, xmm0
pslld xmm2, 0x10
psrad xmm2, 0x10
pslld xmm1, 0x10
psrad xmm1, 0x10
packssdw xmm1, xmm2
pandn xmm3, xmm1
pshufd xmm1, xmm3, 0x4e
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm1, xmm1, 0x1b
movdqu xmmword [rax], xmm1
add rax, 0xfffffffffffffff0
add rbp, 0xfffffffffffffff8
jne 0x24e580
test r8d, r8d
je 0x24e655
add rdx, 0xfffffffffffffffe
nop word cs:[rax + rax]
movzx eax, word [rdx]
sub eax, ecx
cmovb ax, r13w
mov word [rdx], ax
add rdx, 0xfffffffffffffffe
dec ebx
jne 0x24e640
mov rax, qword [r15 + 0x60]
lea rdx, [rax + rcx*2]
lea ebx, [rcx - 1]
lea rbp, [rbx + 1]
cmp rbp, 8
jae 0x24e680
mov ebx, ecx
jmp 0x24e75f
mov r8d, ecx
and r8d, 7
sub rbp, r8
neg rbx
lea rbx, [r8 + rbx - 1]
lea rdx, [rdx + rbx*2]
mov ebx, ecx
sub ebx, ebp
movd xmm0, ecx
pshufd xmm0, xmm0, 0
lea rax, [rax + rcx*2 - 0x10]
nop dword [rax + rax]
movdqu xmm1, xmmword [rax]
pshufd xmm1, xmm1, 0x4e
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm2, xmm1, 0x1b
movdqa xmm1, xmm2
punpcklwd xmm1, xmm6
punpckhwd xmm2, xmm6
movdqa xmm3, xmm0
pxor xmm3, xmm7
movdqa xmm4, xmm2
pxor xmm4, xmm7
movdqa xmm5, xmm3
pcmpgtd xmm5, xmm4
pshuflw xmm4, xmm5, 0xe8
pshufhw xmm4, xmm4, 0xe8
pshufd xmm4, xmm4, 0xe8
movdqa xmm5, xmm1
pxor xmm5, xmm7
pcmpgtd xmm3, xmm5
pshuflw xmm3, xmm3, 0xe8
pshufhw xmm3, xmm3, 0xe8
pshufd xmm3, xmm3, 0xe8
punpcklqdq xmm3, xmm4
psubd xmm1, xmm0
psubd xmm2, xmm0
pslld xmm2, 0x10
psrad xmm2, 0x10
pslld xmm1, 0x10
psrad xmm1, 0x10
packssdw xmm1, xmm2
pandn xmm3, xmm1
pshufd xmm1, xmm3, 0x4e
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm1, xmm1, 0x1b
movdqu xmmword [rax], xmm1
add rax, 0xfffffffffffffff0
add rbp, 0xfffffffffffffff8
jne 0x24e6b0
test r8d, r8d
je 0x24e789
add rdx, 0xfffffffffffffffe
nop word cs:[rax + rax]
movzx eax, word [rdx]
sub eax, ecx
mov ebp, 0
cmovae bp, ax
mov word [rdx], bp
add rdx, 0xfffffffffffffffe
dec ebx
jne 0x24e770
add edi, r12d
mov rbp, qword [r15]
mov eax, dword [rbp + 8]
test eax, eax
je 0x24e8e2
mov r10d, dword [r15 + 0x9c]
cmp eax, edi
cmovbe edi, eax
test edi, edi
je 0x24e7f0
mov ebx, r9d
add rbx, qword [r15 + 0x50]
add rbx, r10
sub eax, edi
mov dword [rbp + 8], eax
mov rdx, qword [rbp]
mov r14d, edi
mov rcx, rbx
mov r8, r14
call sub.msvcrt.dll_memcpy
mov rax, qword [rbp + 0x28]
mov eax, dword [rax + 0x2c]
cmp eax, 2
je 0x24e800
cmp eax, 1
jne 0x24e81b
lea r12, [rbp + 0x4c]
mov ecx, dword [rbp + 0x4c]
mov rdx, rbx
mov r8d, edi
call fcn.00258fc0
jmp 0x24e812
xor edi, edi
jmp 0x24e829
lea r12, [rbp + 0x4c]
mov ecx, dword [rbp + 0x4c]
mov rdx, rbx
mov r8d, edi
call fcn.00259490
mov dword [r12], eax
mov r12, qword [rsp + 0x28]
add qword [rbp], r14
add dword [rbp + 0xc], edi
mov r10d, dword [r15 + 0x9c]
add r10d, edi
mov dword [r15 + 0x9c], r10d
mov eax, dword [r15 + 0x170c]
lea ecx, [rax + r10]
cmp ecx, 3
jb 0x24e4b0
mov ebp, dword [r15 + 0x94]
sub ebp, eax
mov r8, qword [r15 + 0x50]
movzx ebx, byte [r8 + rbp]
mov dword [r15 + 0x70], ebx
mov ecx, dword [r15 + 0x80]
shl ebx, cl
lea edi, [rbp + 1]
movzx edi, byte [r8 + rdi]
xor edi, ebx
mov r9d, dword [r15 + 0x7c]
and edi, r9d
mov dword [r15 + 0x70], edi
test eax, eax
je 0x24e4b0
dec eax
nop word cs:[rax + rax]
shl edi, cl
lea ebx, [rbp + 2]
movzx ebx, byte [r8 + rbx]
xor ebx, edi
mov edi, ebx
and edi, r9d
mov dword [r15 + 0x70], edi
mov r11, qword [r15 + 0x60]
mov rsi, qword [r15 + 0x68]
movzx edx, word [rsi + rdi*2]
mov ebx, dword [r15 + 0x4c]
and ebx, ebp
mov word [r11 + rbx*2], dx
mov word [rsi + rdi*2], bp
mov dword [r15 + 0x170c], eax
lea edx, [r10 + rax]
cmp edx, 2
jbe 0x24e4b0
inc ebp
dec eax
cmp eax, 0xffffffff
jne 0x24e890
jmp 0x24e4b0
mov ecx, dword [r15 + 0x1718]
mov edi, dword [r15 + 0x58]
cmp edi, ecx
jbe 0x24e958
mov ebp, dword [r15 + 0x9c]
add ebp, dword [r15 + 0x94]
cmp ecx, ebp
jae 0x24e927
sub edi, ebp
cmp edi, 0x102
mov ebx, 0x102
cmovb ebx, edi
mov ecx, ebp
add rcx, qword [r15 + 0x50]
xor edx, edx
mov r8, rbx
call sub.msvcrt.dll_memset
add ebx, ebp
jmp 0x24e951
add ebp, 0x102
cmp ebp, ecx
jbe 0x24e958
sub ebp, ecx
sub edi, ecx
cmp ebp, edi
cmovbe edi, ebp
add rcx, qword [r15 + 0x50]
xor edx, edx
mov r8, rdi
call sub.msvcrt.dll_memset
add edi, dword [r15 + 0x1718]
mov ebx, edi
mov dword [r15 + 0x1718], ebx
movaps xmm6, xmmword [rsp + 0x30]
movaps xmm7, xmmword [rsp + 0x40]
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret