nl_tokens: Read header section parse dictionary attributes and config scanner according to engine version attribute .
pl_tokens: function read_header_sect ( input , len ) { var scanner = Scanner ( input ) , header_str = scanner . readUTF16 ( len ) . replace ( / \0$ / , '' ) ; // need to remove tailing NUL // parse dictionary attributes var doc = new DOMParser ( ) . parseFromString ( header_str , 'text/xml' ) ; var elem = <mask> . getElementsByTagName ( 'Dictionary' ) [ 0 ] ; if ( ! elem ) { elem = doc . getElementsByTagName ( 'Library_Data' ) [ 0 ] ; } // console.log(doc.getElementsByTagName('Dictionary')[0].attributes); // var xml = parseXml(header_str).querySelector('Dictionary, Library_Data').attributes; for ( var i = 0 , item ; i < elem . attributes . length ; i ++ ) { item = elem . attributes [ i ] ; attrs [ item . nodeName ] = item . nodeValue ; } attrs . Encrypted = parseInt ( attrs . Encrypted , 10 ) || 0 ; config ( ) ; return spreadus ( len + 4 , input ) ; }