Skip to content

Instantly share code, notes, and snippets.

@XenocodeRCE
Last active August 15, 2021 16:10
Show Gist options
  • Select an option

  • Save XenocodeRCE/8a19f9926e1f99a7028d5cc7f4c2aa1c to your computer and use it in GitHub Desktop.

Select an option

Save XenocodeRCE/8a19f9926e1f99a7028d5cc7f4c2aa1c to your computer and use it in GitHub Desktop.
jobfuscator deob poc blog
using Microsoft.CodeDom.Providers.DotNetCompilerPlatform;
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Net;
using System.Text.RegularExpressions;
using System.Threading;
using System.Web;
namespace JDeobfuscator
{
partial class Program
{
public static string obfuscatedCode =
//public static double Cvrhllagj(double[] numArray) {
@"double[] P_w8f_fgCeIaTRV_p_7ndn1q = { 12.458764457962426, 11.774898185844052, 0.04689317746733355, 1.2969850392387325, 10.611000853475497, 9.444500548246086, 3.0010750907231962, 8.214242224683236, 5.35369950946601, 2.2967911566451398, 6.337725947635746, 4.1084483812734645, 7.644315091317943 };
double[] sGCdYD_QW_Gul63_3CSg_ = { 0.49541834233909826, 11.108651132591769, 7.333755559903432, 6.312855145298063, 1.5379281965905527, 12.772400418512902, 8.309486663437598, 5.3210172938720985, 9.210460937962365, 2.363189009623283, 4.940208607912868, 10.77765599145965, 3.6289456913818885 };
int[] var_2298 = { 3, 9, 0, 2, 1, 12, 6, 5, 7, 11, 10, 8, 4 };
double[] EDDZK = { 7.6302934574042345, 0.48647822072817365, 3.7469304623780424, 12.890310694553246, 4.424076412168135, 2.2644183141716656, 6.920101302627346, 8.083165735359255, 5.165626087210683, 11.703452832675005, 10.738901075350242, 1.0883621127571155, 9.544276127666178 };
double[] g_tDidrpacwyeVyrhew = { 11.798076555261488, 8.72840963335931, 0.847652032382205, 12.10679943129788, 5.8222289639469365, 4.878753279512456, 10.99689186434766, 3.6408793996380444, 9.408845272345676, 7.918413795369193, 2.3988605196020854, 1.4930951762342022, 6.7899955325046655 };
int[] var_1154 = { 5, 8, 7, 1, 2, 11, 10, 3, 9, 12, 6, 4, 0 };
double[] ZICHO_IKOCUKWU_EGCSZ = { 6.775326581635852, 9.621039661701861, 12.952011031726164, 7.5069637614684535, 4.2261314021485346, 8.16884574736118, 1.9697586768349638, 5.801733765049773, 2.6365953406299067, 10.176009478815065, 3.685945767542533, 0.04414493793098155, 11.89560568784708 };
int[] tRajtwqypTizszcm = { 11, 6, 12, 10, 8, 3, 9, 1, 5, 0, 2, 4, 7 };
double[] g_aIpfzqie = { 7.032984234292641, 3.077571847567626, 1.304402294825222, 9.971923825808249, 2.013574193141939, 0.5363226958883169, 8.713747398802738, 6.78327741700414, 11.987125657521801, 10.74369246398476, 5.5968122609455895, 12.947441411228526, 4.006650348315246 };
double[] var_2151 = { 11.920731024798778, 9.592900712432833, 12.16861901516612, 3.2521783648818703, 4.239994892469965, 8.912937596299136, 0.95693862125048, 7.690758594164553, 1.9067848640629919, 5.450262221142008, 2.210675252862015, 10.034569234008435, 6.565508816559017 };
double[] var_374 = { 1.1366782944434E8, 1.13666273E8, 5.4788174587182E8, 1.18186762692505E9, 10.49125, 5.8241904281803E8, 3.57591, 4.0146879430169E8, 0.0, 8.3566175464046E8, 17.84958, 1.69642573461452E9, 1.15575422582617E9 };
int[] dZgpaaaqvq = { 0, 4, 5, 3, 2, 1 };
double[] BGUKAYXAD_BFMZSMVC = { 4.526450652360194, 2.456416333945702, 1.0330716052261302, 5.407718737871458, 3.9972967568629003, 0.6076960783622827 };
double[] Dex84zYkyGeLg__v1e_7 = { 2.527836620133729, 1.3533463614317913, 0.8179501060260149, 5.196922560109992, 3.185561580072823, 4.410568962313531 };
double[] a_1B_Qd551G_4e7U9Wb = { 0.7793633984621939, 5.307756442540827, 1.9408882313798674, 2.8015442173243805, 4.550867755450923, 3.690852883081302 };
int[] var_1444 = { 2, 4, 5, 1, 3, 0 };
double[] eXapdnpozvaRequrgourWyymkm = { 4.382221215354622, 1.6097981199813254, 0.08523247562916646, 3.44010515396284, 5.070403342886876, 2.6125009748617565 };
int[] var_1286 = { 2, 0, 4, 5, 1, 3 };
double[] var_2980 = { 14.472239053915706, 0.4626801974458849, 65535.27131860518, 25.960673081154674, 2.207841502966151, 21667.351884658172 };
int UHIQAXCIL_MESOZZ_TSQTEKKV = (int) (var_374[(int) (var_2151[(int) (g_aIpfzqie[tRajtwqypTizszcm[(int) (ZICHO_IKOCUKWU_EGCSZ[var_1154[(int) (g_tDidrpacwyeVyrhew[(int) (EDDZK[var_2298[(int) (sGCdYD_QW_Gul63_3CSg_[(int) (P_w8f_fgCeIaTRV_p_7ndn1q[4])])]])])]])]])])] - Math.sinh(var_374[(int) (var_2151[(int) (g_aIpfzqie[tRajtwqypTizszcm[(int) (ZICHO_IKOCUKWU_EGCSZ[var_1154[(int) (g_tDidrpacwyeVyrhew[(int) (EDDZK[var_2298[(int) (sGCdYD_QW_Gul63_3CSg_[(int) (P_w8f_fgCeIaTRV_p_7ndn1q[8])])]])])]])]])])]));
double[] var_3457 = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
double var_3878 = var_374[(int) (var_2151[(int) (g_aIpfzqie[tRajtwqypTizszcm[(int) (ZICHO_IKOCUKWU_EGCSZ[var_1154[(int) (g_tDidrpacwyeVyrhew[(int) (EDDZK[var_2298[(int) (sGCdYD_QW_Gul63_3CSg_[(int) (P_w8f_fgCeIaTRV_p_7ndn1q[2])])]])])]])]])])];
UHIQAXCIL_MESOZZ_TSQTEKKV = (int) (var_374[(int) (var_2151[(int) (g_aIpfzqie[tRajtwqypTizszcm[(int) (ZICHO_IKOCUKWU_EGCSZ[var_1154[(int) (g_tDidrpacwyeVyrhew[(int) (EDDZK[var_2298[(int) (sGCdYD_QW_Gul63_3CSg_[(int) (P_w8f_fgCeIaTRV_p_7ndn1q[9])])]])])]])]])])] + Math.sqrt(var_374[(int) (var_2151[(int) (g_aIpfzqie[tRajtwqypTizszcm[(int) (ZICHO_IKOCUKWU_EGCSZ[var_1154[(int) (g_tDidrpacwyeVyrhew[(int) (EDDZK[var_2298[(int) (sGCdYD_QW_Gul63_3CSg_[(int) (P_w8f_fgCeIaTRV_p_7ndn1q[10])])]])])]])]])])]));
while (UHIQAXCIL_MESOZZ_TSQTEKKV != (int) (Math.sqrt(var_374[(int) (var_2151[(int) (g_aIpfzqie[tRajtwqypTizszcm[(int) (ZICHO_IKOCUKWU_EGCSZ[var_1154[(int) (g_tDidrpacwyeVyrhew[(int) (EDDZK[var_2298[(int) (sGCdYD_QW_Gul63_3CSg_[(int) (P_w8f_fgCeIaTRV_p_7ndn1q[1])])]])])]])]])])]) + var_374[(int) (var_2151[(int) (g_aIpfzqie[tRajtwqypTizszcm[(int) (ZICHO_IKOCUKWU_EGCSZ[var_1154[(int) (g_tDidrpacwyeVyrhew[(int) (EDDZK[var_2298[(int) (sGCdYD_QW_Gul63_3CSg_[(int) (P_w8f_fgCeIaTRV_p_7ndn1q[7])])]])])]])]])])])) {
switch(UHIQAXCIL_MESOZZ_TSQTEKKV) {
case 949352161:
String var_3187 = "";
int[] W4_ZH_Lfcjn_XSCXp6g = { 0x5355, 0x52D1, 0x531D, 0x52E9, 0x5311, 0x531D, 0x52D9, 0x5311, 0x5421, 0x5391, 0x530D, 0x52C9, 0x52FD, 0x531D, 0x52D1, 0x52FD, 0x52E5, 0x52E9, 0x5421, 0x53AD, 0x5421, 0x540D, 0x53E9, 0x53C9, 0x5309 };
for (int var_1429 = (int) (var_2980[var_1286[(int) (eXapdnpozvaRequrgourWyymkm[var_1444[(int) (a_1B_Qd551G_4e7U9Wb[(int) (Dex84zYkyGeLg__v1e_7[(int) (BGUKAYXAD_BFMZSMVC[dZgpaaaqvq[(int) (var_2151[(int) (g_aIpfzqie[tRajtwqypTizszcm[(int) (ZICHO_IKOCUKWU_EGCSZ[var_1154[(int) (g_tDidrpacwyeVyrhew[(int) (EDDZK[var_2298[(int) (sGCdYD_QW_Gul63_3CSg_[(int) (P_w8f_fgCeIaTRV_p_7ndn1q[11])])]])])]])]])])]])])])]])]]), oaxYKroM5iU_KE_IxG8_ = (int) (var_2980[var_1286[(int) (eXapdnpozvaRequrgourWyymkm[var_1444[(int) (a_1B_Qd551G_4e7U9Wb[(int) (Dex84zYkyGeLg__v1e_7[(int) (BGUKAYXAD_BFMZSMVC[dZgpaaaqvq[(int) (var_2151[(int) (g_aIpfzqie[tRajtwqypTizszcm[(int) (ZICHO_IKOCUKWU_EGCSZ[var_1154[(int) (g_tDidrpacwyeVyrhew[(int) (EDDZK[var_2298[(int) (sGCdYD_QW_Gul63_3CSg_[(int) (P_w8f_fgCeIaTRV_p_7ndn1q[11])])]])])]])]])])]])])])]])]]); var_1429 < (int) (var_2980[var_1286[(int) (eXapdnpozvaRequrgourWyymkm[var_1444[(int) (a_1B_Qd551G_4e7U9Wb[(int) (Dex84zYkyGeLg__v1e_7[(int) (BGUKAYXAD_BFMZSMVC[dZgpaaaqvq[(int) (var_2151[(int) (g_aIpfzqie[tRajtwqypTizszcm[(int) (ZICHO_IKOCUKWU_EGCSZ[var_1154[(int) (g_tDidrpacwyeVyrhew[(int) (EDDZK[var_2298[(int) (sGCdYD_QW_Gul63_3CSg_[(int) (P_w8f_fgCeIaTRV_p_7ndn1q[0])])]])])]])]])])]])])])]])]]); var_1429++) {
oaxYKroM5iU_KE_IxG8_ = W4_ZH_Lfcjn_XSCXp6g[var_1429];
oaxYKroM5iU_KE_IxG8_++;
oaxYKroM5iU_KE_IxG8_ ^= (int) (var_2980[var_1286[(int) (eXapdnpozvaRequrgourWyymkm[var_1444[(int) (a_1B_Qd551G_4e7U9Wb[(int) (Dex84zYkyGeLg__v1e_7[(int) (BGUKAYXAD_BFMZSMVC[dZgpaaaqvq[(int) (var_2151[(int) (g_aIpfzqie[tRajtwqypTizszcm[(int) (ZICHO_IKOCUKWU_EGCSZ[var_1154[(int) (g_tDidrpacwyeVyrhew[(int) (EDDZK[var_2298[(int) (sGCdYD_QW_Gul63_3CSg_[(int) (P_w8f_fgCeIaTRV_p_7ndn1q[1])])]])])]])]])])]])])])]])]]);
oaxYKroM5iU_KE_IxG8_ += (int) (var_2980[var_1286[(int) (eXapdnpozvaRequrgourWyymkm[var_1444[(int) (a_1B_Qd551G_4e7U9Wb[(int) (Dex84zYkyGeLg__v1e_7[(int) (BGUKAYXAD_BFMZSMVC[dZgpaaaqvq[(int) (var_2151[(int) (g_aIpfzqie[tRajtwqypTizszcm[(int) (ZICHO_IKOCUKWU_EGCSZ[var_1154[(int) (g_tDidrpacwyeVyrhew[(int) (EDDZK[var_2298[(int) (sGCdYD_QW_Gul63_3CSg_[(int) (P_w8f_fgCeIaTRV_p_7ndn1q[12])])]])])]])]])])]])])])]])]]);
oaxYKroM5iU_KE_IxG8_ = (((oaxYKroM5iU_KE_IxG8_ & (int) (var_2980[var_1286[(int) (eXapdnpozvaRequrgourWyymkm[var_1444[(int) (a_1B_Qd551G_4e7U9Wb[(int) (Dex84zYkyGeLg__v1e_7[(int) (BGUKAYXAD_BFMZSMVC[dZgpaaaqvq[(int) (var_2151[(int) (g_aIpfzqie[tRajtwqypTizszcm[(int) (ZICHO_IKOCUKWU_EGCSZ[var_1154[(int) (g_tDidrpacwyeVyrhew[(int) (EDDZK[var_2298[(int) (sGCdYD_QW_Gul63_3CSg_[(int) (P_w8f_fgCeIaTRV_p_7ndn1q[1])])]])])]])]])])]])])])]])]])) >> (int) (var_2980[var_1286[(int) (eXapdnpozvaRequrgourWyymkm[var_1444[(int) (a_1B_Qd551G_4e7U9Wb[(int) (Dex84zYkyGeLg__v1e_7[(int) (BGUKAYXAD_BFMZSMVC[dZgpaaaqvq[(int) (var_2151[(int) (g_aIpfzqie[tRajtwqypTizszcm[(int) (ZICHO_IKOCUKWU_EGCSZ[var_1154[(int) (g_tDidrpacwyeVyrhew[(int) (EDDZK[var_2298[(int) (sGCdYD_QW_Gul63_3CSg_[(int) (P_w8f_fgCeIaTRV_p_7ndn1q[3])])]])])]])]])])]])])])]])]])) | (oaxYKroM5iU_KE_IxG8_ << (int) (var_2980[var_1286[(int) (eXapdnpozvaRequrgourWyymkm[var_1444[(int) (a_1B_Qd551G_4e7U9Wb[(int) (Dex84zYkyGeLg__v1e_7[(int) (BGUKAYXAD_BFMZSMVC[dZgpaaaqvq[(int) (var_2151[(int) (g_aIpfzqie[tRajtwqypTizszcm[(int) (ZICHO_IKOCUKWU_EGCSZ[var_1154[(int) (g_tDidrpacwyeVyrhew[(int) (EDDZK[var_2298[(int) (sGCdYD_QW_Gul63_3CSg_[(int) (P_w8f_fgCeIaTRV_p_7ndn1q[6])])]])])]])]])])]])])])]])]]))) & (int) (var_2980[var_1286[(int) (eXapdnpozvaRequrgourWyymkm[var_1444[(int) (a_1B_Qd551G_4e7U9Wb[(int) (Dex84zYkyGeLg__v1e_7[(int) (BGUKAYXAD_BFMZSMVC[dZgpaaaqvq[(int) (var_2151[(int) (g_aIpfzqie[tRajtwqypTizszcm[(int) (ZICHO_IKOCUKWU_EGCSZ[var_1154[(int) (g_tDidrpacwyeVyrhew[(int) (EDDZK[var_2298[(int) (sGCdYD_QW_Gul63_3CSg_[(int) (P_w8f_fgCeIaTRV_p_7ndn1q[1])])]])])]])]])])]])])])]])]]);
var_3187 += (char) (oaxYKroM5iU_KE_IxG8_ & (int) (var_2980[var_1286[(int) (eXapdnpozvaRequrgourWyymkm[var_1444[(int) (a_1B_Qd551G_4e7U9Wb[(int) (Dex84zYkyGeLg__v1e_7[(int) (BGUKAYXAD_BFMZSMVC[dZgpaaaqvq[(int) (var_2151[(int) (g_aIpfzqie[tRajtwqypTizszcm[(int) (ZICHO_IKOCUKWU_EGCSZ[var_1154[(int) (g_tDidrpacwyeVyrhew[(int) (EDDZK[var_2298[(int) (sGCdYD_QW_Gul63_3CSg_[(int) (P_w8f_fgCeIaTRV_p_7ndn1q[1])])]])])]])]])])]])])])]])]]));
}
System.out.format(var_3187, var_3878);
UHIQAXCIL_MESOZZ_TSQTEKKV -= (int) Math.min(var_374[(int) (var_2151[(int) (g_aIpfzqie[tRajtwqypTizszcm[(int) (ZICHO_IKOCUKWU_EGCSZ[var_1154[(int) (g_tDidrpacwyeVyrhew[(int) (EDDZK[var_2298[(int) (sGCdYD_QW_Gul63_3CSg_[(int) (P_w8f_fgCeIaTRV_p_7ndn1q[6])])]])])]])]])])], var_374[(int) (var_2151[(int) (g_aIpfzqie[tRajtwqypTizszcm[(int) (ZICHO_IKOCUKWU_EGCSZ[var_1154[(int) (g_tDidrpacwyeVyrhew[(int) (EDDZK[var_2298[(int) (sGCdYD_QW_Gul63_3CSg_[(int) (P_w8f_fgCeIaTRV_p_7ndn1q[3])])]])])]])]])])]);
break;
case 1696459731:
double[] var_1115 = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
UHIQAXCIL_MESOZZ_TSQTEKKV = (int) (var_374[(int) (var_2151[(int) (g_aIpfzqie[tRajtwqypTizszcm[(int) (ZICHO_IKOCUKWU_EGCSZ[var_1154[(int) (g_tDidrpacwyeVyrhew[(int) (EDDZK[var_2298[(int) (sGCdYD_QW_Gul63_3CSg_[(int) (P_w8f_fgCeIaTRV_p_7ndn1q[5])])]])])]])]])])] - Math.sqrt(var_374[(int) (var_2151[(int) (g_aIpfzqie[tRajtwqypTizszcm[(int) (ZICHO_IKOCUKWU_EGCSZ[var_1154[(int) (g_tDidrpacwyeVyrhew[(int) (EDDZK[var_2298[(int) (sGCdYD_QW_Gul63_3CSg_[(int) (P_w8f_fgCeIaTRV_p_7ndn1q[12])])]])])]])]])])]));
break;
case 401434416:
var_3878 = Cvrhllagj(var_3457);
UHIQAXCIL_MESOZZ_TSQTEKKV += (int) (var_374[(int) (var_2151[(int) (g_aIpfzqie[tRajtwqypTizszcm[(int) (ZICHO_IKOCUKWU_EGCSZ[var_1154[(int) (g_tDidrpacwyeVyrhew[(int) (EDDZK[var_2298[(int) (sGCdYD_QW_Gul63_3CSg_[(int) (P_w8f_fgCeIaTRV_p_7ndn1q[0])])]])])]])]])])] + Math.exp(var_374[(int) (var_2151[(int) (g_aIpfzqie[tRajtwqypTizszcm[(int) (ZICHO_IKOCUKWU_EGCSZ[var_1154[(int) (g_tDidrpacwyeVyrhew[(int) (EDDZK[var_2298[(int) (sGCdYD_QW_Gul63_3CSg_[(int) (P_w8f_fgCeIaTRV_p_7ndn1q[11])])]])])]])]])])]));
break;
}
}
";
static Dictionary<string, double[]> dic_double_array = new Dictionary<string, double[]>();
static Dictionary<string, int[]> dic_int_array = new Dictionary<string, int[]>();
static string[] deobCode;
static int SwitchIndex;
static string SwitchIndexName;
static int switchTargetCount;
static Dictionary<int, string> methodBlocks;
static int SwitchFinalIndex;
static List<string> solvedOrder;
static Evaluator script;
static void Main(string[] args) {
script = new Evaluator();
//clean casts
//obfuscatedCode = obfuscatedCode.Replace("(int) (", string.Empty);
//obfuscatedCode = obfuscatedCode.Replace("])", "]");
//store as list
deobCode = obfuscatedCode.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
//find switch index, JObfuscator locals are always above
SwitchIndex = GrabSwitchIndex();
///1st pass : clean loca int[] and double[]
GrabArrayContent();
ReplaceArrayContent();
ReplaceCast();
ReplaceMaths();
CleanResidualExpressions();
//2nd pass : clean cflow
GrabSwitchLocalIndexName();
GrabSwitchFinalIndex();
BuildCFGGraph();
SolveCFGTree();
CleanFlowDust();
//3rd pass : string encoding
DecodeStrings();
Console.WriteLine(string.Join(Environment.NewLine, deobCode));
Console.WriteLine("===");
Console.WriteLine(string.Join(Environment.NewLine, solvedOrder));
Console.WriteLine("===");
Console.ReadKey();
}
private static void DecodeStrings() {
for (int i = 0; i < solvedOrder.Count; i++) {
if (solvedOrder[i].Contains("String ") && solvedOrder[i + 1].Contains("int[]") && solvedOrder[i + 2].Contains("for")) {
//we found str encryption...
var count = CountInString(solvedOrder[i], "\"");
if(count == 1) {
solvedOrder[i] = solvedOrder[i].Replace("\"", " \"\"");
}
var varName = GetStringInBetween("String ", "=", solvedOrder[i], false, false).Trim();
int start = i + 0;
i += 2;
while (!solvedOrder[i].Contains("}")) {
i++;
}
int end = i + 1;
string eval = "";
for (int x = 7; x < end; x++) {
eval += solvedOrder[x] + Environment.NewLine;
}
string decoded = EvaluateString(eval, varName).ToString();
solvedOrder[start] = $"String {varName} = \"{decoded}\";";
start++;
int tot = end - start;
for (int x = 0; x < tot; x++) {
solvedOrder.RemoveAt(start);
}
}
}
}
private static int CountInString(string v1, string v2) {
int count = 0;
char toFind = Convert.ToChar(v2);
foreach (char c in v1) {
if (c == toFind) {
count++;
}
}
return count;
}
private static void CleanResidualExpressions() {
for (int i = 0; i < deobCode.Length; i++) {
var currentLine = deobCode[i];
//qQ3afFIA__VZ15a_fC -= -(int) (946513270,07304 - 374107,07303932);
if (currentLine.Contains("= (int) (")) {
var splitted = currentLine.Split('=');
var exp = splitted[1].Replace(",", ".");
if (exp.EndsWith(") {"))
exp = exp.Replace(") {", "");
object result = EvaluateExpression(exp);
deobCode[i] = deobCode[i].Substring(0, deobCode[i].IndexOf("="));
deobCode[i] += $" = {result};";
Console.WriteLine($"Evaluated expression : ({exp}) to {result}");
}else if (currentLine.Contains("= -(int) (")) {
var splitted = currentLine.Split('=');
var exp = splitted[1].Replace(",", ".");
if (exp.EndsWith(") {"))
exp = exp.Replace(") {", "");
object result = EvaluateExpression(exp);
deobCode[i] = deobCode[i].Substring(0, deobCode[i].IndexOf("="));
deobCode[i] += $" = {result};";
Console.WriteLine($"Evaluated expression : ({exp}) to {result}");
}
}
}
private static object EvaluateExpression(string exp) {
object result = script.EvaluateExpression(exp);
return result;
}
private static object EvaluateString(string exp, string varName) {
object result = script.EvaluateString(exp, varName);
return result;
}
private static void CleanFlowDust() {
var block = string.Join(Environment.NewLine, solvedOrder);
var lines = block.Split(new[] { Environment.NewLine }, StringSplitOptions.None).ToList();
for (int i = 0; i < lines.Count; i++) {
var current = lines[i];
if (current.Contains($"{SwitchIndexName}")) {
lines.RemoveAt(i);
}
}
solvedOrder.Clear();
solvedOrder = lines;
}
private static void GrabSwitchFinalIndex() {
//while (qQ3afFIA__VZ15a_fC != (int) 535286808) {
for (int i = 0; i < deobCode.Length; i++) {
var current = deobCode[i];
if (current.Contains($"while ({SwitchIndexName} != ")) {
SwitchFinalIndex = int.Parse(GetStringInBetween("(int)", ")", current, false, false));
Console.WriteLine($"Switch final index = {SwitchIndexName}");
return;
}
}
}
private static void SolveCFGTree() {
solvedOrder = new List<string>();
var indexvalue = 0;
List<int> visitedBloks = new List<int>();
for (int i = 0; i < SwitchIndex; i++) {
var current = deobCode[i];
if (current.Contains($"{SwitchIndexName}")) {
if (current.Contains("(int)"))
current = current.Replace("(int)", "");
indexvalue = int.Parse(GetStringInBetween("=", ";", current, false, false));
}
}
if (!methodBlocks.ContainsKey(indexvalue))
throw new Exception($"Flow initial value is wrong, or cannot find matching case for value{indexvalue}");
label_001:
var block = methodBlocks[indexvalue];
visitedBloks.Add(indexvalue);
solvedOrder.Add(block);
if (solvedOrder.Count == switchTargetCount) {
return;
}
var blockcode = block.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
for (int i = 0; i < blockcode.Length; i++) {
var current = blockcode[i];
if (current.Contains($"{SwitchIndexName}")) {
if (current.Contains("(int)"))
current = current.Replace("(int)", "");
var param = int.Parse(GetStringInBetween("=", ";", current, false, false));
var op = GetStringInBetween(SwitchIndexName, param.ToString(), current, false, false).Replace(" ", string.Empty);
if (param == SwitchFinalIndex)
return;
switch (op) {
case "=":
indexvalue = param;
goto label_001;
case "= -":
indexvalue = -param;
goto label_001;
case "-=":
indexvalue -= param;
goto label_001;
case "-= -":
indexvalue -= -param;
goto label_001;
case "+=":
indexvalue += param;
goto label_001;
case "+= -":
indexvalue += -param;
goto label_001;
case "^=":
indexvalue ^= param;
goto label_001;
case "^= -":
indexvalue ^= -param;
goto label_001;
}
}
}
}
private static void BuildCFGGraph() {
methodBlocks = new Dictionary<int, string>();
var src = string.Join(Environment.NewLine, deobCode);
switchTargetCount = Regex.Matches(src, "case").Count;
for (int i = 0; i < switchTargetCount; i++) {
var test = GetStringInBetween("case", "break", src, true, false);
src = src.Replace(test, "//removed" + Environment.NewLine);
var id = int.Parse(GetStringInBetween("case", ":", test, false, false));
test = test.Replace($"case {id}:", string.Empty);
methodBlocks.Add(id, test);
}
}
private static void GrabSwitchLocalIndexName() {
for (int i = 0; i < deobCode.Length; i++) {
var current = deobCode[i];
if (current.Contains("while (")) {
SwitchIndexName = GetStringInBetween("while (", "!", current, false, false);
Console.WriteLine($"Switch Index Name = {SwitchIndexName}");
return;
}
}
}
private static void ReplaceMaths() {
for (int i = 0; i < deobCode.Length; i++) {
var line = deobCode[i];
if (line.Contains("Math.")) {
var splitted = line.Split(new[] { "Math." }, StringSplitOptions.None);
foreach (var item in splitted) {
if (item.Contains("sin(")) {
var itemz = item.Split(new[] { "sin(" }, StringSplitOptions.None)[1];
if (!Char.IsDigit(itemz[0])) continue;
string str = "";
var ind = 0;
var current = itemz[ind];
while (current != ')' && current != ' ') {
str += current;
ind++;
current = itemz[ind];
}
var newdouble = Convert.ToDouble(str);
var result = Math.Sin(newdouble).ToString();
obfuscatedCode = string.Join(Environment.NewLine, deobCode);
var xe = obfuscatedCode.Replace($"Math.sin({str})", $"{result}");
if (xe == obfuscatedCode) continue;
deobCode = xe.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
Console.WriteLine($"Math replaced sin({ str}) with {result}");
} else if (item.Contains("sinh(")) {
var itemz = item.Split(new[] { "sinh(" }, StringSplitOptions.None)[1];
if (!Char.IsDigit(itemz[0])) continue;
string str = "";
var ind = 0;
var current = itemz[ind];
while (current != ')' && current != ' ') {
str += current;
ind++;
current = itemz[ind];
}
var newdouble = Convert.ToDouble(str);
var result = Math.Sinh(newdouble).ToString();
obfuscatedCode = string.Join(Environment.NewLine, deobCode);
var xe = obfuscatedCode.Replace($"Math.sinh({str})", $"{result}");
if (xe == obfuscatedCode) continue;
deobCode = xe.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
Console.WriteLine($"Math replaced sinh({ str}) with {result}");
} else if (item.Contains("max(")) {
var itemz = item.Split(new[] { "max(" }, StringSplitOptions.None)[1];
if (!Char.IsDigit(itemz[0])) continue;
string str = "";
var ind = 0;
var current = itemz[ind];
while (current != ')') {
str += current;
ind++;
current = itemz[ind];
}
str = str.TrimEnd(new char[] { ',' });
var num1 = Convert.ToDouble(str.Split(new[] { ", " }, StringSplitOptions.None)[0]);
var num2 = Convert.ToDouble(str.Split(new[] { ", " }, StringSplitOptions.None)[1]);
var result = Math.Max(num1, num2).ToString();
obfuscatedCode = string.Join(Environment.NewLine, deobCode);
var xe = obfuscatedCode.Replace($"Math.max({str})", $"{result}");
if (xe == obfuscatedCode) continue;
deobCode = xe.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
Console.WriteLine($"Math replaced max({ str}) with {result}");
} else if (item.Contains("min(")) {
var itemz = item.Split(new[] { "min(" }, StringSplitOptions.None)[1];
if (!Char.IsDigit(itemz[0])) continue;
string str = "";
var ind = 0;
var current = itemz[ind];
while (current != ')') {
str += current;
ind++;
current = itemz[ind];
}
str = str.TrimEnd(new char[] { ',' });
var num1 = Convert.ToDouble(str.Split(new[] { ", " }, StringSplitOptions.None)[0]);
var num2 = Convert.ToDouble(str.Split(new[] { ", " }, StringSplitOptions.None)[1]);
var result = Math.Min(num1, num2).ToString();
obfuscatedCode = string.Join(Environment.NewLine, deobCode);
var xe = obfuscatedCode.Replace($"Math.min({str})", $"{result}");
if (xe == obfuscatedCode) continue;
deobCode = xe.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
Console.WriteLine($"Math replaced min({ str}) with {result}");
} else if (item.Contains("sqrt(")) {
var itemz = item.Split(new[] { "sqrt(" }, StringSplitOptions.None)[1];
if (!Char.IsDigit(itemz[0])) continue;
string str = "";
var ind = 0;
var current = itemz[ind];
while (current != ')' && current != ' ') {
str += current;
ind++;
current = itemz[ind];
}
var newdouble = Convert.ToDouble(str);
var result = Math.Sqrt(newdouble).ToString();
obfuscatedCode = string.Join(Environment.NewLine, deobCode);
var xe = obfuscatedCode.Replace($"Math.sqrt({str})", $"{result}");
if (xe == obfuscatedCode) continue;
deobCode = xe.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
Console.WriteLine($"Math replaced sqrt({ str}) with {result}");
} else if (item.Contains("expm1(")) {
var itemz = item.Split(new[] { "expm1(" }, StringSplitOptions.None)[1];
if (!Char.IsDigit(itemz[0])) continue;
string str = "";
var ind = 0;
var current = itemz[ind];
while (current != ')' && current != ' ') {
str += current;
ind++;
current = itemz[ind];
}
var newdouble = Convert.ToDouble(str);
var result = expm1(newdouble).ToString();
obfuscatedCode = string.Join(Environment.NewLine, deobCode);
var xe = obfuscatedCode.Replace($"Math.expm1({str})", $"{result}");
if (xe == obfuscatedCode) continue;
deobCode = xe.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
Console.WriteLine($"Math replaced expm1({ str}) with {result}");
} else if (item.Contains("cos(")) {
var itemz = item.Split(new[] { "cos(" }, StringSplitOptions.None)[1];
if (!Char.IsDigit(itemz[0])) continue;
string str = "";
var ind = 0;
var current = itemz[ind];
while (current != ')' && current != ' ') {
str += current;
ind++;
current = itemz[ind];
}
var newdouble = Convert.ToDouble(str);
var result = Math.Cos(newdouble).ToString();
obfuscatedCode = string.Join(Environment.NewLine, deobCode);
var xe = obfuscatedCode.Replace($"Math.cos({str})", $"{result}");
if (xe == obfuscatedCode) continue;
deobCode = xe.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
Console.WriteLine($"Math replaced cos({ str}) with {result}");
} else if (item.Contains("exp(")) {
var itemz = item.Split(new[] { "exp(" }, StringSplitOptions.None)[1];
if (!Char.IsDigit(itemz[0])) continue;
string str = "";
var ind = 0;
var current = itemz[ind];
while (current != ')' && current != ' ') {
str += current;
ind++;
current = itemz[ind];
}
var newdouble = Convert.ToDouble(str);
var result = Math.Exp(newdouble).ToString();
obfuscatedCode = string.Join(Environment.NewLine, deobCode);
var xe = obfuscatedCode.Replace($"Math.exp({str})", $"{result}");
if (xe == obfuscatedCode) continue;
deobCode = xe.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
Console.WriteLine($"Math replaced exp({ str}) with {result}");
}
}
}
}
}
private static void ReplaceCast() {
for (int i = 0; i < deobCode.Length; i++) {
var line = deobCode[i];
if(line.Contains("(int) (")){
foreach (var item in line.Split(new[] { "(int) (" }, StringSplitOptions.None)) {
if (!Char.IsDigit(item[0])) continue;
string str = "";
var ind = 0;
var current = item[ind];
while (current != ')' && current != ' ') {
str += current;
ind++;
current = item[ind];
}
var newdouble = Convert.ToDouble(str);
var toreplace = (int)newdouble;
obfuscatedCode = string.Join(Environment.NewLine, deobCode);
var xe = obfuscatedCode.Replace($"(int) ({str})", $"{toreplace}");
if (xe == obfuscatedCode) continue;
deobCode = xe.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
Console.WriteLine($"(int) cast replaced (int)({ str}) with {toreplace}");
}
}
}
}
private static int GrabSwitchIndex() {
for (int i = 0; i < deobCode.Length -1; i++) {
if (deobCode[i].Contains("while") && deobCode[i+1].Contains("switch")) {
return i;
}
}
throw new Exception("Cannot find switch index");
}
private static void ReplaceArrayContent() {
foreach (var item in dic_double_array) {
var name = item.Key;
for (int i = 0; i < item.Value.Length; i++) {
var value = item.Value;
obfuscatedCode = string.Join(Environment.NewLine, deobCode);
var xe = obfuscatedCode.Replace($"{name}[{i}]", $"{value[i]}");
if (xe == obfuscatedCode) continue;
deobCode = xe.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
Console.WriteLine($"double[] replaced {name}[{i}] with {value[i]}");
ReplaceCast();
ReplaceArrayContent();
ReplaceCast();
}
}
foreach (var item in dic_int_array) {
var name = item.Key;
for (int i = 0; i < item.Value.Length; i++) {
var value = item.Value;
obfuscatedCode = string.Join(Environment.NewLine, deobCode);
var xe = obfuscatedCode.Replace($"{name}[{i}]", $"{value[i]}");
if (xe == obfuscatedCode) continue;
deobCode = xe.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
Console.WriteLine($"int[] replaced {name}[{i}] with {value[i]}");
ReplaceCast();
ReplaceArrayContent();
ReplaceCast();
}
}
}
private static void GrabArrayContent() {
for (int i = 0; i < SwitchIndex; i++) {
if (!deobCode[i].Contains("="))
continue;
var value = GetStringInBetween("{", "}", deobCode[i], false, false);
if (value is null)
continue;
var name = GetStringInBetween("[]", "=", deobCode[i], false, false).Trim();
if (deobCode[i].Contains("int[]")) {
List<int> tmp1 = new List<int>();
foreach (var item in value.Split(',')) {
var itemm = item.Trim();
if (itemm.Contains("0x")) {
int intValue = Convert.ToInt32(itemm, 16);
tmp1.Add(intValue);
} else {
tmp1.Add(int.Parse(item.Trim()));
}
}
dic_int_array.Add(name, tmp1.ToArray());
} else if (deobCode[i].Contains("double[]")) {
List<double> tmp1 = new List<double>();
foreach (var item in value.Split(',')) {
var v = item.Replace(".", ",").Trim();
var temp = ConvertToDouble(v);
tmp1.Add(temp);
}
dic_double_array.Add(name, tmp1.ToArray());
}
}
}
static double expm1(double x) {
if (Math.Abs(x) < 1e-5)
return x + 0.5 * x * x;
else
return Math.Exp(x) - 1.0;
}
public static IEnumerable<int> AllIndexesOf(string str, string searchstring) {
int minIndex = str.IndexOf(searchstring);
while (minIndex != -1) {
yield return minIndex;
minIndex = str.IndexOf(searchstring, minIndex + searchstring.Length);
}
}
public static double ConvertToDouble(string s) {
char systemSeparator = Thread.CurrentThread.CurrentCulture.NumberFormat.CurrencyDecimalSeparator[0];
double result = 0;
try {
if (s != null)
if (!s.Contains(","))
result = double.Parse(s, CultureInfo.InvariantCulture);
else
result = Convert.ToDouble(s.Replace(".", systemSeparator.ToString()).Replace(",", systemSeparator.ToString()));
} catch (Exception e) {
try {
result = Convert.ToDouble(s);
} catch {
try {
result = Convert.ToDouble(s.Replace(",", ";").Replace(".", ",").Replace(";", "."));
} catch {
throw new Exception("Wrong string-to-double format");
}
}
}
return result;
}
public static string GetStringInBetween(string strBegin, string strEnd, string strSource, bool includeBegin,
bool includeEnd) {
string[] result = { string.Empty, string.Empty };
int iIndexOfBegin = strSource.IndexOf(strBegin);
if (iIndexOfBegin != -1) {
// include the Begin string if desired
if (includeBegin)
iIndexOfBegin -= strBegin.Length;
strSource = strSource.Substring(iIndexOfBegin + strBegin.Length);
int iEnd = strSource.IndexOf(strEnd);
if (iEnd != -1) {
// include the End string if desired
if (includeEnd)
iEnd += strEnd.Length;
result[0] = strSource.Substring(0, iEnd);
// advance beyond this segment
if (iEnd + strEnd.Length < strSource.Length)
result[1] = strSource.Substring(iEnd + strEnd.Length);
}
} else
// stay where we are
result[1] = strSource;
return result[0];
}
public class Evaluator
{
public CompilerParameters Parameters { get; set; } = new CompilerParameters() {
CompilerOptions = "/unsafe",
};
public Evaluator() {
Parameters.ReferencedAssemblies.Add("System.dll");
Parameters.ReferencedAssemblies.Add("System.Core.dll");
Parameters.ReferencedAssemblies.Add("Microsoft.CSharp.dll");
Parameters.GenerateInMemory = true;
}
public CompilerResults Compile(string methodCode) {
return new CSharpCodeProvider().CompileAssemblyFromSource(Parameters, methodCode);
}
public int EvaluateExpression(string expression) {
if (!expression.EndsWith(";")) {
expression += ";";
}
string code = $@"
public class A{{
public static int B() {{
int result = {expression}
return result;
}}
}}
";
var results = Compile(code);
if (results.Errors.Count > 0)
throw new Exception("Error during expression evaluation");
var methodInfo = results.CompiledAssembly.GetTypes().Single(
t => t.GetMethods().Count() > 0
&& t.GetMethods().Count(m => m.ReturnParameter.ParameterType == typeof(int)) > 0
&& t.GetMethods().Count(m => m.Name == "B") > 0)
.GetMethods()[0];
var mResult = (int)methodInfo.Invoke(null, null);
return mResult;
}
public string EvaluateString(string expression, string variableName) {
expression = expression.Replace("String", "string");
string code = $@"
public class A{{
public static string B() {{
{expression}
return {variableName};
}}
}}
";
var results = Compile(code);
if (results.Errors.Count > 0)
throw new Exception("Error during expression evaluation");
var methodInfo = results.CompiledAssembly.GetTypes().Single(
t => t.GetMethods().Count() > 0
&& t.GetMethods().Count(m => m.ReturnParameter.ParameterType == typeof(int)) > 0
&& t.GetMethods().Count(m => m.Name == "B") > 0)
.GetMethods()[0];
var mResult = (string)methodInfo.Invoke(null, null);
return mResult;
}
}
}
}
@XenocodeRCE
Copy link
Copy Markdown
Author

