Let $R$ be a prime ring with its Utumi ring of quotients $U$, $C=Z(U)$ the extended centroid of $R$, $L$ a non-central Lie ideal of $R$ and $0neq a in R$. If $R$ admits a generalized derivation $F$ such that $a(F(u^2)pm F(u)^{2})=0$ for all $u in L$, then one of the following holds: begin{enumerate}

item there exists $b in U$ such that $F(x)=bx$ for all $x in R$, with $ab=0$; item $F(x)=mp x$ for all $x in R$; item char $(R)=2$ and $R$ satisfies $s_4$;item char $(R) neq 2$, $R$ satisfies $s_4$ and there exists $bin U$ such that $F(x)=bx$ for all $x in R$.