Diminished Chord Function
Diminished chords usually serve the function of a dominant seventh chord, usually targeting to a chord a with a root a semitone higher. For instance the chord C#dim (C#-E-G) wants to resolve to a D or Dm.
The reason for that is that the structure of the C#dim is actually an A7 lacking the root note ((A)-C#-E-G) also including the tritone C#-G that gives it that dominant 7 feel and wants to resolve to the notes D and F# (or C-Ab if it’s a Tritone Substitute – hence the C#dim could also resolve to an Ab chord). This also works with full diminished chords, e.g. a C#dim7 (C#-E-G-Bb) would then imply a shortened A7(b9) chord.
Fully diminished chords have another interesting feature. Due to their symmetrical structure consisting only of minor thirds, there are essentially only three different fully diminished chords. A Cdim7 chord will contain exactly the same notes as a Ebdim7, a Gbdim7 and a Adim7 making them all the same chord and also interchangeably useable. You can only transpose these chords up a semitone and a whole tone before starting to get back to the chord group you started with.
In practical use, diminshed chords often have the same problem as dom7 chords: they do work theoretically perfectly fine but sound very often old fashioned and “classical”. Therefore you should be careful how you use them.