AS中CLibInit的作用是什么 ?

时间:2021-08-19 00:10:08
今天在破解一个 播放器的时候,破解的as代码中有这样的代码 :
this._cloader = new CLibInit();
this._lib = this._cloader.init();
var _loc_2:* = Base64.decodeToByteArray(param1)
this._lib.getSize(_loc_2, _loc_2.length);

这里 的最后的getsize方法相当于js或者java的什么方法 ,CLibInit这个加密算法的具体步骤是什么样的呢?





2 个解决方案

#1


package cmodule.ccYouku
{
    import flash.display.*;
    import flash.utils.*;

    public class CLibInit extends Object
    {

        public function CLibInit()
        {
            return;
        }// end function

        public function init()
        {
            var runner:CRunner;
            var result:*;
            var saveState:MState;
            var regged:Boolean;
            runner = new CRunner(true);
            saveState = new MState(null);
            copyTo(saveState);
            try
            {
                runner.startSystem();
                do
                {
                    
                    try
                    {
                        while (true)
                        {
                            
                            runner.work();
                        }
                    }
                    catch (e:AlchemyDispatch)
                    {
                        continue;
                    }
                    catch (e:AlchemyYield)
                    {
                    }
                }while (true)
            }
            catch (e:AlchemyLibInit)
            {
                log(3, "Caught AlchemyLibInit " + e.rv);
                regged;
                result = e.AS3ValType.valueTracker.release(e.rv);
            }
            finally
            {
                saveState.copyTo();
                if (!regged)
                {
                    log(1, "Lib didn\'t register");
                }
            }
            return result;
        }// end function

        public function supplyFile(param1:String, param2:ByteArray) : void
        {
            [param1] = param2;
            return;
        }// end function

        public function putEnv(param1:String, param2:String) : void
        {
            [param1] = param2;
            return;
        }// end function

        public function setSprite(param1:Sprite) : void
        {
             = param1;
            return;
        }// end function

    }
}

#2


呵呵,这个是Alchemy,查找下,应该是c++写的代码,使用e:Alchemy技术给flash使用的方法。

#1


package cmodule.ccYouku
{
    import flash.display.*;
    import flash.utils.*;

    public class CLibInit extends Object
    {

        public function CLibInit()
        {
            return;
        }// end function

        public function init()
        {
            var runner:CRunner;
            var result:*;
            var saveState:MState;
            var regged:Boolean;
            runner = new CRunner(true);
            saveState = new MState(null);
            copyTo(saveState);
            try
            {
                runner.startSystem();
                do
                {
                    
                    try
                    {
                        while (true)
                        {
                            
                            runner.work();
                        }
                    }
                    catch (e:AlchemyDispatch)
                    {
                        continue;
                    }
                    catch (e:AlchemyYield)
                    {
                    }
                }while (true)
            }
            catch (e:AlchemyLibInit)
            {
                log(3, "Caught AlchemyLibInit " + e.rv);
                regged;
                result = e.AS3ValType.valueTracker.release(e.rv);
            }
            finally
            {
                saveState.copyTo();
                if (!regged)
                {
                    log(1, "Lib didn\'t register");
                }
            }
            return result;
        }// end function

        public function supplyFile(param1:String, param2:ByteArray) : void
        {
            [param1] = param2;
            return;
        }// end function

        public function putEnv(param1:String, param2:String) : void
        {
            [param1] = param2;
            return;
        }// end function

        public function setSprite(param1:Sprite) : void
        {
             = param1;
            return;
        }// end function

    }
}

#2


呵呵,这个是Alchemy,查找下,应该是c++写的代码,使用e:Alchemy技术给flash使用的方法。