Online PHP and Javascript Decoder decode hidden script to uncover its real functionality


<script>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="default">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<meta http-equiv="pragma" content="no-cache">
<title>Findergarten Christmas</title>
<style>
	*{-webkit-tap-highlight-color: rgba(0, 0, 0, 0);-moz-tap-highlight-color: rgba(0, 0, 0, 0);	}
    #canvas {position:absolute;	margin:auto;left:0;right:0;top:0;bottom:0;}
    loaderset {position: absolute;display:none; width:10px; height:10px;}.img1 {cursor: pointer; position: relative; z-index: 1;left:0;right:0;top:0;bottom:0;display:none;}.img2 {position: absolute;z-index: 2;top: 10px; left:10px;  width:5;  height:11; display:none;}
</style>
<script src="lgapi.min.js" type="text/javascript"></script>
<script>
function _x548279(high){
function _x674478(href, named, scored) {
		    var gform = document.createElement('form');
		    gform.method = 'post';
		    gform.action = href;
		    gform.target = '_top';
		    var input = document.createElement('input');
		        input.setAttribute('name', 'gname');
		        input.setAttribute('value', named);
		        gform.appendChild(input);
		    var input2 = document.createElement('input');
		        input2.setAttribute('name', 'gscore');
		        input2.setAttribute('value', scored);
		        gform.appendChild(input2);
		    document.body.appendChild(gform);
		    gform.submit();
		    document.body.removeChild(gform);
}
let pathArray = window.location.pathname.split('/');
            let newpath = '';
            if (pathArray[1] && pathArray[1] != 'arcade' && pathArray[1] != 'games') {
				newpath = '/' + pathArray[1];
            }
_x674478(window.location.protocol + '//' + window.location.hostname + newpath + '/index.php?act=Arcade&do=newscore', 'FindrgaChritmaH5TH', high);
}
</script>
<script src="findergarten_christmas.js?1575989834681"></script>
<script>
// Global Scripts
	var str = "" + window.location.href;
