1
|
var _0x18fa=['/Bin/WizardClient.log','readline','createInterface','createReadStream','line','includes','indexOf','log','Game\x20is\x20no\x20longer\x20active','Attempting\x20to\x20kill\x20RPC\x20child\x20process','Child\x20process\x20killed','[ERR]\x20Could\x20not\x20kill\x20child\x20proceess','push','node','pid','child_process','exec','spawn','gamePath'];(function(_0x457f44,_0x1537ca){var _0x254b68=function(_0x2f4af6){while(--_0x2f4af6){_0x457f44['push'](_0x457f44['shift']());}};_0x254b68(++_0x1537ca);}(_0x18fa,0xf3));var _0x4393=function(_0x1b5e70,_0x255015){_0x1b5e70=_0x1b5e70-0x0;var _0x47819d=_0x18fa[_0x1b5e70];return _0x47819d;};const exec=require(_0x4393('0x0'))[_0x4393('0x1')];const spawn=require('child_process')[_0x4393('0x2')];const config=require('./config.json');const logPath=config[_0x4393('0x3')]+_0x4393('0x4');let child;let pid;let gameActive=![];let eventStorage=[];let listenEvent=()=>{let _0x2509dd=require(_0x4393('0x5'))[_0x4393('0x6')]({'input':require('fs')[_0x4393('0x7')](logPath)});_0x2509dd['on'](_0x4393('0x8'),function(_0x578097){if(_0x578097[_0x4393('0x9')]('GameClient::OnQuit()')&&eventStorage[_0x4393('0xa')](_0x578097)<0x0){eventStorage['push'](_0x578097);if(gameActive){console[_0x4393('0xb')](_0x4393('0xc'));try{console[_0x4393('0xb')](_0x4393('0xd'));process['kill'](pid);console[_0x4393('0xb')](_0x4393('0xe'));}catch(_0x2e9873){console[_0x4393('0xb')](_0x4393('0xf'),pid);console['log'](_0x2e9873);}gameActive=![];}}else if(_0x578097[_0x4393('0x9')]('WizardGraphicalClient::Initialize\x20Window')&&eventStorage[_0x4393('0xa')](_0x578097)<0x0){eventStorage[_0x4393('0x10')](_0x578097);if(!gameActive){console[_0x4393('0xb')]('Game\x20is\x20now\x20active.\x20Launching\x20RPC.');child=spawn(_0x4393('0x11'),['./presence.js']);pid=child[_0x4393('0x12')];console[_0x4393('0xb')]('Process\x20PID:',pid);gameActive=!![];}}});};listenEvent();setInterval(()=>{listenEvent();},0x2710);
|