From: A.Kleine <ak...@us...> - 2007-12-12 12:13:17
|
Update of /cvsroot/ming/ming/util In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31869/ming/util Modified Files: decompile.c Log Message: 1. rewrote function decompileGETURL2() 2. bugfix in decompileSTOREREGISTER() Index: decompile.c =================================================================== RCS file: /cvsroot/ming/ming/util/decompile.c,v retrieving revision 1.105 retrieving revision 1.106 diff -C2 -d -r1.105 -r1.106 *** decompile.c 11 Dec 2007 14:38:11 -0000 1.105 --- decompile.c 12 Dec 2007 12:13:08 -0000 1.106 *************** *** 769,798 **** - void - decompileGETURL (SWF_ACTION *act) - { - OUT_BEGIN(SWF_ACTIONGETURL); - - INDENT - println("getUrl('%s',%s);", sact->UrlString, sact->TargetString); - } - int - decompileGETURL2 (SWF_ACTION *act) - { - struct SWF_ACTIONPUSHPARAM *a; - - OUT_BEGIN(SWF_ACTIONGETURL2); - INDENT - a = pop(); - if (sact->f.FlagBits.SendVarsMethod) - puts("loadVars("); - else - puts("getUrl("); - puts(getString(pop())); - puts(","); - puts(getString(a)); - println(");"); - return 0; - } static void --- 769,772 ---- *************** *** 869,872 **** --- 843,890 ---- } + void + decompileGETURL (SWF_ACTION *act) + { + OUT_BEGIN(SWF_ACTIONGETURL); + + INDENT + println("getUrl('%s',%s);", sact->UrlString, sact->TargetString); + } + + int + decompileGETURL2 (SWF_ACTION *act) + { + struct SWF_ACTIONPUSHPARAM *a,*b; + OUT_BEGIN(SWF_ACTIONGETURL2); + INDENT + + a = pop(); + b = pop(); + + if (sact->f.FlagBits.SendVarsMethod==3) + puts("loadVariables("); + else + if (sact->f.FlagBits.SendVarsMethod==2) + puts("loadVariablesNum("); + else + if (sact->f.FlagBits.SendVarsMethod==1) + puts("loadMovie("); + else + if (*getName(a)=='_') // found a _level + puts("loadMovieNum("); + else + puts("getURL("); + + decompilePUSHPARAM (b, 1); + puts(","); + decompilePUSHPARAM (a, 1); + if (sact->f.FlagBits.LoadVariableFlag) + puts(",'GET'"); + if (sact->f.FlagBits.LoadTargetFlag) + puts(",'POST'"); + println(");"); + return 0; + } + int isStoreOp(int n, SWF_ACTION *actions,int maxn) *************** *** 1523,1529 **** INDENT if (data->Type==11) println("%s;", r); else ! println("%s = %s;",l,r); } } --- 1541,1553 ---- INDENT if (data->Type==11) + { println("%s;", r); + } else ! { ! printf("%s = ",l); ! decompilePUSHPARAM(data,1); ! println(";"); ! } } } |