Function at 0x1001ca20
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push edi
mov edi, dword [ebp + 0x24]
test edi, edi
je 0x1001cd31
mov ecx, dword [ebp + 0x20]
and dword [ebp + 0xc], 0xfffffffc
add ecx, 0xfffffffc
and dword [ebp + 0x14], 0xfffffffc
and dword [ebp + 0x1c], 0xfffffffc
mov edx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x18]
dec edi
mov dword [ebp - 4], 0
cmp byte [0x101fd8ec], 0
mov dword [ebp + 0x24], edi
mov edi, dword [ebp + 0x20]
mov dword [ebp - 0x14], edi
je 0x1001cbca
mov eax, edx
or eax, esi
or eax, ecx
test al, 0xf
lea eax, [edi - 8]
jne 0x1001cb23
mov dword [ebp - 0x10], eax
test eax, eax
js 0x1001cbca
mov dword [ebp - 0xc], ecx
lea eax, [esi + 0x10]
mov ecx, edx
mov edx, dword [ebp + 0x18]
sub edx, esi
sub ecx, esi
mov esi, dword [ebp + 8]
sub esi, dword [ebp + 0x18]
mov dword [ebp - 0x1c], edx
mov edx, dword [ebp - 0x10]
mov edi, dword [ebp - 0x1c]
add edx, 8
shr edx, 3
mov dword [ebp - 0x10], edx
shl edx, 3
mov dword [ebp - 0x20], esi
mov esi, dword [ebp - 0xc]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
dec dword [ebp - 0x10]
lea esi, [esi + 0x20]
mov edx, dword [ebp - 0x20]
lea eax, [eax + 0x20]
movdqa xmm1, xmmword [eax - 0x30]
movdqa xmm4, xmmword [ecx + eax - 0x20]
movdqa xmm3, xmmword [eax - 0x20]
movdqa xmm2, xmmword [edx + esi - 0x20]
mov edx, dword [ebp + 8]
movdqa xmm0, xmm2
pcmpgtd xmm0, xmm1
pxor xmm1, xmm2
pand xmm0, xmm1
pxor xmm0, xmm2
movdqa xmmword [esi - 0x20], xmm0
movdqa xmm0, xmm4
pcmpgtd xmm0, xmm3
pxor xmm3, xmm4
pand xmm0, xmm3
pxor xmm0, xmm4
movdqa xmmword [edi + eax - 0x20], xmm0
jne 0x1001cac1
mov ecx, dword [ebp + 0x18]
jmp 0x1001cbc4
mov dword [ebp - 0x20], eax
test eax, eax
js 0x1001cbca
mov dword [ebp - 0x1c], ecx
lea eax, [esi + 0x10]
mov ecx, edx
mov edx, dword [ebp + 0x18]
sub ecx, esi
sub edx, esi
mov esi, dword [ebp + 8]
sub esi, dword [ebp + 0x18]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 8], edx
mov edx, dword [ebp - 0x1c]
mov edi, dword [ebp - 8]
lea ecx, [ecx + 8]
mov dword [ebp - 0x24], esi
mov esi, dword [ebp - 0xc]
shr ecx, 3
mov dword [ebp - 0x10], ecx
shl ecx, 3
mov dword [ebp - 4], ecx
dec dword [ebp - 0x10]
lea edx, [edx + 0x20]
mov ecx, dword [ebp - 0x24]
lea eax, [eax + 0x20]
movdqu xmm1, xmmword [eax - 0x30]
movdqu xmm4, xmmword [eax + esi - 0x20]
movdqu xmm3, xmmword [edx + ecx - 0x20]
mov ecx, dword [ebp + 0x18]
movdqu xmm2, xmmword [eax - 0x20]
movdqa xmm0, xmm3
pcmpgtd xmm0, xmm1
pxor xmm1, xmm3
pand xmm0, xmm1
pxor xmm0, xmm3
movdqu xmmword [edx - 0x20], xmm0
movdqa xmm0, xmm4
pcmpgtd xmm0, xmm2
pxor xmm2, xmm4
pand xmm0, xmm2
pxor xmm0, xmm4
movdqu xmmword [eax + edi - 0x20], xmm0
jne 0x1001cb67
mov edx, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 4], eax
jg 0x1001ccb6
mov edi, dword [ebp - 4]
mov dword [ebp - 0xc], ecx
sub dword [ebp - 0xc], edx
lea eax, [edi + 3]
inc edi
lea eax, [esi + eax*4]
mov dword [ebp - 8], eax
lea eax, [edx + edi*4]
mov edi, esi
sub edi, edx
mov dword [ebp - 0x10], eax
sub ecx, esi
mov dword [ebp - 0x40], edi
mov esi, dword [ebp - 8]
mov dword [ebp - 0x3c], ecx
mov edi, edi
mov edi, dword [edi + eax]
mov ecx, dword [eax - 4]
mov edx, dword [esi - 0xc]
cmp edx, ecx
mov esi, dword [eax]
lea eax, [ebp - 0x24]
mov dword [ebp - 0x20], ecx
lea ecx, [ebp - 0x20]
cmovge eax, ecx
mov dword [ebp - 0x24], edx
mov edx, dword [ebp - 4]
cmp edi, esi
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 0x28], esi
mov eax, dword [eax]
mov esi, dword [ebp - 0x10]
mov dword [ecx + edx*4], eax
lea eax, [ebp - 0x1c]
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x1c], edi
cmovge eax, ecx
mov dword [ebp - 0x2c], edi
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [ecx + esi], eax
mov eax, dword [ebp - 8]
mov ecx, dword [esi + 4]
mov esi, dword [esi + 8]
mov dword [ebp - 0x30], ecx
mov edx, dword [eax - 4]
cmp edx, ecx
mov edi, dword [eax]
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x2c], edx
lea eax, [ebp - 0x2c]
mov edx, dword [ebp - 4]
cmovge eax, ecx
mov ecx, dword [ebp + 0x18]
cmp edi, esi
mov dword [ebp - 0x38], esi
lea esi, [ebp - 0x38]
mov dword [ebp - 0x34], edi
mov eax, dword [eax]
mov dword [ecx + edx*4 + 8], eax
lea eax, [ebp - 0x34]
cmovge eax, esi
mov dword [ebp - 0x28], edi
mov esi, dword [ebp - 8]
add edx, 4
mov edi, dword [ebp - 0x3c]
mov dword [ebp - 4], edx
mov eax, dword [eax]
mov dword [edi + esi], eax
add esi, 0x10
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp - 0x40]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], esi
cmp edx, dword [ebp - 0x18]
jle 0x1001cc00
mov edi, dword [ebp - 0x14]
jmp 0x1001ccb9
mov edx, dword [ebp - 4]
cmp edx, edi
jge 0x1001cd0d
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
mov esi, dword [ebp - 4]
sub ecx, edx
mov dword [ebp - 0x40], ecx
mov ecx, dword [ebp + 0x18]
sub ecx, edx
sub edi, esi
lea eax, [edx + esi*4]
mov dword [ebp - 0x38], ecx
jmp 0x1001cce0
mov ecx, dword [ebp - 0x40]
lea edx, [ebp - 0x3c]
lea eax, [eax + 4]
mov esi, dword [eax + ecx - 4]
mov ecx, dword [eax - 4]
cmp esi, ecx
mov dword [ebp - 0x14], ecx
lea ecx, [ebp - 0x14]
cmovge edx, ecx
mov dword [ebp - 0x3c], esi
mov ecx, dword [edx]
mov edx, dword [ebp - 0x38]
mov dword [eax + edx - 4], ecx
dec edi
jne 0x1001cce0
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
add edx, dword [ebp + 0xc]
add esi, dword [ebp + 0x14]
add ecx, dword [ebp + 0x1c]
mov edi, dword [ebp + 0x24]
mov dword [ebp + 8], edx
mov dword [ebp + 0x10], esi
mov dword [ebp + 0x18], ecx
test edi, edi
jne 0x1001ca51
pop esi
pop edi
mov esp, ebp
pop ebp
ret