You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
737 B

3 years ago
#ifndef __OBFUSCATOR_H
#define __OBFUSCATOR_H
#include "Windas.h"
#include "XedWrap.h"
#include "NativeCode.h"
#include "Jit.h"
#include "OpaqueBranching.h"
3 years ago
#define OBF_ATTRIBUTE_JIT (1<<0)
#define OBF_ATTRIBUTE_OPAQUE_BRANCHES (1<<1)
#define OBF_ATTRIBUTE_RANDOMIZE_DIVISOR (1<<2)
3 years ago
typedef struct _OBFUSCATOR
{
ULONG MinDepthForRandomOpaqueBranch;
ULONG MinSizeForOpaqueBranch;
UCHAR OpaqueBranchChance;
UCHAR InstructionMutateChance;
UCHAR BlockDivisionFactor;
ULONG Flags;
PNATIVE_CODE_BLOCK GlobalBlock;
3 years ago
ULONG MaxDepth;
}OBFUSCATOR, *POBFUSCATOR;
BOOL ObfJitInst();
//Recursive obfuscation routine using opaque branches and jit
VOID ObfObfuscate1(POBFUSCATOR Obf, PNATIVE_CODE_BLOCK Block, ULONG Depth = 0);
3 years ago
#endif