This peace of code freeze Unity, and I don't know why.

Hello,

I wrote a bit of code that changes the sprite of a game object, but it freezes Unity, and I really don’t know why, can somebody help me, please?

IEnumerator Routine()
    {
        while (routineBool)
        {
            for (int i = 0; i > end; i++)
            {
                myself.GetComponent<SpriteRenderer>().sprite.Equals(animation[i]);
                yield return new WaitForSeconds(0.4f);
            }
        }
        myself.GetComponent<SpriteRenderer>().enabled.Equals(false);
    }

What is the value for end? Before your while loop, place this line:

Debug.Log("The value of end = " + end.ToString());

Your code is dangerous because if the for loop is not entered, then your coroutine will never yield inside the while loop.

for (int i = 0; i > end; i++)

That will only work if end is < 0, otherwise as has been mentioned your Coroutine will never yield as it gets stuck in the while loop and never enters the for loop.
What is the value of end? Did you perhaps mean to do i < end;?