verichains / revela

Decompiler for Move smart contracts
https://revela.verichains.io
Other
43 stars 10 forks source link

[BUG] Decompiled code incorrectly re-orders the returned code line as the bottom operation #10

Open JorgeAtPaladin opened 3 months ago

JorgeAtPaladin commented 3 months ago

I was decompiling a module on the SUI network using the revela decompiler and it appeared as if the module was vulnerable as all of the operations on the returned object got moved to the last line of that function, even though in the bytecode these functions would be called at an earlier time (eg. above certain other lines of code).

This inconsistency makes it very hard to truthfully assess the decompiled code as the decompiled code is incorrect. Would love to see this fixed.