What are the challenges you face when working across database platforms? Take the survey
Options

SmartAssembly 6.12 does not rename variables or methods when obfuscating a C# WPF application

e.g. after obfuscation I get this result using dotPeek: (Crypto Obfuscator is doing that better)

    protected override void OnSourceInitialized(EventArgs e)
    {
      base.OnSourceInitialized(e);
      HwndSource hwndSource = HwndSource.FromHwnd(new WindowInteropHelper((Window) this).Handle);
      if (hwndSource == null)
        return;
      IntPtr handle = hwndSource.Handle;
      hwndSource.AddHook(new HwndSourceHook(this.HwndHandler));
      \u0001.\u0001(handle, false);
    }

    private IntPtr HwndHandler(IntPtr hwnd, int msg, IntPtr wparam, IntPtr lparam, ref bool handled)
    {
      if (msg == 537)
        goto label_4;
label_3:
      handled = false;
      return IntPtr.Zero;
label_4:
      switch ((int) wparam)
      {
        case 32768:
          this.Usb_DeviceAdded();
          goto label_3;
        case 32772:
          this.Usb_DeviceRemoved();
          goto label_3;
        default:
          goto label_3;
      }
    }

    private void Usb_DeviceAdded()
    {
      if (this._ThreadDriveDetection != null)
        return;
      // ISSUE: method pointer
      this._ThreadDriveDetection = new Thread(new ThreadStart((object) this, __methodptr(DriveDetection)));
      this._ThreadDriveDetection.Start();
    }

    private void Usb_DeviceRemoved()
    {
      if (this._ThreadDriveDetection != null)
        return;
      // ISSUE: method pointer
      this._ThreadDriveDetection = new Thread(new ThreadStart((object) this, __methodptr(DriveDetection)));
      this._ThreadDriveDetection.Start();
    }

Sign In or Register to comment.