I am working on an obfuscated binary. IDA did pretty good job distinguishing code from junk. However, I had started messing around with a function changing from code to data and  vice versa and completely messed the function up and destroyed the way it looked like. I don't want to start new database on the executable and re-do all my work. Is there a way to re-analyse a single function and return it to the way it looked like after initial analysis?
How to re-analyse a function in IDA Pro?
disassembly;ida
Well you have to first Undefine the code using U key and they select the code and right click you will have some options like C (code) and so on. IDA almost give you ability of doing anything wih obfuscated code to help him to understand code correctly .ADDED: After converting to C (code), do Alt+P to create/edit function. In addition, rebuild layout graph by go to Layout view, right clicking empty space and selecting Layout graph.