Nasty is written in the key of F♯ Locrian.
According to the Theorytab database, it is the 9th most popular key among Locrian keys and the 81st most popular among all keys. The F♯ Locrian scale is similar to the F♯ Minor scale except that both the 2nd and the 5th notes (G and C) are a half step lower. This means that the characteristic "home base" chord of F♯ Locrian has a dissonant diminished quality (f#˚), which makes it a very uncommon choice for songs.
See the F♯ Locrian Cheat Sheet for popular chords, chord progressions, downloadable midi files and more!