I've successfully flashed my S500 to W580 and unlocked it. It worked fine. But how can I change it back 'cause I need to send it for repair?

CID52 - RED - R8BE001 - S E EUROPE

Can someone help me please...