VisualSource is an encoded and compressed source code format which takes information of a script and turns it into condensed executable information.
This documentation documents how VisualSource 3.0 works in detail.
The encryption and data format is pretty much the same. However, the version was bumped to 0000000000000004 and a change was made to add extra data for blocks attached as an else block. It's stored in a new Property that comes after ChildBlocks called ElseChildBlock. What is stored is average block data (see Block data structure for information on that) and if one is not stored, the value stored is nil.
VisualSource uses 3 different data concepts within it's code: