Statistical wavefunction method for highly excited vibrational states of polyatomic molecules