Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion De4DotCommon.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@
<DisableOutOfProcTaskHost>true</DisableOutOfProcTaskHost>
<DnlibVersion>4.5.0</DnlibVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<PropertyGroup Condition="'$(Configuration)' == 'Release' And '$(De4DotNetFramework)' != 'true'">
<SelfContained>true</SelfContained>
</PropertyGroup>

<!-- Enable compiling .NET Framework 4.8 targets natively on Linux/macOS using standard .NET SDK -->
<ItemGroup Condition=" '$(De4DotNetFramework)' == 'true' ">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" />
</ItemGroup>

</Project>
7 changes: 6 additions & 1 deletion de4dot.blocks/cflow/BlockCflowDeobfuscator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ protected override bool Deobfuscate(Block block) {
return false;
}

return branchEmulator.Emulate(block.LastInstr.Instruction);
try {
return branchEmulator.Emulate(block.LastInstr.Instruction);
}
catch {
return false;
}
}

void PopPushedArgs(int stackArgs) {
Expand Down
2 changes: 1 addition & 1 deletion de4dot.cui/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ExitException : Exception {
public ExitException(int code) => this.code = code;
}

class Program {
public class Program {
static IList<IDeobfuscatorInfo> deobfuscatorInfos = CreateDeobfuscatorInfos();

static IList<IDeobfuscatorInfo> LoadPlugin(string assembly) {
Expand Down
Loading