output :


int[] replaced var_3478[0] with 8
int[] replaced var_3478[1] with 3
int[] replaced var_3478[2] with 14
int[] replaced var_3478[3] with 17
int[] replaced var_3478[4] with 4
int[] replaced var_3478[5] with 0
int[] replaced var_3478[6] with 21
int[] replaced var_3478[7] with 12
int[] replaced var_3478[8] with 10
int[] replaced var_3478[9] with 22
int[] replaced var_3478[10] with 13
int[] replaced var_3478[11] with 5
int[] replaced var_3478[12] with 11
int[] replaced var_3478[13] with 6
int[] replaced var_3478[14] with 20
int[] replaced var_3478[15] with 2
int[] replaced var_3478[16] with 1
int[] replaced var_3478[17] with 19
int[] replaced var_3478[18] with 9
int[] replaced var_3478[19] with 7
int[] replaced var_3478[20] with 16
int[] replaced var_3478[21] with 18
int[] replaced var_3478[22] with 15
int[] replaced var_48[0] with 15
double[] replaced WOTZCG[15] with 14,0618579884658
(int) cast replaced (int)(14,0618579884658) with 14
int[] replaced var_48[1] with 14
double[] replaced WOTZCG[14] with 21,2827371335097
(int) cast replaced (int)(21,2827371335097) with 21
int[] replaced var_48[2] with 8
double[] replaced WOTZCG[8] with 16,2257672317267
(int) cast replaced (int)(16,2257672317267) with 16
int[] replaced var_48[3] with 10
double[] replaced WOTZCG[10] with 8,25439937182704
(int) cast replaced (int)(8,25439937182704) with 8
int[] replaced var_48[4] with 19
double[] replaced WOTZCG[19] with 13,0836622535079
(int) cast replaced (int)(13,0836622535079) with 13
int[] replaced var_48[5] with 9
double[] replaced WOTZCG[9] with 10,2466424072627
(int) cast replaced (int)(10,2466424072627) with 10
int[] replaced var_48[6] with 3
double[] replaced WOTZCG[3] with 7,91234262199508
(int) cast replaced (int)(7,91234262199508) with 7
int[] replaced var_48[7] with 1
double[] replaced WOTZCG[1] with 11,4813280007767
(int) cast replaced (int)(11,4813280007767) with 11
int[] replaced var_48[8] with 6
double[] replaced WOTZCG[6] with 15,5214055050782
(int) cast replaced (int)(15,5214055050782) with 15
int[] replaced var_48[9] with 7
double[] replaced WOTZCG[7] with 9,40466383499151
(int) cast replaced (int)(9,40466383499151) with 9
int[] replaced var_48[10] with 21
double[] replaced WOTZCG[21] with 22,1104195095683
(int) cast replaced (int)(22,1104195095683) with 22
int[] replaced var_48[11] with 22
double[] replaced WOTZCG[22] with 12,4934624261295
(int) cast replaced (int)(12,4934624261295) with 12
int[] replaced var_48[12] with 0
double[] replaced WOTZCG[0] with 18,0840937741464
(int) cast replaced (int)(18,0840937741464) with 18
int[] replaced var_48[13] with 17
double[] replaced WOTZCG[17] with 1,63790812538508
(int) cast replaced (int)(1,63790812538508) with 1
int[] replaced var_48[14] with 5
double[] replaced WOTZCG[5] with 17,0662594113444
(int) cast replaced (int)(17,0662594113444) with 17
int[] replaced var_48[15] with 2
double[] replaced WOTZCG[2] with 6,25767347865484
(int) cast replaced (int)(6,25767347865484) with 6
int[] replaced var_48[16] with 4
double[] replaced WOTZCG[4] with 4,42302427107913
(int) cast replaced (int)(4,42302427107913) with 4
int[] replaced var_48[17] with 18
double[] replaced WOTZCG[18] with 0,722826788866883
(int) cast replaced (int)(0,722826788866883) with 0
int[] replaced var_48[18] with 13
double[] replaced WOTZCG[13] with 19,467555820209
(int) cast replaced (int)(19,467555820209) with 19
int[] replaced var_48[19] with 11
double[] replaced WOTZCG[11] with 20,4910646013497
(int) cast replaced (int)(20,4910646013497) with 20
int[] replaced var_48[20] with 20
double[] replaced WOTZCG[20] with 2,03588746817564
(int) cast replaced (int)(2,03588746817564) with 2
int[] replaced var_48[21] with 16
double[] replaced WOTZCG[16] with 5,76917631383755
(int) cast replaced (int)(5,76917631383755) with 5
int[] replaced var_48[22] with 12
double[] replaced WOTZCG[12] with 3,09040557278664
(int) cast replaced (int)(3,09040557278664) with 3
int[] replaced Ppg4Z_o7Iq_S6S3Pc2n_7DD[0] with 15
int[] replaced Ppg4Z_o7Iq_S6S3Pc2n_7DD[1] with 0
int[] replaced Ppg4Z_o7Iq_S6S3Pc2n_7DD[2] with 17
int[] replaced Ppg4Z_o7Iq_S6S3Pc2n_7DD[3] with 20
int[] replaced Ppg4Z_o7Iq_S6S3Pc2n_7DD[4] with 13
int[] replaced Ppg4Z_o7Iq_S6S3Pc2n_7DD[5] with 16
int[] replaced Ppg4Z_o7Iq_S6S3Pc2n_7DD[6] with 4
int[] replaced Ppg4Z_o7Iq_S6S3Pc2n_7DD[7] with 21
int[] replaced Ppg4Z_o7Iq_S6S3Pc2n_7DD[8] with 12
int[] replaced Ppg4Z_o7Iq_S6S3Pc2n_7DD[9] with 18
int[] replaced Ppg4Z_o7Iq_S6S3Pc2n_7DD[10] with 11
int[] replaced Ppg4Z_o7Iq_S6S3Pc2n_7DD[11] with 5
int[] replaced Ppg4Z_o7Iq_S6S3Pc2n_7DD[12] with 22
int[] replaced Ppg4Z_o7Iq_S6S3Pc2n_7DD[13] with 19
int[] replaced Ppg4Z_o7Iq_S6S3Pc2n_7DD[14] with 7
int[] replaced Ppg4Z_o7Iq_S6S3Pc2n_7DD[15] with 8
int[] replaced Ppg4Z_o7Iq_S6S3Pc2n_7DD[16] with 6
int[] replaced Ppg4Z_o7Iq_S6S3Pc2n_7DD[17] with 1
int[] replaced Ppg4Z_o7Iq_S6S3Pc2n_7DD[18] with 14
int[] replaced Ppg4Z_o7Iq_S6S3Pc2n_7DD[19] with 10
int[] replaced Ppg4Z_o7Iq_S6S3Pc2n_7DD[20] with 9
int[] replaced Ppg4Z_o7Iq_S6S3Pc2n_7DD[21] with 3
int[] replaced Ppg4Z_o7Iq_S6S3Pc2n_7DD[22] with 2
int[] replaced WAfQ60_6WCw7XySqS_[0] with 5
double[] replaced QDDBGNAX_YGXFAGVX[5] with 14,5131244265909
(int) cast replaced (int)(14,5131244265909) with 14
double[] replaced qA9Wf_wWZ4_B_XS4p[14] with 1383712855,24053
int[] replaced WAfQ60_6WCw7XySqS_[1] with 19
double[] replaced QDDBGNAX_YGXFAGVX[19] with 20,0162802031679
(int) cast replaced (int)(20,0162802031679) with 20
double[] replaced qA9Wf_wWZ4_B_XS4p[20] with 30776140,9854
int[] replaced WAfQ60_6WCw7XySqS_[2] with 7
double[] replaced QDDBGNAX_YGXFAGVX[7] with 2,79797018231503
(int) cast replaced (int)(2,79797018231503) with 2
double[] replaced qA9Wf_wWZ4_B_XS4p[2] with 6,24417
int[] replaced WAfQ60_6WCw7XySqS_[3] with 15
double[] replaced QDDBGNAX_YGXFAGVX[15] with 9,85214113372592
(int) cast replaced (int)(9,85214113372592) with 9
double[] replaced qA9Wf_wWZ4_B_XS4p[9] with 182539389
int[] replaced WAfQ60_6WCw7XySqS_[4] with 18
double[] replaced QDDBGNAX_YGXFAGVX[18] with 0,808804542592216
(int) cast replaced (int)(0,808804542592216) with 0
double[] replaced qA9Wf_wWZ4_B_XS4p[0] with 1290103987
int[] replaced WAfQ60_6WCw7XySqS_[5] with 11
double[] replaced QDDBGNAX_YGXFAGVX[11] with 10,5686146764338
(int) cast replaced (int)(10,5686146764338) with 10
double[] replaced qA9Wf_wWZ4_B_XS4p[10] with 2,98644
int[] replaced WAfQ60_6WCw7XySqS_[6] with 14
double[] replaced QDDBGNAX_YGXFAGVX[14] with 22,7170935536049
(int) cast replaced (int)(22,7170935536049) with 22
double[] replaced qA9Wf_wWZ4_B_XS4p[22] with 257,50012
int[] replaced WAfQ60_6WCw7XySqS_[7] with 2
double[] replaced QDDBGNAX_YGXFAGVX[2] with 11,5513950664614
(int) cast replaced (int)(11,5513950664614) with 11
double[] replaced qA9Wf_wWZ4_B_XS4p[11] with 1550,8451
int[] replaced WAfQ60_6WCw7XySqS_[8] with 12
double[] replaced QDDBGNAX_YGXFAGVX[12] with 3,4709886039232
(int) cast replaced (int)(3,4709886039232) with 3
double[] replaced qA9Wf_wWZ4_B_XS4p[3] with 257917589,08104
int[] replaced WAfQ60_6WCw7XySqS_[9] with 8
double[] replaced QDDBGNAX_YGXFAGVX[8] with 18,9894385771053
(int) cast replaced (int)(18,9894385771053) with 18
double[] replaced qA9Wf_wWZ4_B_XS4p[18] with 1071309613,7809
int[] replaced WAfQ60_6WCw7XySqS_[10] with 6
double[] replaced QDDBGNAX_YGXFAGVX[6] with 12,6639940380401
(int) cast replaced (int)(12,6639940380401) with 12
double[] replaced qA9Wf_wWZ4_B_XS4p[12] with 0,04581
int[] replaced WAfQ60_6WCw7XySqS_[11] with 21
double[] replaced QDDBGNAX_YGXFAGVX[21] with 19,4454233461889
(int) cast replaced (int)(19,4454233461889) with 19
double[] replaced qA9Wf_wWZ4_B_XS4p[19] with 101506437,40104
int[] replaced WAfQ60_6WCw7XySqS_[12] with 13
double[] replaced QDDBGNAX_YGXFAGVX[13] with 1,1429810579011
(int) cast replaced (int)(1,1429810579011) with 1
double[] replaced qA9Wf_wWZ4_B_XS4p[1] with 1694910337,84547
int[] replaced WAfQ60_6WCw7XySqS_[13] with 0
double[] replaced QDDBGNAX_YGXFAGVX[0] with 5,64336290011137
(int) cast replaced (int)(5,64336290011137) with 5
double[] replaced qA9Wf_wWZ4_B_XS4p[5] with 129303186,26904
int[] replaced WAfQ60_6WCw7XySqS_[14] with 10
double[] replaced QDDBGNAX_YGXFAGVX[10] with 16,6329361653025
(int) cast replaced (int)(16,6329361653025) with 16
double[] replaced qA9Wf_wWZ4_B_XS4p[16] with 390196108
int[] replaced WAfQ60_6WCw7XySqS_[15] with 1
double[] replaced QDDBGNAX_YGXFAGVX[1] with 15,6168100683319
(int) cast replaced (int)(15,6168100683319) with 15
double[] replaced qA9Wf_wWZ4_B_XS4p[15] with 946513270,07304
int[] replaced WAfQ60_6WCw7XySqS_[16] with 22
double[] replaced QDDBGNAX_YGXFAGVX[22] with 6,18966262431692
(int) cast replaced (int)(6,18966262431692) with 6
double[] replaced qA9Wf_wWZ4_B_XS4p[6] with 0,70829
int[] replaced WAfQ60_6WCw7XySqS_[17] with 17
double[] replaced QDDBGNAX_YGXFAGVX[17] with 7,11648769965335
(int) cast replaced (int)(7,11648769965335) with 7
double[] replaced qA9Wf_wWZ4_B_XS4p[7] with 0,0458
int[] replaced WAfQ60_6WCw7XySqS_[18] with 4
double[] replaced QDDBGNAX_YGXFAGVX[4] with 17,6759709434403
(int) cast replaced (int)(17,6759709434403) with 17
double[] replaced qA9Wf_wWZ4_B_XS4p[17] with 535286808
int[] replaced WAfQ60_6WCw7XySqS_[19] with 9
double[] replaced QDDBGNAX_YGXFAGVX[9] with 13,8396513135408
(int) cast replaced (int)(13,8396513135408) with 13
double[] replaced qA9Wf_wWZ4_B_XS4p[13] with 12,8323
int[] replaced WAfQ60_6WCw7XySqS_[20] with 3
double[] replaced QDDBGNAX_YGXFAGVX[3] with 4,72773135857041
(int) cast replaced (int)(4,72773135857041) with 4
double[] replaced qA9Wf_wWZ4_B_XS4p[4] with 1005129723,10615
int[] replaced WAfQ60_6WCw7XySqS_[21] with 20
double[] replaced QDDBGNAX_YGXFAGVX[20] with 8,8982293063219
(int) cast replaced (int)(8,8982293063219) with 8
double[] replaced qA9Wf_wWZ4_B_XS4p[8] with 2
int[] replaced WAfQ60_6WCw7XySqS_[22] with 16
double[] replaced QDDBGNAX_YGXFAGVX[16] with 21,9047248146332
(int) cast replaced (int)(21,9047248146332) with 21
double[] replaced qA9Wf_wWZ4_B_XS4p[21] with 0
Math replaced sin(0,04581) with 0,0457939792052957
Math replaced sinh(6,24417) with 257,499827209547
Math replaced max(30776140,9854, 182539389) with 182539389
Math replaced max(535286808, 101506437,40104) with 535286808
Math replaced sqrt(1005129723,10615) with 31703,7808960722
Math replaced expm1(12,8323) with 374107,07303932
Math replaced max(390196108, 129303186,26904) with 390196108
Math replaced min(1550,8451, 2) with 2
Math replaced sin(2,98644) with 0,154530920998719
Math replaced max(257917589,08104, 1290103987) with 1290103987
Math replaced cos(0,70829) with 0,759475402433027
Switch Index Name = qQ3afFIA__VZ15a_fC
Switch final index = qQ3afFIA__VZ15a_fC
switch replaced(        int qQ3afFIA__VZ15a_fC = (int) (0,0457939792052957 + -0,0458);) with 0
switch replaced(        qQ3afFIA__VZ15a_fC = (int) 182539389;) with 182539389
switch replaced(                    qQ3afFIA__VZ15a_fC = (int) (1071309613,7809 - 31703,7808960722);) with 1071277910
switch replaced(                    qQ3afFIA__VZ15a_fC -= -(int) (946513270,07304 - 374107,07303932);) with 946139163
switch replaced(                    qQ3afFIA__VZ15a_fC -= -(int) 390196108;) with 390196108
switch replaced(                    qQ3afFIA__VZ15a_fC ^= (int) (1694910337,84547 + 0,154530920998719);) with 1694910338
switch replaced(                    qQ3afFIA__VZ15a_fC ^= (int) 1290103987;) with 1290103987
switch replaced(                    qQ3afFIA__VZ15a_fC ^= (int) (1383712855,24053 + 0,759475402433027);) with 1383712856
 int[] var_3478 = { 8, 3, 14, 17, 4, 0, 21, 12, 10, 22, 13, 5, 11, 6, 20, 2, 1, 19, 9, 7, 16, 18, 15 };
        int[] var_48 = { 15, 14, 8, 10, 19, 9, 3, 1, 6, 7, 21, 22, 0, 17, 5, 2, 4, 18, 13, 11, 20, 16, 12 };
        double[] WOTZCG = { 18.084093774146382, 11.481328000776687, 6.25767347865484, 7.9123426219950845, 4.423024271079128, 17.066259411344387, 15.521405505078203, 9.404663834991512, 16.225767231726685, 10.246642407262673, 8.254399371827038, 20.491064601349656, 3.0904055727866364, 19.467555820208982, 21.282737133509713, 14.061857988465798, 5.769176313837545, 1.6379081253850827, 0.7228267888668826, 13.083662253507905, 2.0358874681756434, 22.11041950956832, 12.493462426129476 };
        int[] Ppg4Z_o7Iq_S6S3Pc2n_7DD = { 15, 0, 17, 20, 13, 16, 4, 21, 12, 18, 11, 5, 22, 19, 7, 8, 6, 1, 14, 10, 9, 3, 2 };
        int[] WAfQ60_6WCw7XySqS_ = { 5, 19, 7, 15, 18, 11, 14, 2, 12, 8, 6, 21, 13, 0, 10, 1, 22, 17, 4, 9, 3, 20, 16 };
        double[] QDDBGNAX_YGXFAGVX = { 5.6433629001113745, 15.616810068331857, 11.551395066461364, 4.727731358570409, 17.675970943440255, 14.51312442659091, 12.663994038040064, 2.79797018231503, 18.989438577105265, 13.839651313540829, 16.63293616530254, 10.568614676433752, 3.470988603923196, 1.1429810579011037, 22.717093553604883, 9.852141133725922, 21.904724814633237, 7.116487699653353, 0.8088045425922157, 20.016280203167902, 8.898229306321904, 19.445423346188882, 6.189662624316919 };
        double[] qA9Wf_wWZ4_B_XS4p = { 1.290103987E9, 1.69491033784547E9, 6.24417, 2.5791758908104E8, 1.00512972310615E9, 1.2930318626904E8, 0.70829, 0.0458, 2.0, 1.82539389E8, 2.98644, 1550.8451, 0.04581, 12.8323, 1.38371285524053E9, 9.4651327007304E8, 3.90196108E8, 5.35286808E8, 1.0713096137809E9, 1.0150643740104E8, 3.07761409854E7, 0.0, 257.50012 };
        int qQ3afFIA__VZ15a_fC = (int)0;
        int var_335 = (int) (257,499827209547 + -257,50012);
        double NVXTYU_EGSTGZZO = 0, fJjboumsjkNqkhjcnfHcftk = 0;
        double YTZLE_VQWKAZWMFE = 0;
        qQ3afFIA__VZ15a_fC = (int)182539389;
        while (qQ3afFIA__VZ15a_fC != (int) 535286808) {
            switch(qQ3afFIA__VZ15a_fC) {
                case 2120820969:
                    for (double ZHSHCP_SEQGYOJPY : numArray) {
                        NVXTYU_EGSTGZZO += ZHSHCP_SEQGYOJPY;
                    }
                    qQ3afFIA__VZ15a_fC = (int)1071277910;
                    break;
                case 1174681806:
                    var_335 = numArray.length;
                    qQ3afFIA__VZ15a_fC -= -(int)946139163;
                    break;
                case 145090700:
                    qQ3afFIA__VZ15a_fC -= -(int)390196108;
                    break;
                case 1839443726:
                    for (double g_aFsefwlpm : numArray) {
                        fJjboumsjkNqkhjcnfHcftk += Math.pow(g_aFsefwlpm - YTZLE_VQWKAZWMFE, (int) 2);
                    }
                    qQ3afFIA__VZ15a_fC ^= (int)1694910338;
                    break;
                case 182539389:
                    fJjboumsjkNqkhjcnfHcftk = 0;
                    qQ3afFIA__VZ15a_fC ^= (int)1290103987;
                    break;
                case 1071277910:
                    YTZLE_VQWKAZWMFE = NVXTYU_EGSTGZZO / var_335;
                    qQ3afFIA__VZ15a_fC ^= (int)1383712856;
                    break;
            }
        }
        return Math.sqrt(fJjboumsjkNqkhjcnfHcftk / var_335);

===

                    fJjboumsjkNqkhjcnfHcftk = 0;


                    var_335 = numArray.length;


                    for (double ZHSHCP_SEQGYOJPY : numArray) {
                        NVXTYU_EGSTGZZO += ZHSHCP_SEQGYOJPY;
                    }


                    YTZLE_VQWKAZWMFE = NVXTYU_EGSTGZZO / var_335;


                    for (double g_aFsefwlpm : numArray) {
                        fJjboumsjkNqkhjcnfHcftk += Math.pow(g_aFsefwlpm - YTZLE_VQWKAZWMFE, (int) 2);
                    }



===


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment