Automatic weight deforms my mesh

I tried to solve the problem in differents ways but none of them have worked.

Here is how the model should look.


Here is the armature.


And here is whem i aplied the automatic weights.


Also, the rigging is all mess up. Nothing is well painted in the weight painting mode. Is it possible to exclude a part of the mesh to be automatically painted?

I hope you cand help me. Here is the blend file. Thanks!

The main problem is the weird topology and the floating mesh groups of the figure. This and the fact that many transformations were not correctly applied made the blender automatical parenting turn crazy.

Here is a blend file with a little less scary armature: Popcorn guy.blend (13.8 MB)