private void ApplyShape(KAnim.Build.Symbol variation_symbol, KBatchedAnimController controller, KAnimFile shapes_file, HashedString symbol_name_in_shape_file, bool should_use_sideways_symbol)
    {
        HashedString hashedString = HASH_NEUTRAL;

        if (currentExpression != null)
        {
            hashedString = currentExpression.face.hash;
        }
        KAnim.Anim anim = null;
        KAnim.Anim.FrameElement frameElement = default(KAnim.Anim.FrameElement);
        bool flag  = false;
        bool flag2 = false;

        for (int i = 0; i < shapes_file.GetData().animCount; i++)
        {
            if (flag)
            {
                break;
            }
            KAnim.Anim anim2 = shapes_file.GetData().GetAnim(i);
            if (anim2.hash == hashedString)
            {
                anim = anim2;
                KAnim.Anim.Frame frame = anim.GetFrame(shapes_file.GetData().build.batchTag, 0);
                for (int j = 0; j < frame.numElements; j++)
                {
                    KBatchGroupData batchGroupData = KAnimBatchManager.Instance().GetBatchGroupData(shapes_file.GetData().animBatchTag);
                    frameElement = batchGroupData.GetFrameElement(frame.firstElementIdx + j);
                    if (!(frameElement.symbol != symbol_name_in_shape_file))
                    {
                        if (flag2 || !should_use_sideways_symbol)
                        {
                            flag = true;
                        }
                        flag2 = true;
                        break;
                    }
                }
            }
        }
        if (anim == null)
        {
            DebugUtil.Assert(false, "Could not find shape for expression: " + HashCache.Get().Get(hashedString));
        }
        if (!flag2)
        {
            DebugUtil.Assert(false, "Could not find shape element for shape:" + HashCache.Get().Get(variation_symbol.hash));
        }
        KAnim.Build.Symbol symbol          = KAnimBatchManager.Instance().GetBatchGroupData(controller.batchGroupID).GetSymbol(symbol_name_in_shape_file);
        KBatchGroupData    batchGroupData2 = KAnimBatchManager.Instance().GetBatchGroupData(variation_symbol.build.batchTag);

        KAnim.Build.SymbolFrameInstance symbol_frame_instance = batchGroupData2.symbolFrameInstances[variation_symbol.firstFrameIdx + frameElement.frame];
        symbol_frame_instance.buildImageIdx = GetComponent <SymbolOverrideController>().GetAtlasIdx(variation_symbol.build.GetTexture(0));
        controller.SetSymbolOverride(symbol.firstFrameIdx, symbol_frame_instance);
    }