简体   繁体   English

反编译 Dll - 代码具有用于变量的 CS$4$0001

[英]Decompile Dll - Code has CS$4$0001 for vars

I want to edit a dll file if possible or extract the contents and modify them.如果可能,我想编辑一个 dll 文件或提取内容并修改它们。

I have used .Net Reflector to decompile and generate files.我使用 .Net Reflector 来反编译和生成文件。

That worked great except some files have things like CS$4$0001 instead of variables.除了某些文件包含CS$4$0001而不是变量之外,效果很好。

also <>g__initLocal31还有<>g__initLocal31

Is there a way to find what those are?有没有办法找到那些是什么? Or Should I just replace all instances, and test?还是我应该更换所有实例并进行测试?

ADDED:添加:

    [OutputCache(NoStore=true, Location=OutputCacheLocation.Client, Duration=1)]
    public ActionResult _StateTile(string AssetName, string StateName)
    {
        aaReportsEntities dataContext;
        string CS$4$0001 = StateName;
        if (CS$4$0001 != null)
        {
            if (!(CS$4$0001 == "IDLE-UPSTREAM"))

Those can be:这些可以是:

  • local variables (don't have names in IL)局部变量(在 IL 中没有名称)
  • backing fields for automatically implemented properties / field-like events自动实现的属性/类字段事件的支持字段
  • fields for anything compiler-generated (capture-context related scopes, etc)任何编译器生成的字段(捕获上下文相关的范围等)
  • expression-tree / delegate caches表达式树/委托缓存
  • "dynamic" caches “动态”缓存
  • state variables in iterator-blocks / "await" code迭代器块/“等待”代码中的状态变量
  • etc (again, mainly anything compiler-generated)等(同样,主要是编译器生成的任何东西)

They are important.它们很重要。 But frankly, you probably shouldn't be extracting code via reflector: usually, if you have justification in doing that, you already own the source code (or are licensed to access it)但坦率地说,您可能不应该通过反射器提取代码:通常,如果您有理由这样做,则您已经拥有源代码(或被许可访问它)

You cant get variable names back.您无法取回变量名称。 TReverse engineering is very difficult to do, recommend this book - http://www.amazon.co.uk/Reversing-Secrets-Engineering-Eldad-Eilam/dp/0764574817/ref=sr_1_1?ie=UTF8&qid=1353436851&sr=8-1 TReverse工程是很难做到的,推荐这本书- http://www.amazon.co.uk/Reversing-Secrets-Engineering-Eldad-Eilam/dp/0764574817/ref=sr_1_1?ie=UTF8&qid=1353436851&sr=8- 1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM