Пример #1
0
 public ResourceResolver(ModuleDefinition module, AssemblyResolver assemblyResolver, ResourceResolverInfo resourceResolverInfo)
 {
     this.module = module;
     this.assemblyResolver = assemblyResolver;
     this.resourceResolverInfo = resourceResolverInfo;
 }
Пример #2
0
        void initDecrypters()
        {
            assemblyResolverInfo = new AssemblyResolverInfo(module, DeobfuscatedFile, this);
            assemblyResolverInfo.findTypes();
            resourceDecrypterInfo = new ResourceDecrypterInfo(module, assemblyResolverInfo.SimpleZipTypeMethod, DeobfuscatedFile);
            resourceResolverInfo = new ResourceResolverInfo(module, DeobfuscatedFile, this, assemblyResolverInfo);
            resourceResolverInfo.findTypes();
            resourceDecrypter = new ResourceDecrypter(resourceDecrypterInfo);
            assemblyResolver = new AssemblyResolver(resourceDecrypter, assemblyResolverInfo);
            resourceResolver = new ResourceResolver(module, assemblyResolver, resourceResolverInfo);

            initStringDecrypterInfos();
            assemblyResolverInfo.findTypes();
            resourceResolverInfo.findTypes();

            addModuleCctorInitCallToBeRemoved(assemblyResolverInfo.CallResolverMethod);
            addCallToBeRemoved(module.EntryPoint, assemblyResolverInfo.CallResolverMethod);
            addModuleCctorInitCallToBeRemoved(resourceResolverInfo.CallResolverMethod);
            addCallToBeRemoved(module.EntryPoint, resourceResolverInfo.CallResolverMethod);

            resourceDecrypterInfo.setSimpleZipType(getGlobalSimpleZipTypeMethod(), DeobfuscatedFile);

            if (!decryptResources())
                throw new ApplicationException("Could not decrypt resources");

            dumpEmbeddedAssemblies();
        }
Пример #3
0
 public ResourceResolver(ModuleDefinition module, AssemblyResolver assemblyResolver, ResourceResolverInfo resourceResolverInfo)
 {
     this.module               = module;
     this.assemblyResolver     = assemblyResolver;
     this.resourceResolverInfo = resourceResolverInfo;
 }