Skip to main content

Module

Trait Module 

Source
pub trait Module: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn transform<'a>(
        &mut self,
        allocator: &'a Allocator,
        program: &mut Program<'a>,
        scoping: Scoping,
    ) -> Result<TransformResult>;

    // Provided method
    fn changes_symbols(&self) -> bool { ... }
}
Expand description

A deobfuscation transformation module.

Each module is a self-contained transformation pass. Modules run in a fixed order within the convergence loop. The engine chains scoping between modules and rebuilds it when changes_symbols returns true.

Required Methods§

Source

fn name(&self) -> &'static str

Human-readable name for logging.

Source

fn transform<'a>( &mut self, allocator: &'a Allocator, program: &mut Program<'a>, scoping: Scoping, ) -> Result<TransformResult>

Run the transformation.

Provided Methods§

Source

fn changes_symbols(&self) -> bool

Whether this module adds/removes declarations or renames bindings.

If true and modifications > 0, the engine rebuilds scoping after this module runs.

Implementors§