Unsure about wiring in electrical box
If you haven't burned to a crisp yet...BURNINATE THIS PANEL

This box is very definitely a FPE Stab-Lok, and thus needs to be burninated with extreme predjudice before it burns your house down!

I'd simply replace it outright; ordinarily, an Eaton retrofit interior would be an option, but your panel is stuffed to the gills with tandems, and since tandem GFCI/AFCI breakers are not a thing, you will need far more spaces on your new panel than will fit in a cabinet that size (a 24 circuit CH main breaker retrofit interior requires 29" of height, and you only appear to have about 24").  I would get the largest panel I can, however, to avoid having "overstuffed electrical panel" syndrome again in the future.

As a result, a bare minimum replacement for this application would be a 30 space, 100A, main breaker unit; however, I would splash out and get a 42 or 54 space, 200/225A unit and downbreaker it to 100A (either through swapping to a lower amp main or using a backfed 100A branch breaker with a hold-down as the main as not all 200A panels can accept a 100A breaker in the main breaker position).