daily pastebin goal
48%
SHARE
TWEET

Untitled

a guest Dec 6th, 2018 103 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package
  2. {
  3.     import flash.display.*;
  4.     import flash.events.*;
  5.     import flash.net.*;
  6.     import flash.utils.*;
  7.    
  8.     public class EncryptedSWFLoader extends flash.display.Sprite
  9.     {
  10.         public function EncryptedSWFLoader()
  11.         {
  12.             super();
  13.             binaryLoader = new flash.net.URLLoader();
  14.             binaryLoader.addEventListener(flash.events.Event.COMPLETE, onLoadInit);
  15.             binaryLoader.dataFormat = flash.net.URLLoaderDataFormat.BINARY;
  16.             binaryLoader.load(new flash.net.URLRequest(ENCRYPTED_SWF_URL));
  17.             return;
  18.         }
  19.  
  20.         internal function onLoadInit(arg1:flash.events.Event):void
  21.         {
  22.             binaryLoader.removeEventListener(flash.events.Event.COMPLETE, onLoadInit);
  23.             var loc1:*=new flash.display.Loader();
  24.             var loc2:*=new flash.utils.ByteArray();
  25.             loc2 = binaryLoader.data;
  26.             if (loc2.length != 0)
  27.             {
  28.                 XOR(loc2, KEY);
  29.                 loc1.loadBytes(loc2);
  30.                 addChild(loc1);
  31.             }
  32.             return;
  33.         }
  34.  
  35.         internal static function XOR(arg1:flash.utils.ByteArray, arg2:String):void
  36.         {
  37.             var loc1:*=0;
  38.             var loc2:*=0;
  39.             while (loc2 < arg1.length)
  40.             {
  41.                 arg1[loc2] = arg1[loc2] ^ arg2.charCodeAt(loc1);
  42.                 ++loc1;
  43.                 if (loc1 >= arg2.length)
  44.                 {
  45.                     loc1 = 0;
  46.                 }
  47.                 ++loc2;
  48.             }
  49.             return;
  50.         }
  51.  
  52.         internal static const ENCRYPTED_SWF_URL:String="./websapp_main-en.swf";
  53.  
  54.         internal static const KEY:String="alexander";
  55.  
  56.         internal var binaryLoader:flash.net.URLLoader;
  57.     }
  58. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top