Yes Odin should very well solve your problem.
Also do think about how it crashed in the first place and share that here so that others can avoid this problem.
Samsung GT-S5830 Galaxy Ace
ROM: AOKP 4.2.2
Scripts: CronMod INT2EXT4+
245MHz - 800MHz, SmartassH3