Weird wiring in a 4-connection switch configuration for ceiling fan/light
This is pretty easy, because whatever's happening with the red and white wires there is none of our business.  

It's like if you call in a realtor and prime contractor, and they show up at the same time and look alike... that's none of your business. 

(You can take it apart if you want to... but then you become responsible for everything going on in that area of the circuit, and I gather you don't have the skills to pay those bills.  Such unnecessary dismantling almost always ends in an electrician call.  I do have the skills, and those colors unnerve me,  and I'd do some investigating, but I wouldn't touch it until I'd fully mapped it out.)

So, all ground wires everywhere except the old Soviet Bloc are bare, green, or yellow/green.  All grounds go together. Done.  

The black/white wire is supply hot, and it's not unusual for supply hots to splice with other things to go onward to other points of use. So you leave that alone and just join the red, white and a pigtail to the "common" on your new duplex switch. 

Except for grounds, color codes mean next to nothing because of the way cables are made.  It'd be peachy keen if we could just buy red/black, blue/white, red/yellow/yellow or whatever combo you needed, but nope - cables are only made one way.  So colors are pretty useless unless you swerve out of your way to use colored tape to mark wires. 

The remaining two wires: 


Solo-red from the wall goes to the light. 
Solo-black from the wall goes to the fan.  


Each of these goes to a switched-hot screw on your duplex switch.