他们是否混淆了C#代码
本文关键字:代码 他们是 是否 他们 | 更新日期: 2023-09-27 18:20:12
这些代码行是否被混淆了(C#)?
HWND__* ptr = <Module>.FindWindowW(null, (char*)(&<Module>.??_C@_19HAIJKKDJ@?$AA7?$AA5?$AA5?$AA4?$AA?$AA@));
<Module>.SendNotifyMessageW(ptr, 1024u, (uint)num, 0);
如果是,是否有软件可以消除它们的模糊?
完整方法(代码由ILSpy反编译器反编译):
// My7554_Launcher.Form1
protected unsafe override void WndProc(ref Message m)
{
IntPtr wParam = m.WParam;
IntPtr lParam = m.LParam;
if (m.Msg == 1024)
{
if (wParam.ToInt32() == 1)
{
<Module>.LicenseServices.UnlockExecute();
<Module>.LicenseServices.CloseSession();
base.Close();
}
if (wParam.ToInt32() == 3 || wParam.ToInt32() == 4 || wParam.ToInt32() == 5)
{
if (<Module>.LicenseServices.LockExecute() == null)
{
base.Close();
}
else
{
int num;
if (wParam.ToInt32() == 3)
{
num = this.EGLiDecode1(lParam.ToInt32());
}
if (wParam.ToInt32() == 4)
{
num = this.EGLiDecode2(lParam.ToInt32());
}
if (wParam.ToInt32() == 5)
{
num = this.EGLiDecode3(lParam.ToInt32());
}
HWND__* ptr = <Module>.FindWindowW(null, (char*)(&<Module>.??_C@_19HAIJKKDJ@?$AA7?$AA5?$AA5?$AA4?$AA?$AA@));
<Module>.SendNotifyMessageW(ptr, 1024u, (uint)num, 0);
}
}
}
base.WndProc(ref m);
}
p/s:
虽然有一些评论提到它不是用C#编写的,但我在某个地方发现它非常接近C#,例如:
private void InitializeComponent()
{
ComponentResourceManager manager = null;
manager = new ComponentResourceManager(typeof(Form1));
base.SuspendLayout();
SizeF ef = new SizeF(6f, 13f);
base.AutoScaleDimensions = ef;
base.AutoScaleMode = AutoScaleMode.Font;
Color window = SystemColors.Window;
this.BackColor = window;
this.BackgroundImage = (Image) manager.GetObject("$this.BackgroundImage");
this.BackgroundImageLayout = ImageLayout.Center;
Size size = new Size(0x28c, 0x138);
base.ClientSize = size;
base.ControlBox = false;
base.FormBorderStyle = FormBorderStyle.None;
base.Icon = (Icon) manager.GetObject("$this.Icon");
base.Name = "Form1";
base.StartPosition = FormStartPosition.CenterScreen;
this.Text = "Launcher";
Color white = Color.White;
base.TransparencyKey = white;
base.Load += new EventHandler(this.Form1_Load);
base.ResumeLayout(false);
}
这不是有效的C#。
当你要求反汇编程序/反编译器从一个最初用支持自由函数的语言编写的程序集生成C#时,它可能会显示出这种情况(C++/CLI确实如此,我认为VB.NET也如此)。
也许该反编译器还提供了定位字符串文字的帮助。
消息编号在原始编译过程中被替换,如果您想将其转换为WM_
*常量,则必须自己查找。编译器无法知道许多等于1024u的常量中的哪一个在原始源中。对于.NET程序员,您可以参考此窗口消息列表,而不是SDK头文件。
总的来说,你会有更好的运气手工修复这个代码。
它似乎是编译器生成的代码,可能来自混合模式程序集(C++.Net)。然而,应用字符串加密的可能性很小。我会反编译其他方法,并检查它们是否包含字符串(类似于manager.GetObject("$this.BackgroundImage"))。如果你能在其他方法中找到字符串,代码肯定不会混淆。