Default [Q] sony Xperia s reset too factory settings

Hello do not know if this is the right place,

but I have purchased a used sony xperia s with operating system , 3.4.0 doomkernel.

but would like to have it back to factory condition, can I?