Why recorded avi speeds up?
According to the symptoms it seems that the workload is too much for VirtualDub. That does depend on the CPU, but also on the hard disk. Sometimes VirtualDub has to drop frames and resync between video and audio. But in the file header there are only static values that MAGIX and other video editors expect to be constant throughout the video.

You should try setting a smaller frame size and a lower frame rate in Video->Capture pin. And in Capture->Timing there are some other important options. Try the "Sync video to audio..." alternative under Resync mode, or the "Automatically disable resync..." option.

When you find a combination that works, then you can increase the frame size again. I hope this helps.