*Tested on my P3100*:
NOTE: I am not responsible for bricked devices or dead SD Cards, you are doing this at your own risk.
1. Download and extract the file, you will get a file ending with "HOME.tar.md5".
2. Download the appropriate .pit file for your P3100 from here and Odin3 v1.85 (or above).
3. Connect your phone in download mode (Volume Down + Power Button).
4. Run Odin and find the .tar.md5 file and mount it as PDA and the .pit file as PIT. You should see your phone in yellow labelled as COM:*something*. Tick the Auto Reboot and F.Reset Time options.
5. Lastly, Flash! (Don't forget to end Samsung Kies or any other process from the task manager that might interfere in the process.).
That's it, you now have the latest official firmware.
If your phone gets stuck at the bootlogo, enter recovery and wipe data/factory reset.
To root your phone running 4.0.4, follow this guide. (credits: Fz.hary)
Like my post or I helped you anyway? Please click the "Thanks" button.