Skip to content

Instantly share code, notes, and snippets.

@ryan-weil
Created March 1, 2024 20:16
Show Gist options
  • Save ryan-weil/8d7fc8709774cfa17edd4d5d09e417b2 to your computer and use it in GitHub Desktop.
Save ryan-weil/8d7fc8709774cfa17edd4d5d09e417b2 to your computer and use it in GitHub Desktop.
Unflattener
using System;
using System.Collections.Generic;
using System.Text;
using de4dot.blocks;
using de4dot.blocks.cflow;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
namespace de4dot.code.deobfuscators.AgentTesla
{
public class Unflattener : IBlocksDeobfuscator
{
public bool ExecuteIfNotModified
{
get { return false; }
}
public Deobfuscator Deobfuscator;
public Unflattener(Deobfuscator deobfuscator)
{
Deobfuscator = deobfuscator;
}
public void DeobfuscateBegin(Blocks blocks)
{
}
public bool Deobfuscate(List<Block> methodBlocks)
{
UnflattenerHelper unflattenerHelper = new UnflattenerHelper(methodBlocks[0]);
return unflattenerHelper.Unflatten();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment