自定义db数据文件,打开乱码,已找到代码,大神是否能读懂?

leigh_ 2019-09-07 11:55:24
.method private 
instance void ᜐ (
object A_0,
class [mscorlib]System.EventArgs A_1
) cil managed
{
// 方法起始 RVA 地址 0x417d0
// 方法起始地址(相对于文件绝对值:0x3f9d0)
// 代码长度 1112 (0x458)
.maxstack 5
.locals init (
[0] int32,
[1] class [mscorlib]System.IO.BinaryWriter,
[2] class [System.Windows.Forms]System.Windows.Forms.SaveFileDialog,
[3] int32,
[4] class '᜝',
[5] class ᜂ,
[6] class '᜙',
[7] class [mscorlib]System.Exception,
[8] class [System.Windows.Forms]System.Windows.Forms.SaveFileDialog,
[9] class [System.Windows.Forms]System.Windows.Forms.ToolStripProgressBar,
[10] class [mscorlib]System.IO.BinaryWriter,
[11] int32,
[12] class [System.Windows.Forms]System.Windows.Forms.ToolStripProgressBar,
[13] int32,
[14] int32,
[15] bool,
[16] int32,
[17] int32
)

// 0x3F9DC: 17
IL_0000: ldc.i4.1
// 0x3F9DD: 2B 03
IL_0001: br.s IL_0006

// 0x3F9DF: 16
IL_0003: ldc.i4.0
// 0x3F9E0: 2B 00
IL_0004: br.s IL_0006

// 0x3F9E2: 2C 00
IL_0006: brfalse.s IL_0008

// 0x3F9E4: 16
IL_0008: ldc.i4.0
// 0x3F9E5: 13 11
IL_0009: stloc.s 17
// 0x3F9E7: 11 11
IL_000b: ldloc.s 17
// 0x3F9E9: 45 01 00 00 00 00 00 00 00
IL_000d: switch (IL_0016)

// 0x3F9F2: 2B 2F
IL_0016: br.s IL_0047
// 循环开始 (head: IL_0047)
// 0x3F9F4: 11 11
IL_0018: ldloc.s 17
// 0x3F9F6: 45 0A 00 00 00 20 00 00 00 D9 03 00 00 EB 03 00 00 0A 04 00 00 30 00 00 00 5F 03 00 00 2E 03 00 00 FA 03 00 00 AA 03 00 00 BA 03 00 00
IL_001a: switch (IL_0067, IL_0420, IL_0432, IL_0451, IL_0077, IL_03a6, IL_0375, IL_0441, IL_03f1, IL_0401)

// 0x3FA23: 00
IL_0047: nop
// 0x3FA24: 02
IL_0048: ldarg.0
// 0x3FA25: 7B CE 01 00 04
IL_0049: ldfld string aa::'᜽'
// 0x3FA2A: 72 59 00 00 70
IL_004e: ldstr ""
// 0x3FA2F: 16
IL_0053: ldc.i4.0
// 0x3FA30: 28 43 00 00 0A
IL_0054: call int32 [Microsoft.VisualBasic]Microsoft.VisualBasic.CompilerServices.Operators::CompareString(string, string, bool)
// 0x3FA35: 16
IL_0059: ldc.i4.0
// 0x3FA36: FE 01
IL_005a: ceq
// 0x3FA38: 13 0F
IL_005c: stloc.s 15
// 0x3FA3A: 20 00 00 00 00
IL_005e: ldc.i4 0
// 0x3FA3F: 13 11
IL_0063: stloc.s 17
// 0x3FA41: 2B B1
IL_0065: br.s IL_0018

// 0x3FA43: 11 0F
IL_0067: ldloc.s 15
// 0x3FA45: 39 EB 02 00 00
IL_0069: brfalse IL_0359

// 0x3FA4A: 20 04 00 00 00
IL_006e: ldc.i4 4
// 0x3FA4F: 13 11
IL_0073: stloc.s 17
// 0x3FA51: 2B A1
IL_0075: br.s IL_0018

// 0x3FA53: 38 2F 03 00 00
IL_0077: br IL_03ab
.try
{
.try
{
// 0x3FA58: 2B 3B
IL_007c: br.s IL_00b9
// 循环开始 (head: IL_00b9)
// 0x3FA5A: 11 11
IL_007e: ldloc.s 17
// 0x3FA5C: 45 0D 00 00 00 A6 01 00 00 00 02 00 00 DF 00 00 00 02 01 00 00 ED 00 00 00 93 00 00 00 5B 02 00 00 47 02 00 00 91 01 00 00 37 01 00 00 83 01 00 00 F2 01 00 00 15 02 00 00
IL_0080: switch (IL_025f, IL_02b9, IL_0198, IL_01bb, IL_01a6, IL_014c, IL_0314, IL_0300, IL_024a, IL_01f0, IL_023c, IL_02ab, IL_02ce)

// 0x3FA95: 02
IL_00b9: ldarg.0
// 0x3FA96: 7B CA 01 00 04
IL_00ba: ldfld class [mscorlib]System.Collections.ArrayList aa::'᜹'
// 0x3FA9B: 6F 5C 00 00 0A
IL_00bf: callvirt instance int32 [mscorlib]System.Collections.ArrayList::get_Count()
// 0x3FAA0: 02
IL_00c4: ldarg.0
// 0x3FAA1: 7B CB 01 00 04
IL_00c5: ldfld class [mscorlib]System.Collections.ArrayList aa::'᜺'
// 0x3FAA6: 6F 5C 00 00 0A
IL_00ca: callvirt instance int32 [mscorlib]System.Collections.ArrayList::get_Count()
// 0x3FAAB: D6
IL_00cf: add.ovf
// 0x3FAAC: 02
IL_00d0: ldarg.0
// 0x3FAAD: 7B CC 01 00 04
IL_00d1: ldfld class [mscorlib]System.Collections.ArrayList aa::'᜻'
// 0x3FAB2: 6F 5C 00 00 0A
IL_00d6: callvirt instance int32 [mscorlib]System.Collections.ArrayList::get_Count()
// 0x3FAB7: D6
IL_00db: add.ovf
// 0x3FAB8: 0D
IL_00dc: stloc.3
// 0x3FAB9: 02
IL_00dd: ldarg.0
// 0x3FABA: 6F 7A 02 00 06
IL_00de: callvirt instance class [System.Windows.Forms]System.Windows.Forms.ToolStripProgressBar aa::'᜛'()
// 0x3FABF: 13 09
IL_00e3: stloc.s 9
// 0x3FAC1: 11 09
IL_00e5: ldloc.s 9
// 0x3FAC3: 09
IL_00e7: ldloc.3
// 0x3FAC4: 6F D7 00 00 0A
IL_00e8: callvirt instance void [System.Windows.Forms]System.Windows.Forms.ToolStripProgressBar::set_Maximum(int32)
// 0x3FAC9: 00
IL_00ed: nop
// 0x3FACA: 11 09
IL_00ee: ldloc.s 9
// 0x3FACC: 16
IL_00f0: ldc.i4.0
// 0x3FACD: 6F D8 00 00 0A
IL_00f1: callvirt instance void [System.Windows.Forms]System.Windows.Forms.ToolStripProgressBar::set_Value(int32)
// 0x3FAD2: 00
IL_00f6: nop
// 0x3FAD3: 11 09
IL_00f7: ldloc.s 9
// 0x3FAD5: 17
IL_00f9: ldc.i4.1
// 0x3FAD6: 6F 92 00 00 0A
IL_00fa: callvirt instance void [System.Windows.Forms]System.Windows.Forms.ToolStripItem::set_Visible(bool)
// 0x3FADB: 00
IL_00ff: nop
// 0x3FADC: 14
IL_0100: ldnull
// 0x3FADD: 13 09
IL_0101: stloc.s 9
// 0x3FADF: 07
IL_0103: ldloc.1
// 0x3FAE0: 13 0A
IL_0104: stloc.s 10
// 0x3FAE2: 11 0A
IL_0106: ldloc.s 10
// 0x3FAE4: 72 3D 0A 00 70
IL_0108: ldstr "V5.0"
// 0x3FAE9: 6F 5F 00 00 0A
IL_010d: callvirt instance void [mscorlib]System.IO.BinaryWriter::Write(string)
// 0x3FAEE: 00
IL_0112: nop
// 0x3FAEF: 11 0A
IL_0113: ldloc.s 10
// 0x3FAF1: 09
IL_0115: ldloc.3
// 0x3FAF2: 6F 18 00 00 0A
IL_0116: callvirt instance void [mscorlib]System.IO.BinaryWriter::Write(int32)
// 0x3FAF7: 00
IL_011b: nop
// 0x3FAF8: 11 0A
IL_011c: ldloc.s 10
// 0x3FAFA: 02
IL_011e: ldarg.0
// 0x3FAFB: 7B CA 01 00 04
IL_011f: ldfld class [mscorlib]System.Collections.ArrayList aa::'᜹'
// 0x3FB00: 6F 5C 00 00 0A
IL_0124: callvirt instance int32 [mscorlib]System.Collections.ArrayList::get_Count()
// 0x3FB05: 6F 18 00 00 0A
IL_0129: callvirt instance void [mscorlib]System.IO.BinaryWriter::Write(int32)
// 0x3FB0A: 00
IL_012e: nop
// 0x3FB0B: 16
IL_012f: ldc.i4.0
// 0x3FB0C: 02
IL_0130: ldarg.0
// 0x3FB0D: 7B CA 01 00 04
IL_0131: ldfld class [mscorlib]System.Collections.ArrayList aa::'᜹'
// 0x3FB12: 6F 5C 00 00 0A
IL_0136: callvirt instance int32 [mscorlib]System.Collections.ArrayList::get_Count()
// 0x3FB17: 17
IL_013b: ldc.i4.1
// 0x3FB18: DA
IL_013c: sub.ovf
// 0x3FB19: 13 0B
IL_013d: stloc.s 11
// 0x3FB1B: 0A
IL_013f: stloc.0
// 0x3FB1C: 20 05 00 00 00
IL_0140: ldc.i4 5
// 0x3FB21: 13 11
IL_0145: stloc.s 17
// 0x3FB23: 38 32 FF FF FF
IL_0147: br IL_007e

// 0x3FB28: 38 ED 00 00 00
IL_014c: br IL_023e

// 0x3FB2D: 02
IL_0151: ldarg.0
// 0x3FB2E: 7B CC 01 00 04
IL_0152: ldfld class [mscorlib]System.Collections.ArrayList aa::'᜻'
// 0x3FB33: 06
IL_0157: ldloc.0
// 0x3FB34: 6F 5D 00 00 0A
IL_0158: callvirt instance object [mscorlib]System.Collections.ArrayList::get_Item(int32)
// 0x3FB39: 74 24 00 00 02
IL_015d: castclass '᜝'
// 0x3FB3E: 13 04
IL_0162: stloc.s 4
// 0x3FB40: 11 04
IL_0164: ldloc.s 4
// 0x3FB42: 12 01
IL_0166: ldloca.s 1
// 0x3FB44: 6F 51 02 00 06
IL_0168: callvirt instance void '᜝'::ᜆ(class [mscorlib]System.IO.BinaryWriter&)
// 0x3FB49: 00
IL_016d: nop
// 0x3FB4A: 02
IL_016e: ldarg.0
// 0x3FB4B: 6F 7A 02 00 06
IL_016f: callvirt instance class [System.Windows.Forms]System.Windows.Forms.ToolStripProgressBar aa::'᜛'()
// 0x3FB50: 13 0C
IL_0174: stloc.s 12
// 0x3FB52: 11 0C
IL_0176: ldloc.s 12
// 0x3FB54: 11 0C
IL_0178: ldloc.s 12
// 0x3FB56: 6F DD 00 00 0A
IL_017a: callvirt instance int32 [System.Windows.Forms]System.Windows.Forms.ToolStripProgressBar::get_Value()
// 0x3FB5B: 17
IL_017f: ldc.i4.1
// 0x3FB5C: D6
IL_0180: add.ovf
// 0x3FB5D: 6F D8 00 00 0A
IL_0181: callvirt instance void [System.Windows.Forms]System.Windows.Forms.ToolStripProgressBar::set_Value(int32)
// 0x3FB62: 00
IL_0186: nop
// 0x3FB63: 00
IL_0187: nop
// 0x3FB64: 06
IL_0188: ldloc.0
// 0x3FB65: 17
IL_0189: ldc.i4.1
// 0x3FB66: D6
IL_018a: add.ovf
// 0x3FB67: 0A
IL_018b: stloc.0
// 0x3FB68: 20 02 00 00 00
IL_018c: ldc.i4 2
// 0x3FB6D: 13 11
IL_0191: stloc.s 17
// 0x3FB6F: 38 E6 FE FF FF
IL_0193: br IL_007e

// 0x3FB74: 2B 00
IL_0198: br.s IL_019a

// 0x3FB76: 20 04 00 00 00
IL_019a: ldc.i4 4
// 0x3FB7B: 13 11
IL_019f: stloc.s 17
// 0x3FB7D: 38 D8 FE FF FF
IL_01a1: br IL_007e

// 0x3FB82: 06
IL_01a6: ldloc.0
// 0x3FB83: 11 0E
IL_01a7: ldloc.s 14
// 0x3FB85: 13 10
IL_01a9: stloc.s 16
// 0x3FB87: 11 10
IL_01ab: ldloc.s 16
// 0x3FB89: 31 A2
IL_01ad: ble.s IL_0151

// 0x3FB8B: 20 03 00 00 00
IL_01af: ldc.i4 3
// 0x3FB90: 13 11
IL_01b4: stloc.s 17
// 0x3FB92: 38 C3 FE FF FF
IL_01b6: br IL_007e

// 0x3FB97: 38 45 01 00 00
IL_01bb: br IL_0305

// 0x3FB9C: 11 0A
IL_01c0: ldloc.s 10
// 0x3FB9E: 02
IL_01c2: ldarg.0
// 0x3FB9F: 7B CB 01 00 04
IL_01c3: ldfld class [mscorlib]System.Collections.ArrayList aa::'᜺'
// 0x3FBA4: 6F 5C 00 00 0A
IL_01c8: callvirt instance int32 [mscorlib]System.Collections.ArrayList::get_Count()
// 0x3FBA9: 6F 18 00 00 0A
IL_01cd: callvirt instance void [mscorlib]System.IO.BinaryWriter::Write(int32)
// 0x3FBAE: 00
IL_01d2: nop
// 0x3FBAF: 16
IL_01d3: ldc.i4.0
// 0x3FBB0: 02
IL_01d4: ldarg.0
// 0x3FBB1: 7B CB 01 00 04
IL_01d5: ldfld class [mscorlib]System.Collections.ArrayList aa::'᜺'
// 0x3FBB6: 6F 5C 00 00 0A
IL_01da: callvirt in
...全文
394 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
leigh_ 2019-09-19
  • 打赏
  • 举报
回复
引用 1 楼 hztltgg 的回复:
这只是il反汇编,你怎么也要找个有反射功能的来看代码啊。比如 ILSpy
// ICSharpCode.Decompiler.Disassembler.MethodBodyDisassembler
public void Disassemble(MethodBody body, MethodDebugSymbols debugSymbols)
{
MethodDefinition method = body.Method;
this.output.WriteLine("// 方法起始 RVA 地址 0x{0:x4}", new object[]
{
method.RVA
});
uint num = method.Module.RawImage.ResolveVirtualAddress((uint)method.RVA);
if (num > 0u)
{
this.output.WriteLine("// 方法起始地址(相对于文件绝对值:0x{0:x4})", new object[]
{
num
});
}
this.output.WriteLine("// 代码长度 {0} (0x{0:x})", new object[]
{
body.CodeSize
});
this.output.WriteLine(".maxstack {0}", new object[]
{
body.MaxStackSize
});
if (method.DeclaringType.Module.Assembly != null && method.DeclaringType.Module.Assembly.EntryPoint == method)
{
this.output.WriteLine(".entrypoint");
}
if (method.Body.HasVariables)
{
this.output.Write(".locals ");
if (method.Body.InitLocals)
{
this.output.Write("init ");
}
this.output.WriteLine("(");
this.output.Indent();
foreach (VariableDefinition current in method.Body.Variables)
{
this.output.WriteDefinition("[" + current.Index + "] ", current, true);
current.VariableType.WriteTo(this.output, ILNameSyntax.Signature);
if (!string.IsNullOrEmpty(current.Name))
{
this.output.Write(' ');
this.output.Write(DisassemblerHelpers.Escape(current.Name));
}
if (current.Index + 1 < method.Body.Variables.Count)
{
this.output.Write(',');
}
this.output.WriteLine();
}
this.output.Unindent();
this.output.WriteLine(")");
}
this.output.WriteLine();
if (this.detectControlStructure && body.Instructions.Count > 0)
{
Instruction instruction = body.Instructions[0];
HashSet<int> branchTargets = this.GetBranchTargets(body.Instructions);
this.WriteStructureBody(new ILStructure(body), branchTargets, ref instruction, debugSymbols, method.Body.CodeSize);
return;
}
foreach (Instruction current2 in method.Body.Instructions)
{
TextLocation arg_2B4_0 = this.output.Location;
current2.WriteRawDataTo(this.output);
current2.WriteTo(this.output);
if (debugSymbols != null)
{
debugSymbols.SequencePoints.Add(new SequencePoint
{
StartLocation = this.output.Location,
EndLocation = this.output.Location,
ILRanges = new ILRange[]
{
new ILRange(current2.Offset, (current2.Next == null) ? method.Body.CodeSize : current2.Next.Offset)
}
});
}
this.output.WriteLine();
}
if (method.Body.HasExceptionHandlers)
{
this.output.WriteLine();
using (Collection<ExceptionHandler>.Enumerator enumerator3 = method.Body.ExceptionHandlers.GetEnumerator())
{
while (enumerator3.MoveNext())
{
enumerator3.Current.WriteTo(this.output);
this.output.WriteLine();
}
}
}
}

是这个c#吗
hztltgg 2019-09-11
  • 打赏
  • 举报
回复
这只是il反汇编,你怎么也要找个有反射功能的来看代码啊。比如 ILSpy

16,555

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