Download Stock Sony Xperia M5 Dual For E5663 Official Firmware Marshmallow 6.0
Download Androxyde FlashTool.
Install the Downloaded Flashtool.
After the Installation, you can See the C:\Flashtool\firmwares this Folder.
Copy your Downloaded Firmware file With extension .ftf and Paste it into the Firmware folder.
Connect Your Mobile Via USB data Cable.
Ignore the Fastboot Mode Step.
Select the Flash Button with the Electric Symbol.
Select Flashmode in that.
Select the Folder as C:\Flashtool\firmwares and in your Right side, you can Find Wipe tick the Wipe data and Wipe Cache.
Select no Final Verification and Select ok.
Follow the Instructions that Will appear on the Screen.
Wait for the Process to be Complete.After the Process Complete Turn on Your Mobile.
You can Check the Firmware Details->Settings->About->Version.