It's probably that i'm doing something wrong but,

System.Runtime.InteropServices.Marshal.WriteIntPtr(positionToWriteTo, newFinalBitsValue);

does not seem to be changing final bits


3333333333