Function at 0x669160
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
sub esp, 0x20
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
test cl, 3
jne 0x6692d3
test bl, 3
jne 0x6692d3
test al, 3
jne 0x6692d3
mov edx, dword [ebp + 0x14]
xor edi, edi
mov esi, edx
shr esi, 2
mov dword [ebp - 4], esi
test esi, esi
je 0x6692b1
cmp esi, 0x10
jb 0x669274
lea ebx, [ecx - 4]
lea eax, [eax + esi*4]
lea ebx, [ebx + esi*4]
add eax, 0xfffffffc
mov dword [ebp - 8], ebx
mov ebx, dword [ebp + 0xc]
cmp ecx, eax
ja 0x6691cc
mov eax, dword [ebp + 0x10]
cmp dword [ebp - 8], eax
jae 0x669274
lea eax, [ebx - 4]
lea eax, [eax + esi*4]
cmp ecx, eax
ja 0x6691e4
lea eax, [ecx - 4]
lea eax, [eax + esi*4]
cmp eax, ebx
jae 0x669271
mov eax, esi
mov ecx, ebx
and eax, 0xfffffff0
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x10]
sub ecx, eax
mov dword [ebp - 8], ecx
mov ecx, dword [ebp + 8]
mov edx, ecx
sub edx, eax
lea esi, [eax + 0x10]
mov dword [ebp - 0xc], edx
mov edx, dword [ebp - 8]
mov eax, ebx
sub eax, ecx
mov dword [ebp - 0x10], eax
lea eax, [ecx + 0x20]
movups xmm0, xmmword [esi - 0x10]
mov ecx, dword [ebp - 0xc]
lea esi, [esi + 0x40]
movups xmm1, xmmword [ebx + edi*4]
lea eax, [eax + 0x40]
pxor xmm1, xmm0
movups xmm0, xmmword [esi - 0x40]
movups xmmword [eax - 0x60], xmm1
movups xmm1, xmmword [edx + esi - 0x40]
pxor xmm1, xmm0
movups xmm0, xmmword [esi - 0x30]
movups xmmword [ecx + esi - 0x40], xmm1
mov ecx, dword [ebp - 0x10]
movups xmm1, xmmword [ecx + eax - 0x40]
mov ecx, dword [ebp + 8]
pxor xmm1, xmm0
movups xmm0, xmmword [esi - 0x20]
movups xmmword [eax - 0x40], xmm1
movups xmm1, xmmword [ebx + edi*4 + 0x30]
add edi, 0x10
pxor xmm1, xmm0
movups xmmword [eax - 0x30], xmm1
cmp edi, dword [ebp - 0x14]
jb 0x669210
mov edx, dword [ebp + 0x14]
mov esi, dword [ebp - 4]
mov eax, dword [ebp + 0x10]
cmp edi, esi
jae 0x6692b1
mov esi, dword [ebp - 4]
lea ecx, [eax + edi*4]
sub ebx, eax
mov dword [ebp - 0x14], ebx
mov ebx, dword [ebp + 8]
sub ebx, eax
sub esi, edi
mov edi, dword [ebp - 4]
mov dword [ebp - 0x10], ebx
mov ebx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
mov eax, dword [ecx + ebx]
lea ecx, [ecx + 4]
xor eax, dword [ecx - 4]
mov dword [ecx + edx - 4], eax
sub esi, 1
jne 0x669296
mov edx, dword [ebp + 0x14]
mov ebx, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
shl edi, 2
sub edx, edi
mov dword [ebp - 8], edx
je 0x6693d2
mov eax, dword [ebp + 0x10]
add ecx, edi
add ebx, edi
mov dword [ebp + 8], ecx
add eax, edi
mov dword [ebp + 0xc], ebx
mov dword [ebp + 0x10], eax
jmp 0x6692d9
mov edx, dword [ebp + 0x14]
mov dword [ebp - 8], edx
xor edi, edi
test edx, edx
je 0x6693d2
cmp edx, 0x40
jb 0x6693b0
dec eax
lea esi, [ecx - 1]
add eax, edx
add esi, edx
cmp ecx, eax
ja 0x669303
mov eax, dword [ebp + 0x10]
cmp esi, eax
jae 0x6693b0
lea eax, [ebx - 1]
add eax, edx
cmp ecx, eax
ja 0x669314
cmp esi, ebx
jae 0x6693ad
mov esi, dword [ebp + 8]
mov eax, edx
sub esi, dword [ebp + 0x10]
and eax, 0xffffffc0
mov dword [ebp - 0x20], eax
lea eax, [ecx + 0x10]
mov dword [ebp - 0x10], eax
mov ecx, ebx
sub ecx, dword [ebp + 0x10]
mov eax, ebx
sub eax, dword [ebp + 8]
mov dword [ebp - 0x18], eax
lea eax, [ebx + 0x30]
mov edx, dword [ebp - 0x18]
mov dword [ebp - 4], ecx
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0xc], esi
mov esi, dword [ebp + 0x10]
mov ebx, dword [ebp - 0xc]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 4]
movups xmm1, xmmword [esi + eax]
mov eax, dword [ebp - 0x1c]
lea esi, [esi + 0x40]
movups xmm0, xmmword [esi - 0x40]
lea ecx, [ecx + 0x40]
pxor xmm1, xmm0
movups xmm0, xmmword [esi - 0x30]
movups xmmword [esi + ebx - 0x40], xmm1
movups xmm1, xmmword [ecx + edx - 0x40]
pxor xmm1, xmm0
movups xmm0, xmmword [esi - 0x20]
movups xmmword [ecx - 0x40], xmm1
movups xmm1, xmmword [eax + edi - 0x10]
pxor xmm1, xmm0
movups xmm0, xmmword [esi - 0x10]
movups xmmword [ecx - 0x30], xmm1
movups xmm1, xmmword [eax + edi]
mov eax, dword [ebp - 4]
add edi, 0x40
pxor xmm1, xmm0
movups xmmword [ecx - 0x20], xmm1
cmp edi, dword [ebp - 0x20]
jb 0x669350
mov edx, dword [ebp - 8]
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
cmp edi, edx
jae 0x6693d2
mov esi, dword [ebp + 8]
lea ecx, [edi + eax]
sub ebx, eax
sub esi, eax
sub edx, edi
mov al, byte [ecx + ebx]
lea ecx, [ecx + 1]
xor al, byte [ecx - 1]
mov byte [ecx + esi - 1], al
sub edx, 1
jne 0x6693c0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret