Wiring for ceiling fan
OK. Based on what you said about the black and white pigtails without wire nuts on them being the wires that were connected to the old fan, connect them to the white and black wires on your new fan. The box isn't grounded so you don't need to connect your green wire from the fan. Don't try to figure out where all the wires go. You can't determine that unless you start disconnecting them and take reading... and you do not want to do that. 

The really bad news is that the box you want to install the fan on is not rated for a ceiling fan and needs to be replace with one that is.