public void SendDirectColorCanvas(Color[,] arg1)
        {
            //Claymore's key matrix is [Rows, Columns] whereas a sane key matrix is [Columns, Rows]
            var colorArray = arg1.TransposeMatrix().FlattenMatrix();

            int XMax = DirectColorCanvasLength.Item1;
            int YMax = DirectColorCanvasLength.Item2;

            int iVar12 = XMax * YMax;

            byte[] buffer = new byte[64];
            byte   uVar14 = 0;
            byte   bVar6  = 0;
            byte   uVar9  = 0;

            buffer[0] = 0xc0;
            buffer[1] = 0x81;
            buffer[2] = 0x0f;

            do
            {
                int  iVar10 = 0;
                uint uVar11 = uVar14;
                byte bVar8  = bVar6;
                do
                {
                    uint uVar3 = uVar11 & 0x80000007;
                    if ((int)uVar3 < 0)
                    {
                        uVar3 = (uVar3 - 1 | 0xfffffff8) + 1;
                    }
                    bVar6 = (byte)iVar10;
                    if (uVar3 != 0)
                    {
                        bVar6 = bVar8;
                    }
                    iVar10++;
                    uVar11--;
                    bVar8 = bVar6;
                } while (iVar10 < 8);

                iVar10            = uVar14 - bVar6;
                buffer[uVar9 + 4] = (byte)(((byte)iVar10 + ((byte)(iVar10 >> 0x1f) & 7) & 0xf8) + bVar6);

                buffer[uVar9 + 5] = colorArray[uVar14].R;
                buffer[uVar9 + 6] = colorArray[uVar14].G;
                buffer[uVar9 + 7] = colorArray[uVar14].B;

                uVar14++;
                bVar8 = (byte)(uVar9 + 4);
                if (bVar8 == 60)
                {
                    SendIface0ByteArray(buffer);
                    bVar8 = 0;

                    Array.Clear(buffer, 4, 20);

                    /*puVar5[4]
                     *
                     * pbVar4 = puVar5 + 4;
                     * lVar5 = 4;
                     * do
                     * {
                     *(undefined4*)(pbVar4) = 0;
                     *  pbVar4 += 4;
                     *
                     *  lVar5--;
                     * } while (lVar5 != 0);*/
                }

                uVar9 = bVar8;
                if (uVar14 == iVar12 - 1)
                {
                    buffer[2] = (byte)(bVar8 >> 2);
                    SendIface0ByteArray(buffer);
                }
            } while (uVar14 < iVar12);
        }