The registed corruption occurs when the function returns, where it restores the register states from the stack. At least this is an easy fix :)
The registed corruption occurs when the function returns, where it restores the register states from the stack. At least this is an easy fix :)