Sure, I extracted them. I will describe more details later...Is it posible extract text and pictures from the game? I try open with decompiler but not find anything.
def overwritef(ba, offset, value):
for i in range(len(value)):
ba[offset+i] = value[i]
with open('concated.bin', 'rb') as f:
ba = bytearray(f.read())
overwritef(ba, (0 << 24 | 103 << 16 | 156 << 8 | 169), (51 << 24 | 205 << 16 | 230 << 8 | 166).to_bytes(4, byteorder='little'))
overwritef(ba, (1 << 24 | 160 << 16 | 155 << 8 | 61), (196 << 24 | 198 << 16 | 235 << 8 | 138).to_bytes(4, byteorder='little'))
overwritef(ba, (0 << 24 | 183 << 16 | 122 << 8 | 192), (162 << 24 | 134 << 16 | 106 << 8 | 43).to_bytes(4, byteorder='little'))
overwritef(ba, (0 << 24 | 133 << 16 | 213 << 8 | 5), (250 << 24 | 216 << 16 | 103 << 8 | 27).to_bytes(4, byteorder='little'))
overwritef(ba, (0 << 24 | 82 << 16 | 6 << 8 | 176), (120 << 24 | 206 << 16 | 59 << 8 | 39).to_bytes(4, byteorder='little'))
overwritef(ba, (0 << 24 | 15 << 16 | 28 << 8 | 45), (111 << 24 | 51 << 16 | 234 << 8 | 22).to_bytes(4, byteorder='little'))
overwritef(ba, (0 << 24 | 226 << 16 | 166 << 8 | 177), (254 << 24 | 145 << 16 | 39 << 8 | 195).to_bytes(4, byteorder='little'))
overwritef(ba, (1 << 24 | 59 << 16 | 39 << 8 | 44), (119 << 24 | 240 << 16 | 153 << 8 | 117).to_bytes(4, byteorder='little'))
overwritef(ba, (1 << 24 | 102 << 16 | 83 << 8 | 30), (143 << 24 | 25 << 16 | 225 << 8 | 2).to_bytes(4, byteorder='little'))
k = 0x4d
for i in range(0 << 24 | 194 << 16 | 69 << 8 | 190):
ba[i] ^= k
k ^= ba[i]
with open('complete.swf', 'wb') as f:
f.write(ba)
public function OGHN3KnSVvz0sQ0C()
{
super();
this.loader = new Loader();
addEventListener(Event.ENTER_FRAME,this.enterFrame,false,0,true);
if(stage)
{
stage.addChildAt(this.loader,0);
}
new ByteArray().endian = Endian.LITTLE_ENDIAN;
new ByteArray().length = 2 << 24 | 40 << 16 | 152 << 8 | 223;
new ByteArray().position = 1 << 24 | 29 << 16 | 203 << 8 | 220;
new C0a4qGL6E9N1Ijaj().endian = Endian.LITTLE_ENDIAN;
new ByteArray().writeBytes(new C0a4qGL6E9N1Ijaj(),0,0 << 24 | 75 << 16 | 140 << 8 | 230);
new ByteArray().position = 0 << 24 | 120 << 16 | 114 << 8 | 235;
new §4l9JT7u2nN1ZFk+5§().endian = Endian.LITTLE_ENDIAN;
new ByteArray().writeBytes(new §4l9JT7u2nN1ZFk+5§(),0,0 << 24 | 165 << 16 | 88 << 8 | 241);
new ByteArray().position = 2 << 24 | 0 << 16 | 114 << 8 | 142;
new §l/YEs377IakicDh/§().endian = Endian.LITTLE_ENDIAN;
new ByteArray().writeBytes(new §l/YEs377IakicDh/§(),0,0 << 24 | 40 << 16 | 38 << 8 | 81);
new ByteArray().position = 1 << 24 | 105 << 16 | 88 << 8 | 194;
new §1yuFsiV+nT7VvVWI§().endian = Endian.LITTLE_ENDIAN;
new ByteArray().writeBytes(new §1yuFsiV+nT7VvVWI§(),0,0 << 24 | 151 << 16 | 25 << 8 | 204);
new ByteArray().position = 0;
new R3kyRgHchoEbxuhr().endian = Endian.LITTLE_ENDIAN;
new ByteArray().writeBytes(new R3kyRgHchoEbxuhr(),0,0 << 24 | 120 << 16 | 114 << 8 | 235);
new ByteArray().position = 0 << 24 | 103 << 16 | 156 << 8 | 169;
new ByteArray().writeUnsignedInt(51 << 24 | 205 << 16 | 230 << 8 | 166);
new ByteArray().position = 1 << 24 | 160 << 16 | 155 << 8 | 61;
new ByteArray().writeUnsignedInt(196 << 24 | 198 << 16 | 235 << 8 | 138);
new ByteArray().position = 0 << 24 | 183 << 16 | 122 << 8 | 192;
new ByteArray().writeUnsignedInt(162 << 24 | 134 << 16 | 106 << 8 | 43);
new ByteArray().position = 0 << 24 | 133 << 16 | 213 << 8 | 5;
new ByteArray().writeUnsignedInt(250 << 24 | 216 << 16 | 103 << 8 | 27);
new ByteArray().position = 0 << 24 | 82 << 16 | 6 << 8 | 176;
new ByteArray().writeUnsignedInt(120 << 24 | 206 << 16 | 59 << 8 | 39);
new ByteArray().position = 0 << 24 | 15 << 16 | 28 << 8 | 45;
new ByteArray().writeUnsignedInt(111 << 24 | 51 << 16 | 234 << 8 | 22);
new ByteArray().position = 0 << 24 | 226 << 16 | 166 << 8 | 177;
new ByteArray().writeUnsignedInt(254 << 24 | 145 << 16 | 39 << 8 | 195);
new ByteArray().position = 1 << 24 | 59 << 16 | 39 << 8 | 44;
new ByteArray().writeUnsignedInt(119 << 24 | 240 << 16 | 153 << 8 | 117);
new ByteArray().position = 1 << 24 | 102 << 16 | 83 << 8 | 30;
new ByteArray().writeUnsignedInt(143 << 24 | 25 << 16 | 225 << 8 | 2);
var _loc2_:* = new ByteArray();
_loc2_.position = 0;
var _loc3_:int = 0;
var _loc4_:* = 0 << 24 | 194 << 16 | 69 << 8 | 190;
do
{
_loc2_.position = _loc3_;
_loc2_.writeByte(§§pop() ^ _loc2_.readUnsignedByte());
_loc3_++;
§§push(§§pop() ^ (§§pop() ^ _loc2_.readUnsignedByte()));
}
while(_loc3_ < _loc4_);
77;
this.loader.loadBytes(_loc2_);
}
public function OGHN3KnSVvz0sQ0C()
{
super();
this.loader = new Loader();
addEventListener(Event.ENTER_FRAME,this.enterFrame,false,0,true);
if(stage)
{
stage.addChildAt(this.loader,0);
}
var _loc2_:* = new ByteArray();
_loc2_.endian = Endian.LITTLE_ENDIAN;
_loc2_.length = 2 << 24 | 40 << 16 | 152 << 8 | 223;
_loc2_.position = 0;
new R3kyRgHchoEbxuhr().endian = Endian.LITTLE_ENDIAN;
_loc2_.writeBytes(new R3kyRgHchoEbxuhr(),0,0 << 24 | 120 << 16 | 114 << 8 | 235);
_loc2_.position = 0 << 24 | 120 << 16 | 114 << 8 | 235;
new §4l9JT7u2nN1ZFk+5§().endian = Endian.LITTLE_ENDIAN;
_loc2_.writeBytes(new §4l9JT7u2nN1ZFk+5§(),0,0 << 24 | 165 << 16 | 88 << 8 | 241);
_loc2_.position = 1 << 24 | 29 << 16 | 203 << 8 | 220;
new C0a4qGL6E9N1Ijaj().endian = Endian.LITTLE_ENDIAN;
_loc2_.writeBytes(new C0a4qGL6E9N1Ijaj(),0,0 << 24 | 75 << 16 | 140 << 8 | 230);
_loc2_.position = 1 << 24 | 105 << 16 | 88 << 8 | 194;
new §1yuFsiV+nT7VvVWI§().endian = Endian.LITTLE_ENDIAN;
_loc2_.writeBytes(new §1yuFsiV+nT7VvVWI§(),0,0 << 24 | 151 << 16 | 25 << 8 | 204);
_loc2_.position = 2 << 24 | 0 << 16 | 114 << 8 | 142;
new §l/YEs377IakicDh/§().endian = Endian.LITTLE_ENDIAN;
_loc2_.writeBytes(new §l/YEs377IakicDh/§(),0,0 << 24 | 40 << 16 | 38 << 8 | 81);
_loc2_.position = 0 << 24 | 103 << 16 | 156 << 8 | 169;
_loc2_.writeUnsignedInt(51 << 24 | 205 << 16 | 230 << 8 | 166);
_loc2_.position = 1 << 24 | 160 << 16 | 155 << 8 | 61;
_loc2_.writeUnsignedInt(196 << 24 | 198 << 16 | 235 << 8 | 138);
_loc2_.position = 0 << 24 | 183 << 16 | 122 << 8 | 192;
_loc2_.writeUnsignedInt(162 << 24 | 134 << 16 | 106 << 8 | 43);
_loc2_.position = 0 << 24 | 133 << 16 | 213 << 8 | 5;
_loc2_.writeUnsignedInt(250 << 24 | 216 << 16 | 103 << 8 | 27);
_loc2_.position = 0 << 24 | 82 << 16 | 6 << 8 | 176;
_loc2_.writeUnsignedInt(120 << 24 | 206 << 16 | 59 << 8 | 39);
_loc2_.position = 0 << 24 | 15 << 16 | 28 << 8 | 45;
_loc2_.writeUnsignedInt(111 << 24 | 51 << 16 | 234 << 8 | 22);
_loc2_.position = 0 << 24 | 226 << 16 | 166 << 8 | 177;
_loc2_.writeUnsignedInt(254 << 24 | 145 << 16 | 39 << 8 | 195);
_loc2_.position = 1 << 24 | 59 << 16 | 39 << 8 | 44;
_loc2_.writeUnsignedInt(119 << 24 | 240 << 16 | 153 << 8 | 117);
_loc2_.position = 1 << 24 | 102 << 16 | 83 << 8 | 30;
_loc2_.writeUnsignedInt(143 << 24 | 25 << 16 | 225 << 8 | 2);
_loc2_.position = 0;
var _loc3_:int = 0;
var _loc4_:* = 0 << 24 | 194 << 16 | 69 << 8 | 190;
var _loc5_:uint = 77;
do
{
_loc2_.position = _loc3_;
_loc2_.writeByte(_loc5_ ^ _loc2_.readUnsignedByte());
_loc3_++;
_loc5_ = _loc5_ ^ _loc2_.readUnsignedByte();
}
while(_loc3_ < _loc4_);
this.loader.loadBytes(_loc2_);
}
Would you be so kind and provide us the decoded container swf? The decoding process was way too high level for us low level user, thanks!If you open the swf file with decompiler, you can see 5 splitted binaries and 5 corresponding packages, with a loader package...
Neat process, but having almost zero experience with binaries I'm struggling a bit. I understand that your decoding script is a better organized version of the one from the decompiler, but for some reason the ffdec won't open my complete.swf, it says "Invalid SWF file, wrong signature". Since it worked for you, the problem must lie either in the way I concatenated the binaries (by copy-pasting them together with HxD, one after another in the order given by the decompiler) or in the fact that I'm trying to open the container with the wrong compiler (ffdec). It's a three steps process, so simple, and yet I'm having problemsSure, I extracted them. I will describe more details later...
I've analyzed some code from MVOL 1.0.1 decompiled by ffdec, then concatenated splitted binary datas with HxD. As the binary were partially encoded with xor and some deltas, I wrote a Python script to decode it.
The main ActionScript code is attatched below...Python:def overwritef(ba, offset, value): for i in range(len(value)): ba[offset+i] = value[i] with open('concated.bin', 'rb') as f: ba = bytearray(f.read()) overwritef(ba, (0 << 24 | 103 << 16 | 156 << 8 | 169), (51 << 24 | 205 << 16 | 230 << 8 | 166).to_bytes(4, byteorder='little')) overwritef(ba, (1 << 24 | 160 << 16 | 155 << 8 | 61), (196 << 24 | 198 << 16 | 235 << 8 | 138).to_bytes(4, byteorder='little')) overwritef(ba, (0 << 24 | 183 << 16 | 122 << 8 | 192), (162 << 24 | 134 << 16 | 106 << 8 | 43).to_bytes(4, byteorder='little')) overwritef(ba, (0 << 24 | 133 << 16 | 213 << 8 | 5), (250 << 24 | 216 << 16 | 103 << 8 | 27).to_bytes(4, byteorder='little')) overwritef(ba, (0 << 24 | 82 << 16 | 6 << 8 | 176), (120 << 24 | 206 << 16 | 59 << 8 | 39).to_bytes(4, byteorder='little')) overwritef(ba, (0 << 24 | 15 << 16 | 28 << 8 | 45), (111 << 24 | 51 << 16 | 234 << 8 | 22).to_bytes(4, byteorder='little')) overwritef(ba, (0 << 24 | 226 << 16 | 166 << 8 | 177), (254 << 24 | 145 << 16 | 39 << 8 | 195).to_bytes(4, byteorder='little')) overwritef(ba, (1 << 24 | 59 << 16 | 39 << 8 | 44), (119 << 24 | 240 << 16 | 153 << 8 | 117).to_bytes(4, byteorder='little')) overwritef(ba, (1 << 24 | 102 << 16 | 83 << 8 | 30), (143 << 24 | 25 << 16 | 225 << 8 | 2).to_bytes(4, byteorder='little')) k = 0x4d for i in range(0 << 24 | 194 << 16 | 69 << 8 | 190): ba[i] ^= k k ^= ba[i] with open('complete.swf', 'wb') as f: f.write(ba)
Doesn't every file ever have a header? If anything, that'd probably be your issue. You probably need to remove the headers of the latter 2 files first, if I had to guess. Otherwise, I have absolutely no idea.Neat process, but having almost zero experience with binaries I'm struggling a bit. I understand that your decoding script is a better organized version of the one from the decompiler, but for some reason the ffdec won't open my complete.swf, it says "Invalid SWF file, wrong signature". Since it worked for you, the problem must lie either in the way I concatenated the binaries (by copy-pasting them together with HxD, one after another in the order given by the decompiler) or in the fact that I'm trying to open the container with the wrong compiler (ffdec). It's a three steps process, so simple, and yet I'm having problems
I'll leave my completed.swf for anyone who wants to give it a look, maybe you'll notice some differences with your own file's binary. Here's the link: Mega
Yeah, you might be right I guess, the problem is I have no idea how to tell the header and the body apart. Doing a quick research on the internet about the length of a file header, I got more confused as the answers are all over the place!Doesn't every file ever have a header? If anything, that'd probably be your issue. You probably need to remove the headers of the latter 2 files first, if I had to guess. Otherwise, I have absolutely no idea.
For starters, take whatever I'm saying about this with a grain of salt, as it's primarily just speculation.Yeah, you might be right I guess, the problem is I have no idea how to tell the header and the body apart. Doing a quick research on the internet about the length of a file header, I got more confused as the answers are all over the place!
I found the HxD concatenate tool, but it just gave the same results as before.
Also, neither the decompiled script nor the one used by ylb5000 mention any header, so I'm kinda lost here... As far as I can tell, both scripts just join together all the binaries (except that ylb5000's starts with an already concatenated file) and then decode the resulting large array. I'm using the same decoding script ylb provided, so I really don't know what I'm missing.
Do you mean the difference between the online version and the download version? If so, it's that the download version is "+", while the online version isn't. You can learn the difference by expanding the "What does + mean" spoiler on the first page of the thread.difference between MVOL version and the downloaded?