コード例 #1
0
        private static BitmapSource CaptureRegion(Rectangle targetArea, bool copyToClipboard)
        {
label_1:
            int num1 = -1450861730;
            BitmapSource bitmapSource;

            while (true)
            {
                int  num2 = -692545691;
                uint num3;
                switch ((num3 = (uint)(num1 ^ num2)) % 3U)
                {
                case 1:
                    bitmapSource = ImageCapture.CaptureRegion(targetArea.X, targetArea.Y, targetArea.Width, targetArea.Height, copyToClipboard);
                    num1         = (int)num3 * 1458477633 ^ -2108331340;
                    continue;

                case 2:
                    goto label_1;

                default:
                    goto label_4;
                }
            }
label_4:
            return(bitmapSource);
        }
コード例 #2
0
        public CaptureState Capture()
        {
            try
            {
label_2:
                int num1 = 1418237637;
                while (true)
                {
                    int       num2 = 1861967932;
                    uint      num3;
                    Rectangle targetArea;
                    bool      flag1;
                    bool      flag2;
                    bool      flag3;
                    bool      flag4;
                    int       num4;
                    int       num5;
                    int       num6;
                    switch ((num3 = (uint)(num1 ^ num2)) % 32U)
                    {
                    case 0:
                        num4 = this.WindowHandle != IntPtr.Zero ? 1 : 0;
                        goto label_30;

                    case 1:
                        num1 = (int)num3 * -942013922 ^ -1026390241;
                        continue;

                    case 2:
                        num1 = (int)num3 * 1982281149 ^ -868449927;
                        continue;

                    case 3:
                        int num7 = !flag3 ? -1269114476 : (num7 = -2060708755);
                        int num8 = (int)num3 * 425574000;
                        num1 = num7 ^ num8;
                        continue;

                    case 4:
                        num1 = (int)num3 * -40535071 ^ -964942270;
                        continue;

                    case 5:
                        int num9  = !flag1 ? -1856652550 : (num9 = -718641782);
                        int num10 = (int)num3 * -2021402696;
                        num1 = num9 ^ num10;
                        continue;

                    case 6:
                        targetArea = this.Window.Rectangle;
                        num1       = (int)num3 * 117733689 ^ 2130486503;
                        continue;

                    case 7:
                        num1 = (int)num3 * 1910703357 ^ 1401254680;
                        continue;

                    case 8:
                        if (this.WindowHandle == IntPtr.Zero)
                        {
                            num1 = (int)num3 * -639480064 ^ 1374243535;
                            continue;
                        }
                        break;

                    case 9:
                        num6 = this.TargetRegion != Rectangle.Empty ? 1 : 0;
                        goto label_20;

                    case 10:
                        int num11 = flag2 ? 1079314485 : (num11 = 1406444750);
                        int num12 = (int)num3 * 839406427;
                        num1 = num11 ^ num12;
                        continue;

                    case 11:
                        int num13 = flag4 ? 1993436157 : (num13 = 1905073710);
                        int num14 = (int)num3 * 632340527;
                        num1 = num13 ^ num14;
                        continue;

                    case 12:
                        if (!(targetArea != Rectangle.Empty))
                        {
                            num6 = 0;
                            goto label_20;
                        }
                        else
                        {
                            num1 = 603372821;
                            continue;
                        }

                    case 13:
                        num1 = (int)num3 * 358748854 ^ 1413496558;
                        continue;

                    case 14:
                        num1 = (int)num3 * 1752567094 ^ -1434109540;
                        continue;

                    case 15:
                        this.source = ImageCapture.CaptureRegion(targetArea, true);
                        this.Image  = new ZoomImage(this.Window, this.source);
                        num1        = (int)num3 * -258896821 ^ 1975776264;
                        continue;

                    case 16:
                        num1 = (int)num3 * 1816664671 ^ -1783678496;
                        continue;

                    case 17:
                        this.State = CaptureState.Captured;
                        num1       = (int)num3 * -1476085113 ^ -1635202615;
                        continue;

                    case 18:
                        targetArea.Size = this.TargetRegion.Size;
                        num1            = (int)num3 * 1067836517 ^ 369083773;
                        continue;

                    case 19:
                        num5 = this.TargetRegion == Rectangle.Empty ? 1 : 0;
                        goto label_17;

                    case 20:
                        goto label_5;

                    case 21:
                        goto label_2;

                    case 22:
                        num1 = (int)num3 * -860120491 ^ 1557486740;
                        continue;

                    case 23:
                        int num15;
                        num1 = num15 = this.Window == null ? 1936528528 : (num15 = 1769361450);
                        continue;

                    case 24:
                        flag2 = targetArea != Rectangle.Empty;
                        num1  = 1902172246;
                        continue;

                    case 25:
                        targetArea = Rectangle.Empty;
                        if (this.Window == null)
                        {
                            num1 = (int)num3 * -1386744918 ^ 2111528494;
                            continue;
                        }
                        break;

                    case 26:
                        targetArea = WindowHelper.GetWindowRectangle(this.WindowHandle);
                        num1       = (int)num3 * 637992003 ^ -1327939326;
                        continue;

                    case 27:
                        num1 = (int)num3 * 2091262725 ^ -1802628829;
                        continue;

                    case 29:
                        targetArea.Offset(this.TargetRegion.Location);
                        num1 = (int)num3 * -1771741607 ^ -2137502149;
                        continue;

                    case 30:
                        if (this.Window != null)
                        {
                            num4 = 0;
                            goto label_30;
                        }
                        else
                        {
                            num1 = 1982921404;
                            continue;
                        }

                    case 31:
                        num1 = (int)num3 * 825767934 ^ -1684775006;
                        continue;

                    default:
                        goto label_48;
                    }
                    num5 = 0;
label_17:
                    flag1 = num5 != 0;
                    num1  = 1757081049;
                    continue;
label_20:
                    flag3 = num6 != 0;
                    num1  = 107226687;
                    continue;
label_30:
                    flag4 = num4 != 0;
                    num1  = 779168951;
                }
label_5:
                return(CaptureState.Error);
            }
            catch (Exception ex)
            {
                this.TraceError(\u003CModule\u003E.\u202A​‬‫‪‫‪‮‪‫‎‭‪‏‮‎‭‍‌‎‫‍​‎‎‮ <string>(3135048408U), ex);
label_45:
                int num1 = 1984288131;
                while (true)
                {
                    int  num2 = 1861967932;
                    uint num3;
                    switch ((num3 = (uint)(num1 ^ num2)) % 3U)
                    {
                    case 1:
                        num1 = (int)num3 * 1221430082 ^ 1494452828;
                        continue;

                    case 2:
                        goto label_45;

                    default:
                        goto label_48;
                    }
                }
            }
label_48:
            return(this.State);
        }