Link | Submitted By | Actions | |
---|---|---|---|
Game On Armor Games | dy8i8 | ||
Game On Kongregate | blahblahman | ||
Game On Newgrounds | kolonelkadat | ||
Game On Newgrounds | gates | ||
Game On Kongregate | jarly | ||
Game On Armor Games | Aceforlife12 |
Need some help... Tower of DoomBase64...Last Updated: 04/02/2013 19:06 |
Additional Info
|
Hey guys,
Someone needed help with the game, And cheat engine itself isn't the solution, tried all kind of stuff that I know... and relaized already that it encrypted. So decided to give AS3 a shot. While digging I found this Base64 encrypt { import __AS3__.vec.*; import flash.utils.*; public class Base64 extends Object { private static const _encodeChars:Vector.<int> = InitEncoreChar(); private static const _decodeChars:Vector.<int> = InitDecodeChar(); public function Base64() { return; }// end function public static function encode(param1:ByteArray) : String { var _loc_6:* = 0; var _loc_2:* = new ByteArray(); _loc_2.length = (2 + param1.length - (param1.length + 2) % 3) * 4 / 3; var _loc_3:* = 0; var _loc_4:* = param1.length % 3; var _loc_5:* = param1.length - _loc_4; var _loc_7:* = 0; while (_loc_3 < _loc_5) { _loc_6 = param1[int(_loc_3++)] << 16 | param1[int(_loc_3++)] << 8 | param1[int(_loc_3++)]; _loc_2[int(_loc_7++)] = _encodeChars[int(_loc_6 >>> 18)]; _loc_2[int(_loc_7++)] = _encodeChars[int(_loc_6 >>> 12 & 63)]; _loc_2[int(_loc_7++)] = _encodeChars[int(_loc_6 >>> 6 & 63)]; _loc_2[int(_loc_7++)] = _encodeChars[int(_loc_6 & 63)]; } if (_loc_4 == 1) { _loc_6 = param1[int(_loc_3)]; _loc_2[int(_loc_7++)] = _encodeChars[int(_loc_6 >>> 2)]; _loc_2[int(_loc_7++)] = _encodeChars[int((_loc_6 & 3) << 4)]; _loc_2[int(_loc_7++)] = 61; _loc_2[int(_loc_7++)] = 61; } else if (_loc_4 == 2) { _loc_6 = param1[int(_loc_3++)] << 8 | param1[int(_loc_3)]; _loc_2[int(_loc_7++)] = _encodeChars[int(_loc_6 >>> 10)]; _loc_2[int(_loc_7++)] = _encodeChars[int(_loc_6 >>> 4 & 63)]; _loc_2[int(_loc_7++)] = _encodeChars[int((_loc_6 & 15) << 2)]; _loc_2[int(_loc_7++)] = 61; } return _loc_2.readUTFBytes(_loc_2.length); }// end function public static function decode(param1:String) : ByteArray { var _loc_2:* = 0; var _loc_3:* = 0; var _loc_4:* = 0; var _loc_5:* = 0; var _loc_6:* = 0; var _loc_7:* = param1.length; var _loc_8:* = new ByteArray(); new ByteArray().writeUTFBytes(param1); var _loc_9:* = 0; while (_loc_6 < _loc_7) { _loc_2 = _decodeChars[int(_loc_8[_loc_6++])]; if (_loc_2 == -1) { break; } _loc_3 = _decodeChars[int(_loc_8[_loc_6++])]; if (_loc_3 == -1) { break; } _loc_8[int(_loc_9++)] = _loc_2 << 2 | (_loc_3 & 48) >> 4; _loc_4 = _loc_8[int(_loc_6++)]; if (_loc_4 == 61) { _loc_8.length = _loc_9; return _loc_8; } _loc_4 = _decodeChars[int(_loc_4)]; if (_loc_4 == -1) { break; } _loc_8[int(_loc_9++)] = (_loc_3 & 15) << 4 | (_loc_4 & 60) >> 2; _loc_5 = _loc_8[int(_loc_6++)]; if (_loc_5 == 61) { _loc_8.length = _loc_9; return _loc_8; } _loc_5 = _decodeChars[int(_loc_5)]; if (_loc_5 == -1) { break; } _loc_8[int(_loc_9++)] = (_loc_4 & 3) << 6 | _loc_5; } _loc_8.length = _loc_9; return _loc_8; }// end function public static function InitEncoreChar() : Vector.<int> { var _loc_1:* = new Vector.<int>(64, true); var _loc_2:* = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; var _loc_3:* = 0; while (_loc_3 < 64) { _loc_1[_loc_3] = _loc_2.charCodeAt(_loc_3); _loc_3++; } return _loc_1; }// end function public static function InitDecodeChar() : Vector.<int> { new Vector.<int>(256)[0] = -1; new Vector.<int>(256)[1] = -1; new Vector.<int>(256)[2] = -1; new Vector.<int>(256)[3] = -1; new Vector.<int>(256)[4] = -1; new Vector.<int>(256)[5] = -1; new Vector.<int>(256)[6] = -1; new Vector.<int>(256)[7] = -1; new Vector.<int>(256)[8] = -1; new Vector.<int>(256)[9] = -1; new Vector.<int>(256)[10] = -1; new Vector.<int>(256)[11] = -1; new Vector.<int>(256)[12] = -1; new Vector.<int>(256)[13] = -1; new Vector.<int>(256)[14] = -1; new Vector.<int>(256)[15] = -1; new Vector.<int>(256)[16] = -1; new Vector.<int>(256)[17] = -1; new Vector.<int>(256)[18] = -1; new Vector.<int>(256)[19] = -1; new Vector.<int>(256)[20] = -1; new Vector.<int>(256)[21] = -1; new Vector.<int>(256)[22] = -1; new Vector.<int>(256)[23] = -1; new Vector.<int>(256)[24] = -1; new Vector.<int>(256)[25] = -1; new Vector.<int>(256)[26] = -1; new Vector.<int>(256)[27] = -1; new Vector.<int>(256)[28] = -1; new Vector.<int>(256)[29] = -1; new Vector.<int>(256)[30] = -1; new Vector.<int>(256)[31] = -1; new Vector.<int>(256)[32] = -1; new Vector.<int>(256)[33] = -1; new Vector.<int>(256)[34] = -1; new Vector.<int>(256)[35] = -1; new Vector.<int>(256)[36] = -1; new Vector.<int>(256)[37] = -1; new Vector.<int>(256)[38] = -1; new Vector.<int>(256)[39] = -1; new Vector.<int>(256)[40] = -1; new Vector.<int>(256)[41] = -1; new Vector.<int>(256)[42] = -1; new Vector.<int>(256)[43] = 62; new Vector.<int>(256)[44] = -1; new Vector.<int>(256)[45] = -1; new Vector.<int>(256)[46] = -1; new Vector.<int>(256)[47] = 63; new Vector.<int>(256)[48] = 52; new Vector.<int>(256)[49] = 53; new Vector.<int>(256)[50] = 54; new Vector.<int>(256)[51] = 55; new Vector.<int>(256)[52] = 56; new Vector.<int>(256)[53] = 57; new Vector.<int>(256)[54] = 58; new Vector.<int>(256)[55] = 59; new Vector.<int>(256)[56] = 60; new Vector.<int>(256)[57] = 61; new Vector.<int>(256)[58] = -1; new Vector.<int>(256)[59] = -1; new Vector.<int>(256)[60] = -1; new Vector.<int>(256)[61] = -1; new Vector.<int>(256)[62] = -1; new Vector.<int>(256)[63] = -1; new Vector.<int>(256)[64] = -1; new Vector.<int>(256)[65] = 0; new Vector.<int>(256)[66] = 1; new Vector.<int>(256)[67] = 2; new Vector.<int>(256)[68] = 3; new Vector.<int>(256)[69] = 4; new Vector.<int>(256)[70] = 5; new Vector.<int>(256)[71] = 6; new Vector.<int>(256)[72] = 7; new Vector.<int>(256)[73] = 8; new Vector.<int>(256)[74] = 9; new Vector.<int>(256)[75] = 10; new Vector.<int>(256)[76] = 11; new Vector.<int>(256)[77] = 12; new Vector.<int>(256)[78] = 13; new Vector.<int>(256)[79] = 14; new Vector.<int>(256)[80] = 15; new Vector.<int>(256)[81] = 16; new Vector.<int>(256)[82] = 17; new Vector.<int>(256)[83] = 18; new Vector.<int>(256)[84] = 19; new Vector.<int>(256)[85] = 20; new Vector.<int>(256)[86] = 21; new Vector.<int>(256)[87] = 22; new Vector.<int>(256)[88] = 23; new Vector.<int>(256)[89] = 24; new Vector.<int>(256)[90] = 25; new Vector.<int>(256)[91] = -1; new Vector.<int>(256)[92] = -1; new Vector.<int>(256)[93] = -1; new Vector.<int>(256)[94] = -1; new Vector.<int>(256)[95] = -1; new Vector.<int>(256)[96] = -1; new Vector.<int>(256)[97] = 26; new Vector.<int>(256)[98] = 27; new Vector.<int>(256)[99] = 28; new Vector.<int>(256)[100] = 29; new Vector.<int>(256)[101] = 30; new Vector.<int>(256)[102] = 31; new Vector.<int>(256)[103] = 32; new Vector.<int>(256)[104] = 33; new Vector.<int>(256)[105] = 34; new Vector.<int>(256)[106] = 35; new Vector.<int>(256)[107] = 36; new Vector.<int>(256)[108] = 37; new Vector.<int>(256)[109] = 38; new Vector.<int>(256)[110] = 39; new Vector.<int>(256)[111] = 40; new Vector.<int>(256)[112] = 41; new Vector.<int>(256)[113] = 42; new Vector.<int>(256)[114] = 43; new Vector.<int>(256)[115] = 44; new Vector.<int>(256)[116] = 45; new Vector.<int>(256)[117] = 46; new Vector.<int>(256)[118] = 47; new Vector.<int>(256)[119] = 48; new Vector.<int>(256)[120] = 49; new Vector.<int>(256)[121] = 50; new Vector.<int>(256)[122] = 51; new Vector.<int>(256)[123] = -1; new Vector.<int>(256)[124] = -1; new Vector.<int>(256)[125] = -1; new Vector.<int>(256)[126] = -1; new Vector.<int>(256)[127] = -1; new Vector.<int>(256)[128] = -1; new Vector.<int>(256)[129] = -1; new Vector.<int>(256)[130] = -1; new Vector.<int>(256)[131] = -1; new Vector.<int>(256)[132] = -1; new Vector.<int>(256)[133] = -1; new Vector.<int>(256)[134] = -1; new Vector.<int>(256)[135] = -1; new Vector.<int>(256)[136] = -1; new Vector.<int>(256)[137] = -1; new Vector.<int>(256)[138] = -1; new Vector.<int>(256)[139] = -1; new Vector.<int>(256)[140] = -1; new Vector.<int>(256)[141] = -1; new Vector.<int>(256)[142] = -1; new Vector.<int>(256)[143] = -1; new Vector.<int>(256)[144] = -1; new Vector.<int>(256)[145] = -1; new Vector.<int>(256)[146] = -1; new Vector.<int>(256)[147] = -1; new Vector.<int>(256)[148] = -1; new Vector.<int>(256)[149] = -1; new Vector.<int>(256)[150] = -1; new Vector.<int>(256)[151] = -1; new Vector.<int>(256)[152] = -1; new Vector.<int>(256)[153] = -1; new Vector.<int>(256)[154] = -1; new Vector.<int>(256)[155] = -1; new Vector.<int>(256)[156] = -1; new Vector.<int>(256)[157] = -1; new Vector.<int>(256)[158] = -1; new Vector.<int>(256)[159] = -1; new Vector.<int>(256)[160] = -1; new Vector.<int>(256)[161] = -1; new Vector.<int>(256)[162] = -1; new Vector.<int>(256)[163] = -1; new Vector.<int>(256)[164] = -1; new Vector.<int>(256)[165] = -1; new Vector.<int>(256)[166] = -1; new Vector.<int>(256)[167] = -1; new Vector.<int>(256)[168] = -1; new Vector.<int>(256)[169] = -1; new Vector.<int>(256)[170] = -1; new Vector.<int>(256)[171] = -1; new Vector.<int>(256)[172] = -1; new Vector.<int>(256)[173] = -1; new Vector.<int>(256)[174] = -1; new Vector.<int>(256)[175] = -1; new Vector.<int>(256)[176] = -1; new Vector.<int>(256)[177] = -1; new Vector.<int>(256)[178] = -1; new Vector.<int>(256)[179] = -1; new Vector.<int>(256)[180] = -1; new Vector.<int>(256)[181] = -1; new Vector.<int>(256)[182] = -1; new Vector.<int>(256)[183] = -1; new Vector.<int>(256)[184] = -1; new Vector.<int>(256)[185] = -1; new Vector.<int>(256)[186] = -1; new Vector.<int>(256)[187] = -1; new Vector.<int>(256)[188] = -1; new Vector.<int>(256)[189] = -1; new Vector.<int>(256)[190] = -1; new Vector.<int>(256)[191] = -1; new Vector.<int>(256)[192] = -1; new Vector.<int>(256)[193] = -1; new Vector.<int>(256)[194] = -1; new Vector.<int>(256)[195] = -1; new Vector.<int>(256)[196] = -1; new Vector.<int>(256)[197] = -1; new Vector.<int>(256)[198] = -1; new Vector.<int>(256)[199] = -1; new Vector.<int>(256)[200] = -1; new Vector.<int>(256)[201] = -1; new Vector.<int>(256)[202] = -1; new Vector.<int>(256)[203] = -1; new Vector.<int>(256)[204] = -1; new Vector.<int>(256)[205] = -1; new Vector.<int>(256)[206] = -1; new Vector.<int>(256)[207] = -1; new Vector.<int>(256)[208] = -1; new Vector.<int>(256)[209] = -1; new Vector.<int>(256)[210] = -1; new Vector.<int>(256)[211] = -1; new Vector.<int>(256)[212] = -1; new Vector.<int>(256)[213] = -1; new Vector.<int>(256)[214] = -1; new Vector.<int>(256)[215] = -1; new Vector.<int>(256)[216] = -1; new Vector.<int>(256)[217] = -1; new Vector.<int>(256)[218] = -1; new Vector.<int>(256)[219] = -1; new Vector.<int>(256)[220] = -1; new Vector.<int>(256)[221] = -1; new Vector.<int>(256)[222] = -1; new Vector.<int>(256)[223] = -1; new Vector.<int>(256)[224] = -1; new Vector.<int>(256)[225] = -1; new Vector.<int>(256)[226] = -1; new Vector.<int>(256)[227] = -1; new Vector.<int>(256)[228] = -1; new Vector.<int>(256)[229] = -1; new Vector.<int>(256)[230] = -1; new Vector.<int>(256)[231] = -1; new Vector.<int>(256)[232] = -1; new Vector.<int>(256)[233] = -1; new Vector.<int>(256)[234] = -1; new Vector.<int>(256)[235] = -1; new Vector.<int>(256)[236] = -1; new Vector.<int>(256)[237] = -1; new Vector.<int>(256)[238] = -1; new Vector.<int>(256)[239] = -1; new Vector.<int>(256)[240] = -1; new Vector.<int>(256)[241] = -1; new Vector.<int>(256)[242] = -1; new Vector.<int>(256)[243] = -1; new Vector.<int>(256)[244] = -1; new Vector.<int>(256)[245] = -1; new Vector.<int>(256)[246] = -1; new Vector.<int>(256)[247] = -1; new Vector.<int>(256)[248] = -1; new Vector.<int>(256)[249] = -1; new Vector.<int>(256)[250] = -1; new Vector.<int>(256)[251] = -1; new Vector.<int>(256)[252] = -1; new Vector.<int>(256)[253] = -1; new Vector.<int>(256)[254] = -1; new Vector.<int>(256)[255] = -1; var _loc_1:* = new Vector.<int>(256); return _loc_1; }// end function } } This is digit cryptor which probably encrypts the values. package net.utils { import flash.utils.*; public class DigitCryptor extends Object { private var str:String; private var bytes:ByteArray; public function DigitCryptor(param1:Number = 0) { this.bytes = new ByteArray(); this.value = param1; return; }// end function public function get value() : Number { this.bytes = Base64.decode(this.str); this.bytes.position = 0; return this.bytes.readFloat(); }// end function public function set value(param1:Number) : void { this.bytes.position = 0; this.bytes.writeFloat(param1); this.str = Base64.encode(this.bytes); return; }// end function public function toString() : String { return String(this.value); }// end function public function toEncryptedString() : String { return this.str; }// end function } } Encrypt/decrypt the value. Any chance to help me out? First time ever I deal with encrypted values, usually I deal with either protected or server sided (protected, e.g dynamic, has check routine and etc.). |
Additional Info
|
if it were me, id just re write the getter so it always returned a large number.
eg this.bytes = Base64.decode(this.str); this.bytes.position = 0; return this.bytes.readFloat(); --> return 32000*1000; I use this AoB tool to make all the AoBs I post. Try the online version if you dont feel like downloading it. |
Additional Info
|
I can't do so...
Lack of space.... I use cheat engine to replace. I just wondering, if we could "skip" the encoding/decoding, and let it return the value that it wants to encrypt/decrypt. |
Additional Info
|
not without doint integer conversion, in this case.
I use this AoB tool to make all the AoBs I post. Try the online version if you dont feel like downloading it. |