Chapter 3. How Does Eazfuscator.NET Work?

Eazfuscator.NET

Chapter 3. How Does Eazfuscator.NET Work?

Obfuscation Techniques

Symbol Renaming

class MainForm
{
    
    private bool _UseStartupShutdownEffects;
    private bool _FadeDirection;
    private bool _LargeFadeStep;
    private System.Windows.Forms.Timer _OpacityTimer;
    
    private void MainForm_Load(object sender, EventArgs e)
    {
        if (this.DesignMode)
            return;
        this.Icon = Icon.ExtractAssociatedIcon(Assembly.GetEntryAssembly().Location);
        if (this._UseStartupShutdownEffects)
        {
            this.Opacity = 0;
            this._FadeDirection = true;
            this._LargeFadeStep = true;
            this._OpacityTimer.Start();
        }
        else
        {
            Application.DoEvents();
            Point point1 = this.Location;
            this.Location = new Point(Int32.MinValue, Int32.MinValue);
            this.Show();
            Application.DoEvents();
            this.Location = point1;
        }
    }
    
}
class  
{
    
    private bool  ;
    private bool  ;
    private bool  ;
    private System.Windows.Forms.Timer  ;
    
    private void   (object  , EventArgs  )
    {
        if (this.DesignMode)
            return;
        this.Icon = Icon.ExtractAssociatedIcon(Assembly.GetEntryAssembly().Location);
        if (this. )
        {
            this.Opacity = 0;
            this.  = true;
            this.  = true;
            this. .Start();
        }
        else
        {
            Application.DoEvents();
            Point point1 = this.Location;
            this.Location = new Point(Int32.MinValue, Int32.MinValue);
            this.Show();
            Application.DoEvents();
            this.Location = point1;
        }
    }
    
}

String Encryption

class LicenseManager
{
    
    internal bool CanRun()
    {
        if (LicenseContainer.Get("License").IsValidFor(_CurrentCustomer))
            return true;
        else
            return false;
    }
    
}
class LicenseManager
{
    
    internal bool CanRun()
    {
        if (LicenseContainer.Get( . (-2942637)).IsValidFor(_CurrentCustomer))
            return true;
        else
            return false;
    }
    
}

Constant Literals Pruning

class LicenseManager
{
    
    public enum Decision
    {
        Allow,
        Deny,
        UnrestrictedDeveloperMode,
        Lock
    }
    
    internal Decision MakeDecision()
    {
        if (CanRun())
            return Decision.Allow;
        if (IsDeveloperSite())
            return Decision.UnrestrictedDeveloperMode;
        int int1 = UnlicensedRunCount;
        if (int1 > MaxUnlicensedRunCount)
            return Decision.Lock;
        int1++;
        UnlicensedRunCount = int1;
        return Decision.Deny;
    }
    
}
class LicenseManager
{
    
    public enum Decision
    {
    }
    
    internal Decision MakeDecision()
    {
        if (CanRun())
            return 0;
        if (IsDeveloperSite())
            return 2;
        int int1 = UnlicensedRunCount;
        if (int1 > MaxUnlicensedRunCount)
            return 3;
        int1++;
        UnlicensedRunCount = int1;
        return 1;
    }
    
}

Overload Induction

class MainForm
{
    
    private bool _UseStartupShutdownEffects;
    private bool _FadeDirection;
    private bool _LargeFadeStep;
    private System.Windows.Forms.Timer _OpacityTimer;
    
    private void MainForm_Load(object sender, EventArgs e)
    {
        if (this.DesignMode)
            return;
        this.Icon = Icon.ExtractAssociatedIcon(Assembly.GetEntryAssembly().Location);
        if (this._UseStartupShutdownEffects)
        {
            this.Opacity = 0;
            this._FadeDirection = true;
            this._LargeFadeStep = true;
            this._OpacityTimer.Start();
        }
        else
        {
            Application.DoEvents();
            Point point1 = this.Location;
            this.Location = new Point(Int32.MinValue, Int32.MinValue);
            this.Show();
            Application.DoEvents();
            this.Location = point1;
        }
    }
    
    private int CalculateSize()
    {
        return this.Width * 2 / 3;
    }
    
}
[Note]Note
class A
{
    
    private bool A;
    private bool B;
    private bool C;
    private System.Windows.Forms.Timer D;
    
    private void A(object A, EventArgs B)
    {
        if (this.DesignMode)
            return;
        this.Icon = Icon.ExtractAssociatedIcon(Assembly.GetEntryAssembly().Location);
        if (this.A)
        {
            this.Opacity = 0;
            this.B = true;
            this.C = true;
            this.D.Start();
        }
        else
        {
            Application.DoEvents();
            Point point1 = this.Location;
            this.Location = new Point(Int32.MinValue, Int32.MinValue);
            this.Show();
            Application.DoEvents();
            this.Location = point1;
        }
    }

    private int A()
    {
        return this.Width * 2 / 3;
    }
    
}

Class Hierarchy Linerization

namespace MyPreciousIdea
{
    namespace Licensing
    {
        class License
        {
            
        }

        class Manager
        {
            
        }
    }

    namespace UI
    {
        class MainForm
        {
            
        }
        
        class SettingsForm
        {
            
        }

        class LicensingForm
        {
            
        }
    }

    
}
class  
{
    
}

class  
{
    
}

class  
{
    
}
        
class  
{
    
}

class  
{
    
}

XML Documentation Filter

XAML Renaming

Connections Between XAML and Code
Symbols Are Simultaneously Renamed in XAML and Code