Fungus usually form where its cool and damp. I recommend breaking the tank down fully and re-cycling the tank rather then trying to preserve any good bacteria still in the tank.
However -If you want to preserve whats in the filter (if this applies at all)- break down the filter,, bleach the casing's perform any needed maintenance on the impeller and tubes, change out the chemical filtration but preserve the bio and mechanical filtration in tank water with an air stone. Until after your done cleaning the filter and reassemble it. Keep the filter running through a bucket of the tank water for the duration.
Next empty the tank of all remaining water (if it isn't already), remove the rock and ornaments- and wash everything down with a bleach solution. Once bleached fully rinse the rock in a colander or some other strainer. Bleach down the walls and lid of the tank. Rinse.
Now the hard part: Totally and completly dry the tank, rock, and ornaments out *fully*. Hairdryers can help some with this.
This trick might help you- for rock storage (to prevent fungus and mold), I broke down a cardboard box spread the rock out in a thin layer on the box, toweled it down with a rag, and then placed it in the full sun for a few days before storing it in a sealed plastic tub.
Once everything is fully dry you can reassemble the tank. This should have killed all the fungus and any bad bacteria in the rock, tank, and ornaments.
Good luck!