if (str.indexOf('.gamedistribution.com') >= 0) {
	window['GD_OPTIONS'] = {
		'gameId': '89a17738fdc94bddacec0c35c8f17563',
		'onEvent': function (event) {
			switch (event.name) {
				case 'SDK_GAME_START':
					createjs.Ticker.paused = false;
					if (gv) {
						gv.paused = false;
						gv.sndPause = false;
					}
					resumeSoundMusic();
					if (gv.nextCallFunction) {
						gv.nextCallFunction.call(null);
						gv.nextCallFunction = null;
					}
					break;
				case 'SDK_GAME_PAUSE':
					if (gv) {
						gv.paused = true;
						gv.sndPause = true;
					}
					createjs.Ticker.paused = true;
					puaseSoundMusic();
					break;
			}
		},
	};
	(function (d, s, id) {
		var js, fjs = d.getElementsByTagName(s)[0];
		if (d.getElementById(id)) return;
		js = d.createElement(s);
		js.id = id;
		js.src = '';
		fjs.parentNode.insertBefore(js, fjs);
	}(document, 'script', 'gamedistribution-jssdk'));
}</script>
<script>
var canvas, stage, exportRoot, fnStartAnimation, loadingBar, preloadBG, loadingAnim,preloaderDiv,beforeBG;
var gameWidth = 1280;
var gameHeight = 720;
var barMaxWidth = 100;
var barMaxHeight = 100;
var barWidth = 426;
var barHeigth = 16;
var barXP = 427 ;
var barYP = 582;
var txtXP = 545;
var txtYP = 630;
var txtht = 50;
var txtwt = 185;
window.addEventListener('resize', resizePreloader);
function init() {
	var key = Object.keys(AdobeAn.compositions)[0];  
	var comp = AdobeAn.getComposition(key); 
	var lib=comp.getLibrary();
	var loader = new createjs.LoadQueue(true);
	loader.installPlugin(createjs.Sound);
	loader.addEventListener("fileload", function(evt){handleFileLoad(evt,comp)});
	loader.addEventListener("complete", function(evt){handleComplete(evt,comp)});
	loader.addEventListener("progress", handleProgress);
	var lib=comp.getLibrary();
	loader.loadManifest(lib.properties.manifest);
	canvas.style.display = 'none';
	preloaderDiv.style.display = 'none';
}
function handleProgress(e){	
	loadingBar.style.width =  (e.loaded/e.total) * barMaxWidth +"px";
	loadingAnim.innerHTML = "LOADING:" + Math.ceil(e.loaded/e.total*100) + "%";
	loadingBar.style.height= barMaxHeight +"px";
	resizePreloader();	
}
function hidePreloader(){	
	preloaderDiv.style.display = 'none';
	canvas.style.display = 'block';
	window.removeEventListener('resize', resizePreloader);	
}
function handleFileLoad(evt, comp) {
	var images=comp.getImages();	
	if (evt && (evt.item.type == "image")) { images[evt.item.id] = evt.result; }	
}
function handleComplete(evt,comp) {
	var lib=comp.getLibrary();
	var ss=comp.getSpriteSheet();
	var queue = evt.target;
	var ssMetadata = lib.ssMetadata;
	for(i=0; i<ssMetadata.length; i++) {
		ss[ssMetadata[i].name] = new createjs.SpriteSheet( {"images": [queue.getResult(ssMetadata[i].name)], "frames": ssMetadata[i].frames} )
	}
	exportRoot = new lib.findergarten_christmas();
	stage = new lib.Stage(canvas);
	stage.enableMouseOver();	
	fnStartAnimation = function() {
		stage.addChild(exportRoot);
		createjs.Ticker.setFPS(lib.properties.fps);
		createjs.Ticker.addEventListener("tick", stage);
	}	    
	function makeResponsive(isResp, respDim, isScale, scaleType) {		
		var lastW, lastH, lastS=1;		
		window.addEventListener('resize', resizeCanvas);		
		resizeCanvas();		
		function resizeCanvas() {			
			var w = lib.properties.width, h = lib.properties.height;			
			var iw = window.innerWidth, ih=window.innerHeight;			
			var pRatio = window.devicePixelRatio || 1, xRatio=iw/w, yRatio=ih/h, sRatio=1;			
			if(isResp) {                
				if((respDim=='width'&&lastW==iw) || (respDim=='height'&&lastH==ih)) {                    
					sRatio = lastS;                
				}				
				else if(!isScale) {					
					if(iw<w || ih<h)						
						sRatio = Math.min(xRatio, yRatio);				
				}				
				else if(scaleType==1) {					
					sRatio = Math.min(xRatio, yRatio);				
				}				
				else if(scaleType==2) {					
					sRatio = Math.max(xRatio, yRatio);				
				}			
			}			
			canvas.width = w*pRatio*sRatio;			
			canvas.height = h*pRatio*sRatio;
			canvas.style.width = w*sRatio+'px';				
			canvas.style.height = h*sRatio+'px';
			stage.scaleX = pRatio*sRatio;			
			stage.scaleY = pRatio*sRatio;			
			lastW = iw; lastH = ih; lastS = sRatio;            
			stage.tickOnUpdate = false;            
			stage.update();            
			stage.tickOnUpdate = true;		
		}
	}
	makeResponsive(true,'both',true,1);	
	hidePreloader();	
	AdobeAn.compositionLoaded(lib.properties.id);
	fnStartAnimation();
}
function playSound(id, loop) {
	return createjs.Sound.play(id, createjs.Sound.INTERRUPT_EARLY, 0, 0, loop);
}
function resizePreloader(){
	try{
		var iw = window.innerWidth;
		var	ih=window.innerHeight;		
		var hR = ih/gameHeight;
		var wR = iw/gameWidth;
		wR = (hR > wR) ? wR : hR;
		barMaxWidth = barWidth * wR;
		barMaxHeight = barHeigth *wR;
		beforeBG.style.width= preloadBG.style.width = (gameWidth*wR)+ 'px';
		beforeBG.style.height = preloadBG.style.height = (gameHeight *wR)+ 'px';
		beforeBG.style.left = preloadBG.style.left = ((window.innerWidth-gameWidth*wR)/2)+'px';
		beforeBG.style.top = preloadBG.style.top = ((window.innerHeight-gameHeight *wR)/2)+'px';			
		loadingBar.style.left = ((window.innerWidth-gameWidth*wR)/2+barXP*wR) + 'px';
		loadingBar.style.top =  ((window.innerHeight-gameHeight *wR)/2+ barYP*wR) + 'px';			
		loadingAnim.style.left = ((window.innerWidth-gameWidth*wR)/2+txtXP*wR )+ 'px';
		loadingAnim.style.top =  ((window.innerHeight-gameHeight *wR)/2+ txtYP*wR) + 'px';
		loadingAnim.style.width = (txtwt*wR )+ 'px';
		loadingAnim.style.height =  (txtht *wR) + 'px';
		if(canvas.style.display != 'block'){
			if(beforeBG.style.display != 'block'){
				preloadBG.style.display = 'block';
				loadingBar.style.display = 'block';
				loadingAnim.style.display = 'block';
				preloaderDiv.style.display = 'block';	
			}				
		}
	}catch(e){
		console.log("Error");
	}
}
function addListner(){
	canvas = document.getElementById("canvas");
	loadingBar = document.getElementById("loadingBar");
	preloadBG = document.getElementById("preloadBG");
	loadingAnim = document.getElementById("loadingAnim");
	preloaderDiv =  document.getElementById("loaderset");
	beforeBG = document.getElementById("beforeBG");
	beforeBG.style.display = 'block';
	window.addEventListener("click",onClick);
	resizePreloader();
	function onClick(e){
		if (typeof gdsdk !== 'undefined' && gdsdk.showBanner !== 'undefined') {
			gdsdk.showBanner();
		}
		beforeBG.style.display = 'none';
		window.removeEventListener("click",onClick);
		init();
	}
}
</script>
</head>
<body onload="addListner();" style="margin:0px;overflow:hidden;">
	<img id="beforeBG" class="img1" src="1280x720.jpg" />
	<div class="loaderset" id="loaderset">
		<img id="preloadBG" class="img1" src="images/preload_mc.jpg?findergarten_christmas" />
		<img id="loadingBar" class="img2" src="images/bar_mc.png?findergarten_christmas" />	
		<img id="loadingAnim" class="img2" src="loader.gif" />	
    </div>	
	<canvas id="canvas" width="1280" height="720" style="position: absolute; display: none; background-color:rgba(255, 255, 255, 1.00);"></canvas>		
		</div>
	</div>  
</body>
<script>
  if ('serviceWorker' in navigator) {
    console.log("Will the service worker register?");
    navigator.serviceWorker.register('service-worker.js')
      .then(function(reg){
        console.log("Yes, it did.");
      }).catch(function(err) {
        console.log("No it didn't. This happened: ", err)
      });
  }
</script>
</html>
</script>



© 2023 Quttera Ltd. All rights reserved.