In the context of varieties of representations of arbitrary quivers, possibly carrying loops, we define a generalization of Lusztig Lagrangian subvarieties. From the combinatorial study of their irreducible components arises a structure richer than the usual Kashiwara crystals. Along with the geometric study of Nakajima quiver varieties, in the same context, this yields a notion of generalized crystals, coming with a tensor product. As an application, we define the semicanonical basis of the Hopf algebra generalizing quantum groups, which was already equipped with a canonical basis. The irreducible components of the Nakajima varieties provide the family of highest weight crystals associated to dominant weights, as in the classical case.