Where where where where whew here whehrhwhe did you get that hat!!!
Part of the black witch set. Free Royal Sorcerer Navlaan in Alidia’s Keep and talk to him while human to buy the whole set and more. If your Int is 20+ the hat grants an attunement slot.