I’m trying to figure out the chord progression in the highlighted measure. I know the key shifts from A flat major to minor, but what do the #c minor and A major chords do here? How can I write them in terms of Roman numerals? Thanks
It’s not a great idea to just shift to enharmonic names for chords, because that can obscure their function within the key. Beethoven tends to be quite careful about his enharmonic spelling. The D♭ minor chord is a iv chord, and that immediately changes into the even stronger pre-dominant function chord called a Neapolitan 6th. A Neapolitan 6th chord is a chromatic harmony that is a major chord in first inversion with the flattened second scale degree as its root. In the key of A♭, the flattened second scale degree is B♭♭, and this is indeed a B♭♭ major chord in first inversion.
Actually, Beethoven is inadvertently offering a lesson in what is generally thought to be the actual origin of this chromatic harmony. Rather than an altered ii chord, the Neapolitan is usually seen as an altered iv chord. Just raise the fifth of the iv chord by one half step (in this case, A♭ to B♭♭) and you get a spicier sounding chord with the same function.
As Athanisius points out in a comment, I failed to explain what the Roman Numeral analysis for this chord would be. At the schools I’ve taught we use ♭II6 for a Neapolitan sixth chord. In case you haven’t seen it before, an accidental in front of a Roman numeral indicates an alteration of the root from its normal diatonic quality. A flat in front means that the root has been lowered by a half step from its normal note. In the case of your example, the standard second scale degree is B♭, but it is being lowered to become B♭♭. Other people use N6 as the symbol, which is perfectly fine as well. What matters is that you understand it has a strong pre-dominant function.