Constants Melt

This protections 'melts' strings and numbers by cutting them down into single variables and joining them back up at runtime. 'Spaghettifys' code.

Before Obfuscation
private void InitializeComponent()
		{
			this.button1 = new Button();
			base.SuspendLayout();
			this.button1.Location = new Point(284, 190);
			this.button1.Name = "button1";
			this.button1.Size = new Size(206, 73);
			this.button1.TabIndex = 0;
			this.button1.Text = "button1";
			this.button1.UseVisualStyleBackColor = true;
			this.button1.Click += this.button1_Click;
			base.AutoScaleDimensions = new SizeF(8f, 16f);
			base.AutoScaleMode = AutoScaleMode.Font;
			base.ClientSize = new Size(800, 450);
			base.Controls.Add(this.button1);
			base.Name = "Form1";
			this.Text = "Form1";
			base.ResumeLayout(false);
		}

		// Token: 0x04000001 RID: 1
		public string lol = "Hi";
After Obfuscation
private void InitializeComponent()
		{
			this.button1 = new Button();
			base.SuspendLayout();
			Control control = this.button1;
			int num = 284;
			int x = num;
			int y = 190;
			control.Location = new Point(x, y);
			Control control2 = this.button1;
			string name = "button1";
			control2.Name = name;
			Control control3 = this.button1;
			int num2 = 206;
			int width = num2;
			int height = 73;
			control3.Size = new Size(width, height);
			Control control4 = this.button1;
			int tabIndex = 0;
			control4.TabIndex = tabIndex;
			Control control5 = this.button1;
			string text = "button1";
			control5.Text = text;
			ButtonBase buttonBase = this.button1;
			int useVisualStyleBackColor = 1;
			buttonBase.UseVisualStyleBackColor = (useVisualStyleBackColor != 0);
			this.button1.Click += this.button1_Click;
			base.AutoScaleDimensions = new SizeF(8f, 16f);
			int autoScaleMode = 1;
			base.AutoScaleMode = (AutoScaleMode)autoScaleMode;
			int num3 = 800;
			int width2 = num3;
			int height2 = 450;
			base.ClientSize = new Size(width2, height2);
			base.Controls.Add(this.button1);
			string name2 = "Form1";
			base.Name = name2;
			string text2 = "Form1";
			this.Text = text2;
			int performLayout = 0;
			base.ResumeLayout(performLayout != 0);
		}

		// Token: 0x04000001 RID: 1
		public string lol;

Last updated

Was this helpful?