~てみたら ('when I tried doing X and found...') combines ~てみる ('try doing') with the たら conditional — typical for 'when I did X, (I found) Y.' 腐っている uses ~ている on 腐る ('to rot, spoil') to mean 'is in the rotten state.' 気付く ('to notice') takes のに as its complement marker here (のに + 気付く = notice that...).