Untested, no promises, etc. etc. I tweaked the code to make it harder to modify, but be a tiny bit more line conserving.
It's currently set to divide by 2/add 2. Any move with less than 4 frames of hitlag gets set to 1 frame of hitlag (the Red 4 is the limit for the hitlag before it gets changed, the Yellow 1 is what this get set to if it IS <4).
The Divide part of the code is the Blue 13. It's in Hex, and it seems to follow the general formula 8x+3, where 8 is the division amount. So if you want to divide by 3, it'd be 24+3=27, which is then converted into Hex to 1B.
The Add part of the code is the Lime 2.
The glitches you seemed to have were probably associated with moves which had 0 hitlag - which would have happened if the divide was larger than the limit (for example, a divide of 4 with a cap of 3). The game waited for the last frame of hitlag to put in directional influence, and it never happened, so it freaked out.
Once again, I modified this code based solely on the content of PW's code. To be honest, it doesn't really make sense to me (it modifies registers, and I don't know what these registers do). Don't blame me if I destroy your Wii.