以下是我在VS中整理的笔记:
(目标:飞信2008 PC体验版 工具:VS2005+Xenocode 2007+自已写的工具)
Xenocode反编译及代码整理记录
1、Xenocode中设置输出数字为十进制
2、输出后中文文本为\uXXXX,可采用编码工具转成中文
3、new ()改成null;
4、反编译后代码中嵌套数组new int[101][grayPixel[w, h]]++;改成
int[] Totaldark = new int[101];
Totaldark[grayPixel[w, h]]++;
5、形如“+= delegate(”的转换
如: this.shapeButton.DropDownClosed += delegate(object sender, EventArgs e) {this.shapeButton.DropDownItems.Clear();};
反编译成 this.shapeButton.DropDownClosed += new System.EventHandler(this.<InitializeComponent>b__2);
变成了用+= new System.EventHandler,标志<InitializeComponent>为包含代码的函数
标志__CachedAnonymousMethodDelegate XXXX = new EventHandler XX
代码整理方法:
将>b__替换成_b__,去掉<,即
this.shapeButton.DropDownClosed += new System.EventHandler(this.InitializeComponent_b__2);
6、自定义类的转换,标志c__DisplayClass // __locals
如: WaitCursorChanger wcc = new WaitCursorChanger(this);
using (ChooseToolDefaultsDialog dialog = new ChooseToolDefaultsDialog())
{
EventHandler shownDelegate = null;
shownDelegate =
delegate(object sender2, EventArgs e2)
{
wcc.Dispose();
wcc = null;
dialog.Shown -= shownDelegate;
};
反编译成:
PdnToolBar.<>c__DisplayClass4 <>8__locals5 = new PdnToolBar.<>c__DisplayClass4();
<>8__locals5.dialog = new ChooseToolDefaultsDialog();
try
{
PdnToolBar.<>c__DisplayClass6 <>8__locals7 = new PdnToolBar.<>c__DisplayClass6();
<>8__locals7.<>8__locals5 = <>8__locals5;
<>8__locals7.<>8__locals3 = <>8__locals3;
<>8__locals7.shownDelegate = null;
<>8__locals7.shownDelegate = new EventHandler(<>8__locals7.<ToolChooserStrip_ChooseDefaultsClicked>b__1);
<>8__locals5.dialog.Shown += <>8__locals7.shownDelegate;
<>8__locals5.dialog.SetToolBarSettings(this.appWorkspace.GlobalToolTypeChoice, this.appWorkspace.AppEnvironment);
代码整理方法:
将4__this替换成4__this,类中有实例
7、变量定义,反编译后有时会连一块
private bool AutoReconnectEventAttached;
变成了 private AutoReconnectEventAttached;
8、反编译后出现(0)e.aaa 改成 e.aaaa
区别Function(0)
9、EventHandler<0>,改成EventHandler,此事件一般都有变化
(EventHandler) this.EndDownload, 改成this.EndDownload 
10、反编译后出现 () value; 改为value,此时变量定义有问题,Bool or int
11、反编译后出(T) this._personalgroup.GroupInfo.Portrait; 改成this._personalgroup.GroupInfo.Portrait 类型转换
反编译后出(TKey) this._personalgroup.GroupInfo.Portrait; 改成this._personalgroup.GroupInfo.Portrait 类型转换
12、将反统标识去掉,//[CompilerGenerated]
13、反编译后enum属性付值时,会只给数字。如enum{first,second}会为成0,1。 可重新改成相应的属性值
14、Decimal.op_Modulus操作符找不到,改成% 
15、反编译后出现两次类实例,如PsPrivacyControl.PsPrivacyControl. 改成PsPrivacyControl.
16、有代码Ref必须转为out才能编译通过
本文只作技术交流用,请阅读者不要用于商业活动或破坏活动,否则后果自负。
附:
重新编译通过的YBFetion.exe (未添加任何功能代码)