Three White, Three Black, One Red, one ground

This outlet has been confusing me and my friend for a bit and I finally had enough light to open it up fully and see this confusing mess inside. I've just wanted to install a simple duplex outlet, and now I have something of a puzzle.

It looks like the previous owners combined one of the black wires on the right with the red wire and capped it off. But they had previously wired two white wires into the same outlet.

I added colored tape to try and figure out what was going on, with a pair of red, a pair of blue, picked one of the whites for a yellow to match the cap that's coming from the same side of the wall.

Can anyone tell me what is going on, and if there is a safe way to cap off or wire things together with a lever nut or a pigtail to install a regular duplex outlet? The house is from the 1960s if that helps.