Function at 0x55cdbf
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], ecx
mov ecx, dword [ebp + 0xc]
mov ebx, edx
mov edx, dword [ebp + 0x20]
shr ebx, 2
shr ecx, 2
push 4
pop eax
cmp edx, 2
je 0x55cded
cmp edx, 3
je 0x55cded
mov esi, dword [ebp + 8]
jmp 0x55ce0c
mov eax, ebx
mov esi, edi
mov edi, dword [ebp + 8]
mov ebx, ecx
mov ecx, eax
mov dword [ebp - 4], edi
xor eax, eax
inc eax
cmp edx, 2
push 4
pop edx
cmove eax, edx
push 4
mov edx, eax
pop eax
mov dword [ebp + 0xc], esi
cmp edx, 1
je 0x55cf58
cmp edx, eax
je 0x55cf58
test edx, edx
je 0x55ce2d
cmp edx, 5
jne 0x55d07f
neg edx
sbb edx, edx
and edx, 0xff
cmp dword [ebp + 0x1c], 0
je 0x55d07f
mov eax, dword [ebp + 0x18]
add eax, 0xfffffffc
mov dword [ebp - 0xc], eax
mov eax, ebx
shl eax, 2
mov dword [ebp - 0x1c], eax
mov eax, ecx
mov ecx, dword [ebp + 0x1c]
shl eax, 2
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x10]
add eax, 2
mov dword [ebp - 8], eax
dec ecx
xor ebx, ebx
mov dword [ebp - 0x18], ecx
cmp dword [ebp - 0xc], ebx
jl 0x55cefa
lea eax, [edi + 8]
mov dword [ebp + 0x20], eax
lea eax, [esi + 4]
mov dword [ebp - 0x10], eax
mov eax, edi
mov edi, dword [ebp - 8]
sub eax, esi
mov esi, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
mov eax, dword [eax + esi]
xor ecx, ecx
cmp eax, dword [esi]
lea esi, [esi + 0x10]
mov eax, dword [ebp + 0x20]
setne cl
dec ecx
xor ecx, edx
mov eax, dword [eax - 8]
cmp eax, dword [esi - 0x14]
mov byte [edi + ebx - 1], cl
setne al
xor ecx, ecx
dec al
xor al, dl
mov byte [edi + ebx - 2], al
mov eax, dword [ebp + 0x20]
push 4
mov eax, dword [eax + 4]
cmp eax, dword [esi - 8]
mov eax, dword [ebp + 0x20]
setne cl
dec ecx
xor ecx, edx
mov eax, dword [eax]
cmp eax, dword [esi - 0xc]
mov byte [edi + ebx + 1], cl
setne al
add dword [ebp + 0x20], 0x10
dec al
xor al, dl
mov byte [edi + ebx], al
pop eax
add ebx, eax
mov eax, dword [ebp - 0x14]
cmp ebx, dword [ebp - 0xc]
jle 0x55ce8e
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp - 4]
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 8]
cmp ebx, dword [ebp + 0x18]
jge 0x55cf39
lea eax, [esi + ebx*4]
mov dword [ebp + 0x20], eax
mov eax, edi
mov edi, dword [ebp + 0x20]
sub eax, esi
mov esi, dword [ebp - 8]
mov dword [ebp - 0x18], eax
mov eax, dword [eax + edi]
cmp eax, dword [edi]
push 4
setne al
dec al
xor al, dl
mov byte [esi + ebx - 2], al
inc ebx
pop eax
add edi, eax
mov eax, dword [ebp - 0x18]
cmp ebx, dword [ebp + 0x18]
jl 0x55cf12
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp - 4]
mov eax, dword [ebp - 8]
add edi, dword [ebp - 0x1c]
add esi, dword [ebp - 0x20]
add eax, dword [ebp + 0x14]
mov dword [ebp - 4], edi
mov dword [ebp + 0xc], esi
mov dword [ebp - 8], eax
test ecx, ecx
jne 0x55ce66
jmp 0x55d07f
dec edx
neg edx
sbb edx, edx
and edx, 0xff
cmp dword [ebp + 0x1c], 0
je 0x55d07f
mov eax, dword [ebp + 0x18]
add eax, 0xfffffffc
mov dword [ebp - 0xc], eax
mov eax, ebx
shl eax, 2
mov dword [ebp - 0x14], eax
mov eax, ecx
mov ecx, dword [ebp + 0x1c]
shl eax, 2
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x10]
add eax, 2
mov dword [ebp - 8], eax
dec ecx
xor ebx, ebx
mov dword [ebp - 0x18], ecx
cmp dword [ebp - 0xc], ebx
jl 0x55d026
lea eax, [edi + 8]
mov dword [ebp + 0x20], eax
lea eax, [esi + 4]
mov dword [ebp - 0x20], eax
mov eax, edi
mov edi, dword [ebp - 8]
sub eax, esi
mov esi, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
mov eax, dword [eax + esi]
xor ecx, ecx
cmp eax, dword [esi]
lea esi, [esi + 0x10]
mov eax, dword [ebp + 0x20]
setle cl
dec ecx
xor ecx, edx
mov eax, dword [eax - 8]
cmp eax, dword [esi - 0x14]
mov byte [edi + ebx - 1], cl
setle al
xor ecx, ecx
dec al
xor al, dl
mov byte [edi + ebx - 2], al
mov eax, dword [ebp + 0x20]
push 4
mov eax, dword [eax + 4]
cmp eax, dword [esi - 8]
mov eax, dword [ebp + 0x20]
setle cl
dec ecx
xor ecx, edx
mov eax, dword [eax]
cmp eax, dword [esi - 0xc]
mov byte [edi + ebx + 1], cl
setle al
add dword [ebp + 0x20], 0x10
dec al
xor al, dl
mov byte [edi + ebx], al
pop eax
add ebx, eax
mov eax, dword [ebp - 0x1c]
cmp ebx, dword [ebp - 0xc]
jle 0x55cfba
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp - 4]
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 8]
cmp ebx, dword [ebp + 0x18]
jge 0x55d065
lea eax, [esi + ebx*4]
mov dword [ebp + 0x20], eax
mov eax, edi
mov edi, dword [ebp + 0x20]
sub eax, esi
mov esi, dword [ebp - 8]
mov dword [ebp - 0x20], eax
mov eax, dword [edi + eax]
cmp eax, dword [edi]
push 4
setle al
dec al
xor al, dl
mov byte [esi + ebx - 2], al
inc ebx
pop eax
add edi, eax
mov eax, dword [ebp - 0x20]
cmp ebx, dword [ebp + 0x18]
jl 0x55d03e
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp - 4]
mov eax, dword [ebp - 8]
add edi, dword [ebp - 0x14]
add esi, dword [ebp - 0x10]
add eax, dword [ebp + 0x14]
mov dword [ebp - 4], edi
mov dword [ebp + 0xc], esi
mov dword [ebp - 8], eax
test ecx, ecx
jne 0x55cf92
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret