Researcher decodes brain to help patients with mental illnesses