274 lines
5.8 KiB
C#
274 lines
5.8 KiB
C#
using System;
|
|
using System.IO;
|
|
using System.Runtime.InteropServices;
|
|
using PluginSDK.Interfaces;
|
|
using ProtoBuf;
|
|
using WHtonEnRQ3TyPp1lZXF;
|
|
|
|
namespace PluginSDK;
|
|
|
|
[ComVisible(false)]
|
|
public static class Serialization
|
|
{
|
|
internal static Serialization QmBRb7LiZdPAAWaWuqd;
|
|
|
|
internal static byte[] Ev3No9Wbt(object P_0)
|
|
{
|
|
int num = 2;
|
|
MemoryStream memoryStream = default(MemoryStream);
|
|
int num4 = default(int);
|
|
byte[] result = default(byte[]);
|
|
int num6 = default(int);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
while (true)
|
|
{
|
|
switch (num2)
|
|
{
|
|
default:
|
|
goto IL_0014;
|
|
case 1:
|
|
try
|
|
{
|
|
Serializer.Serialize((Stream)memoryStream, (IPacket)P_0);
|
|
int num3 = 1;
|
|
if (_003CModule_003E_007Bcc855980_002Dbf4d_002D4da3_002D96c7_002D14d69de0c9ee_007D.m_271cb415f2384f7a8af2439f61d79e09.m_6651f8592e684e849da751d50852d553 == 0)
|
|
{
|
|
num3 = 6;
|
|
}
|
|
while (true)
|
|
{
|
|
switch (num3)
|
|
{
|
|
default:
|
|
if (num4 == 990)
|
|
{
|
|
num3 = num4;
|
|
continue;
|
|
}
|
|
break;
|
|
case 1:
|
|
memoryStream.Position = 0L;
|
|
num3 = 0;
|
|
if (_003CModule_003E_007Bcc855980_002Dbf4d_002D4da3_002D96c7_002D14d69de0c9ee_007D.m_271cb415f2384f7a8af2439f61d79e09.m_f25311c256b24afb83430c7b2ff15b49 == 0)
|
|
{
|
|
num3 = 6;
|
|
}
|
|
continue;
|
|
case 0:
|
|
break;
|
|
case 2:
|
|
goto end_IL_0048;
|
|
}
|
|
result = Hs1p7bnIKthS4T2pSI7.mXDnCAbl6k(memoryStream.ToArray());
|
|
num3 = 2;
|
|
continue;
|
|
end_IL_0048:
|
|
break;
|
|
}
|
|
}
|
|
finally
|
|
{
|
|
int num5;
|
|
if (memoryStream == null)
|
|
{
|
|
num5 = 2;
|
|
goto IL_00a9;
|
|
}
|
|
goto IL_00c8;
|
|
IL_00c8:
|
|
((IDisposable)memoryStream).Dispose();
|
|
num5 = 4;
|
|
if (_003CModule_003E_007Bcc855980_002Dbf4d_002D4da3_002D96c7_002D14d69de0c9ee_007D.m_271cb415f2384f7a8af2439f61d79e09.m_26f406ee7475415ea8607e0d9d8ee024 == 0)
|
|
{
|
|
num5 = 1;
|
|
}
|
|
goto IL_00a9;
|
|
IL_00a9:
|
|
while (true)
|
|
{
|
|
switch (num5)
|
|
{
|
|
default:
|
|
if (num6 == 990)
|
|
{
|
|
goto IL_00a7;
|
|
}
|
|
goto end_IL_00a9;
|
|
case 0:
|
|
break;
|
|
case 2:
|
|
goto end_IL_00a9;
|
|
case 1:
|
|
goto end_IL_00a9;
|
|
}
|
|
goto IL_00c8;
|
|
IL_00a7:
|
|
num5 = num6;
|
|
continue;
|
|
end_IL_00a9:
|
|
break;
|
|
}
|
|
}
|
|
break;
|
|
case 2:
|
|
memoryStream = new MemoryStream();
|
|
num2 = 1;
|
|
if (_003CModule_003E_007Bcc855980_002Dbf4d_002D4da3_002D96c7_002D14d69de0c9ee_007D.m_271cb415f2384f7a8af2439f61d79e09.m_bdeabfc7dc3c456c87949484ef8ce8c5 == 0)
|
|
{
|
|
num2 = 4;
|
|
}
|
|
continue;
|
|
case 0:
|
|
break;
|
|
}
|
|
goto IL_012a;
|
|
IL_0014:
|
|
if (num == 990)
|
|
{
|
|
break;
|
|
}
|
|
goto IL_012a;
|
|
IL_012a:
|
|
return result;
|
|
}
|
|
}
|
|
}
|
|
|
|
public static IPacket PacketDesirialize(byte[] data)
|
|
{
|
|
int num = 1;
|
|
MemoryStream memoryStream = default(MemoryStream);
|
|
int num4 = default(int);
|
|
IPacket result = default(IPacket);
|
|
int num6 = default(int);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
while (true)
|
|
{
|
|
switch (num2)
|
|
{
|
|
default:
|
|
if (num == 990)
|
|
{
|
|
goto end_IL_0003;
|
|
}
|
|
goto case 0;
|
|
case 1:
|
|
memoryStream = new MemoryStream(Hs1p7bnIKthS4T2pSI7.QSUnNKj0pb(data));
|
|
num2 = 0;
|
|
if (_003CModule_003E_007Bcc855980_002Dbf4d_002D4da3_002D96c7_002D14d69de0c9ee_007D.m_271cb415f2384f7a8af2439f61d79e09.m_ba76871b56e54f669cda2d26609cc5b4 == 0)
|
|
{
|
|
num2 = 5;
|
|
}
|
|
continue;
|
|
case 0:
|
|
try
|
|
{
|
|
memoryStream.Position = 0L;
|
|
int num3 = 6;
|
|
if (_003CModule_003E_007Bcc855980_002Dbf4d_002D4da3_002D96c7_002D14d69de0c9ee_007D.m_271cb415f2384f7a8af2439f61d79e09.m_1b3d64cf90d3478ea689f41ea1de0e20 != 0)
|
|
{
|
|
num3 = 1;
|
|
}
|
|
while (true)
|
|
{
|
|
switch (num3)
|
|
{
|
|
default:
|
|
if (num4 == 989)
|
|
{
|
|
num3 = num4;
|
|
continue;
|
|
}
|
|
break;
|
|
case 1:
|
|
break;
|
|
case 0:
|
|
goto end_IL_0066;
|
|
}
|
|
result = Serializer.Deserialize<IPacket>(memoryStream);
|
|
num3 = 7;
|
|
if (_003CModule_003E_007Bcc855980_002Dbf4d_002D4da3_002D96c7_002D14d69de0c9ee_007D.m_271cb415f2384f7a8af2439f61d79e09.m_c29de6cf9a314eb89482fe4c2290bc42 == 0)
|
|
{
|
|
num3 = 0;
|
|
}
|
|
continue;
|
|
end_IL_0066:
|
|
break;
|
|
}
|
|
}
|
|
finally
|
|
{
|
|
int num5;
|
|
if (memoryStream == null)
|
|
{
|
|
num5 = 1;
|
|
if (_003CModule_003E_007Bcc855980_002Dbf4d_002D4da3_002D96c7_002D14d69de0c9ee_007D.m_271cb415f2384f7a8af2439f61d79e09.m_94e78e0769e54be39e13ceab800bcc0d != 0)
|
|
{
|
|
num5 = 3;
|
|
}
|
|
goto IL_00c4;
|
|
}
|
|
goto IL_00e3;
|
|
IL_00c4:
|
|
while (true)
|
|
{
|
|
switch (num5)
|
|
{
|
|
default:
|
|
if (num6 == 990)
|
|
{
|
|
goto IL_00c2;
|
|
}
|
|
break;
|
|
case 2:
|
|
break;
|
|
case 1:
|
|
goto end_IL_00c4;
|
|
case 0:
|
|
goto end_IL_00c4;
|
|
}
|
|
goto IL_00e3;
|
|
IL_00c2:
|
|
num5 = num6;
|
|
continue;
|
|
end_IL_00c4:
|
|
break;
|
|
}
|
|
goto end_IL_009d;
|
|
IL_00e3:
|
|
((IDisposable)memoryStream).Dispose();
|
|
num5 = 3;
|
|
if (_003CModule_003E_007Bcc855980_002Dbf4d_002D4da3_002D96c7_002D14d69de0c9ee_007D.m_271cb415f2384f7a8af2439f61d79e09.m_9dfdbeb3592e4807b15dd3a37534d3a2 != 0)
|
|
{
|
|
num5 = 0;
|
|
}
|
|
goto IL_00c4;
|
|
end_IL_009d:;
|
|
}
|
|
break;
|
|
case 2:
|
|
break;
|
|
}
|
|
return result;
|
|
continue;
|
|
end_IL_0003:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
internal static bool Gshd9ULnCkmtcydk5oS()
|
|
{
|
|
return QmBRb7LiZdPAAWaWuqd == null;
|
|
}
|
|
|
|
internal static Serialization wapt5lLmIxcLWIKTT2K()
|
|
{
|
|
return QmBRb7LiZdPAAWaWuqd;
|
|
}
|
|
}
|