let m_root=self.location.pathname.split("/").slice(0,-1).join("/");function extractOffset(e){e=e.match(/(0x[a-fA-F0-9]+)/);return null===e?null:e[1]}function extractFct(e){e=e.replace(/<[^>]*>/g,"").match(/\(fcn\) ([\S^]+)/);return null===e?null:e[1]}function extractVar(e){e=e.replace(/<[^>]*>/g,"").match(/; var ([a-zA-Z0-9]+) ([\S^]+)/);return null===e?null:e[2]}function prepareClickableOffsets(e){return e=(e=(e=(e=e.replace(/0x([a-zA-Z0-9]*)/g,"<a class='r2seek'>0x$1</a>")).replace(/sym\.([\.a-zA-Z0-9_]*)/g,"<a class='r2seek'>sym.$1</a>")).replace(/fcn\.([\.a-zA-Z0-9_]*)/g,"<a class='r2seek'>fcn.$1</a>")).replace(/str\.([\.a-zA-Z0-9_]*)/g,"<a class='r2seek'>str.$1</a>")}function normalizeHtmlLineBreaks(e){return e.replace(/<br\s*\/?>[\r\n]*/gi,"\n").replace(/\n$/,"")}function getChunk(e,a){r2.cmd("pD "+a+"@e:scr.color=3@"+e+"|H",function(e){t=e});for(var t,s=(t=prepareClickableOffsets(t=normalizeHtmlLineBreaks(t))).split("\n"),r=0;r<s.length;r++){var n=extractFct(s[r]),n=(null!==n&&(s[r]="<span class='fcn' id='"+n+"'>"+s[r]+"</span>"),extractVar(s[r])),n=(null!==n&&(s[r]="<span class='var' id='"+n+"'>"+s[r]+"</span>"),extractOffset(s[r]));null!==n&&(s[r]="<span class='offset' id='"+parseInt(n,16)+"'>"+s[r]+"</span>")}return'<pre style="border-bottom:1px dashed white;" title="'+e+'" id="block'+e+'">'+s.join("\n")+"</pre>"}importScripts(m_root+"/r2.js"),self.onmessage=function(e){e.data.offset<0?self.postMessage({offset:0,data:"before 0x00"}):(e={offset:e.data.offset,size:e.data.size,data:getChunk(e.data.offset,e.data.size)},self.postMessage(e))};