What a does it mean when someone is trying to function?
This means that the person is taking a responsible action. This is normally after there was an issue that he was foreseeing and did not take immediate measure and when he takes the measures, that is when it is said he is trying to function.
It normally means they're disoriented.
Think of it like this if a toy is not functioning properly it's not working correctly so now if a persons lets say heart isn't functioning correctly it could be a heart attack