/ * ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------ author: wiNrOOt [FCG] tools: flasm http://www.nowrap.de/flasm.html UltraEdit Sothink SWF Decompiler purpose:? let swf check with the server can be played locally (mainly The purpose is to hope that all the masters have pointed outsiders: ** Surus mathematics counseling SWF file ------------------------------------------------------------------------------------------- -------------------------*/ Hello everyone! I am WinRoot, a rookie. Dear prawns laugh, the younger brother said here on how to make the SWF with the server to play locally. It is very simple for the masters, but it takes some time for my foreign pedestrians. ============================================================================================================================================================================================================= ======================== I need some teaching materials recently, I will find XDF Flash is good, I like it! Oh, I got some discovery in BT. I gave birth to the merit me! So I am interested in the crack of Flash, but I will learn from my head for Flash. Just a friend's ** Surus mathematics counseling SWF file (not XDF) can't play locally, so we started .......
1.SWF file structure (reposted a little) first look at the official SWF file format Description, understand http://www.half-serious.com/swf/format/******************* ****************** Repost part ************************************** ************************* The overall structure of the SWF file is the composition of Header Body. The beginning of the file is a [file header] Its structure is as follows: byte name Description 1 Signature "f" Represents Non-encrypted format, "C" Represents encrypted format 1 signature "w" no special meaning 1 Signature "s" no special meaning 1 Version version number, it represents the corresponding player version 4 FileLength's entire file length, low in the first N frameSize Rect structure, indicating that the screen size, the specific structure, and the length according to data change, analysis method is discussed. 2 Framerate frame frequency, default is 12, high in the first 2 framecount frame, indicate the number of frames under the root, the low position includes one head and a data body, and there are 2 types, short TAG types and Long TAG type. The short TAG type consists of 2byte, the first 10 bits represent a TAG type, and the last 6 bits represent a TAG length. The long TAG type is composed of 6byte. The first 10 bits represent a TAG type, and the last 6 bit fixed to all 1, and the last 4 Byte represents the length of the TAG. The length of the tag is different from the length FileLength of the file head, which is the length of the TAG head.
The SWF file consists of 1 head and 1 body. The rest of the following is the body of the SWF file. The entire file body is composed of a large number of tags, and the TAG type code and length can be immediately known by analyzing the TAG's HEAD section. If you can't identify the type of TAG, you can use the length of the tag to skip this TAG directly. This way ensures the compatibility of the version, even if new TAGs appear, the old version of the player can also parse the full SWF file without errors, and it is not possible to provide new features. The following is an image concept of the SWF file structure.
(File Body) | (Tag 1) (Tag 3) (Tag Header) | (TAG Type Code) ************* ***************************************************************************************************************** *********************** Added a little Tag divided into two definition tagscontrol tags were divided into: Display List tags control tags and an action Tags personal understanding: Definition tags is to store all resource control tags is the storage control code through the above understands We know, the information about the verification must be stored in the action ........... Use Sothink SWF Decompiler anti-compilation Take a look at Action --------> Mainmovie Wow, you saw anything (the performance of the rookie) // Action script ... // [OnClipEvent of Sprite 1 in frame 1] // Component construct () {fv_acceptedurls_Array = []; fv_acceptedurls_Array [0] = "www. ****. Cn"; fv_acceptedurls_Array [1] = "www. ****. Net"; fv_acceptedurls_Array [2] = "www. ******. com.cn "; fv_acceptedurls_Array [3] =" www. ******. Net.cn "; fv_acceptedurls_Array [4] =" www. ******.... FV_acceptedurls_Array [5] = "www. ******. Net"; Fv_acceptedurls_Array [6] = "www. ******. Com"; fv_acceptedurls_Array [7] = "www. ******. Com"; fv_acceptedurls_Array [8] = "www. ***** .NET.CN "; FV_EXACTURL_BOOL = FALSE; FV_ALLOWFROMHDD_BOOL = FALSE; FV_SHOWARNING_BOOL = FALSE;}
// [OnClipEvent of Sprite 1 in frame 1044] // Component Construct () {fv_acceptedURLS_ARRAY = []; fv_acceptedurls_Array [0] = "www. ****. cn"; fv_acceptedurls_Array [1] = "www. *** * .NET "; FV_ACCEPTEDURLS_ARRAY [2] =" www. ******. com.cn "; fv_acceptedurls_array [3] =" www. ******. Net.cn "; fv_acceptedURLS_Array [4] = "www. ******." FV_ACCEPTEDURLS_ARRAY [5] = "www. ******. Net"; fv_acceptedurls_Array [6] = "www. ******. com"; fv_acceptedURLS_Array [7] = "www. ******. Com"; fv_acceptedurls_Array [8] = "www. *******. Net.cn"; fiv_exacturl_bool = false; false; fly; fiv_showwarning_bool = false;} / / In order to avoid unnecessary trouble here, I wo the website information. Everyone pays that fv_allowfromhdd_bool = false; I am a fool, but I know it defines a variable, let it equal the false variable name? ALLOWFROMHDD allows play from hard disk? Oh, I am too lazy ~~~~ Everyone knows, so we just modify fv_allowfromhdd_bool = true, can you see (guess), but how can you modify it? Sothink swf deciler can not be modified (maybe I have not found ^ _ ^) We invite today's protagonist: Flasm? Http://www.nowrap.de/flasm.html Let's take a help Flasm Command FileName Command-D Compiling SWF files to console (CMD) -a compile FLASM Project-U update SWF, Replace Flasm Macros (Can't understand) -z compression SWF with zlib-x Decompression SWF-D foo.swfdisassemble foo.swf to the console.
-d foo.swf> flm anti-compilation foo.swf saved to foo.flm. The simplest method Flasm foo.swf creates foo.flm to the same folder.
-a foo.flm compile foo.flm and updates in the definition in the SWF file. Create a backup. $ Wf.
-u foo.swf decompile foo.swf to a temporary file .Execute Flasm macros embedded in SWF.Make trivial optimizations automatically:. remove double nots, replace 0.0 with 0, rebuild constant pools, clear register arguments.Create $ wf backup, update The Original Swf.it's a Good Idea To Update The final version of swf with flasm -u. Don't excect the swf to beeticeably faster, IT Will Just Make It a bit smaller.
-x foo.swfdeCompress foo.swf, create. $ wf backup.