-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathZyroxConfig.js
More file actions
58 lines (50 loc) · 1.79 KB
/
ZyroxConfig.js
File metadata and controls
58 lines (50 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/**
* @implements {ZyroxPlugin}
*/
class ZyroxPluginImpl {
RunOnFunction(Name) {
if (Name == "main") {
z.log("Skipping main function obfuscation");
return;
}
if (Name.startsWith("___siphash") || Name == "__decrypt_ctor") {
z.RegisterPass(ObfuscationType.SimpleIndirectBranch, {
PassIterations: 1,
"SimpleIndirectBranch.Chance": 100,
});
return;
}
z.RegisterPass(ObfuscationType.BasicBlockSplitter, {
PassIterations: 1,
"BasicBlockSplitter.SplitBlockChance": 100,
"BasicBlockSplitter.SplitBlockMinSize": 2,
"BasicBlockSplitter.SplitBlockMaxSize": 5,
});
z.RegisterPass(ObfuscationType.MixedBooleanArithmetic, {
PassIterations: 1,
});
z.RegisterPass(ObfuscationType.BasicBlockSplitter, {
PassIterations: 1,
"BasicBlockSplitter.SplitBlockChance": 60,
"BasicBlockSplitter.SplitBlockMinSize": 5,
"BasicBlockSplitter.SplitBlockMaxSize": 10,
});
z.RegisterPass(ObfuscationType.ControlFlowFlattening, {
PassIterations: 2,
"ControlFlowFlattening.UseFunctionResolverChance": 60,
"ControlFlowFlattening.UseGlobalStateVariablesChance": 60,
"ControlFlowFlattening.UseOpaqueTransformationChance": 40,
"ControlFlowFlattening.UseGlobalVariableOpaquesChance": 80,
"ControlFlowFlattening.UseSipHashedStateChance": 40,
"ControlFlowFlattening.CloneSipHashChance": 80,
});
}
OnString(Str) {
z.log("str: " + Str);
return z.Global;
}
Init() {
z.AddMetaData("@zyrox::template");
}
}
z.RegisterClass(new ZyroxPluginImpl());