first u need a flash tool download it here.
http://xdaforums.com/showthread.php?t=1351324
and then u need a stock rom. Here is the last version ICS 4.1.B.1.13 for Ray
http://d-h.st/WcP
put the ROM file in the D:/Flashtool/firmware ( it's the location where you install the flashtool)
ok just install flash tool and driver in the zip file you had downloaded.
when the install complete
- open flash tool
- choose the lighting button
- flashmode
- select the ROM ) St18i 4.1.B.1.13
- tick wipe user date & wipe cache then press ok
- wait fore the report that the program is preparing file for install.
- when a windows show on that u need to connect you phone with PC
- turn off you phone and hold the volum down + connect the cable with PC ( when the light oh home button on )
- just wait untill it's finish and reboot your phone ( wait for a few minutes the phone will prepaire for the first time )
sry for my English.