In cognitive-behavioral therapy for substance use disorders, what is the primary focus of a functional analysis?