Function at 0x1001eae0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0x24]
sub esp, 0x24
test ecx, ecx
je 0x1001ee8b
mov edx, dword [ebp + 0x20]
add edx, 0xfffffffc
push esi
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x18], edx
mov edx, dword [ebp + 0x18]
push edi
dec ecx
mov dword [ebp + 0x24], ecx
xor ecx, ecx
cmp byte [0x101fd8ec], cl
mov edi, dword [ebp + 0x20]
mov dword [ebp - 0xc], edi
je 0x1001ec1c
lea eax, [edi - 0x20]
mov dword [ebp - 0x14], eax
test eax, eax
js 0x1001ebb7
mov ecx, dword [ebp + 8]
sub esi, ecx
mov dword [ebp - 8], esi
mov esi, dword [ebp + 0x18]
sub esi, ecx
mov dword [ebp - 0x10], edx
lea eax, [ecx + 0x10]
mov dword [ebp - 0x1c], esi
mov ecx, dword [ebp + 0x10]
sub ecx, dword [ebp + 0x18]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0x1c]
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0x14]
add ecx, 0x20
shr ecx, 5
mov dword [ebp - 0x14], ecx
shl ecx, 5
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp - 0x20]
dec dword [ebp - 0x14]
lea eax, [eax + 0x20]
movdqu xmm2, xmmword [eax - 0x30]
lea edx, [edx + 0x20]
movdqu xmm1, xmmword [ecx + edx - 0x20]
movdqu xmm4, xmmword [eax - 0x20]
movdqu xmm3, xmmword [esi + eax - 0x20]
movdqa xmm0, xmm2
psubusb xmm0, xmm1
psubusb xmm1, xmm2
paddb xmm0, xmm1
movdqu xmmword [edx - 0x20], xmm0
movdqa xmm0, xmm4
psubusb xmm0, xmm3
psubusb xmm3, xmm4
paddb xmm0, xmm3
movdqu xmmword [edi + eax - 0x20], xmm0
jne 0x1001eb62
mov ecx, dword [ebp - 0x24]
mov edi, dword [ebp - 0xc]
mov esi, dword [ebp + 0x10]
lea edx, [edi - 8]
cmp ecx, edx
jg 0x1001ec1c
lea eax, [ecx + esi]
sub edx, ecx
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 8]
sub eax, esi
shr edx, 3
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x18]
sub eax, esi
mov esi, dword [ebp - 0x20]
inc edx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x24]
mov edi, dword [ebp - 0x1c]
lea ecx, [ecx + edx*8]
jmp 0x1001ebf0
movq xmm2, qword [esi + eax]
lea eax, [eax + 8]
movq xmm1, qword [eax - 8]
movdqa xmm0, xmm2
psubusb xmm0, xmm1
psubusb xmm1, xmm2
paddb xmm0, xmm1
movq qword [edi + eax - 8], xmm0
dec edx
jne 0x1001ebf0
mov edi, dword [ebp - 0xc]
mov esi, dword [ebp + 0x10]
cmp ecx, dword [ebp - 0x18]
jg 0x1001ecdd
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x14], eax
lea edx, [ecx + eax]
mov dword [ebp - 8], edx
mov edx, dword [ebp + 8]
sub dword [ebp - 0x10], edx
sub dword [ebp - 0x14], edx
lea edi, [edx + 1]
mov edx, esi
add edi, ecx
sub edx, eax
mov dword [ebp - 0x24], edx
mov edx, dword [ebp - 8]
lea esp, [esp]
mov eax, dword [ebp - 0x10]
lea edi, [edi + 4]
mov al, byte [edi + eax - 4]
mov byte [ebp - 2], al
mov al, byte [edi - 4]
mov byte [ebp - 1], al
mov eax, dword [ebp - 0x24]
movzx edx, byte [edx + eax]
movzx eax, byte [edi - 5]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp - 8]
mov byte [edx], al
movzx edx, byte [ebp - 2]
movzx eax, byte [ebp - 1]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp - 0x14]
mov byte [edi + edx - 4], al
mov al, byte [esi + ecx + 3]
movzx edx, byte [esi + ecx + 2]
add ecx, 4
mov byte [ebp - 1], al
mov al, byte [edi - 2]
mov byte [ebp - 2], al
movzx eax, byte [edi - 3]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp - 8]
mov byte [edx + 2], al
movzx edx, byte [ebp - 1]
movzx eax, byte [ebp - 2]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp - 8]
mov byte [edx + 3], al
add edx, 4
mov dword [ebp - 8], edx
cmp ecx, dword [ebp - 0x18]
jle 0x1001ec50
mov edi, dword [ebp - 0xc]
mov eax, edi
sub eax, ecx
mov dword [ebp - 0x20], eax
cmp ecx, edi
jge 0x1001ee69
mov edx, dword [ebp + 0x18]
cmp eax, 8
jb 0x1001ee2d
cmp dword [0x101fe438], 2
jl 0x1001ee2d
lea eax, [ecx + edx]
mov dword [ebp - 0x14], eax
lea eax, [edx - 1]
add eax, edi
mov dword [ebp - 0x24], eax
lea eax, [ecx + esi]
mov dword [ebp - 0x10], eax
lea eax, [esi - 1]
add eax, edi
cmp dword [ebp - 0x14], eax
ja 0x1001ed31
lea eax, [edx - 1]
add eax, edi
cmp eax, dword [ebp - 0x10]
jae 0x1001ee2d
mov eax, dword [ebp + 8]
lea edx, [ecx + eax]
dec eax
add eax, edi
cmp dword [ebp - 0x14], eax
ja 0x1001ed48
cmp dword [ebp - 0x24], edx
jae 0x1001ee2a
mov eax, dword [ebp - 0x20]
and eax, 0x80000007
jns 0x1001ed57
dec eax
or eax, 0xfffffff8
inc eax
mov esi, dword [ebp + 0x18]
sub esi, dword [ebp + 8]
mov dword [ebp - 0x14], edi
sub dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
add eax, 4
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 0x10]
sub eax, dword [ebp + 8]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x18]
sub eax, dword [ebp + 0x10]
mov edi, dword [ebp - 0x10]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x24]
jmp 0x1001ed90
movd xmm0, dword [edx]
lea edx, [edx + 8]
pmovzxbd xmm1, xmm0
movd xmm0, dword [edi + edx - 8]
lea eax, [eax + 8]
pmovzxbd xmm0, xmm0
psubd xmm1, xmm0
mov edi, dword [ebp - 0x1c]
pabsd xmm0, xmm1
add ecx, 8
pshuflw xmm0, xmm0, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm0, xmm0, 0xd8
pand xmm0, xmmword [0x1019b450]
packuswb xmm0, xmm0
movd dword [esi + edx - 8], xmm0
movd xmm0, dword [edx - 4]
pmovzxbd xmm1, xmm0
movd xmm0, dword [eax - 8]
pmovzxbd xmm0, xmm0
psubd xmm1, xmm0
pabsd xmm0, xmm1
pshuflw xmm0, xmm0, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm0, xmm0, 0xd8
pand xmm0, xmmword [0x1019b450]
packuswb xmm0, xmm0
movd dword [edi + eax - 8], xmm0
mov edi, dword [ebp - 0x10]
cmp ecx, dword [ebp - 0x14]
jl 0x1001ed90
mov edi, dword [ebp - 0xc]
mov esi, dword [ebp + 0x10]
mov edx, dword [ebp + 0x18]
cmp ecx, edi
jge 0x1001ee69
mov eax, dword [ebp + 8]
add esi, ecx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x10]
sub edx, eax
sub dword [ebp - 0x14], eax
sub edi, ecx
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x14]
lea esi, [esi + 1]
movzx ecx, byte [esi - 1]
movzx eax, byte [eax + esi - 1]
sub eax, ecx
mov ecx, dword [ebp - 0x24]
cdq
xor eax, edx
sub eax, edx
mov byte [ecx + esi - 1], al
dec edi
jne 0x1001ee46
mov esi, dword [ebp + 0x10]
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 0xc]
add esi, dword [ebp + 0x14]
add edx, dword [ebp + 0x1c]
add dword [ebp + 8], eax
mov ecx, dword [ebp + 0x24]
mov dword [ebp + 0x10], esi
mov dword [ebp + 0x18], edx
test ecx, ecx
jne 0x1001eb02
pop edi
pop esi
mov esp, ebp
pop ebp
ret