Not quite right mentally: perverted, stupid, or mentally ill.
Having a mental illness.
Having low intelligence.