Activate Altar of Dementia by sacrificing the creature.
When the creature dies, its undying ability triggers if it didn't have a +1/+1 counter, and Luminous Broodmoth triggers if the creature didn't have flying.
Resolve the undying trigger, if applicable, returning the creature from your graveyard to the battlefield with a +1/+1 counter on it.
Resolve the Luminous Broodmoth trigger, if applicable, returning the creature from your graveyard to the battlefield with a flying counter on it if the creature is still in your graveyard.