i try to decompile the loadingscreen.swf
This file is packed with zlib i think, and crypted before
i found AS3 source code from preloader.swf
Code:
package net.bigpoint.darkorbit.preloader { import flash.display.Sprite; import flash.display.Loader; import flash.net.URLLoader; import net.bigpoint.darkorbit.preloader.error.GlobalErrorHandler; import flash.events.Event; import flash.display.StageAlign; import flash.system.Security; import flash.display.StageScaleMode; import flash.display.MovieClip; import flash.display.LoaderInfo; import --_--.-__--_; import flash.net.URLRequest; import flash.net.URLLoaderDataFormat; import flash.events.IOErrorEvent; import flash.utils.ByteArray; import flash.system.LoaderContext; import flash.system.ApplicationDomain; import --_-_.-_____; import mx.logging.Log; import flash.text.Font; public class -_-_-- extends Sprite { public function -_-_--() { var _loc1_:* = true; var _loc2_:* = false; this.-_-_- = -_---_; super(); Font.registerFont(-____); addEventListener(Event.ADDED_TO_STAGE,this.---__); } private static var -____:Class = -___-; private var ---:-__-__; private var -_----:Loader; private var -__-:URLLoader; private var errorHandler:GlobalErrorHandler; private var -_-_-:Class; private function ---__(param1:Event) : void { var _loc2_:* = false; var _loc3_:* = true; removeEventListener(Event.ADDED_TO_STAGE,this.---__); stage.addEventListener(Event.RESIZE,this.---_-); stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; Security.allowDomain("*"); this.--____(); this.-_-_(); this.-_---(); } private function --_() : void { var _loc1_:* = false; var _loc2_:* = true; this.errorHandler = new GlobalErrorHandler(this); this.errorHandler.initialize(); } private function ---_-(param1:Event) : void { var _loc2_:* = false; var _loc3_:* = true; this.-___--(); } private function -_-_() : void { var _loc2_:* = false; var _loc3_:* = true; if(this.--- != null) { return; } var _loc1_:MovieClip = new this.-_-_-() as MovieClip; this.--- = new -__-__(_loc1_); this.-___--(); addChild(this.---); this.---.show(); } private function -___--() : void { var _loc1_:* = false; var _loc2_:* = true; if(!(stage == null) && !(this.--- == null)) { this.---.x = stage.stageWidth * 0.5; this.---.y = stage.stageHeight * 0.5; } } private function --____() : void { var _loc5_:* = false; var _loc6_:* = true; var -__:String = null; var -_--:String = null; var --__-:Object = null; var -_-:Boolean = false; try { --__- = LoaderInfo(this.stage.loaderInfo).parameters; for (-__ in --__-) { -_-- = String(--__-[-__]); if("host" !== _loc4_) { if("cdn" !== _loc4_) { if("lang" !== _loc4_) { if("loadingscreenHash" !== _loc4_) { if("loadingClaim" !== _loc4_) { if("resolutionID" !== _loc4_) { switch(null) { case "errortracking": -__--_.host = "http://" + -_-- + "/"; continue; default: continue; } } } } } } } } } catch(error:Error) { } if(!(-__--_.host == "") && -__--_.--__ == "") { -__--_.--__ = -__--_.host; } } public function -_---() : void { var _loc3_:* = false; var _loc4_:* = true; var _loc2_:URLRequest = null; var _loc1_:* = ".did.ID? c#sharp!"; _loc1_ = ".swf"; if(-__--_.--__ == "") { _loc2_ = new URLRequest("loadingscreen" + _loc1_); } else { _loc2_ = new URLRequest(-__--_.--__ + "spacemap/loadingscreen" + _loc1_ + "?__cv=" + -__--_.loadingscreenHash); } this.-__- = new URLLoader(); this.-__-.dataFormat = URLLoaderDataFormat.BINARY; this.-__-.addEventListener(Event.COMPLETE,this.--_-__); this.-__-.addEventListener(IOErrorEvent.IO_ERROR,this.-_-_-_); this.-__-.load(_loc2_); } private function -_-_-_(param1:IOErrorEvent) : void { var _loc2_:* = true; var _loc3_:* = false; } private function --_-__(param1:Event) : void { var _loc2_:* = false; var _loc3_:* = true; this.--__--(param1.target as URLLoader); } private function --__--(param1:URLLoader) : void { var _loc5_:* = false; var _loc6_:* = true; var _loc2_:ByteArray = param1.data as ByteArray; var _loc3_:* = true; _loc2_.uncompress(); _loc2_ = this.--_-(_loc2_); _loc2_.position = 0; this.-_---- = new Loader(); this.--___-(); var _loc4_:LoaderContext = new LoaderContext(false,new ApplicationDomain(null)); this.-_----.loadBytes(_loc2_,_loc4_); } private function --_-(param1:ByteArray) : ByteArray { var _loc7_:* = true; var _loc8_:* = false; var _loc3_:uint = 0; var _loc4_:uint = 0; var _loc2_:uint = param1.length; param1.position = 0; var _loc5_:uint = 57; var _loc6_:* = 0; while(_loc6_ < _loc2_) { _loc5_ = _loc5_ + 3; _loc5_ = (_loc5_ + 3) & 255; _loc4_ = _loc5_ & 4; _loc3_ = param1[_loc6_]; param1[_loc6_] = _loc3_ ^ _loc5_; _loc6_++; } param1.position = 0; return param1; } private function -_(param1:uint, param2:uint) : uint { var _loc3_:* = true; var _loc4_:* = false; return param1 << param2 | param1 >>> -param2; } private function -_--_(param1:Event) : void { var _loc2_:* = true; var _loc3_:* = false; this.-_-__-(); this.---.hide(); stage.addChild(this.-_----); this.-__-_-(); } private function -(param1:IOErrorEvent) : void { var _loc2_:* = true; var _loc3_:* = false; this.-_-__-(); } private function --___-() : void { var _loc1_:* = true; var _loc2_:* = false; this.-_----.contentLoaderInfo.addEventListener(Event.COMPLETE,this.-_--_); this.-_----.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,this.-); this.-_----.addEventListener("mx.managers.SystemManager.isBootstrapRoot",this.--__-_); this.-_----.addEventListener("mx.managers.SystemManager.isStageRoot",this.--__-_); } private function -_-__-() : void { var _loc1_:* = true; var _loc2_:* = false; this.-_----.contentLoaderInfo.removeEventListener(Event.COMPLETE,this.-_--_); this.-_----.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR,this.-); this.-_----.removeEventListener("mx.managers.SystemManager.isBootstrapRoot",this.--__-_); this.-_----.removeEventListener("mx.managers.SystemManager.isStageRoot",this.--__-_); } private function -____-() : void { var _loc2_:* = false; var _loc3_:* = true; var _loc1_:-_____ = new -_____(); _loc1_.-- = "localhost"; Log.addTarget(_loc1_); } public function --__-_(param1:Event) : void { var _loc2_:* = false; var _loc3_:* = true; param1.preventDefault(); } private function -__-_-() : void { var _loc1_:* = false; var _loc2_:* = true; stage.removeEventListener(Event.RESIZE,this.---_-); if(!(this.--- == null) && (contains(this.---))) { removeChild(this.---); } } } }
I try to build now code to decrypt and save the decrypted file
here i my code
Code:
package { import flash.display.Sprite; import flash.events.Event; import flash.display.Sprite; import flash.display.Loader; import flash.net.URLLoader; import flash.events.Event; import flash.display.StageAlign; import flash.system.Security; import flash.display.StageScaleMode; import flash.display.MovieClip; import flash.display.LoaderInfo; import flash.net.URLRequest; import flash.net.URLLoaderDataFormat; import flash.events.IOErrorEvent; import flash.utils.ByteArray; import flash.system.LoaderContext; import flash.system.ApplicationDomain; import mx.logging.Log; import flash.text.Font; import flash.events.*; import flash.net.*; /** * ... * @author uragan */ public class Main extends Sprite { public var swfloader:Loader = new Loader(); public var url:String public var request:URLRequest = new URLRequest(); public var loader:URLLoader = new URLLoader(); public var bytestring:ByteArray; public var myfile:FileReference = new FileReference(); public var context:LoaderContext = new LoaderContext(false, new ApplicationDomain(null)); public function Main():void { url = "loadingscreen.swf" //"http://darkorbit-22.level3.bpcdn.net/spacemap/loadingscreen.swf"; request = new URLRequest(url); loader.dataFormat = URLLoaderDataFormat.BINARY; loader.addEventListener(Event.COMPLETE, completeHandler); loader.load(request); } public function completeHandler(event:Event):void { unpack(event.target as URLLoader); //trace("completeHandler: " + loader.data); } public function unpack(loader:URLLoader):void { bytestring = loader.data as ByteArray; bytestring.uncompress(); bytestring = decompile(bytestring); bytestring.position = 0; myfile.save(bytestring.toString(), "text.swf"); swfloader.loadBytes(bytestring, context); //trace("completeHandler: " + loader.data); } public function decompile(param1:ByteArray) : ByteArray { var _loc7_:* = true; var _loc8_:* = false; var _loc3_:uint = 0; var _loc4_:uint = 0; var _loc2_:uint = param1.length; param1.position = 0; var _loc5_:uint = 57; var _loc6_:* = 0; while(_loc6_ < _loc2_) { _loc5_ = _loc5_ + 3; _loc5_ = (_loc5_ + 3) & 255; _loc4_ = _loc5_ & 4; _loc3_ = param1[_loc6_]; param1[_loc6_] = _loc3_ ^ _loc5_; _loc6_++; } param1.position = 0; return param1; } public function init(e:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); } } }
But this file is still crypted
Maybe somebody can compare this codes and find the BUG on my code
I will put some used files to a packet and zip it.
Thank you