Question: In a song I am learning, there is a section of the song that has the chord progression G#m | A#m7b5 | B6
I sometimes get the fingerings wrong and use dimished 7th chords on guitar instead of m7b5 chords and in this case I actually think the dimished7th chord sounds good too. So I wanted to ask, what is the difference functionally between the two? They both seem to work in most situations as leading tone chords to a tonic chord one semitone above (B in this case).

Answer: 
In this case it's a "safe" substitution, because the pitches are within the key (`G# minor`) and have contextually appropriate functions within the key.

`A#m7b5` and `A#dim7` differ only in the presence of `G#` or `G`, respectively, both of which are present in `G# minor`. (Technically `G` is `Fx`, but the distinction isn't important in this context.) The voice-leading works nicely in either case:

```
X: 1
T: half dim vs. full dim
K: G# minor
M: none
L: 1/1
"G#min"[GBd] "A#min7b5""inverted"[GAce] "B6""inverted"[GB^df] |
"G#min"[GBd] "A#dim7""inverted"[=GAce] "B6""inverted"[^GBdf] |

```

Some points of interest:

* In both cases, there is an upward progression of triads: `G#min A#dim B`. In the `min7b5` case, the progression occurs over a `G#` pedal tone; whereas, in the `dim7` case, the `G` serves as a leading tone.
* `B6` and `Gmin7` contain exactly the same pitches, which allows for flexibility of interpretation.
* The `dim7` case allows for a descending chromatic line of `G# G F#`.

---

The `min7b5` is most common as the `ii` chord in a minor key. The `dim7` chord appears most frequently as a `vii` chord in major or minor.

The progression `G#min A#[min7b5 or dim7] B6`, allowing for the interpretation `G#min A#[min7b5 or dim7] G#min7`, can be interpreted as:

* `i ii III`
* `i vii i`
* `i vii III`  

All of which are viable according to the precepts of functional harmony.
Taking Bm7-5 vs Bdim7 as examples. If you want to see the chords as working in the same roles as simpler more common chords in the key of A minor:

* **Bm7-5** (alias B half-diminished alias Dm6/B) works roughly as a **substitute for Dm**, so it works as **Am's subdominant**. Bm7-5 contains all the notes of a Dm.
* **Bdim7** (alias B fully diminished) works roughly as a **substitute for E7**, so it works as **Am's dominant**. This is because of the D and G# notes.

But as you already noticed, they're quite similar and the difference isn't very big. The functionality of a chord comes as a sum of its parts and the chords share 75% of the same notes.