• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

SamboyCoding / Cpp2IL / 13988197905

21 Mar 2025 09:03AM UTC coverage: 23.407% (-3.8%) from 27.187%
13988197905

Pull #426

github

web-flow
Merge 4aa36af61 into 76a9b72af
Pull Request #426: ISIL -> CIL Decompiler

1270 of 7736 branches covered (16.42%)

Branch coverage included in aggregate %.

5 of 1526 new or added lines in 31 files covered. (0.33%)

4 existing lines in 3 files now uncovered.

3383 of 12143 relevant lines covered (27.86%)

107291.03 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.0
/Cpp2IL.Core/Cpp2IlCorePlugin.cs
1
using System;
2
using Cpp2IL.Core;
3
using Cpp2IL.Core.Api;
4
using Cpp2IL.Core.Attributes;
5
using Cpp2IL.Core.InstructionSets;
6
using Cpp2IL.Core.OutputFormats;
7
using Cpp2IL.Core.ProcessingLayers;
8
//Need this for the assembly attribute definition below.
9
using LibCpp2IL;
10

11
[assembly: RegisterCpp2IlPlugin(typeof(Cpp2IlCorePlugin))]
12

13
namespace Cpp2IL.Core;
14

15
public class Cpp2IlCorePlugin : Cpp2IlPlugin
16
{
17
    public override string Name => "Cpp2IL Built-In";
2✔
18

19
    public override string Description =>
NEW
20
        "Core Cpp2IL plugin containing built-in instruction sets, binaries, and other core functionality.";
×
21

22
    public override void OnLoad()
23
    {
24
        Logger.VerboseNewline("Initializing...", "Core Plugin");
1✔
25
        var start = DateTime.Now;
1✔
26

27
        Logger.VerboseNewline("\tRegistering built-in instruction set handlers...", "Core Plugin");
1✔
28

29
        InstructionSetRegistry.RegisterInstructionSet<X86InstructionSet>(DefaultInstructionSets.X86_32);
1✔
30
        InstructionSetRegistry.RegisterInstructionSet<X86InstructionSet>(DefaultInstructionSets.X86_64);
1✔
31
        InstructionSetRegistry.RegisterInstructionSet<WasmInstructionSet>(DefaultInstructionSets.WASM);
1✔
32
        InstructionSetRegistry.RegisterInstructionSet<ArmV7InstructionSet>(DefaultInstructionSets.ARM_V7);
1✔
33

34
        if (Environment.GetEnvironmentVariable("CPP2IL_LEGACY_ARM64") != null)
1!
35
            InstructionSetRegistry.RegisterInstructionSet<Arm64InstructionSet>(DefaultInstructionSets.ARM_V8);
×
36
        else
37
            InstructionSetRegistry.RegisterInstructionSet<NewArmV8InstructionSet>(DefaultInstructionSets.ARM_V8);
1✔
38

39
        Logger.VerboseNewline("\tRegistering built-in binary parsers...", "Core Plugin");
1✔
40

41
        LibCpp2IlBinaryRegistry.RegisterBuiltInBinarySupport();
1✔
42

43
        Logger.VerboseNewline("\tRegistering built-in output formats...", "Core Plugin");
1✔
44

45
        OutputFormatRegistry.Register<AsmResolverDllOutputFormatLegacy>();
1✔
46
        OutputFormatRegistry.Register<AsmResolverDllOutputFormatDefault>();
1✔
47
        OutputFormatRegistry.Register<AsmResolverDllOutputFormatEmpty>();
1✔
48
        OutputFormatRegistry.Register<AsmResolverDllOutputFormatThrowNull>();
1✔
49
        OutputFormatRegistry.Register<AsmResolverDllOutputFormatIlRecovery>();
1✔
50
        OutputFormatRegistry.Register<DiffableCsOutputFormat>();
1✔
51
        OutputFormatRegistry.Register<IsilDumpOutputFormat>();
1✔
52
        OutputFormatRegistry.Register<WasmMappingOutputFormat>();
1✔
53
        OutputFormatRegistry.Register<WasmNameSectionOutputFormat>();
1✔
54
        OutputFormatRegistry.Register<IlOutputFormat>();
1✔
55

56
        Logger.VerboseNewline("\tRegistering built-in processing layers", "Core Plugin");
1✔
57

58
        ProcessingLayerRegistry.Register<AttributeAnalysisProcessingLayer>();
1✔
59
        ProcessingLayerRegistry.Register<AttributeInjectorProcessingLayer>();
1✔
60
        ProcessingLayerRegistry.Register<CallAnalysisProcessingLayer>();
1✔
61
        ProcessingLayerRegistry.Register<NativeMethodDetectionProcessingLayer>();
1✔
62
        ProcessingLayerRegistry.Register<StableRenamingProcessingLayer>();
1✔
63
        ProcessingLayerRegistry.Register<DeobfuscationMapProcessingLayer>();
1✔
64

65
        var elapsed = DateTime.Now - start;
1✔
66
        Logger.VerboseNewline($"Core plugin loaded in {elapsed.Ticks} ticks ({elapsed.TotalMilliseconds}ms)",
1✔
67
            "Core Plugin");
1✔
68
    }
1✔
69

70
    private sealed class AsmResolverDllOutputFormatLegacy : AsmResolverDllOutputFormatDefault
71
    {
72
        public override string OutputFormatId => "dummydll";
1✔
73
        public override string OutputFormatName => "DLL output format for backwards compatibility.";
×
74
    }
75
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc