How to revert back to stock rom for Galaxy S 2?
You can find the stock ROM for the SGS2 on XDA here, and there is also a list of branded carrier ROMs here.

You will then need to use a tool like ODIN (maybe even Kies) to flash the ROM to the device. The first link also is a good tutorial on how to flash via ODIN. 

I recommend you read everything before you attempt to restore, then when you understand it all, read it again. If there is any reference to specific versions of things, or radios versions or anything like that, make sure you do the research and look in to that stuff and make sure everything is "correct" before you continue. Then follow it step-by-step when you are ready to restore.