接入obfuz->3.0

This commit is contained in:
Alex-Rachel
2025-07-26 18:16:16 +08:00
parent cb86d8868e
commit c8482799c5
414 changed files with 572 additions and 25113 deletions

View File

@@ -1,6 +1,9 @@
using System.Collections.Generic;
using System.Reflection;
using GameLogic;
#if ENABLE_OBFUZ
using Obfuz;
#endif
using TEngine;
#pragma warning disable CS0436
@@ -8,6 +11,9 @@ using TEngine;
/// <summary>
/// 游戏App。
/// </summary>
#if ENABLE_OBFUZ
[ObfuzIgnore]
#endif
public partial class GameApp
{
private static List<Assembly> _hotfixAssembly;
@@ -23,12 +29,13 @@ public partial class GameApp
Log.Warning("======= 看到此条日志代表你成功运行了热更新代码 =======");
Log.Warning("======= Entrance GameApp =======");
Utility.Unity.AddDestroyListener(Release);
Log.Warning("======= StartGameLogic =======");
StartGameLogic();
}
private static void StartGameLogic()
{
GameEvent.Get<ILoginUI>().ShowLoginUI();
// GameEvent.Get<ILoginUI>().ShowLoginUI();
GameModule.UI.ShowUIAsync<BattleMainUI>();
}

View File

@@ -10,7 +10,8 @@
"GUID:47f9fc774596be54ebfed7739cd70c86",
"GUID:1aa3e8589868c80499255710874679c0",
"GUID:d8b63aba1907145bea998dd612889d6b",
"GUID:756335c0388f7114790e504ed368ae1d"
"GUID:756335c0388f7114790e504ed368ae1d",
"GUID:4140bd2e2764f1f47ab93125ecb61942"
],
"includePlatforms": [],
"excludePlatforms": [],

View File

@@ -1,9 +1,8 @@
using UnityEngine;
using UnityEngine.UI;
using TEngine;
namespace GameLogic
{
[Obfuz.ObfuzIgnore(Obfuz.ObfuzScope.TypeName)]
[Window(UILayer.UI)]
class BattleMainUI : UIWindow
{

View File

@@ -7,21 +7,21 @@
<field signature="int $Obfuz$RVA_Value3" newName="$pJA" />
<field signature="int $Obfuz$RVA_Value4" newName="$PJA" />
<field signature="int $Obfuz$RVA_Value5" newName="$qJA" />
<field signature="float $Obfuz$RVA_Value6" newName="$QJA" />
<field signature="int $Obfuz$RVA_Value6" newName="$oIA" />
<field signature="int $Obfuz$RVA_Value7" newName="$rJA" />
<field signature="int $Obfuz$RVA_Value8" newName="$RJA" />
<field signature="int $Obfuz$RVA_Value9" newName="$sJA" />
<field signature="int $Obfuz$RVA_Value10" newName="$SJA" />
<field signature="int $Obfuz$RVA_Value11" newName="$tJA" />
<field signature="int $Obfuz$RVA_Value12" newName="$TJA" />
<field signature="int $Obfuz$RVA_Value13" newName="$uJA" />
<field signature="string $Obfuz$RVA_Value12" newName="$OIA" />
<field signature="string $Obfuz$RVA_Value13" newName="$pIA" />
<field signature="string $Obfuz$RVA_Value14" newName="$UJA" />
<field signature="string $Obfuz$RVA_Value15" newName="$vJA" />
<field signature="string $Obfuz$RVA_Value16" newName="$VJA" />
<field signature="string $Obfuz$RVA_Value17" newName="$wJA" />
<field signature="string $Obfuz$RVA_Value18" newName="$WJA" />
<field signature="int $Obfuz$RVA_Value17" newName="$PIA" />
<field signature="float $Obfuz$RVA_Value18" newName="$qIA" />
<field signature="int $Obfuz$RVA_Value19" newName="$xJA" />
<field signature="float $Obfuz$RVA_Value20" newName="$XJA" />
<field signature="int $Obfuz$RVA_Value20" newName="$QIA" />
<field signature="int $Obfuz$RVA_Value21" newName="$yJA" />
<field signature="int $Obfuz$RVA_Value22" newName="$YJA" />
<field signature="int $Obfuz$RVA_Value23" newName="$zJA" />
@@ -34,7 +34,7 @@
<field signature="int $Obfuz$RVA_Value30" newName="$CkA" />
<field signature="int $Obfuz$RVA_Value31" newName="$dkA" />
<field signature="int $Obfuz$RVA_Value32" newName="$DkA" />
<field signature="float $Obfuz$RVA_Value33" newName="$ekA" />
<field signature="int $Obfuz$RVA_Value33" newName="$rIA" />
<field signature="int $Obfuz$RVA_Value34" newName="$EkA" />
<field signature="int $Obfuz$RVA_Value35" newName="$fkA" />
<field signature="int $Obfuz$RVA_Value36" newName="$FkA" />
@@ -42,7 +42,7 @@
<field signature="int $Obfuz$RVA_Value38" newName="$GkA" />
<field signature="int $Obfuz$RVA_Value39" newName="$hkA" />
<field signature="int $Obfuz$RVA_Value40" newName="$HkA" />
<field signature="int $Obfuz$RVA_Value41" newName="$ikA" />
<field signature="float $Obfuz$RVA_Value41" newName="$RIA" />
<field signature="int $Obfuz$RVA_Value42" newName="$IkA" />
<field signature="int $Obfuz$RVA_Value43" newName="$jkA" />
<field signature="int $Obfuz$RVA_Value44" newName="$JkA" />
@@ -140,26 +140,6 @@
<field signature="int $Obfuz$RVA_Value136" newName="$DlA" />
<field signature="int $Obfuz$RVA_Value137" newName="$elA" />
<field signature="int $Obfuz$RVA_Value138" newName="$ElA" />
<field signature="int $Obfuz$RVA_Value139" newName="$flA" />
<field signature="int $Obfuz$RVA_Value140" newName="$FlA" />
<field signature="int $Obfuz$RVA_Value141" newName="$glA" />
<field signature="int $Obfuz$RVA_Value142" newName="$GlA" />
<field signature="int $Obfuz$RVA_Value143" newName="$hlA" />
<field signature="int $Obfuz$RVA_Value144" newName="$HlA" />
<field signature="int $Obfuz$RVA_Value145" newName="$ilA" />
<field signature="int $Obfuz$RVA_Value146" newName="$IlA" />
<field signature="int $Obfuz$RVA_Value147" newName="$jlA" />
<field signature="int $Obfuz$RVA_Value148" newName="$JlA" />
<field signature="int $Obfuz$RVA_Value149" newName="$klA" />
<field signature="int $Obfuz$RVA_Value150" newName="$KlA" />
<field signature="int $Obfuz$RVA_Value151" newName="$llA" />
<field signature="int $Obfuz$RVA_Value152" newName="$LlA" />
<field signature="int $Obfuz$RVA_Value153" newName="$mlA" />
<field signature="int $Obfuz$RVA_Value154" newName="$MlA" />
<field signature="int $Obfuz$RVA_Value155" newName="$nlA" />
<field signature="int $Obfuz$RVA_Value156" newName="$NlA" />
<field signature="int $Obfuz$RVA_Value157" newName="$olA" />
<field signature="int $Obfuz$RVA_Value158" newName="$OlA" />
</type>
<type fullName="$Obfuz$ProxyCall" newFullName="$Md" status="Renamed">
<method signature="[UniTask]Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskVoidMethodBuilder $Obfuz$ProxyCall::@$Obfuz$Dispatch_22824_7259852(int)" newName="$Bv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_22824_7259852(Int32)" newStackTraceSignature="$Md:$Bv(Int32)" />
@@ -176,7 +156,6 @@
<method signature="[UniTask]Cysharp.Threading.Tasks.UniTaskVoid $Obfuz$ProxyCall::@$Obfuz$Dispatch_36812_13443783(object, object, int)" newName="$hv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_36812_13443783(Object, Object, Int32)" newStackTraceSignature="$Md:$hv(Object, Object, Int32)" />
<method signature="[UniTask]Cysharp.Threading.Tasks.YieldAwaitable $Obfuz$ProxyCall::@$Obfuz$Dispatch_22824_13389309(int)" newName="$Hv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_22824_13389309(Int32)" newStackTraceSignature="$Md:$Hv(Int32)" />
<method signature="[UniTask]Cysharp.Threading.Tasks.YieldAwaitable/Awaiter $Obfuz$ProxyCall::@$Obfuz$Dispatch_2966_1576731$1(nint, int)" newName="$iv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_2966_1576731$1(IntPtr, Int32)" newStackTraceSignature="$Md:$iv(IntPtr, Int32)" />
<method signature="[HybridCLR.Runtime]HybridCLR.LoadImageErrorCode $Obfuz$ProxyCall::@$Obfuz$Dispatch_54639_15112779(byte[], int, int)" newName="$Iv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_54639_15112779(Byte[], Int32, Int32)" newStackTraceSignature="$Md:$Iv(Byte[], Int32, Int32)" />
<method signature="[Launcher]Launcher.LoadText $Obfuz$ProxyCall::@$Obfuz$Dispatch_22824_7539401(int)" newName="$jv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_22824_7539401(Int32)" newStackTraceSignature="$Md:$jv(Int32)" />
<method signature="bool $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_12616511(object, int)" newName="$Jv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_12616511(Object, Int32)" newStackTraceSignature="$Md:$Jv(Object, Int32)" />
<method signature="bool $Obfuz$ProxyCall::@$Obfuz$Dispatch_12519_12616511(object, byte, int)" newName="$kv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_12519_12616511(Object, Byte, Int32)" newStackTraceSignature="$Md:$kv(Object, Byte, Int32)" />
@@ -186,7 +165,6 @@
<method signature="byte[] $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_130600(object, int)" newName="$mv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_130600(Object, Int32)" newStackTraceSignature="$Md:$mv(Object, Int32)" />
<method signature="System.Collections.IEnumerator $Obfuz$ProxyCall::@$Obfuz$Dispatch_36812_13605213(object, object, int)" newName="$Mv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_36812_13605213(Object, Object, Int32)" newStackTraceSignature="$Md:$Mv(Object, Object, Int32)" />
<method signature="int $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_12091355(object, int)" newName="$nv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_12091355(Object, Int32)" newStackTraceSignature="$Md:$nv(Object, Int32)" />
<method signature="int $Obfuz$ProxyCall::@$Obfuz$Dispatch_25763_12091355(int, int)" newName="$Nv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_25763_12091355(Int32, Int32)" newStackTraceSignature="$Md:$Nv(Int32, Int32)" />
<method signature="int $Obfuz$ProxyCall::@$Obfuz$Dispatch_46378_12091355(int, int, int)" newName="$ov" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_46378_12091355(Int32, Int32, Int32)" newStackTraceSignature="$Md:$ov(Int32, Int32, Int32)" />
<method signature="long $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_7551190(object, int)" newName="$Ov" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_7551190(Object, Int32)" newStackTraceSignature="$Md:$Ov(Object, Int32)" />
<method signature="long $Obfuz$ProxyCall::@$Obfuz$Dispatch_40180_7551190(long, long, int)" newName="$pv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_40180_7551190(Int64, Int64, Int32)" newStackTraceSignature="$Md:$pv(Int64, Int64, Int32)" />
@@ -194,11 +172,8 @@
<method signature="float $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_3119315(object, int)" newName="$qv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_3119315(Object, Int32)" newStackTraceSignature="$Md:$qv(Object, Int32)" />
<method signature="float $Obfuz$ProxyCall::@$Obfuz$Dispatch_19129_3119315(object, float, int)" newName="$Qv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_19129_3119315(Object, Single, Int32)" newStackTraceSignature="$Md:$Qv(Object, Single, Int32)" />
<method signature="float $Obfuz$ProxyCall::@$Obfuz$Dispatch_22824_3119315(int)" newName="$rv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_22824_3119315(Int32)" newStackTraceSignature="$Md:$rv(Int32)" />
<method signature="float $Obfuz$ProxyCall::@$Obfuz$Dispatch_2966_3119315(nint, int)" newName="$Rv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_2966_3119315(IntPtr, Int32)" newStackTraceSignature="$Md:$Rv(IntPtr, Int32)" />
<method signature="float $Obfuz$ProxyCall::@$Obfuz$Dispatch_37781_3119315(float, float, float, int)" newName="$sv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_37781_3119315(Single, Single, Single, Int32)" newStackTraceSignature="$Md:$sv(Single, Single, Single, Int32)" />
<method signature="float $Obfuz$ProxyCall::@$Obfuz$Dispatch_38088_3119315([UnityEngine.CoreModule]UnityEngine.Vector2, [UnityEngine.CoreModule]UnityEngine.Vector2, int)" newName="$Sv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_38088_3119315(Vector2, Vector2, Int32)" newStackTraceSignature="$Md:$Sv(Vector2, Vector2, Int32)" />
<method signature="float $Obfuz$ProxyCall::@$Obfuz$Dispatch_47418_3119315(float, float, int)" newName="$tv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_47418_3119315(Single, Single, Int32)" newStackTraceSignature="$Md:$tv(Single, Single, Int32)" />
<method signature="float $Obfuz$ProxyCall::@$Obfuz$Dispatch_59003_3119315(float, int)" newName="$Tv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_59003_3119315(Single, Int32)" newStackTraceSignature="$Md:$Tv(Single, Int32)" />
<method signature="string $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_11558398(object, int)" newName="$uv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_11558398(Object, Int32)" newStackTraceSignature="$Md:$uv(Object, Int32)" />
<method signature="string $Obfuz$ProxyCall::@$Obfuz$Dispatch_19129_11558398(object, float, int)" newName="$Uv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_19129_11558398(Object, Single, Int32)" newStackTraceSignature="$Md:$Uv(Object, Single, Int32)" />
<method signature="string $Obfuz$ProxyCall::@$Obfuz$Dispatch_36812_11558398(object, object, int)" newName="$vv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_36812_11558398(Object, Object, Int32)" newStackTraceSignature="$Md:$vv(Object, Object, Int32)" />
@@ -213,19 +188,15 @@
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_19188_4780505(nint, object, int)" newName="$Zv" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_19188_4780505(IntPtr, Object, Int32)" newStackTraceSignature="$Md:$Zv(IntPtr, Object, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_22824_4780505(int)" newName="$aV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_22824_4780505(Int32)" newStackTraceSignature="$Md:$aV(Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_26461_4780505(object, object, byte, int)" newName="$AV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_26461_4780505(Object, Object, Byte, Int32)" newStackTraceSignature="$Md:$AV(Object, Object, Byte, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_28024_4780505(object, int, float, int)" newName="$bV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_28024_4780505(Object, Int32, Single, Int32)" newStackTraceSignature="$Md:$bV(Object, Int32, Single, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_2966_4780505(nint, int)" newName="$BV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_2966_4780505(IntPtr, Int32)" newStackTraceSignature="$Md:$BV(IntPtr, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_30844_4780505(nint, nuint, nuint, int)" newName="$cV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_30844_4780505(IntPtr, UIntPtr, UIntPtr, Int32)" newStackTraceSignature="$Md:$cV(IntPtr, UIntPtr, UIntPtr, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_32318_4780505(object, object, float, float, int)" newName="$CV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_32318_4780505(Object, Object, Single, Single, Int32)" newStackTraceSignature="$Md:$CV(Object, Object, Single, Single, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_33071_4780505(object, object, float, int)" newName="$dV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_33071_4780505(Object, Object, Single, Int32)" newStackTraceSignature="$Md:$dV(Object, Object, Single, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_36812_4780505(object, object, int)" newName="$DV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_36812_4780505(Object, Object, Int32)" newStackTraceSignature="$Md:$DV(Object, Object, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_37338_4780505(object, int, int, object, object, object, int)" newName="$eV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_37338_4780505(Object, Int32, Int32, Object, Object, Object, Int32)" newStackTraceSignature="$Md:$eV(Object, Int32, Int32, Object, Object, Object, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_40083_4780505(object, int, [UnityEngine.CoreModule]UnityEngine.Color, int)" newName="$EV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_40083_4780505(Object, Int32, Color, Int32)" newStackTraceSignature="$Md:$EV(Object, Int32, Color, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_45077_4780505(object, object, int, object, object, object, int)" newName="$fV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_45077_4780505(Object, Object, Int32, Object, Object, Object, Int32)" newStackTraceSignature="$Md:$fV(Object, Object, Int32, Object, Object, Object, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_50754_4780505(object, object, object, int)" newName="$FV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_50754_4780505(Object, Object, Object, Int32)" newStackTraceSignature="$Md:$FV(Object, Object, Object, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_51425_4780505(object, int, int)" newName="$gV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_51425_4780505(Object, Int32, Int32)" newStackTraceSignature="$Md:$gV(Object, Int32, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_59003_4780505(float, int)" newName="$GV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_59003_4780505(Single, Int32)" newStackTraceSignature="$Md:$GV(Single, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_60320_4780505(object, int, int, int)" newName="$hV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_60320_4780505(Object, Int32, Int32, Int32)" newStackTraceSignature="$Md:$hV(Object, Int32, Int32, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_63447_4780505(nint, nuint, int)" newName="$HV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_63447_4780505(IntPtr, UIntPtr, Int32)" newStackTraceSignature="$Md:$HV(IntPtr, UIntPtr, Int32)" />
<method signature="[TEngine.Runtime]TEngine.IAudioModule $Obfuz$ProxyCall::@$Obfuz$Dispatch_22824_2091141(int)" newName="$iV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_22824_2091141(Int32)" newStackTraceSignature="$Md:$iV(Int32)" />
<method signature="[TEngine.Runtime]TEngine.IDebuggerModule $Obfuz$ProxyCall::@$Obfuz$Dispatch_22824_15302954(int)" newName="$IV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_22824_15302954(Int32)" newStackTraceSignature="$Md:$IV(Int32)" />
@@ -237,28 +208,8 @@
<method signature="[TEngine.Runtime]TEngine.ProcedureSetting $Obfuz$ProxyCall::@$Obfuz$Dispatch_22824_3033287(int)" newName="$LV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_22824_3033287(Int32)" newStackTraceSignature="$Md:$LV(Int32)" />
<method signature="[TEngine.Runtime]TEngine.RootModule $Obfuz$ProxyCall::@$Obfuz$Dispatch_22824_10761570(int)" newName="$mV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_22824_10761570(Int32)" newStackTraceSignature="$Md:$mV(Int32)" />
<method signature="[TEngine.Runtime]TEngine.UpdateSetting $Obfuz$ProxyCall::@$Obfuz$Dispatch_22824_14354703(int)" newName="$MV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_22824_14354703(Int32)" newStackTraceSignature="$Md:$MV(Int32)" />
<method signature="[UnityEngine.UIModule]UnityEngine.AdditionalCanvasShaderChannels $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_8424239(object, int)" newName="$nV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_8424239(Object, Int32)" newStackTraceSignature="$Md:$nV(Object, Int32)" />
<method signature="[UnityEngine.UIModule]UnityEngine.Canvas $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_14829071(object, int)" newName="$NV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_14829071(Object, Int32)" newStackTraceSignature="$Md:$NV(Object, Int32)" />
<method signature="[UnityEngine.CoreModule]UnityEngine.Coroutine $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_11873513(object, int)" newName="$oV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_11873513(Object, Int32)" newStackTraceSignature="$Md:$oV(Object, Int32)" />
<method signature="[UnityEngine.TextRenderingModule]UnityEngine.Font $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_15352804(object, int)" newName="$OV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_15352804(Object, Int32)" newStackTraceSignature="$Md:$OV(Object, Int32)" />
<method signature="[UnityEngine.CoreModule]UnityEngine.GameObject $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_11979780(object, int)" newName="$pV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_11979780(Object, Int32)" newStackTraceSignature="$Md:$pV(Object, Int32)" />
<method signature="[UnityEngine.CoreModule]UnityEngine.Material $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_4258084(object, int)" newName="$PV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_4258084(Object, Int32)" newStackTraceSignature="$Md:$PV(Object, Int32)" />
<method signature="[UnityEngine.CoreModule]UnityEngine.Shader $Obfuz$ProxyCall::@$Obfuz$Dispatch_50754_4364218(object, object, object, int)" newName="$qV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_50754_4364218(Object, Object, Object, Int32)" newStackTraceSignature="$Md:$qV(Object, Object, Object, Int32)" />
<method signature="[UnityEngine.CoreModule]UnityEngine.TextAsset $Obfuz$ProxyCall::@$Obfuz$Dispatch_2966_3944058(nint, int)" newName="$QV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_2966_3944058(IntPtr, Int32)" newStackTraceSignature="$Md:$QV(IntPtr, Int32)" />
<method signature="[UnityEngine.CoreModule]UnityEngine.Texture $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_654776(object, int)" newName="$rV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_654776(Object, Int32)" newStackTraceSignature="$Md:$rV(Object, Int32)" />
<method signature="[UnityEngine.UI]UnityEngine.UI.Graphic $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_12636969(object, int)" newName="$RV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_12636969(Object, Int32)" newStackTraceSignature="$Md:$RV(Object, Int32)" />
<method signature="[UnityEngine.UI]UnityEngine.UI.Text $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_3669768(object, int)" newName="$sV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_3669768(Object, Int32)" newStackTraceSignature="$Md:$sV(Object, Int32)" />
<method signature="[UnityEngine.TextRenderingModule]UnityEngine.UIVertex $Obfuz$ProxyCall::@$Obfuz$Dispatch_5472_16268395([UnityEngine.TextRenderingModule]UnityEngine.UIVertex, int, [UnityEngine.CoreModule]UnityEngine.Vector2, [UnityEngine.CoreModule]UnityEngine.Vector2, [UnityEngine.CoreModule]UnityEngine.Vector2, [UnityEngine.CoreModule]UnityEngine.Vector2, [UnityEngine.CoreModule]UnityEngine.Vector2, [UnityEngine.CoreModule]UnityEngine.Vector4, int)" newName="$SV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_5472_16268395(UIVertex, Int32, Vector2, Vector2, Vector2, Vector2, Vector2, Vector4, Int32)" newStackTraceSignature="$Md:$SV(UIVertex, Int32, Vector2, Vector2, Vector2, Vector2, Vector2, Vector4, Int32)" />
<method signature="[UnityEngine.CoreModule]UnityEngine.Vector2 $Obfuz$ProxyCall::@$Obfuz$Dispatch_22824_590508(int)" newName="$tV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_22824_590508(Int32)" newStackTraceSignature="$Md:$tV(Int32)" />
<method signature="[UnityEngine.CoreModule]UnityEngine.Vector2 $Obfuz$ProxyCall::@$Obfuz$Dispatch_25934_590508([UnityEngine.CoreModule]UnityEngine.Vector4, int)" newName="$TV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_25934_590508(Vector4, Int32)" newStackTraceSignature="$Md:$TV(Vector4, Int32)" />
<method signature="[UnityEngine.CoreModule]UnityEngine.Vector2 $Obfuz$ProxyCall::@$Obfuz$Dispatch_2966_590508(nint, int)" newName="$uV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_2966_590508(IntPtr, Int32)" newStackTraceSignature="$Md:$uV(IntPtr, Int32)" />
<method signature="[UnityEngine.CoreModule]UnityEngine.Vector2 $Obfuz$ProxyCall::@$Obfuz$Dispatch_38088_590508([UnityEngine.CoreModule]UnityEngine.Vector2, [UnityEngine.CoreModule]UnityEngine.Vector2, int)" newName="$UV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_38088_590508(Vector2, Vector2, Int32)" newStackTraceSignature="$Md:$UV(Vector2, Vector2, Int32)" />
<method signature="[UnityEngine.CoreModule]UnityEngine.Vector2 $Obfuz$ProxyCall::@$Obfuz$Dispatch_57912_590508([UnityEngine.CoreModule]UnityEngine.Vector2, [UnityEngine.CoreModule]UnityEngine.Vector2, [UnityEngine.CoreModule]UnityEngine.Vector2, int)" newName="$vV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_57912_590508(Vector2, Vector2, Vector2, Int32)" newStackTraceSignature="$Md:$vV(Vector2, Vector2, Vector2, Int32)" />
<method signature="[UnityEngine.CoreModule]UnityEngine.Vector2 $Obfuz$ProxyCall::@$Obfuz$Dispatch_61619_590508([UnityEngine.CoreModule]UnityEngine.Vector3, int)" newName="$VV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_61619_590508(Vector3, Int32)" newStackTraceSignature="$Md:$VV(Vector3, Int32)" />
<method signature="[UnityEngine.CoreModule]UnityEngine.Vector2 $Obfuz$ProxyCall::@$Obfuz$Dispatch_65323_590508([UnityEngine.CoreModule]UnityEngine.Vector2, float, int)" newName="$wV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_65323_590508(Vector2, Single, Int32)" newStackTraceSignature="$Md:$wV(Vector2, Single, Int32)" />
<method signature="[UnityEngine.CoreModule]UnityEngine.Vector4 $Obfuz$ProxyCall::@$Obfuz$Dispatch_21369_590506([UnityEngine.CoreModule]UnityEngine.Vector4, float, int)" newName="$WV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_21369_590506(Vector4, Single, Int32)" newStackTraceSignature="$Md:$WV(Vector4, Single, Int32)" />
<method signature="[UnityEngine.CoreModule]UnityEngine.Vector4 $Obfuz$ProxyCall::@$Obfuz$Dispatch_31768_590506([UnityEngine.CoreModule]UnityEngine.Vector2, int)" newName="$xV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_31768_590506(Vector2, Int32)" newStackTraceSignature="$Md:$xV(Vector2, Int32)" />
<method signature="[UnityEngine.CoreModule]UnityEngine.Vector4 $Obfuz$ProxyCall::@$Obfuz$Dispatch_53836_590506([UnityEngine.CoreModule]UnityEngine.Vector4, [UnityEngine.CoreModule]UnityEngine.Vector4, int)" newName="$XV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_53836_590506(Vector4, Vector4, Int32)" newStackTraceSignature="$Md:$XV(Vector4, Vector4, Int32)" />
<method signature="[YooAsset]YooAsset.AssetInfo[] $Obfuz$ProxyCall::@$Obfuz$Dispatch_50754_7313902(object, object, object, int)" newName="$yV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_50754_7313902(Object, Object, Object, Int32)" newStackTraceSignature="$Md:$yV(Object, Object, Object, Int32)" />
<method signature="[YooAsset]YooAsset.ClearCacheFilesOperation $Obfuz$ProxyCall::@$Obfuz$Dispatch_45707_10036602(object, int, object, int)" newName="$YV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_45707_10036602(Object, Int32, Object, Int32)" newStackTraceSignature="$Md:$YV(Object, Int32, Object, Int32)" />
<method signature="[YooAsset]YooAsset.EOperationStatus $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_10989665(object, int)" newName="$zV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_10989665(Object, Int32)" newStackTraceSignature="$Md:$zV(Object, Int32)" />
@@ -349,6 +300,7 @@
<field signature="[UniTask]Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskVoidMethodBuilder &lt;&gt;t__builder" newName="$bjA" />
<field signature="[Assembly-CSharp]Procedure.ProcedureCreateDownloader &lt;&gt;4__this" newName="$BjA" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask/Awaiter &lt;&gt;u__1" newName="$cjA" />
<method signature="void Procedure.ProcedureCreateDownloader/&lt;CreateDownloader&gt;d__10::SetStateMachine([Assembly-CSharp]Procedure.ProcedureCreateDownloader/&lt;CreateDownloader&gt;d__10&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$VV" oldStackTraceSignature="Procedure.&lt;CreateDownloader&gt;d__10:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$C.$Bd:$VV(IAsyncStateMachine)" />
</type>
<type fullName="Procedure.ProcedureDownloadFile" newFullName="$C.$cd" status="Renamed">
<field signature="bool &lt;UseNativeDialog&gt;k__BackingField" newName="$CjA" />
@@ -373,6 +325,7 @@
<field signature="[Assembly-CSharp]Procedure.ProcedureDownloadFile &lt;&gt;4__this" newName="$gjA" />
<field signature="[YooAsset]YooAsset.ResourceDownloaderOperation &lt;downloader&gt;5__2" newName="$GjA" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask/Awaiter &lt;&gt;u__1" newName="$hjA" />
<method signature="void Procedure.ProcedureDownloadFile/&lt;BeginDownload&gt;d__10::SetStateMachine([Assembly-CSharp]Procedure.ProcedureDownloadFile/&lt;BeginDownload&gt;d__10&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$wV" oldStackTraceSignature="Procedure.&lt;BeginDownload&gt;d__10:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$C.$Cd:$wV(IAsyncStateMachine)" />
</type>
<type fullName="Procedure.ProcedureDownloadOver" newFullName="$C.$dd" status="Renamed">
<field signature="bool &lt;UseNativeDialog&gt;k__BackingField" newName="$HjA" />
@@ -409,6 +362,7 @@
<field signature="[TEngine.Runtime]TEngine.IFsm`1&lt;[TEngine.Runtime]TEngine.IProcedureModule&gt; procedureOwner" newName="$mjA" />
<field signature="[Assembly-CSharp]Procedure.ProcedureInitPackage/&lt;&gt;c__DisplayClass5_0 &lt;&gt;8__1" newName="$MjA" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask`1/Awaiter&lt;[YooAsset]YooAsset.InitializationOperation&gt; &lt;&gt;u__1" newName="$njA" />
<method signature="void Procedure.ProcedureInitPackage/&lt;InitPackage&gt;d__5::SetStateMachine([Assembly-CSharp]Procedure.ProcedureInitPackage/&lt;InitPackage&gt;d__5&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$WV" oldStackTraceSignature="Procedure.&lt;InitPackage&gt;d__5:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$C.$Ed:$WV(IAsyncStateMachine)" />
</type>
<type fullName="Procedure.ProcedureInitResources" newFullName="$C.$Fd" status="Renamed">
<field signature="bool _initResourcesComplete" newName="$OjA" />
@@ -487,6 +441,7 @@
<field signature="[Assembly-CSharp]Procedure.ProcedureLoadAssembly &lt;&gt;4__this" newName="$BJA" />
<field signature="System.Collections.Generic.List`1/Enumerator&lt;string&gt; &lt;&gt;7__wrap1" newName="$cJA" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask`1/Awaiter&lt;[UnityEngine.CoreModule]UnityEngine.TextAsset&gt; &lt;&gt;u__1" newName="$CJA" />
<method signature="void Procedure.ProcedureLoadAssembly/&lt;LoadAssembly&gt;d__17::SetStateMachine([Assembly-CSharp]Procedure.ProcedureLoadAssembly/&lt;LoadAssembly&gt;d__17&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$xV" oldStackTraceSignature="Procedure.&lt;LoadAssembly&gt;d__17:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$C.$id:$xV(IAsyncStateMachine)" />
</type>
<type fullName="Procedure.ProcedurePreload" newFullName="$C.$Id" status="Renamed">
<field signature="float _progress" newName="$dJA" />
@@ -516,6 +471,7 @@
<field signature="System.Action callback" newName="$iJA" />
<field signature="float &lt;time&gt;5__2" newName="$IJA" />
<field signature="[UniTask]Cysharp.Threading.Tasks.YieldAwaitable/Awaiter &lt;&gt;u__1" newName="$jJA" />
<method signature="void Procedure.ProcedurePreload/&lt;SmoothValue&gt;d__10::SetStateMachine([Assembly-CSharp]Procedure.ProcedurePreload/&lt;SmoothValue&gt;d__10&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$XV" oldStackTraceSignature="Procedure.&lt;SmoothValue&gt;d__10:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$C.$jd:$XV(IAsyncStateMachine)" />
</type>
<type fullName="Procedure.ProcedureSplash" newFullName="$C.$Jd" status="Renamed">
<property signature="bool UseNativeDialog" newName="$a" />
@@ -533,6 +489,7 @@
<field signature="int &lt;&gt;1__state" newName="$kJA" />
<field signature="[UniTask]Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskVoidMethodBuilder &lt;&gt;t__builder" newName="$KJA" />
<field signature="[UniTask]Cysharp.Threading.Tasks.YieldAwaitable/Awaiter &lt;&gt;u__1" newName="$lJA" />
<method signature="void Procedure.ProcedureStartGame/&lt;StartGame&gt;d__4::SetStateMachine([Assembly-CSharp]Procedure.ProcedureStartGame/&lt;StartGame&gt;d__4&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$yBA" oldStackTraceSignature="Procedure.&lt;StartGame&gt;d__4:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$C.$Kd:$yBA(IAsyncStateMachine)" />
</type>
</assembly>
<assembly name="GameLogic">
@@ -666,9 +623,6 @@
<field signature="int $Obfuz$RVA_Value126" newName="$rC" />
<field signature="int $Obfuz$RVA_Value127" newName="$RC" />
<field signature="int $Obfuz$RVA_Value128" newName="$sC" />
<field signature="int $Obfuz$RVA_Value129" newName="$SC" />
<field signature="int $Obfuz$RVA_Value130" newName="$tC" />
<field signature="int $Obfuz$RVA_Value131" newName="$TC" />
</type>
<type fullName="$Obfuz$ProxyCall" newFullName="$bA" status="Renamed">
<method signature="[UniTask]Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder`1&lt;[UnityEngine.CoreModule]UnityEngine.GameObject&gt; $Obfuz$ProxyCall::@$Obfuz$Dispatch_22824_9527092(int)" newName="$iC" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_22824_9527092(Int32)" newStackTraceSignature="$bA:$iC(Int32)" />
@@ -683,7 +637,6 @@
<method signature="[UniTask]Cysharp.Threading.Tasks.UniTaskVoid $Obfuz$ProxyCall::@$Obfuz$Dispatch_8408_13443783(object, object, object, byte, object[], int)" newName="$MC" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_8408_13443783(Object, Object, Object, Byte, Object[], Int32)" newStackTraceSignature="$bA:$MC(Object, Object, Object, Byte, Object[], Int32)" />
<method signature="[UniTask]Cysharp.Threading.Tasks.YieldAwaitable $Obfuz$ProxyCall::@$Obfuz$Dispatch_22824_13389309(int)" newName="$nC" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_22824_13389309(Int32)" newStackTraceSignature="$bA:$nC(Int32)" />
<method signature="[UniTask]Cysharp.Threading.Tasks.YieldAwaitable/Awaiter $Obfuz$ProxyCall::@$Obfuz$Dispatch_2966_1576731(nint, int)" newName="$NC" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_2966_1576731(IntPtr, Int32)" newStackTraceSignature="$bA:$NC(IntPtr, Int32)" />
<method signature="[GameLogic]GameLogic.ILoginUI $Obfuz$ProxyCall::@$Obfuz$Dispatch_22824_8419894(int)" newName="$oC" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_22824_8419894(Int32)" newStackTraceSignature="$bA:$oC(Int32)" />
<method signature="[GameLogic]GameLogic.UIBase $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_5129971(object, int)" newName="$OC" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_5129971(Object, Int32)" newStackTraceSignature="$bA:$OC(Object, Int32)" />
<method signature="[GameLogic]GameLogic.UIBase/UIType $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_3122694(object, int)" newName="$pC" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_3122694(Object, Int32)" newStackTraceSignature="$bA:$pC(Object, Int32)" />
<method signature="[GameLogic]GameLogic.UIModule $Obfuz$ProxyCall::@$Obfuz$Dispatch_22824_8095070(int)" newName="$PC" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_22824_8095070(Int32)" newStackTraceSignature="$bA:$PC(Int32)" />
@@ -753,7 +706,6 @@
<method signature="[UnityEngine.CoreModule]UnityEngine.GameObject $Obfuz$ProxyCall::@$Obfuz$Dispatch_2966_11979780(nint, int)" newName="$Vd" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_2966_11979780(IntPtr, Int32)" newStackTraceSignature="$bA:$Vd(IntPtr, Int32)" />
<method signature="[UnityEngine.CoreModule]UnityEngine.GameObject $Obfuz$ProxyCall::@$Obfuz$Dispatch_36812_11979780(object, object, int)" newName="$wd" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_36812_11979780(Object, Object, Int32)" newStackTraceSignature="$bA:$wd(Object, Object, Int32)" />
<method signature="[UnityEngine.CoreModule]UnityEngine.RectTransform $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_12743197(object, int)" newName="$Wd" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_12743197(Object, Int32)" newStackTraceSignature="$bA:$Wd(Object, Int32)" />
<method signature="[UnityEngine.CoreModule]UnityEngine.RectTransform $Obfuz$ProxyCall::@$Obfuz$Dispatch_36812_12743197(object, object, int)" newName="$xd" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_36812_12743197(Object, Object, Int32)" newStackTraceSignature="$bA:$xd(Object, Object, Int32)" />
<method signature="[UnityEngine.CoreModule]UnityEngine.Transform $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_11509251(object, int)" newName="$Xd" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_11509251(Object, Int32)" newStackTraceSignature="$bA:$Xd(Object, Int32)" />
<method signature="[UnityEngine.CoreModule]UnityEngine.Transform $Obfuz$ProxyCall::@$Obfuz$Dispatch_22824_11509251(int)" newName="$yd" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_22824_11509251(Int32)" newStackTraceSignature="$bA:$yd(Int32)" />
<method signature="[UnityEngine.CoreModule]UnityEngine.Transform $Obfuz$ProxyCall::@$Obfuz$Dispatch_36812_11509251(object, object, int)" newName="$Yd" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_36812_11509251(Object, Object, Int32)" newStackTraceSignature="$bA:$Yd(Object, Object, Int32)" />
@@ -773,19 +725,13 @@
<field signature="byte[] $RVA_Value0" newName="$UC" />
</type>
<type fullName="$ObfuzRVA$DataHolder2048" newFullName="$aA" status="Renamed" />
<type fullName="GameApp" newFullName="$d" status="Renamed">
<field signature="System.Collections.Generic.List`1&lt;System.Reflection.Assembly&gt; _hotfixAssembly" newName="$c" />
<method signature="void GameApp::@Entrance(object[])" newName="$fb" oldStackTraceSignature="GameApp:Entrance(Object[])" newStackTraceSignature="$d:$fb(Object[])" />
<method signature="void GameApp::@StartGameLogic()" newName="$Fb" oldStackTraceSignature="GameApp:StartGameLogic()" newStackTraceSignature="$d:$Fb()" />
<method signature="void GameApp::@Release()" newName="$gb" oldStackTraceSignature="GameApp:Release()" newStackTraceSignature="$d:$gb()" />
</type>
<type fullName="GameLogic.BattleMainUI" newFullName="$A.$x" status="Renamed">
<field signature="[UnityEngine.CoreModule]UnityEngine.RectTransform _rectContainer" newName="$cB" />
<field signature="[UnityEngine.CoreModule]UnityEngine.GameObject _itemTouch" newName="$CB" />
<field signature="[UnityEngine.CoreModule]UnityEngine.GameObject _goTopInfo" newName="$dB" />
<field signature="[UnityEngine.CoreModule]UnityEngine.GameObject _itemRoleInfo" newName="$DB" />
<field signature="[UnityEngine.CoreModule]UnityEngine.GameObject _itemMonsterInfo" newName="$eB" />
<method signature="void GameLogic.BattleMainUI::ScriptGenerator([GameLogic]GameLogic.BattleMainUI)" newName="$fD" oldStackTraceSignature="GameLogic.BattleMainUI:ScriptGenerator()" newStackTraceSignature="$A.$x:$fD()" />
<type fullName="GameLogic.BattleMainUI" newFullName="" status="NotRenamed">
<field signature="[UnityEngine.CoreModule]UnityEngine.RectTransform _rectContainer" newName="$c" />
<field signature="[UnityEngine.CoreModule]UnityEngine.GameObject _itemTouch" newName="$cB" />
<field signature="[UnityEngine.CoreModule]UnityEngine.GameObject _goTopInfo" newName="$CB" />
<field signature="[UnityEngine.CoreModule]UnityEngine.GameObject _itemRoleInfo" newName="$dB" />
<field signature="[UnityEngine.CoreModule]UnityEngine.GameObject _itemMonsterInfo" newName="$DB" />
<method signature="void GameLogic.BattleMainUI::ScriptGenerator([GameLogic]GameLogic.BattleMainUI)" newName="$fb" oldStackTraceSignature="GameLogic.BattleMainUI:ScriptGenerator()" newStackTraceSignature="GameLogic.BattleMainUI:$fb()" />
</type>
<type fullName="GameLogic.ErrorLogger" newFullName="$A.$H" status="Renamed">
<field signature="[GameLogic]GameLogic.UIModule _uiModule" newName="$H" />
@@ -835,7 +781,7 @@
<field signature="System.Collections.Generic.Stack`1&lt;string&gt; _errorTextString" newName="$i" />
<field signature="[UnityEngine.UI]UnityEngine.UI.Text m_textError" newName="$I" />
<field signature="[UnityEngine.UI]UnityEngine.UI.Button m_btnClose" newName="$j" />
<method signature="void GameLogic.LogUI::ScriptGenerator([GameLogic]GameLogic.LogUI)" newName="$fD" oldStackTraceSignature="GameLogic.LogUI:ScriptGenerator()" newStackTraceSignature="$A.$i:$fD()" />
<method signature="void GameLogic.LogUI::ScriptGenerator([GameLogic]GameLogic.LogUI)" newName="$fb" oldStackTraceSignature="GameLogic.LogUI:ScriptGenerator()" newStackTraceSignature="$A.$i:$fb()" />
<method signature="void GameLogic.LogUI::OnClickCloseBtn([GameLogic]GameLogic.LogUI)" newName="$ob" oldStackTraceSignature="GameLogic.LogUI:OnClickCloseBtn()" newStackTraceSignature="$A.$i:$ob()" />
<method signature="void GameLogic.LogUI::OnRefresh([GameLogic]GameLogic.LogUI)" newName="$FD" oldStackTraceSignature="GameLogic.LogUI:OnRefresh()" newStackTraceSignature="$A.$i:$FD()" />
<method signature="[UniTask]Cysharp.Threading.Tasks.UniTaskVoid GameLogic.LogUI::PopErrorLog([GameLogic]GameLogic.LogUI)" newName="$Ob" oldStackTraceSignature="GameLogic.LogUI:PopErrorLog()" newStackTraceSignature="$A.$i:$Ob()" />
@@ -928,7 +874,7 @@
<method signature="[GameLogic]GameLogic.UIBase/UIType GameLogic.UIBase::get_Type([GameLogic]GameLogic.UIBase)" newName="$kD" oldStackTraceSignature="GameLogic.UIBase:get_Type()" newStackTraceSignature="$A.$K:$kD()" />
<method signature="void GameLogic.UIBase::set_IsPrepare([GameLogic]GameLogic.UIBase, bool)" newName="$Qb" oldStackTraceSignature="GameLogic.UIBase:set_IsPrepare(Boolean)" newStackTraceSignature="$A.$K:$Qb(Boolean)" />
<method signature="bool GameLogic.UIBase::get_IsPrepare([GameLogic]GameLogic.UIBase)" newName="$rb" oldStackTraceSignature="GameLogic.UIBase:get_IsPrepare()" newStackTraceSignature="$A.$K:$rb()" />
<method signature="void GameLogic.UIBase::ScriptGenerator([GameLogic]GameLogic.UIBase)" newName="$fD" oldStackTraceSignature="GameLogic.UIBase:ScriptGenerator()" newStackTraceSignature="$A.$K:$fD()" />
<method signature="void GameLogic.UIBase::ScriptGenerator([GameLogic]GameLogic.UIBase)" newName="$fb" oldStackTraceSignature="GameLogic.UIBase:ScriptGenerator()" newStackTraceSignature="$A.$K:$fb()" />
<method signature="void GameLogic.UIBase::BindMemberProperty([GameLogic]GameLogic.UIBase)" newName="$KD" oldStackTraceSignature="GameLogic.UIBase:BindMemberProperty()" newStackTraceSignature="$A.$K:$KD()" />
<method signature="void GameLogic.UIBase::RegisterEvent([GameLogic]GameLogic.UIBase)" newName="$lD" oldStackTraceSignature="GameLogic.UIBase:RegisterEvent()" newStackTraceSignature="$A.$K:$lD()" />
<method signature="void GameLogic.UIBase::OnCreate([GameLogic]GameLogic.UIBase)" newName="$LD" oldStackTraceSignature="GameLogic.UIBase:OnCreate()" newStackTraceSignature="$A.$K:$LD()" />
@@ -1284,6 +1230,466 @@
<method signature="void GameModule::@Shutdown()" newName="$nb" oldStackTraceSignature="GameModule:Shutdown()" newStackTraceSignature="$G:$nb()" />
</type>
</assembly>
<assembly name="GameProto">
<type fullName="$Obfuz$ConstFieldHolder$0" newFullName="$Xb" status="Renamed">
<field signature="int $Obfuz$RVA_Value0" newName="$TIA" />
<field signature="int $Obfuz$RVA_Value1" newName="$uIA" />
<field signature="int $Obfuz$RVA_Value2" newName="$UIA" />
<field signature="int $Obfuz$RVA_Value3" newName="$vIA" />
<field signature="int $Obfuz$RVA_Value4" newName="$VIA" />
<field signature="int $Obfuz$RVA_Value5" newName="$wIA" />
<field signature="int $Obfuz$RVA_Value6" newName="$WIA" />
<field signature="int $Obfuz$RVA_Value7" newName="$xIA" />
<field signature="int $Obfuz$RVA_Value8" newName="$XIA" />
<field signature="int $Obfuz$RVA_Value9" newName="$yIA" />
<field signature="int $Obfuz$RVA_Value10" newName="$YIA" />
<field signature="int $Obfuz$RVA_Value11" newName="$zIA" />
<field signature="int $Obfuz$RVA_Value12" newName="$ZIA" />
<field signature="int $Obfuz$RVA_Value13" newName="$ajA" />
<field signature="int $Obfuz$RVA_Value14" newName="$AjA" />
<field signature="int $Obfuz$RVA_Value15" newName="$bjA" />
<field signature="int $Obfuz$RVA_Value16" newName="$BjA" />
<field signature="int $Obfuz$RVA_Value17" newName="$cjA" />
<field signature="int $Obfuz$RVA_Value18" newName="$CjA" />
<field signature="int $Obfuz$RVA_Value19" newName="$djA" />
<field signature="int $Obfuz$RVA_Value20" newName="$DjA" />
<field signature="int $Obfuz$RVA_Value21" newName="$ejA" />
<field signature="long $Obfuz$RVA_Value22" newName="$EjA" />
<field signature="int $Obfuz$RVA_Value23" newName="$fjA" />
<field signature="long $Obfuz$RVA_Value24" newName="$FjA" />
<field signature="long $Obfuz$RVA_Value25" newName="$gjA" />
<field signature="int $Obfuz$RVA_Value26" newName="$GjA" />
<field signature="int $Obfuz$RVA_Value27" newName="$hjA" />
<field signature="int $Obfuz$RVA_Value28" newName="$HjA" />
<field signature="long $Obfuz$RVA_Value29" newName="$ijA" />
<field signature="int $Obfuz$RVA_Value30" newName="$IjA" />
<field signature="int $Obfuz$RVA_Value31" newName="$jjA" />
<field signature="long $Obfuz$RVA_Value32" newName="$JjA" />
<field signature="int $Obfuz$RVA_Value33" newName="$kjA" />
<field signature="int $Obfuz$RVA_Value34" newName="$KjA" />
<field signature="int $Obfuz$RVA_Value35" newName="$ljA" />
<field signature="string $Obfuz$RVA_Value36" newName="$LjA" />
<field signature="int $Obfuz$RVA_Value37" newName="$mjA" />
<field signature="int $Obfuz$RVA_Value38" newName="$MjA" />
<field signature="int $Obfuz$RVA_Value39" newName="$njA" />
<field signature="string $Obfuz$RVA_Value40" newName="$NjA" />
<field signature="int $Obfuz$RVA_Value41" newName="$ojA" />
<field signature="int $Obfuz$RVA_Value42" newName="$OjA" />
<field signature="int $Obfuz$RVA_Value43" newName="$pjA" />
<field signature="int $Obfuz$RVA_Value44" newName="$PjA" />
<field signature="int $Obfuz$RVA_Value45" newName="$qjA" />
<field signature="int $Obfuz$RVA_Value46" newName="$QjA" />
<field signature="int $Obfuz$RVA_Value47" newName="$rjA" />
<field signature="int $Obfuz$RVA_Value48" newName="$RjA" />
<field signature="int $Obfuz$RVA_Value49" newName="$sjA" />
<field signature="int $Obfuz$RVA_Value50" newName="$SjA" />
<field signature="int $Obfuz$RVA_Value51" newName="$tjA" />
<field signature="int $Obfuz$RVA_Value52" newName="$TjA" />
<field signature="int $Obfuz$RVA_Value53" newName="$ujA" />
<field signature="int $Obfuz$RVA_Value54" newName="$UjA" />
<field signature="int $Obfuz$RVA_Value55" newName="$vjA" />
<field signature="int $Obfuz$RVA_Value56" newName="$VjA" />
<field signature="int $Obfuz$RVA_Value57" newName="$wjA" />
<field signature="int $Obfuz$RVA_Value58" newName="$WjA" />
<field signature="int $Obfuz$RVA_Value59" newName="$xjA" />
<field signature="int $Obfuz$RVA_Value60" newName="$XjA" />
<field signature="int $Obfuz$RVA_Value61" newName="$yjA" />
<field signature="int $Obfuz$RVA_Value62" newName="$YjA" />
<field signature="int $Obfuz$RVA_Value63" newName="$zjA" />
<field signature="int $Obfuz$RVA_Value64" newName="$ZjA" />
<field signature="int $Obfuz$RVA_Value65" newName="$aJA" />
<field signature="int $Obfuz$RVA_Value66" newName="$AJA" />
<field signature="int $Obfuz$RVA_Value67" newName="$bJA" />
<field signature="int $Obfuz$RVA_Value68" newName="$BJA" />
<field signature="int $Obfuz$RVA_Value69" newName="$cJA" />
<field signature="int $Obfuz$RVA_Value70" newName="$CJA" />
<field signature="int $Obfuz$RVA_Value71" newName="$dJA" />
<field signature="int $Obfuz$RVA_Value72" newName="$DJA" />
<field signature="int $Obfuz$RVA_Value73" newName="$eJA" />
<field signature="int $Obfuz$RVA_Value74" newName="$EJA" />
<field signature="int $Obfuz$RVA_Value75" newName="$fJA" />
<field signature="int $Obfuz$RVA_Value76" newName="$FJA" />
<field signature="int $Obfuz$RVA_Value77" newName="$gJA" />
<field signature="int $Obfuz$RVA_Value78" newName="$GJA" />
<field signature="int $Obfuz$RVA_Value79" newName="$hJA" />
<field signature="int $Obfuz$RVA_Value80" newName="$HJA" />
<field signature="int $Obfuz$RVA_Value81" newName="$iJA" />
<field signature="int $Obfuz$RVA_Value82" newName="$IJA" />
<field signature="int $Obfuz$RVA_Value83" newName="$jJA" />
<field signature="int $Obfuz$RVA_Value84" newName="$JJA" />
<field signature="int $Obfuz$RVA_Value85" newName="$kJA" />
<field signature="int $Obfuz$RVA_Value86" newName="$KJA" />
<field signature="int $Obfuz$RVA_Value87" newName="$lJA" />
<field signature="int $Obfuz$RVA_Value88" newName="$LJA" />
<field signature="int $Obfuz$RVA_Value89" newName="$mJA" />
<field signature="int $Obfuz$RVA_Value90" newName="$MJA" />
<field signature="int $Obfuz$RVA_Value91" newName="$nJA" />
<field signature="int $Obfuz$RVA_Value92" newName="$NJA" />
<field signature="int $Obfuz$RVA_Value93" newName="$oJA" />
<field signature="int $Obfuz$RVA_Value94" newName="$OJA" />
<field signature="int $Obfuz$RVA_Value95" newName="$pJA" />
<field signature="int $Obfuz$RVA_Value96" newName="$PJA" />
<field signature="int $Obfuz$RVA_Value97" newName="$qJA" />
<field signature="int $Obfuz$RVA_Value98" newName="$QJA" />
<field signature="int $Obfuz$RVA_Value99" newName="$rJA" />
<field signature="int $Obfuz$RVA_Value100" newName="$RJA" />
<field signature="int $Obfuz$RVA_Value101" newName="$sJA" />
<field signature="int $Obfuz$RVA_Value102" newName="$SJA" />
<field signature="int $Obfuz$RVA_Value103" newName="$tJA" />
<field signature="int $Obfuz$RVA_Value104" newName="$TJA" />
<field signature="int $Obfuz$RVA_Value105" newName="$uJA" />
<field signature="int $Obfuz$RVA_Value106" newName="$UJA" />
<field signature="int $Obfuz$RVA_Value107" newName="$vJA" />
<field signature="int $Obfuz$RVA_Value108" newName="$VJA" />
<field signature="int $Obfuz$RVA_Value109" newName="$wJA" />
<field signature="int $Obfuz$RVA_Value110" newName="$WJA" />
<field signature="int $Obfuz$RVA_Value111" newName="$xJA" />
<field signature="int $Obfuz$RVA_Value112" newName="$XJA" />
<field signature="int $Obfuz$RVA_Value113" newName="$yJA" />
<field signature="int $Obfuz$RVA_Value114" newName="$YJA" />
<field signature="int $Obfuz$RVA_Value115" newName="$zJA" />
<field signature="int $Obfuz$RVA_Value116" newName="$ZJA" />
<field signature="int $Obfuz$RVA_Value117" newName="$akA" />
<field signature="int $Obfuz$RVA_Value118" newName="$AkA" />
<field signature="int $Obfuz$RVA_Value119" newName="$bkA" />
<field signature="int $Obfuz$RVA_Value120" newName="$BkA" />
<field signature="int $Obfuz$RVA_Value121" newName="$ckA" />
<field signature="int $Obfuz$RVA_Value122" newName="$CkA" />
<field signature="int $Obfuz$RVA_Value123" newName="$dkA" />
<field signature="int $Obfuz$RVA_Value124" newName="$DkA" />
<field signature="int $Obfuz$RVA_Value125" newName="$ekA" />
<field signature="int $Obfuz$RVA_Value126" newName="$EkA" />
<field signature="int $Obfuz$RVA_Value127" newName="$fkA" />
<field signature="int $Obfuz$RVA_Value128" newName="$FkA" />
<field signature="int $Obfuz$RVA_Value129" newName="$gkA" />
<field signature="int $Obfuz$RVA_Value130" newName="$GkA" />
<field signature="int $Obfuz$RVA_Value131" newName="$hkA" />
<field signature="int $Obfuz$RVA_Value132" newName="$HkA" />
<field signature="int $Obfuz$RVA_Value133" newName="$ikA" />
<field signature="int $Obfuz$RVA_Value134" newName="$IkA" />
<field signature="int $Obfuz$RVA_Value135" newName="$jkA" />
<field signature="int $Obfuz$RVA_Value136" newName="$JkA" />
<field signature="long $Obfuz$RVA_Value137" newName="$kkA" />
<field signature="long $Obfuz$RVA_Value138" newName="$KkA" />
<field signature="long $Obfuz$RVA_Value139" newName="$lkA" />
<field signature="long $Obfuz$RVA_Value140" newName="$LkA" />
<field signature="int $Obfuz$RVA_Value141" newName="$mkA" />
<field signature="int $Obfuz$RVA_Value142" newName="$MkA" />
<field signature="int $Obfuz$RVA_Value143" newName="$nkA" />
<field signature="long $Obfuz$RVA_Value144" newName="$NkA" />
<field signature="int $Obfuz$RVA_Value145" newName="$okA" />
<field signature="int $Obfuz$RVA_Value146" newName="$OkA" />
<field signature="int $Obfuz$RVA_Value147" newName="$pkA" />
<field signature="int $Obfuz$RVA_Value148" newName="$PkA" />
<field signature="int $Obfuz$RVA_Value149" newName="$qkA" />
<field signature="long $Obfuz$RVA_Value150" newName="$QkA" />
<field signature="int $Obfuz$RVA_Value151" newName="$rkA" />
<field signature="int $Obfuz$RVA_Value152" newName="$RkA" />
<field signature="int $Obfuz$RVA_Value153" newName="$skA" />
<field signature="int $Obfuz$RVA_Value154" newName="$SkA" />
<field signature="int $Obfuz$RVA_Value155" newName="$tkA" />
<field signature="int $Obfuz$RVA_Value156" newName="$TkA" />
<field signature="int $Obfuz$RVA_Value157" newName="$ukA" />
<field signature="int $Obfuz$RVA_Value158" newName="$UkA" />
<field signature="int $Obfuz$RVA_Value159" newName="$vkA" />
<field signature="int $Obfuz$RVA_Value160" newName="$VkA" />
<field signature="int $Obfuz$RVA_Value161" newName="$wkA" />
<field signature="int $Obfuz$RVA_Value162" newName="$WkA" />
<field signature="int $Obfuz$RVA_Value163" newName="$xkA" />
<field signature="int $Obfuz$RVA_Value164" newName="$XkA" />
<field signature="int $Obfuz$RVA_Value165" newName="$ykA" />
<field signature="int $Obfuz$RVA_Value166" newName="$YkA" />
<field signature="int $Obfuz$RVA_Value167" newName="$zkA" />
<field signature="int $Obfuz$RVA_Value168" newName="$ZkA" />
<field signature="int $Obfuz$RVA_Value169" newName="$aKA" />
<field signature="int $Obfuz$RVA_Value170" newName="$AKA" />
<field signature="int $Obfuz$RVA_Value171" newName="$bKA" />
<field signature="long $Obfuz$RVA_Value172" newName="$BKA" />
<field signature="int $Obfuz$RVA_Value173" newName="$cKA" />
<field signature="int $Obfuz$RVA_Value174" newName="$CKA" />
<field signature="int $Obfuz$RVA_Value175" newName="$dKA" />
<field signature="int $Obfuz$RVA_Value176" newName="$DKA" />
<field signature="int $Obfuz$RVA_Value177" newName="$eKA" />
<field signature="int $Obfuz$RVA_Value178" newName="$EKA" />
<field signature="int $Obfuz$RVA_Value179" newName="$fKA" />
<field signature="int $Obfuz$RVA_Value180" newName="$FKA" />
<field signature="int $Obfuz$RVA_Value181" newName="$gKA" />
<field signature="int $Obfuz$RVA_Value182" newName="$GKA" />
<field signature="int $Obfuz$RVA_Value183" newName="$hKA" />
<field signature="int $Obfuz$RVA_Value184" newName="$HKA" />
<field signature="int $Obfuz$RVA_Value185" newName="$iKA" />
<field signature="int $Obfuz$RVA_Value186" newName="$IKA" />
<field signature="int $Obfuz$RVA_Value187" newName="$jKA" />
<field signature="int $Obfuz$RVA_Value188" newName="$JKA" />
<field signature="int $Obfuz$RVA_Value189" newName="$kKA" />
<field signature="int $Obfuz$RVA_Value190" newName="$KKA" />
<field signature="int $Obfuz$RVA_Value191" newName="$lKA" />
<field signature="int $Obfuz$RVA_Value192" newName="$LKA" />
<field signature="int $Obfuz$RVA_Value193" newName="$mKA" />
<field signature="int $Obfuz$RVA_Value194" newName="$MKA" />
<field signature="int $Obfuz$RVA_Value195" newName="$nKA" />
<field signature="int $Obfuz$RVA_Value196" newName="$NKA" />
<field signature="int $Obfuz$RVA_Value197" newName="$oKA" />
<field signature="int $Obfuz$RVA_Value198" newName="$OKA" />
<field signature="int $Obfuz$RVA_Value199" newName="$pKA" />
<field signature="int $Obfuz$RVA_Value200" newName="$PKA" />
<field signature="int $Obfuz$RVA_Value201" newName="$qKA" />
<field signature="int $Obfuz$RVA_Value202" newName="$QKA" />
<field signature="int $Obfuz$RVA_Value203" newName="$rKA" />
<field signature="int $Obfuz$RVA_Value204" newName="$RKA" />
<field signature="int $Obfuz$RVA_Value205" newName="$sKA" />
<field signature="int $Obfuz$RVA_Value206" newName="$SKA" />
<field signature="int $Obfuz$RVA_Value207" newName="$tKA" />
<field signature="int $Obfuz$RVA_Value208" newName="$TKA" />
<field signature="int $Obfuz$RVA_Value209" newName="$uKA" />
<field signature="int $Obfuz$RVA_Value210" newName="$UKA" />
<field signature="int $Obfuz$RVA_Value211" newName="$vKA" />
<field signature="int $Obfuz$RVA_Value212" newName="$VKA" />
<field signature="int $Obfuz$RVA_Value213" newName="$wKA" />
<field signature="float $Obfuz$RVA_Value214" newName="$WKA" />
<field signature="float $Obfuz$RVA_Value215" newName="$xKA" />
<field signature="int $Obfuz$RVA_Value216" newName="$XKA" />
<field signature="int $Obfuz$RVA_Value217" newName="$yKA" />
<field signature="int $Obfuz$RVA_Value218" newName="$YKA" />
<field signature="int $Obfuz$RVA_Value219" newName="$zKA" />
<field signature="int $Obfuz$RVA_Value220" newName="$ZKA" />
<field signature="int $Obfuz$RVA_Value221" newName="$alA" />
<field signature="int $Obfuz$RVA_Value222" newName="$AlA" />
<field signature="int $Obfuz$RVA_Value223" newName="$blA" />
<field signature="int $Obfuz$RVA_Value224" newName="$BlA" />
<field signature="int $Obfuz$RVA_Value225" newName="$clA" />
<field signature="int $Obfuz$RVA_Value226" newName="$ClA" />
<field signature="int $Obfuz$RVA_Value227" newName="$dlA" />
<field signature="int $Obfuz$RVA_Value228" newName="$DlA" />
<field signature="int $Obfuz$RVA_Value229" newName="$elA" />
<field signature="int $Obfuz$RVA_Value230" newName="$ElA" />
<field signature="int $Obfuz$RVA_Value231" newName="$flA" />
<field signature="int $Obfuz$RVA_Value232" newName="$FlA" />
<field signature="int $Obfuz$RVA_Value233" newName="$glA" />
<field signature="int $Obfuz$RVA_Value234" newName="$GlA" />
<field signature="int $Obfuz$RVA_Value235" newName="$hlA" />
<field signature="int $Obfuz$RVA_Value236" newName="$HlA" />
<field signature="int $Obfuz$RVA_Value237" newName="$ilA" />
<field signature="int $Obfuz$RVA_Value238" newName="$IlA" />
<field signature="int $Obfuz$RVA_Value239" newName="$jlA" />
<field signature="int $Obfuz$RVA_Value240" newName="$JlA" />
<field signature="int $Obfuz$RVA_Value241" newName="$klA" />
<field signature="int $Obfuz$RVA_Value242" newName="$KlA" />
<field signature="int $Obfuz$RVA_Value243" newName="$llA" />
<field signature="int $Obfuz$RVA_Value244" newName="$LlA" />
<field signature="int $Obfuz$RVA_Value245" newName="$mlA" />
<field signature="int $Obfuz$RVA_Value246" newName="$MlA" />
<field signature="int $Obfuz$RVA_Value247" newName="$nlA" />
<field signature="int $Obfuz$RVA_Value248" newName="$NlA" />
<field signature="int $Obfuz$RVA_Value249" newName="$olA" />
<field signature="int $Obfuz$RVA_Value250" newName="$OlA" />
<field signature="int $Obfuz$RVA_Value251" newName="$plA" />
<field signature="int $Obfuz$RVA_Value252" newName="$PlA" />
<field signature="int $Obfuz$RVA_Value253" newName="$qlA" />
<field signature="int $Obfuz$RVA_Value254" newName="$QlA" />
<field signature="int $Obfuz$RVA_Value255" newName="$rlA" />
<field signature="int $Obfuz$RVA_Value256" newName="$RlA" />
<field signature="int $Obfuz$RVA_Value257" newName="$slA" />
<field signature="int $Obfuz$RVA_Value258" newName="$SlA" />
<field signature="int $Obfuz$RVA_Value259" newName="$tlA" />
<field signature="int $Obfuz$RVA_Value260" newName="$TlA" />
<field signature="int $Obfuz$RVA_Value261" newName="$ulA" />
<field signature="int $Obfuz$RVA_Value262" newName="$UlA" />
<field signature="int $Obfuz$RVA_Value263" newName="$vlA" />
<field signature="int $Obfuz$RVA_Value264" newName="$VlA" />
<field signature="int $Obfuz$RVA_Value265" newName="$wlA" />
<field signature="int $Obfuz$RVA_Value266" newName="$WlA" />
<field signature="int $Obfuz$RVA_Value267" newName="$xlA" />
<field signature="int $Obfuz$RVA_Value268" newName="$XlA" />
<field signature="int $Obfuz$RVA_Value269" newName="$ylA" />
<field signature="int $Obfuz$RVA_Value270" newName="$YlA" />
<field signature="int $Obfuz$RVA_Value271" newName="$zlA" />
<field signature="int $Obfuz$RVA_Value272" newName="$ZlA" />
<field signature="int $Obfuz$RVA_Value273" newName="$aLA" />
<field signature="int $Obfuz$RVA_Value274" newName="$ALA" />
<field signature="int $Obfuz$RVA_Value275" newName="$bLA" />
</type>
<type fullName="$Obfuz$ProxyCall" newFullName="$RB" status="Renamed">
<method signature="bool $Obfuz$ProxyCall::@$Obfuz$Dispatch_36812_12616511(object, object, int)" newName="$oV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_36812_12616511(Object, Object, Int32)" newStackTraceSignature="$RB:$oV(Object, Object, Int32)" />
<method signature="bool $Obfuz$ProxyCall::@$Obfuz$Dispatch_51425_12616511(object, int, int)" newName="$QV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_51425_12616511(Object, Int32, Int32)" newStackTraceSignature="$RB:$QV(Object, Int32, Int32)" />
<method signature="byte[] $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_130600(object, int)" newName="$VV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_130600(Object, Int32)" newStackTraceSignature="$RB:$VV(Object, Int32)" />
<method signature="double $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_12054002(object, int)" newName="$wV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_12054002(Object, Int32)" newStackTraceSignature="$RB:$wV(Object, Int32)" />
<method signature="double $Obfuz$ProxyCall::@$Obfuz$Dispatch_2966_12054002(nint, int)" newName="$WV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_2966_12054002(IntPtr, Int32)" newStackTraceSignature="$RB:$WV(IntPtr, Int32)" />
<method signature="System.Func`4&lt;byte[],int,int,string&gt; $Obfuz$ProxyCall::@$Obfuz$Dispatch_22824_13477626(int)" newName="$xV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_22824_13477626(Int32)" newStackTraceSignature="$RB:$xV(Int32)" />
<method signature="int $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_12091355(object, int)" newName="$XV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_12091355(Object, Int32)" newStackTraceSignature="$RB:$XV(Object, Int32)" />
<method signature="int $Obfuz$ProxyCall::@$Obfuz$Dispatch_2966_12091355(nint, int)" newName="$yV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_2966_12091355(IntPtr, Int32)" newStackTraceSignature="$RB:$yV(IntPtr, Int32)" />
<method signature="int $Obfuz$ProxyCall::@$Obfuz$Dispatch_46378_12091355(int, int, int)" newName="$YV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_46378_12091355(Int32, Int32, Int32)" newStackTraceSignature="$RB:$YV(Int32, Int32, Int32)" />
<method signature="long $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_7551190(object, int)" newName="$zV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_7551190(Object, Int32)" newStackTraceSignature="$RB:$zV(Object, Int32)" />
<method signature="long $Obfuz$ProxyCall::@$Obfuz$Dispatch_22765_7551190(long, int, int)" newName="$ZV" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_22765_7551190(Int64, Int32, Int32)" newStackTraceSignature="$RB:$ZV(Int64, Int32, Int32)" />
<method signature="long $Obfuz$ProxyCall::@$Obfuz$Dispatch_40180_7551190(long, long, int)" newName="$aw" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_40180_7551190(Int64, Int64, Int32)" newStackTraceSignature="$RB:$aw(Int64, Int64, Int32)" />
<method signature="nint $Obfuz$ProxyCall::@$Obfuz$Dispatch_33801_12828498(nint, int, int)" newName="$Aw" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_33801_12828498(IntPtr, Int32, Int32)" newStackTraceSignature="$RB:$Aw(IntPtr, Int32, Int32)" />
<method signature="float $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_3119315(object, int)" newName="$bw" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_3119315(Object, Int32)" newStackTraceSignature="$RB:$bw(Object, Int32)" />
<method signature="string $Obfuz$ProxyCall::@$Obfuz$Dispatch_36812_11558398(object, object, int)" newName="$Bw" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_36812_11558398(Object, Object, Int32)" newStackTraceSignature="$RB:$Bw(Object, Object, Int32)" />
<method signature="uint $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_3014968(object, int)" newName="$cw" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_3014968(Object, Int32)" newStackTraceSignature="$RB:$cw(Object, Int32)" />
<method signature="ulong $Obfuz$ProxyCall::@$Obfuz$Dispatch_11150_14620669(object, int)" newName="$VBA" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_11150_14620669(Object, Int32)" newStackTraceSignature="$RB:$VBA(Object, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_12519_4780505(object, byte, int)" newName="$wBA" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_12519_4780505(Object, Byte, Int32)" newStackTraceSignature="$RB:$wBA(Object, Byte, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_17483_4780505(object, ulong, int)" newName="$WBA" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_17483_4780505(Object, UInt64, Int32)" newStackTraceSignature="$RB:$WBA(Object, UInt64, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_19129_4780505(object, float, int)" newName="$xBA" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_19129_4780505(Object, Single, Int32)" newStackTraceSignature="$RB:$xBA(Object, Single, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_20882_4780505(object, uint, int)" newName="$XBA" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_20882_4780505(Object, UInt32, Int32)" newStackTraceSignature="$RB:$XBA(Object, UInt32, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_27714_4780505(object, byte[], int)" newName="$yBA" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_27714_4780505(Object, Byte[], Int32)" newStackTraceSignature="$RB:$yBA(Object, Byte[], Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_3304_4780505(object, long, int)" newName="$YBA" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_3304_4780505(Object, Int64, Int32)" newStackTraceSignature="$RB:$YBA(Object, Int64, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_34868_4780505(object, byte[], int, int, int)" newName="$zBA" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_34868_4780505(Object, Byte[], Int32, Int32, Int32)" newStackTraceSignature="$RB:$zBA(Object, Byte[], Int32, Int32, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_45886_4780505(nuint, nuint, int)" newName="$ZBA" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_45886_4780505(UIntPtr, UIntPtr, Int32)" newStackTraceSignature="$RB:$ZBA(UIntPtr, UIntPtr, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_46324_4780505(object, double, int)" newName="$acA" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_46324_4780505(Object, Double, Int32)" newStackTraceSignature="$RB:$acA(Object, Double, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_51425_4780505(object, int, int)" newName="$AcA" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_51425_4780505(Object, Int32, Int32)" newStackTraceSignature="$RB:$AcA(Object, Int32, Int32)" />
<method signature="void $Obfuz$ProxyCall::@$Obfuz$Dispatch_59828_4780505(object, nuint, nuint, int)" newName="$bcA" oldStackTraceSignature="$Obfuz$ProxyCall:$Obfuz$Dispatch_59828_4780505(Object, UIntPtr, UIntPtr, Int32)" newStackTraceSignature="$RB:$bcA(Object, UIntPtr, UIntPtr, Int32)" />
</type>
<type fullName="$Obfuz$RVA$0" newFullName="$rB" status="Renamed">
<field signature="[GameProto]$ObfuzRVA$DataHolder2048 $RVA_Data0" newName="$BLA" />
<field signature="byte[] $RVA_Value0" newName="$cLA" />
</type>
<type fullName="$ObfuzRVA$DataHolder2048" newFullName="$JB" status="Renamed" />
<type fullName="Luban.BeanBase" newFullName="$c.$Db" status="Renamed">
<method signature="int Luban.BeanBase::GetTypeId([GameProto]Luban.BeanBase)" newName="$GcA" oldStackTraceSignature="Luban.BeanBase:GetTypeId()" newStackTraceSignature="$c.$Db:$GcA()" />
</type>
<type fullName="Luban.ByteBuf" newFullName="$c.$Tb" status="Renamed">
<field signature="int &lt;ReaderIndex&gt;k__BackingField" newName="$QIA" />
<field signature="int &lt;WriterIndex&gt;k__BackingField" newName="$rIA" />
<field signature="System.Action`1&lt;[GameProto]Luban.ByteBuf&gt; _releaser" newName="$RIA" />
<field signature="byte[] &lt;Bytes&gt;k__BackingField" newName="$sIA" />
<field signature="int MIN_CAPACITY" newName="$SIA" />
<field signature="System.Func`4&lt;byte[],int,int,string&gt; &lt;StringCacheFinder&gt;k__BackingField" newName="$tIA" />
<property signature="int ReaderIndex" newName="$a" />
<property signature="int WriterIndex" newName="$A" />
<property signature="int Capacity" newName="$b" />
<property signature="int Size" newName="$B" />
<property signature="bool Empty" newName="$c" />
<property signature="bool NotEmpty" newName="$C" />
<property signature="byte[] Bytes" newName="$d" />
<property signature="int Remaining" newName="$D" />
<property signature="int NotCompactWritable" newName="$e" />
<property signature="System.Func`4&lt;byte[],int,int,string&gt; StringCacheFinder" newName="$E" />
<method signature="[GameProto]Luban.ByteBuf Luban.ByteBuf::@Wrap(byte[])" newName="$iU" oldStackTraceSignature="Luban.ByteBuf:Wrap(Byte[])" newStackTraceSignature="$c.$Tb:$iU(Byte[])" />
<method signature="void Luban.ByteBuf::Replace([GameProto]Luban.ByteBuf, byte[])" newName="$IU" oldStackTraceSignature="Luban.ByteBuf:Replace(Byte[])" newStackTraceSignature="$c.$Tb:$IU(Byte[])" />
<method signature="void Luban.ByteBuf::Replace([GameProto]Luban.ByteBuf, byte[], int, int)" newName="$jU" oldStackTraceSignature="Luban.ByteBuf:Replace(Byte[], Int32, Int32)" newStackTraceSignature="$c.$Tb:$jU(Byte[], Int32, Int32)" />
<method signature="int Luban.ByteBuf::get_ReaderIndex([GameProto]Luban.ByteBuf)" newName="$JU" oldStackTraceSignature="Luban.ByteBuf:get_ReaderIndex()" newStackTraceSignature="$c.$Tb:$JU()" />
<method signature="void Luban.ByteBuf::set_ReaderIndex([GameProto]Luban.ByteBuf, int)" newName="$kU" oldStackTraceSignature="Luban.ByteBuf:set_ReaderIndex(Int32)" newStackTraceSignature="$c.$Tb:$kU(Int32)" />
<method signature="int Luban.ByteBuf::get_WriterIndex([GameProto]Luban.ByteBuf)" newName="$KU" oldStackTraceSignature="Luban.ByteBuf:get_WriterIndex()" newStackTraceSignature="$c.$Tb:$KU()" />
<method signature="void Luban.ByteBuf::set_WriterIndex([GameProto]Luban.ByteBuf, int)" newName="$lU" oldStackTraceSignature="Luban.ByteBuf:set_WriterIndex(Int32)" newStackTraceSignature="$c.$Tb:$lU(Int32)" />
<method signature="int Luban.ByteBuf::get_Capacity([GameProto]Luban.ByteBuf)" newName="$LU" oldStackTraceSignature="Luban.ByteBuf:get_Capacity()" newStackTraceSignature="$c.$Tb:$LU()" />
<method signature="int Luban.ByteBuf::get_Size([GameProto]Luban.ByteBuf)" newName="$mU" oldStackTraceSignature="Luban.ByteBuf:get_Size()" newStackTraceSignature="$c.$Tb:$mU()" />
<method signature="bool Luban.ByteBuf::get_Empty([GameProto]Luban.ByteBuf)" newName="$MU" oldStackTraceSignature="Luban.ByteBuf:get_Empty()" newStackTraceSignature="$c.$Tb:$MU()" />
<method signature="bool Luban.ByteBuf::get_NotEmpty([GameProto]Luban.ByteBuf)" newName="$nU" oldStackTraceSignature="Luban.ByteBuf:get_NotEmpty()" newStackTraceSignature="$c.$Tb:$nU()" />
<method signature="void Luban.ByteBuf::AddWriteIndex([GameProto]Luban.ByteBuf, int)" newName="$NU" oldStackTraceSignature="Luban.ByteBuf:AddWriteIndex(Int32)" newStackTraceSignature="$c.$Tb:$NU(Int32)" />
<method signature="void Luban.ByteBuf::AddReadIndex([GameProto]Luban.ByteBuf, int)" newName="$oU" oldStackTraceSignature="Luban.ByteBuf:AddReadIndex(Int32)" newStackTraceSignature="$c.$Tb:$oU(Int32)" />
<method signature="byte[] Luban.ByteBuf::get_Bytes([GameProto]Luban.ByteBuf)" newName="$OU" oldStackTraceSignature="Luban.ByteBuf:get_Bytes()" newStackTraceSignature="$c.$Tb:$OU()" />
<method signature="void Luban.ByteBuf::set_Bytes([GameProto]Luban.ByteBuf, byte[])" newName="$pU" oldStackTraceSignature="Luban.ByteBuf:set_Bytes(Byte[])" newStackTraceSignature="$c.$Tb:$pU(Byte[])" />
<method signature="byte[] Luban.ByteBuf::CopyData([GameProto]Luban.ByteBuf)" newName="$PU" oldStackTraceSignature="Luban.ByteBuf:CopyData()" newStackTraceSignature="$c.$Tb:$PU()" />
<method signature="int Luban.ByteBuf::get_Remaining([GameProto]Luban.ByteBuf)" newName="$qU" oldStackTraceSignature="Luban.ByteBuf:get_Remaining()" newStackTraceSignature="$c.$Tb:$qU()" />
<method signature="void Luban.ByteBuf::DiscardReadBytes([GameProto]Luban.ByteBuf)" newName="$QU" oldStackTraceSignature="Luban.ByteBuf:DiscardReadBytes()" newStackTraceSignature="$c.$Tb:$QU()" />
<method signature="int Luban.ByteBuf::get_NotCompactWritable([GameProto]Luban.ByteBuf)" newName="$rU" oldStackTraceSignature="Luban.ByteBuf:get_NotCompactWritable()" newStackTraceSignature="$c.$Tb:$rU()" />
<method signature="void Luban.ByteBuf::WriteBytesWithoutSize([GameProto]Luban.ByteBuf, byte[])" newName="$RU" oldStackTraceSignature="Luban.ByteBuf:WriteBytesWithoutSize(Byte[])" newStackTraceSignature="$c.$Tb:$RU(Byte[])" />
<method signature="void Luban.ByteBuf::WriteBytesWithoutSize([GameProto]Luban.ByteBuf, byte[], int, int)" newName="$sU" oldStackTraceSignature="Luban.ByteBuf:WriteBytesWithoutSize(Byte[], Int32, Int32)" newStackTraceSignature="$c.$Tb:$sU(Byte[], Int32, Int32)" />
<method signature="void Luban.ByteBuf::Clear([GameProto]Luban.ByteBuf)" newName="$SU" oldStackTraceSignature="Luban.ByteBuf:Clear()" newStackTraceSignature="$c.$Tb:$SU()" />
<method signature="int Luban.ByteBuf::@PropSize(int, int)" newName="$tU" oldStackTraceSignature="Luban.ByteBuf:PropSize(Int32, Int32)" newStackTraceSignature="$c.$Tb:$tU(Int32, Int32)" />
<method signature="void Luban.ByteBuf::EnsureWrite0([GameProto]Luban.ByteBuf, int)" newName="$TU" oldStackTraceSignature="Luban.ByteBuf:EnsureWrite0(Int32)" newStackTraceSignature="$c.$Tb:$TU(Int32)" />
<method signature="void Luban.ByteBuf::EnsureWrite([GameProto]Luban.ByteBuf, int)" newName="$uU" oldStackTraceSignature="Luban.ByteBuf:EnsureWrite(Int32)" newStackTraceSignature="$c.$Tb:$uU(Int32)" />
<method signature="void Luban.ByteBuf::EnsureRead([GameProto]Luban.ByteBuf, int)" newName="$UU" oldStackTraceSignature="Luban.ByteBuf:EnsureRead(Int32)" newStackTraceSignature="$c.$Tb:$UU(Int32)" />
<method signature="bool Luban.ByteBuf::CanRead([GameProto]Luban.ByteBuf, int)" newName="$vU" oldStackTraceSignature="Luban.ByteBuf:CanRead(Int32)" newStackTraceSignature="$c.$Tb:$vU(Int32)" />
<method signature="void Luban.ByteBuf::Append([GameProto]Luban.ByteBuf, byte)" newName="$VU" oldStackTraceSignature="Luban.ByteBuf:Append(Byte)" newStackTraceSignature="$c.$Tb:$VU(Byte)" />
<method signature="void Luban.ByteBuf::WriteBool([GameProto]Luban.ByteBuf, bool)" newName="$wU" oldStackTraceSignature="Luban.ByteBuf:WriteBool(Boolean)" newStackTraceSignature="$c.$Tb:$wU(Boolean)" />
<method signature="bool Luban.ByteBuf::ReadBool([GameProto]Luban.ByteBuf)" newName="$WU" oldStackTraceSignature="Luban.ByteBuf:ReadBool()" newStackTraceSignature="$c.$Tb:$WU()" />
<method signature="void Luban.ByteBuf::WriteByte([GameProto]Luban.ByteBuf, byte)" newName="$xU" oldStackTraceSignature="Luban.ByteBuf:WriteByte(Byte)" newStackTraceSignature="$c.$Tb:$xU(Byte)" />
<method signature="byte Luban.ByteBuf::ReadByte([GameProto]Luban.ByteBuf)" newName="$XU" oldStackTraceSignature="Luban.ByteBuf:ReadByte()" newStackTraceSignature="$c.$Tb:$XU()" />
<method signature="void Luban.ByteBuf::WriteShort([GameProto]Luban.ByteBuf, short)" newName="$yU" oldStackTraceSignature="Luban.ByteBuf:WriteShort(Int16)" newStackTraceSignature="$c.$Tb:$yU(Int16)" />
<method signature="short Luban.ByteBuf::ReadShort([GameProto]Luban.ByteBuf)" newName="$YU" oldStackTraceSignature="Luban.ByteBuf:ReadShort()" newStackTraceSignature="$c.$Tb:$YU()" />
<method signature="short Luban.ByteBuf::ReadFshort([GameProto]Luban.ByteBuf)" newName="$zU" oldStackTraceSignature="Luban.ByteBuf:ReadFshort()" newStackTraceSignature="$c.$Tb:$zU()" />
<method signature="void Luban.ByteBuf::WriteFshort([GameProto]Luban.ByteBuf, short)" newName="$ZU" oldStackTraceSignature="Luban.ByteBuf:WriteFshort(Int16)" newStackTraceSignature="$c.$Tb:$ZU(Int16)" />
<method signature="void Luban.ByteBuf::WriteInt([GameProto]Luban.ByteBuf, int)" newName="$av" oldStackTraceSignature="Luban.ByteBuf:WriteInt(Int32)" newStackTraceSignature="$c.$Tb:$av(Int32)" />
<method signature="int Luban.ByteBuf::ReadInt([GameProto]Luban.ByteBuf)" newName="$Av" oldStackTraceSignature="Luban.ByteBuf:ReadInt()" newStackTraceSignature="$c.$Tb:$Av()" />
<method signature="void Luban.ByteBuf::WriteUint([GameProto]Luban.ByteBuf, uint)" newName="$bv" oldStackTraceSignature="Luban.ByteBuf:WriteUint(UInt32)" newStackTraceSignature="$c.$Tb:$bv(UInt32)" />
<method signature="uint Luban.ByteBuf::ReadUint([GameProto]Luban.ByteBuf)" newName="$Bv" oldStackTraceSignature="Luban.ByteBuf:ReadUint()" newStackTraceSignature="$c.$Tb:$Bv()" />
<method signature="void Luban.ByteBuf::WriteUint_Unsafe([GameProto]Luban.ByteBuf, uint)" newName="$cv" oldStackTraceSignature="Luban.ByteBuf:WriteUint_Unsafe(UInt32)" newStackTraceSignature="$c.$Tb:$cv(UInt32)" />
<method signature="uint Luban.ByteBuf::ReadUint_Unsafe([GameProto]Luban.ByteBuf)" newName="$Cv" oldStackTraceSignature="Luban.ByteBuf:ReadUint_Unsafe()" newStackTraceSignature="$c.$Tb:$Cv()" />
<method signature="int Luban.ByteBuf::ReadFint([GameProto]Luban.ByteBuf)" newName="$dv" oldStackTraceSignature="Luban.ByteBuf:ReadFint()" newStackTraceSignature="$c.$Tb:$dv()" />
<method signature="void Luban.ByteBuf::WriteFint([GameProto]Luban.ByteBuf, int)" newName="$Dv" oldStackTraceSignature="Luban.ByteBuf:WriteFint(Int32)" newStackTraceSignature="$c.$Tb:$Dv(Int32)" />
<method signature="int Luban.ByteBuf::ReadFint_Safe([GameProto]Luban.ByteBuf)" newName="$ev" oldStackTraceSignature="Luban.ByteBuf:ReadFint_Safe()" newStackTraceSignature="$c.$Tb:$ev()" />
<method signature="void Luban.ByteBuf::WriteFint_Safe([GameProto]Luban.ByteBuf, int)" newName="$Ev" oldStackTraceSignature="Luban.ByteBuf:WriteFint_Safe(Int32)" newStackTraceSignature="$c.$Tb:$Ev(Int32)" />
<method signature="void Luban.ByteBuf::WriteLong([GameProto]Luban.ByteBuf, long)" newName="$fv" oldStackTraceSignature="Luban.ByteBuf:WriteLong(Int64)" newStackTraceSignature="$c.$Tb:$fv(Int64)" />
<method signature="long Luban.ByteBuf::ReadLong([GameProto]Luban.ByteBuf)" newName="$Fv" oldStackTraceSignature="Luban.ByteBuf:ReadLong()" newStackTraceSignature="$c.$Tb:$Fv()" />
<method signature="void Luban.ByteBuf::WriteNumberAsLong([GameProto]Luban.ByteBuf, double)" newName="$gv" oldStackTraceSignature="Luban.ByteBuf:WriteNumberAsLong(Double)" newStackTraceSignature="$c.$Tb:$gv(Double)" />
<method signature="double Luban.ByteBuf::ReadLongAsNumber([GameProto]Luban.ByteBuf)" newName="$Gv" oldStackTraceSignature="Luban.ByteBuf:ReadLongAsNumber()" newStackTraceSignature="$c.$Tb:$Gv()" />
<method signature="void Luban.ByteBuf::WriteUlong([GameProto]Luban.ByteBuf, ulong)" newName="$hv" oldStackTraceSignature="Luban.ByteBuf:WriteUlong(UInt64)" newStackTraceSignature="$c.$Tb:$hv(UInt64)" />
<method signature="ulong Luban.ByteBuf::ReadUlong([GameProto]Luban.ByteBuf)" newName="$Hv" oldStackTraceSignature="Luban.ByteBuf:ReadUlong()" newStackTraceSignature="$c.$Tb:$Hv()" />
<method signature="void Luban.ByteBuf::WriteFlong([GameProto]Luban.ByteBuf, long)" newName="$iv" oldStackTraceSignature="Luban.ByteBuf:WriteFlong(Int64)" newStackTraceSignature="$c.$Tb:$iv(Int64)" />
<method signature="long Luban.ByteBuf::ReadFlong([GameProto]Luban.ByteBuf)" newName="$jv" oldStackTraceSignature="Luban.ByteBuf:ReadFlong()" newStackTraceSignature="$c.$Tb:$jv()" />
<method signature="void Luban.ByteBuf::@Copy8(byte*, byte*)" newName="$Jv" oldStackTraceSignature="Luban.ByteBuf:Copy8(Byte*, Byte*)" newStackTraceSignature="$c.$Tb:$Jv(Byte*, Byte*)" />
<method signature="void Luban.ByteBuf::@Copy4(byte*, byte*)" newName="$kv" oldStackTraceSignature="Luban.ByteBuf:Copy4(Byte*, Byte*)" newStackTraceSignature="$c.$Tb:$kv(Byte*, Byte*)" />
<method signature="void Luban.ByteBuf::WriteFloat([GameProto]Luban.ByteBuf, float)" newName="$Kv" oldStackTraceSignature="Luban.ByteBuf:WriteFloat(Single)" newStackTraceSignature="$c.$Tb:$Kv(Single)" />
<method signature="float Luban.ByteBuf::ReadFloat([GameProto]Luban.ByteBuf)" newName="$lv" oldStackTraceSignature="Luban.ByteBuf:ReadFloat()" newStackTraceSignature="$c.$Tb:$lv()" />
<method signature="void Luban.ByteBuf::WriteDouble([GameProto]Luban.ByteBuf, double)" newName="$Lv" oldStackTraceSignature="Luban.ByteBuf:WriteDouble(Double)" newStackTraceSignature="$c.$Tb:$Lv(Double)" />
<method signature="double Luban.ByteBuf::ReadDouble([GameProto]Luban.ByteBuf)" newName="$mv" oldStackTraceSignature="Luban.ByteBuf:ReadDouble()" newStackTraceSignature="$c.$Tb:$mv()" />
<method signature="void Luban.ByteBuf::WriteSize([GameProto]Luban.ByteBuf, int)" newName="$Mv" oldStackTraceSignature="Luban.ByteBuf:WriteSize(Int32)" newStackTraceSignature="$c.$Tb:$Mv(Int32)" />
<method signature="int Luban.ByteBuf::ReadSize([GameProto]Luban.ByteBuf)" newName="$nv" oldStackTraceSignature="Luban.ByteBuf:ReadSize()" newStackTraceSignature="$c.$Tb:$nv()" />
<method signature="void Luban.ByteBuf::WriteSint([GameProto]Luban.ByteBuf, int)" newName="$ov" oldStackTraceSignature="Luban.ByteBuf:WriteSint(Int32)" newStackTraceSignature="$c.$Tb:$ov(Int32)" />
<method signature="int Luban.ByteBuf::ReadSint([GameProto]Luban.ByteBuf)" newName="$Ov" oldStackTraceSignature="Luban.ByteBuf:ReadSint()" newStackTraceSignature="$c.$Tb:$Ov()" />
<method signature="void Luban.ByteBuf::WriteSlong([GameProto]Luban.ByteBuf, long)" newName="$pv" oldStackTraceSignature="Luban.ByteBuf:WriteSlong(Int64)" newStackTraceSignature="$c.$Tb:$pv(Int64)" />
<method signature="long Luban.ByteBuf::ReadSlong([GameProto]Luban.ByteBuf)" newName="$Pv" oldStackTraceSignature="Luban.ByteBuf:ReadSlong()" newStackTraceSignature="$c.$Tb:$Pv()" />
<method signature="void Luban.ByteBuf::WriteString([GameProto]Luban.ByteBuf, string)" newName="$qv" oldStackTraceSignature="Luban.ByteBuf:WriteString(String)" newStackTraceSignature="$c.$Tb:$qv(String)" />
<method signature="System.Func`4&lt;byte[],int,int,string&gt; Luban.ByteBuf::@get_StringCacheFinder()" newName="$Qv" oldStackTraceSignature="Luban.ByteBuf:get_StringCacheFinder()" newStackTraceSignature="$c.$Tb:$Qv()" />
<method signature="void Luban.ByteBuf::@set_StringCacheFinder(System.Func`4&lt;byte[],int,int,string&gt;)" newName="$rv" oldStackTraceSignature="Luban.ByteBuf:set_StringCacheFinder(Func`4)" newStackTraceSignature="$c.$Tb:$rv(Func`4)" />
<method signature="string Luban.ByteBuf::ReadString([GameProto]Luban.ByteBuf)" newName="$sv" oldStackTraceSignature="Luban.ByteBuf:ReadString()" newStackTraceSignature="$c.$Tb:$sv()" />
<method signature="void Luban.ByteBuf::WriteBytes([GameProto]Luban.ByteBuf, byte[])" newName="$tv" oldStackTraceSignature="Luban.ByteBuf:WriteBytes(Byte[])" newStackTraceSignature="$c.$Tb:$tv(Byte[])" />
<method signature="byte[] Luban.ByteBuf::ReadBytes([GameProto]Luban.ByteBuf)" newName="$uv" oldStackTraceSignature="Luban.ByteBuf:ReadBytes()" newStackTraceSignature="$c.$Tb:$uv()" />
<method signature="void Luban.ByteBuf::WriteComplex([GameProto]Luban.ByteBuf, [System.Numerics]System.Numerics.Complex)" newName="$Uv" oldStackTraceSignature="Luban.ByteBuf:WriteComplex(Complex)" newStackTraceSignature="$c.$Tb:$Uv(Complex)" />
<method signature="[System.Numerics]System.Numerics.Complex Luban.ByteBuf::ReadComplex([GameProto]Luban.ByteBuf)" newName="$vv" oldStackTraceSignature="Luban.ByteBuf:ReadComplex()" newStackTraceSignature="$c.$Tb:$vv()" />
<method signature="void Luban.ByteBuf::WriteVector2([GameProto]Luban.ByteBuf, [System.Numerics]System.Numerics.Vector2)" newName="$Vv" oldStackTraceSignature="Luban.ByteBuf:WriteVector2(Vector2)" newStackTraceSignature="$c.$Tb:$Vv(Vector2)" />
<method signature="[System.Numerics]System.Numerics.Vector2 Luban.ByteBuf::ReadVector2([GameProto]Luban.ByteBuf)" newName="$wv" oldStackTraceSignature="Luban.ByteBuf:ReadVector2()" newStackTraceSignature="$c.$Tb:$wv()" />
<method signature="void Luban.ByteBuf::WriteVector3([GameProto]Luban.ByteBuf, [System.Numerics]System.Numerics.Vector3)" newName="$Wv" oldStackTraceSignature="Luban.ByteBuf:WriteVector3(Vector3)" newStackTraceSignature="$c.$Tb:$Wv(Vector3)" />
<method signature="[System.Numerics]System.Numerics.Vector3 Luban.ByteBuf::ReadVector3([GameProto]Luban.ByteBuf)" newName="$xv" oldStackTraceSignature="Luban.ByteBuf:ReadVector3()" newStackTraceSignature="$c.$Tb:$xv()" />
<method signature="void Luban.ByteBuf::WriteVector4([GameProto]Luban.ByteBuf, [System.Numerics]System.Numerics.Vector4)" newName="$Xv" oldStackTraceSignature="Luban.ByteBuf:WriteVector4(Vector4)" newStackTraceSignature="$c.$Tb:$Xv(Vector4)" />
<method signature="[System.Numerics]System.Numerics.Vector4 Luban.ByteBuf::ReadVector4([GameProto]Luban.ByteBuf)" newName="$yv" oldStackTraceSignature="Luban.ByteBuf:ReadVector4()" newStackTraceSignature="$c.$Tb:$yv()" />
<method signature="void Luban.ByteBuf::WriteQuaternion([GameProto]Luban.ByteBuf, [System.Numerics]System.Numerics.Quaternion)" newName="$Yv" oldStackTraceSignature="Luban.ByteBuf:WriteQuaternion(Quaternion)" newStackTraceSignature="$c.$Tb:$Yv(Quaternion)" />
<method signature="[System.Numerics]System.Numerics.Quaternion Luban.ByteBuf::ReadQuaternion([GameProto]Luban.ByteBuf)" newName="$zv" oldStackTraceSignature="Luban.ByteBuf:ReadQuaternion()" newStackTraceSignature="$c.$Tb:$zv()" />
<method signature="void Luban.ByteBuf::WriteMatrix4x4([GameProto]Luban.ByteBuf, [System.Numerics]System.Numerics.Matrix4x4)" newName="$Zv" oldStackTraceSignature="Luban.ByteBuf:WriteMatrix4x4(Matrix4x4)" newStackTraceSignature="$c.$Tb:$Zv(Matrix4x4)" />
<method signature="[System.Numerics]System.Numerics.Matrix4x4 Luban.ByteBuf::ReadMatrix4x4([GameProto]Luban.ByteBuf)" newName="$aV" oldStackTraceSignature="Luban.ByteBuf:ReadMatrix4x4()" newStackTraceSignature="$c.$Tb:$aV()" />
<method signature="void Luban.ByteBuf::SkipBytes([GameProto]Luban.ByteBuf)" newName="$AV" oldStackTraceSignature="Luban.ByteBuf:SkipBytes()" newStackTraceSignature="$c.$Tb:$AV()" />
<method signature="void Luban.ByteBuf::WriteByteBufWithSize([GameProto]Luban.ByteBuf, [GameProto]Luban.ByteBuf)" newName="$BV" oldStackTraceSignature="Luban.ByteBuf:WriteByteBufWithSize(ByteBuf)" newStackTraceSignature="$c.$Tb:$BV($Tb)" />
<method signature="void Luban.ByteBuf::WriteByteBufWithoutSize([GameProto]Luban.ByteBuf, [GameProto]Luban.ByteBuf)" newName="$cV" oldStackTraceSignature="Luban.ByteBuf:WriteByteBufWithoutSize(ByteBuf)" newStackTraceSignature="$c.$Tb:$cV($Tb)" />
<method signature="bool Luban.ByteBuf::TryReadByte([GameProto]Luban.ByteBuf, byte&amp;)" newName="$CV" oldStackTraceSignature="Luban.ByteBuf:TryReadByte(Byte&amp;)" newStackTraceSignature="$c.$Tb:$CV(Byte&amp;)" />
<method signature="[GameProto]Luban.EDeserializeError Luban.ByteBuf::TryDeserializeInplaceByteBuf([GameProto]Luban.ByteBuf, int, [GameProto]Luban.ByteBuf)" newName="$dV" oldStackTraceSignature="Luban.ByteBuf:TryDeserializeInplaceByteBuf(Int32, ByteBuf)" newStackTraceSignature="$c.$Tb:$dV(Int32, $Tb)" />
<method signature="void Luban.ByteBuf::WriteRawTag([GameProto]Luban.ByteBuf, byte)" newName="$DV" oldStackTraceSignature="Luban.ByteBuf:WriteRawTag(Byte)" newStackTraceSignature="$c.$Tb:$DV(Byte)" />
<method signature="void Luban.ByteBuf::WriteRawTag([GameProto]Luban.ByteBuf, byte, byte)" newName="$eV" oldStackTraceSignature="Luban.ByteBuf:WriteRawTag(Byte, Byte)" newStackTraceSignature="$c.$Tb:$eV(Byte, Byte)" />
<method signature="void Luban.ByteBuf::WriteRawTag([GameProto]Luban.ByteBuf, byte, byte, byte)" newName="$fV" oldStackTraceSignature="Luban.ByteBuf:WriteRawTag(Byte, Byte, Byte)" newStackTraceSignature="$c.$Tb:$fV(Byte, Byte, Byte)" />
<method signature="void Luban.ByteBuf::BeginWriteSegment([GameProto]Luban.ByteBuf, int&amp;)" newName="$FV" oldStackTraceSignature="Luban.ByteBuf:BeginWriteSegment(Int32&amp;)" newStackTraceSignature="$c.$Tb:$FV(Int32&amp;)" />
<method signature="void Luban.ByteBuf::EndWriteSegment([GameProto]Luban.ByteBuf, int)" newName="$GV" oldStackTraceSignature="Luban.ByteBuf:EndWriteSegment(Int32)" newStackTraceSignature="$c.$Tb:$GV(Int32)" />
<method signature="void Luban.ByteBuf::ReadSegment([GameProto]Luban.ByteBuf, int&amp;, int&amp;)" newName="$HV" oldStackTraceSignature="Luban.ByteBuf:ReadSegment(Int32&amp;, Int32&amp;)" newStackTraceSignature="$c.$Tb:$HV(Int32&amp;, Int32&amp;)" />
<method signature="void Luban.ByteBuf::ReadSegment([GameProto]Luban.ByteBuf, [GameProto]Luban.ByteBuf)" newName="$iV" oldStackTraceSignature="Luban.ByteBuf:ReadSegment(ByteBuf)" newStackTraceSignature="$c.$Tb:$iV($Tb)" />
<method signature="void Luban.ByteBuf::EnterSegment([GameProto]Luban.ByteBuf, [GameProto]Luban.SegmentSaveState&amp;)" newName="$IV" oldStackTraceSignature="Luban.ByteBuf:EnterSegment(SegmentSaveState&amp;)" newStackTraceSignature="$c.$Tb:$IV($ob&amp;)" />
<method signature="void Luban.ByteBuf::LeaveSegment([GameProto]Luban.ByteBuf, [GameProto]Luban.SegmentSaveState)" newName="$jV" oldStackTraceSignature="Luban.ByteBuf:LeaveSegment(SegmentSaveState)" newStackTraceSignature="$c.$Tb:$jV($ob)" />
<method signature="[GameProto]Luban.ByteBuf Luban.ByteBuf::@FromString(string)" newName="$JV" oldStackTraceSignature="Luban.ByteBuf:FromString(String)" newStackTraceSignature="$c.$Tb:$JV(String)" />
<method signature="void Luban.ByteBuf::Release([GameProto]Luban.ByteBuf)" newName="$kV" oldStackTraceSignature="Luban.ByteBuf:Release()" newStackTraceSignature="$c.$Tb:$kV()" />
</type>
<type fullName="Luban.EDeserializeError" newFullName="$c.$mb" status="Renamed">
<field signature="[GameProto]Luban.EDeserializeError OK" newName="$oIA" />
<field signature="[GameProto]Luban.EDeserializeError NOT_ENOUGH" newName="$OIA" />
<field signature="[GameProto]Luban.EDeserializeError EXCEED_SIZE" newName="$pIA" />
</type>
<type fullName="Luban.ITypeId" newFullName="$c.$Wb" status="Renamed">
<method signature="int Luban.ITypeId::GetTypeId([GameProto]Luban.ITypeId)" newName="$hcA" oldStackTraceSignature="Luban.ITypeId:GetTypeId()" newStackTraceSignature="$c.$Wb:$hcA()" />
</type>
<type fullName="Luban.SegmentSaveState" newFullName="$c.$ob" status="Renamed">
<field signature="int &lt;ReaderIndex&gt;k__BackingField" newName="$PIA" />
<field signature="int &lt;WriterIndex&gt;k__BackingField" newName="$qIA" />
<property signature="int ReaderIndex" newName="$a" />
<property signature="int WriterIndex" newName="$A" />
<method signature="int Luban.SegmentSaveState::get_ReaderIndex([GameProto]Luban.SegmentSaveState&amp;)" newName="$hU" oldStackTraceSignature="Luban.SegmentSaveState:get_ReaderIndex()" newStackTraceSignature="$c.$ob:$hU()" />
<method signature="int Luban.SegmentSaveState::get_WriterIndex([GameProto]Luban.SegmentSaveState&amp;)" newName="$HU" oldStackTraceSignature="Luban.SegmentSaveState:get_WriterIndex()" newStackTraceSignature="$c.$ob:$HU()" />
</type>
<type fullName="Luban.SerializationException" newFullName="$c.$Nb" status="Renamed" />
<type fullName="Luban.StringUtil" newFullName="$c.$xb" status="Renamed">
<method signature="string Luban.StringUtil::@ToStr(object)" newName="$KV" oldStackTraceSignature="Luban.StringUtil:ToStr(Object)" newStackTraceSignature="$c.$xb:$KV(Object)" />
<method signature="string Luban.StringUtil::@ToStr(object, System.Text.StringBuilder)" newName="$lV" oldStackTraceSignature="Luban.StringUtil:ToStr(Object, StringBuilder)" newStackTraceSignature="$c.$xb:$lV(Object, StringBuilder)" />
<method signature="string Luban.StringUtil::@ArrayToString`1(!!0[])" newName="$LV" oldStackTraceSignature="Luban.StringUtil:ArrayToString(T[])" newStackTraceSignature="$c.$xb:$LV(T[])" />
<method signature="string Luban.StringUtil::@CollectionToString`1(System.Collections.Generic.IEnumerable`1&lt;!!0&gt;)" newName="$mV" oldStackTraceSignature="Luban.StringUtil:CollectionToString(IEnumerable`1)" newStackTraceSignature="$c.$xb:$mV(IEnumerable`1)" />
<method signature="string Luban.StringUtil::@CollectionToString`2(System.Collections.Generic.IDictionary`2&lt;!!0,!!1&gt;)" newName="$MV" oldStackTraceSignature="Luban.StringUtil:CollectionToString(IDictionary`2)" newStackTraceSignature="$c.$xb:$MV(IDictionary`2)" />
</type>
</assembly>
<assembly name="Obfuz.Runtime">
<type fullName="Obfuz.AssetUtility" newFullName="$a.$a" status="Renamed">
<method signature="void Obfuz.AssetUtility::@VerifySecretKey(int, int)" newName="$a" oldStackTraceSignature="Obfuz.AssetUtility:VerifySecretKey(Int32, Int32)" newStackTraceSignature="$a.$a:$a(Int32, Int32)" />
@@ -5470,6 +5876,7 @@
<method signature="[System]System.Collections.Generic.LinkedListNode`1&lt;!0&gt; TEngine.GameFrameworkLinkedList`1::AddLast([TEngine.Runtime]TEngine.GameFrameworkLinkedList`1&lt;!0&gt;, !0)" newName="$Lb" oldStackTraceSignature="TEngine.GameFrameworkLinkedList`1:AddLast(T)" newStackTraceSignature="$A.$i`1:$Lb(T)" />
<method signature="void TEngine.GameFrameworkLinkedList`1::AddLast([TEngine.Runtime]TEngine.GameFrameworkLinkedList`1&lt;!0&gt;, [System]System.Collections.Generic.LinkedListNode`1&lt;!0&gt;)" newName="$mb" oldStackTraceSignature="TEngine.GameFrameworkLinkedList`1:AddLast(LinkedListNode`1)" newStackTraceSignature="$A.$i`1:$mb(LinkedListNode`1)" />
<method signature="void TEngine.GameFrameworkLinkedList`1::ClearCachedNodes([TEngine.Runtime]TEngine.GameFrameworkLinkedList`1&lt;!0&gt;)" newName="$Mb" oldStackTraceSignature="TEngine.GameFrameworkLinkedList`1:ClearCachedNodes()" newStackTraceSignature="$A.$i`1:$Mb()" />
<method signature="void TEngine.GameFrameworkLinkedList`1::CopyTo([TEngine.Runtime]TEngine.GameFrameworkLinkedList`1&lt;!0&gt;, System.Array, int)" newName="$bU" oldStackTraceSignature="TEngine.GameFrameworkLinkedList`1:CopyTo(Array, Int32)" newStackTraceSignature="$A.$i`1:$bU(Array, Int32)" />
<method signature="[System]System.Collections.Generic.LinkedListNode`1&lt;!0&gt; TEngine.GameFrameworkLinkedList`1::Find([TEngine.Runtime]TEngine.GameFrameworkLinkedList`1&lt;!0&gt;, !0)" newName="$nb" oldStackTraceSignature="TEngine.GameFrameworkLinkedList`1:Find(T)" newStackTraceSignature="$A.$i`1:$nb(T)" />
<method signature="[System]System.Collections.Generic.LinkedListNode`1&lt;!0&gt; TEngine.GameFrameworkLinkedList`1::FindLast([TEngine.Runtime]TEngine.GameFrameworkLinkedList`1&lt;!0&gt;, !0)" newName="$Nb" oldStackTraceSignature="TEngine.GameFrameworkLinkedList`1:FindLast(T)" newStackTraceSignature="$A.$i`1:$Nb(T)" />
<method signature="void TEngine.GameFrameworkLinkedList`1::Remove([TEngine.Runtime]TEngine.GameFrameworkLinkedList`1&lt;!0&gt;, [System]System.Collections.Generic.LinkedListNode`1&lt;!0&gt;)" newName="$ob" oldStackTraceSignature="TEngine.GameFrameworkLinkedList`1:Remove(LinkedListNode`1)" newStackTraceSignature="$A.$i`1:$ob(LinkedListNode`1)" />
@@ -7120,6 +7527,7 @@
<method signature="[TEngine.Runtime]TEngine.Localization.SimpleJSON.JSONNode TEngine.Localization.SimpleJSON.JSONArray::Remove([TEngine.Runtime]TEngine.Localization.SimpleJSON.JSONArray, int)" newName="$ybA" oldStackTraceSignature="TEngine.Localization.SimpleJSON.JSONArray:Remove(Int32)" newStackTraceSignature="$B.$pC:$ybA(Int32)" />
<method signature="[TEngine.Runtime]TEngine.Localization.SimpleJSON.JSONNode TEngine.Localization.SimpleJSON.JSONArray::Remove([TEngine.Runtime]TEngine.Localization.SimpleJSON.JSONArray, [TEngine.Runtime]TEngine.Localization.SimpleJSON.JSONNode)" newName="$YbA" oldStackTraceSignature="TEngine.Localization.SimpleJSON.JSONArray:Remove(JSONNode)" newStackTraceSignature="$B.$pC:$YbA($NC)" />
<method signature="System.Collections.Generic.IEnumerable`1&lt;[TEngine.Runtime]TEngine.Localization.SimpleJSON.JSONNode&gt; TEngine.Localization.SimpleJSON.JSONArray::get_Childs([TEngine.Runtime]TEngine.Localization.SimpleJSON.JSONArray)" newName="$zbA" oldStackTraceSignature="TEngine.Localization.SimpleJSON.JSONArray:get_Childs()" newStackTraceSignature="$B.$pC:$zbA()" />
<method signature="System.Collections.IEnumerator TEngine.Localization.SimpleJSON.JSONArray::GetEnumerator([TEngine.Runtime]TEngine.Localization.SimpleJSON.JSONArray)" newName="$UV" oldStackTraceSignature="TEngine.Localization.SimpleJSON.JSONArray:GetEnumerator()" newStackTraceSignature="$B.$pC:$UV()" />
<method signature="string TEngine.Localization.SimpleJSON.JSONArray::ToString([TEngine.Runtime]TEngine.Localization.SimpleJSON.JSONArray, string)" newName="$ZbA" oldStackTraceSignature="TEngine.Localization.SimpleJSON.JSONArray:ToString(String)" newStackTraceSignature="$B.$pC:$ZbA(String)" />
<method signature="void TEngine.Localization.SimpleJSON.JSONArray::Serialize([TEngine.Runtime]TEngine.Localization.SimpleJSON.JSONArray, System.IO.BinaryWriter)" newName="$fBA" oldStackTraceSignature="TEngine.Localization.SimpleJSON.JSONArray:Serialize(BinaryWriter)" newStackTraceSignature="$B.$pC:$fBA(BinaryWriter)" />
</type>
@@ -7177,6 +7585,7 @@
<method signature="[TEngine.Runtime]TEngine.Localization.SimpleJSON.JSONNode TEngine.Localization.SimpleJSON.JSONClass::Remove([TEngine.Runtime]TEngine.Localization.SimpleJSON.JSONClass, int)" newName="$ybA" oldStackTraceSignature="TEngine.Localization.SimpleJSON.JSONClass:Remove(Int32)" newStackTraceSignature="$B.$QC:$ybA(Int32)" />
<method signature="[TEngine.Runtime]TEngine.Localization.SimpleJSON.JSONNode TEngine.Localization.SimpleJSON.JSONClass::Remove([TEngine.Runtime]TEngine.Localization.SimpleJSON.JSONClass, [TEngine.Runtime]TEngine.Localization.SimpleJSON.JSONNode)" newName="$YbA" oldStackTraceSignature="TEngine.Localization.SimpleJSON.JSONClass:Remove(JSONNode)" newStackTraceSignature="$B.$QC:$YbA($NC)" />
<method signature="System.Collections.Generic.IEnumerable`1&lt;[TEngine.Runtime]TEngine.Localization.SimpleJSON.JSONNode&gt; TEngine.Localization.SimpleJSON.JSONClass::get_Childs([TEngine.Runtime]TEngine.Localization.SimpleJSON.JSONClass)" newName="$zbA" oldStackTraceSignature="TEngine.Localization.SimpleJSON.JSONClass:get_Childs()" newStackTraceSignature="$B.$QC:$zbA()" />
<method signature="System.Collections.IEnumerator TEngine.Localization.SimpleJSON.JSONClass::GetEnumerator([TEngine.Runtime]TEngine.Localization.SimpleJSON.JSONClass)" newName="$vV" oldStackTraceSignature="TEngine.Localization.SimpleJSON.JSONClass:GetEnumerator()" newStackTraceSignature="$B.$QC:$vV()" />
<method signature="string TEngine.Localization.SimpleJSON.JSONClass::ToString([TEngine.Runtime]TEngine.Localization.SimpleJSON.JSONClass, string)" newName="$ZbA" oldStackTraceSignature="TEngine.Localization.SimpleJSON.JSONClass:ToString(String)" newStackTraceSignature="$B.$QC:$ZbA(String)" />
<method signature="void TEngine.Localization.SimpleJSON.JSONClass::Serialize([TEngine.Runtime]TEngine.Localization.SimpleJSON.JSONClass, System.IO.BinaryWriter)" newName="$fBA" oldStackTraceSignature="TEngine.Localization.SimpleJSON.JSONClass:Serialize(BinaryWriter)" newStackTraceSignature="$B.$QC:$fBA(BinaryWriter)" />
</type>
@@ -7480,6 +7889,7 @@
<field signature="[UniTask]Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder`1&lt;bool&gt; &lt;&gt;t__builder" newName="$Ze" />
<field signature="[TEngine.Runtime]TEngine.LocalizationManager &lt;&gt;4__this" newName="$aE" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask/Awaiter &lt;&gt;u__1" newName="$AE" />
<method signature="void TEngine.LocalizationManager/&lt;AsyncInit&gt;d__16::SetStateMachine([TEngine.Runtime]TEngine.LocalizationManager/&lt;AsyncInit&gt;d__16&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$FU" oldStackTraceSignature="TEngine.&lt;AsyncInit&gt;d__16:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="TEngine.$qb:$FU(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.LocalizationManager/&lt;LoadLanguage&gt;d__18" newFullName="TEngine.LocalizationManager/$rb" status="Renamed">
<field signature="int &lt;&gt;1__state" newName="$DE" />
@@ -7489,6 +7899,7 @@
<field signature="string language" newName="$FE" />
<field signature="bool setCurrent" newName="$gE" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask`1/Awaiter&lt;[UnityEngine.CoreModule]UnityEngine.TextAsset&gt; &lt;&gt;u__1" newName="$GE" />
<method signature="void TEngine.LocalizationManager/&lt;LoadLanguage&gt;d__18::SetStateMachine([TEngine.Runtime]TEngine.LocalizationManager/&lt;LoadLanguage&gt;d__18&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$GU" oldStackTraceSignature="TEngine.&lt;LoadLanguage&gt;d__18:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="TEngine.$rb:$GU(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.LocalizationManager/&lt;LoadLanguageTotalAsset&gt;d__17" newFullName="TEngine.LocalizationManager/$Qb" status="Renamed">
<field signature="int &lt;&gt;1__state" newName="$bE" />
@@ -7496,6 +7907,7 @@
<field signature="[TEngine.Runtime]TEngine.LocalizationManager &lt;&gt;4__this" newName="$cE" />
<field signature="string assetName" newName="$CE" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask`1/Awaiter&lt;[UnityEngine.CoreModule]UnityEngine.TextAsset&gt; &lt;&gt;u__1" newName="$dE" />
<method signature="void TEngine.LocalizationManager/&lt;LoadLanguageTotalAsset&gt;d__17::SetStateMachine([TEngine.Runtime]TEngine.LocalizationManager/&lt;LoadLanguageTotalAsset&gt;d__17&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$gU" oldStackTraceSignature="TEngine.&lt;LoadLanguageTotalAsset&gt;d__17:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="TEngine.$Qb:$gU(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.LocalizationModule" newFullName="$A.$Rb" status="Renamed">
<field signature="[TEngine.Runtime]TEngine.LocalizationManager _localizationManager" newName="$hE" />
@@ -7522,6 +7934,7 @@
<field signature="bool setCurrent" newName="$mE" />
<field signature="bool fromInit" newName="$ME" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask/Awaiter &lt;&gt;u__1" newName="$nE" />
<method signature="void TEngine.LocalizationModule/&lt;LoadLanguage&gt;d__10::SetStateMachine([TEngine.Runtime]TEngine.LocalizationModule/&lt;LoadLanguage&gt;d__10&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$Nv" oldStackTraceSignature="TEngine.&lt;LoadLanguage&gt;d__10:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$A.$Sb:$Nv(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.LocalizationModule/&lt;LoadLanguageTotalAsset&gt;d__9" newFullName="$A.$Rb/$sb" status="Renamed">
<field signature="int &lt;&gt;1__state" newName="$HE" />
@@ -7529,6 +7942,7 @@
<field signature="[TEngine.Runtime]TEngine.LocalizationModule &lt;&gt;4__this" newName="$IE" />
<field signature="string assetName" newName="$jE" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask/Awaiter &lt;&gt;u__1" newName="$JE" />
<method signature="void TEngine.LocalizationModule/&lt;LoadLanguageTotalAsset&gt;d__9::SetStateMachine([TEngine.Runtime]TEngine.LocalizationModule/&lt;LoadLanguageTotalAsset&gt;d__9&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$Iv" oldStackTraceSignature="TEngine.&lt;LoadLanguageTotalAsset&gt;d__9:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$A.$sb:$Iv(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.LocalizationUtility" newFullName="$A.$tb" status="Renamed">
<field signature="string I2ResAssetNamePrefix" newName="$NE" />
@@ -8065,6 +8479,7 @@
<field signature="[UniTask]Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskVoidMethodBuilder &lt;&gt;t__builder" newName="$hf" />
<field signature="[TEngine.Runtime]TEngine.ProcedureSetting &lt;&gt;4__this" newName="$Hf" />
<field signature="[UniTask]Cysharp.Threading.Tasks.YieldAwaitable/Awaiter &lt;&gt;u__1" newName="$if" />
<method signature="void TEngine.ProcedureSetting/&lt;StartProcedure&gt;d__8::SetStateMachine([TEngine.Runtime]TEngine.ProcedureSetting/&lt;StartProcedure&gt;d__8&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$Rv" oldStackTraceSignature="TEngine.&lt;StartProcedure&gt;d__8:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="TEngine.$Zb:$Rv(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.ReleaseObjectFilterCallback`1" newFullName="$A.$Xb`1" status="Renamed" />
<type fullName="TEngine.RemoteServices" newFullName="$A.$VB" status="Renamed">
@@ -8116,6 +8531,7 @@
<field signature="string spriteName" newName="$wF" />
<field signature="[YooAsset]YooAsset.SubAssetsHandle &lt;subAssetsHandle&gt;5__2" newName="$WF" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask/Awaiter &lt;&gt;u__1" newName="$xF" />
<method signature="void TEngine.ResourceExtComponent/&lt;GetSubSpriteImp&gt;d__28::SetStateMachine([TEngine.Runtime]TEngine.ResourceExtComponent/&lt;GetSubSpriteImp&gt;d__28&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$gV" oldStackTraceSignature="TEngine.&lt;GetSubSpriteImp&gt;d__28:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="TEngine.$lB:$gV(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.ResourceExtComponent/&lt;SetAssetByResources&gt;d__23`1" newFullName="TEngine.ResourceExtComponent/$JB`1" status="Renamed">
<field signature="int &lt;&gt;1__state" newName="$IF" />
@@ -8123,6 +8539,7 @@
<field signature="[TEngine.Runtime]TEngine.ResourceExtComponent &lt;&gt;4__this" newName="$JF" />
<field signature="[TEngine.Runtime]TEngine.ISetAssetObject setAssetObject" newName="$kF" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask/Awaiter &lt;&gt;u__1" newName="$KF" />
<method signature="void TEngine.ResourceExtComponent/&lt;SetAssetByResources&gt;d__23`1::SetStateMachine([TEngine.Runtime]TEngine.ResourceExtComponent/&lt;SetAssetByResources&gt;d__23`1&lt;!0&gt;&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$Tv" oldStackTraceSignature="TEngine.&lt;SetAssetByResources&gt;d__23`1:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="TEngine.$JB`1:$Tv(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.ResourceExtComponent/&lt;SetSubSprite&gt;d__26" newFullName="TEngine.ResourceExtComponent/$kB" status="Renamed">
<field signature="int &lt;&gt;1__state" newName="$lF" />
@@ -8134,6 +8551,7 @@
<field signature="[UnityEngine.UI]UnityEngine.UI.Image image" newName="$oF" />
<field signature="bool setNativeSize" newName="$OF" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask`1/Awaiter&lt;[UnityEngine.CoreModule]UnityEngine.Sprite&gt; &lt;&gt;u__1" newName="$pF" />
<method signature="void TEngine.ResourceExtComponent/&lt;SetSubSprite&gt;d__26::SetStateMachine([TEngine.Runtime]TEngine.ResourceExtComponent/&lt;SetSubSprite&gt;d__26&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$bV" oldStackTraceSignature="TEngine.&lt;SetSubSprite&gt;d__26:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="TEngine.$kB:$bV(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.ResourceExtComponent/&lt;SetSubSprite&gt;d__27" newFullName="TEngine.ResourceExtComponent/$KB" status="Renamed">
<field signature="int &lt;&gt;1__state" newName="$PF" />
@@ -8144,6 +8562,7 @@
<field signature="System.Threading.CancellationToken cancellationToken" newName="$sF" />
<field signature="[UnityEngine.CoreModule]UnityEngine.SpriteRenderer spriteRenderer" newName="$SF" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask`1/Awaiter&lt;[UnityEngine.CoreModule]UnityEngine.Sprite&gt; &lt;&gt;u__1" newName="$tF" />
<method signature="void TEngine.ResourceExtComponent/&lt;SetSubSprite&gt;d__27::SetStateMachine([TEngine.Runtime]TEngine.ResourceExtComponent/&lt;SetSubSprite&gt;d__27&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$EV" oldStackTraceSignature="TEngine.&lt;SetSubSprite&gt;d__27:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="TEngine.$KB:$EV(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.ResourceExtComponent/&lt;Start&gt;d__11" newFullName="TEngine.ResourceExtComponent/$iB" status="Renamed">
<field signature="int &lt;&gt;1__state" newName="$dF" />
@@ -8163,6 +8582,7 @@
<field signature="string assetObjectKey" newName="$hF" />
<field signature="[TEngine.Runtime]TEngine.ResourceExtComponent/&lt;&gt;c__DisplayClass15_0 &lt;&gt;8__1" newName="$HF" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask/Awaiter &lt;&gt;u__1" newName="$iF" />
<method signature="void TEngine.ResourceExtComponent/&lt;TryWaitingLoading&gt;d__15::SetStateMachine([TEngine.Runtime]TEngine.ResourceExtComponent/&lt;TryWaitingLoading&gt;d__15&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$Sv" oldStackTraceSignature="TEngine.&lt;TryWaitingLoading&gt;d__15:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="TEngine.$jB:$Sv(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.ResourceLogger" newFullName="$A.$pB" status="Renamed" />
<type fullName="TEngine.ResourceModule" newFullName="$A.$PB" status="Renamed">
@@ -8313,6 +8733,7 @@
<field signature="string packageName" newName="$Sg" />
<field signature="[YooAsset]YooAsset.InitializationOperation &lt;initializationOperation&gt;5__2" newName="$tg" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask/Awaiter &lt;&gt;u__1" newName="$Tg" />
<method signature="void TEngine.ResourceModule/&lt;InitPackage&gt;d__65::SetStateMachine([TEngine.Runtime]TEngine.ResourceModule/&lt;InitPackage&gt;d__65&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$hV" oldStackTraceSignature="TEngine.&lt;InitPackage&gt;d__65:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$A.$QB:$hV(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.ResourceModule/&lt;InvokeProgress&gt;d__104" newFullName="$A.$PB/$uB" status="Renamed">
<field signature="int &lt;&gt;1__state" newName="$bh" />
@@ -8322,6 +8743,7 @@
<field signature="[YooAsset]YooAsset.AssetHandle assetHandle" newName="$dh" />
<field signature="object userData" newName="$Dh" />
<field signature="[UniTask]Cysharp.Threading.Tasks.YieldAwaitable/Awaiter &lt;&gt;u__1" newName="$eh" />
<method signature="void TEngine.ResourceModule/&lt;InvokeProgress&gt;d__104::SetStateMachine([TEngine.Runtime]TEngine.ResourceModule/&lt;InvokeProgress&gt;d__104&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$qV" oldStackTraceSignature="TEngine.&lt;InvokeProgress&gt;d__104:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$A.$uB:$qV(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.ResourceModule/&lt;LoadAsset&gt;d__99`1" newFullName="$A.$PB/$RB`1" status="Renamed">
<field signature="int &lt;&gt;1__state" newName="$Wg" />
@@ -8333,6 +8755,7 @@
<field signature="[TEngine.Runtime]TEngine.ResourceModule/&lt;&gt;c__DisplayClass99_0`1&lt;!0&gt; &lt;&gt;8__1" newName="$Zg" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask/Awaiter &lt;&gt;u__1" newName="$aG" />
<field signature="[UniTask]Cysharp.Threading.Tasks.YieldAwaitable/Awaiter &lt;&gt;u__2" newName="$AG" />
<method signature="void TEngine.ResourceModule/&lt;LoadAsset&gt;d__99`1::SetStateMachine([TEngine.Runtime]TEngine.ResourceModule/&lt;LoadAsset&gt;d__99`1&lt;!0&gt;&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$nV" oldStackTraceSignature="TEngine.&lt;LoadAsset&gt;d__99`1:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$A.$RB`1:$nV(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.ResourceModule/&lt;LoadAssetAsync&gt;d__100`1" newFullName="$A.$PB/$sB`1" status="Renamed">
<field signature="int &lt;&gt;1__state" newName="$bG" />
@@ -8347,6 +8770,7 @@
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask/Awaiter &lt;&gt;u__1" newName="$FG" />
<field signature="[UniTask]Cysharp.Threading.Tasks.YieldAwaitable/Awaiter &lt;&gt;u__2" newName="$gG" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask`1/Awaiter&lt;bool&gt; &lt;&gt;u__3" newName="$GG" />
<method signature="void TEngine.ResourceModule/&lt;LoadAssetAsync&gt;d__100`1::SetStateMachine([TEngine.Runtime]TEngine.ResourceModule/&lt;LoadAssetAsync&gt;d__100`1&lt;!0&gt;&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$NV" oldStackTraceSignature="TEngine.&lt;LoadAssetAsync&gt;d__100`1:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$A.$sB`1:$NV(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.ResourceModule/&lt;LoadAssetAsync&gt;d__102" newFullName="$A.$PB/$tB" status="Renamed">
<field signature="int &lt;&gt;1__state" newName="$NG" />
@@ -8363,6 +8787,7 @@
<field signature="[YooAsset]YooAsset.AssetHandle &lt;handle&gt;5__5" newName="$tG" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask/Awaiter &lt;&gt;u__1" newName="$TG" />
<field signature="[UniTask]Cysharp.Threading.Tasks.YieldAwaitable/Awaiter &lt;&gt;u__2" newName="$uG" />
<method signature="void TEngine.ResourceModule/&lt;LoadAssetAsync&gt;d__102::SetStateMachine([TEngine.Runtime]TEngine.ResourceModule/&lt;LoadAssetAsync&gt;d__102&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$pV" oldStackTraceSignature="TEngine.&lt;LoadAssetAsync&gt;d__102:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$A.$tB:$pV(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.ResourceModule/&lt;LoadAssetAsync&gt;d__103" newFullName="$A.$PB/$TB" status="Renamed">
<field signature="int &lt;&gt;1__state" newName="$UG" />
@@ -8378,6 +8803,7 @@
<field signature="[YooAsset]YooAsset.AssetHandle &lt;handle&gt;5__5" newName="$ZG" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask/Awaiter &lt;&gt;u__1" newName="$ah" />
<field signature="[UniTask]Cysharp.Threading.Tasks.YieldAwaitable/Awaiter &lt;&gt;u__2" newName="$Ah" />
<method signature="void TEngine.ResourceModule/&lt;LoadAssetAsync&gt;d__103::SetStateMachine([TEngine.Runtime]TEngine.ResourceModule/&lt;LoadAssetAsync&gt;d__103&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$PV" oldStackTraceSignature="TEngine.&lt;LoadAssetAsync&gt;d__103:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$A.$TB:$PV(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.ResourceModule/&lt;LoadGameObjectAsync&gt;d__101" newFullName="$A.$PB/$SB" status="Renamed">
<field signature="int &lt;&gt;1__state" newName="$hG" />
@@ -8393,6 +8819,7 @@
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask/Awaiter &lt;&gt;u__1" newName="$mG" />
<field signature="[UniTask]Cysharp.Threading.Tasks.YieldAwaitable/Awaiter &lt;&gt;u__2" newName="$MG" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask`1/Awaiter&lt;bool&gt; &lt;&gt;u__3" newName="$nG" />
<method signature="void TEngine.ResourceModule/&lt;LoadGameObjectAsync&gt;d__101::SetStateMachine([TEngine.Runtime]TEngine.ResourceModule/&lt;LoadGameObjectAsync&gt;d__101&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$OV" oldStackTraceSignature="TEngine.&lt;LoadGameObjectAsync&gt;d__101:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$A.$SB:$OV(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.ResourceModule/&lt;TryWaitingLoading&gt;d__108" newFullName="$A.$PB/$vB" status="Renamed">
<field signature="int &lt;&gt;1__state" newName="$Fh" />
@@ -8401,6 +8828,7 @@
<field signature="string assetObjectKey" newName="$hh" />
<field signature="[TEngine.Runtime]TEngine.ResourceModule/&lt;&gt;c__DisplayClass108_0 &lt;&gt;8__1" newName="$Hh" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask/Awaiter &lt;&gt;u__1" newName="$ih" />
<method signature="void TEngine.ResourceModule/&lt;TryWaitingLoading&gt;d__108::SetStateMachine([TEngine.Runtime]TEngine.ResourceModule/&lt;TryWaitingLoading&gt;d__108&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$rV" oldStackTraceSignature="TEngine.&lt;TryWaitingLoading&gt;d__108:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$A.$vB:$rV(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.ResourceModule/AssetObject" newFullName="$A.$PB/$qB" status="Renamed">
<field signature="[YooAsset]YooAsset.AssetHandle _assetHandle" newName="$qg" />
@@ -8546,6 +8974,7 @@
<field signature="[YooAsset]YooAsset.SceneHandle sceneHandle" newName="$Zh" />
<field signature="System.Action`1&lt;float&gt; progress" newName="$aH" />
<field signature="[UniTask]Cysharp.Threading.Tasks.YieldAwaitable/Awaiter &lt;&gt;u__1" newName="$AH" />
<method signature="void TEngine.SceneModule/&lt;InvokeProgress&gt;d__10::SetStateMachine([TEngine.Runtime]TEngine.SceneModule/&lt;InvokeProgress&gt;d__10&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$sV" oldStackTraceSignature="TEngine.&lt;InvokeProgress&gt;d__10:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$A.$bc:$sV(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.SceneModule/&lt;LoadSceneAsync&gt;d__8" newFullName="$A.$ZB/$ac" status="Renamed">
<field signature="int &lt;&gt;1__state" newName="$rh" />
@@ -8560,6 +8989,7 @@
<field signature="[YooAsset]YooAsset.SceneHandle &lt;subScene&gt;5__2" newName="$Vh" />
<field signature="[UniTask]Cysharp.Threading.Tasks.YieldAwaitable/Awaiter &lt;&gt;u__1" newName="$wh" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask/Awaiter &lt;&gt;u__2" newName="$Wh" />
<method signature="void TEngine.SceneModule/&lt;LoadSceneAsync&gt;d__8::SetStateMachine([TEngine.Runtime]TEngine.SceneModule/&lt;LoadSceneAsync&gt;d__8&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$RV" oldStackTraceSignature="TEngine.&lt;LoadSceneAsync&gt;d__8:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$A.$ac:$RV(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.SceneModule/&lt;UnloadAsync&gt;d__14" newFullName="$A.$ZB/$Bc" status="Renamed">
<field signature="int &lt;&gt;1__state" newName="$bH" />
@@ -8570,6 +9000,7 @@
<field signature="[YooAsset]YooAsset.UnloadSceneOperation &lt;unloadOperation&gt;5__2" newName="$DH" />
<field signature="[UniTask]Cysharp.Threading.Tasks.YieldAwaitable/Awaiter &lt;&gt;u__1" newName="$eH" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask/Awaiter &lt;&gt;u__2" newName="$EH" />
<method signature="void TEngine.SceneModule/&lt;UnloadAsync&gt;d__14::SetStateMachine([TEngine.Runtime]TEngine.SceneModule/&lt;UnloadAsync&gt;d__14&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$SV" oldStackTraceSignature="TEngine.&lt;UnloadAsync&gt;d__14:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$A.$Bc:$SV(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.SetSpriteObject" newFullName="" status="NotRenamed">
<field signature="[TEngine.Runtime]TEngine.SetSpriteObject/SetType _setType" newName="$rf" />
@@ -8708,6 +9139,7 @@
<field signature="[TEngine.Runtime]TEngine.UpdateDriver &lt;&gt;4__this" newName="$sH" />
<field signature="System.Action action" newName="$SH" />
<field signature="[UniTask]Cysharp.Threading.Tasks.YieldAwaitable/Awaiter &lt;&gt;u__1" newName="$tH" />
<method signature="void TEngine.UpdateDriver/&lt;AddFixedUpdateListenerImp&gt;d__14::SetStateMachine([TEngine.Runtime]TEngine.UpdateDriver/&lt;AddFixedUpdateListenerImp&gt;d__14&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$TV" oldStackTraceSignature="TEngine.&lt;AddFixedUpdateListenerImp&gt;d__14:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$A.$Fc:$TV(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.UpdateDriver/&lt;AddLateUpdateListenerImp&gt;d__16" newFullName="$A.$Ec/$gc" status="Renamed">
<field signature="int &lt;&gt;1__state" newName="$TH" />
@@ -8715,6 +9147,7 @@
<field signature="[TEngine.Runtime]TEngine.UpdateDriver &lt;&gt;4__this" newName="$UH" />
<field signature="System.Action action" newName="$vH" />
<field signature="[UniTask]Cysharp.Threading.Tasks.YieldAwaitable/Awaiter &lt;&gt;u__1" newName="$VH" />
<method signature="void TEngine.UpdateDriver/&lt;AddLateUpdateListenerImp&gt;d__16::SetStateMachine([TEngine.Runtime]TEngine.UpdateDriver/&lt;AddLateUpdateListenerImp&gt;d__16&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$uV" oldStackTraceSignature="TEngine.&lt;AddLateUpdateListenerImp&gt;d__16:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$A.$gc:$uV(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.UpdateDriver/&lt;AddUpdateListenerImp&gt;d__12" newFullName="$A.$Ec/$fc" status="Renamed">
<field signature="int &lt;&gt;1__state" newName="$OH" />
@@ -8722,6 +9155,7 @@
<field signature="[TEngine.Runtime]TEngine.UpdateDriver &lt;&gt;4__this" newName="$PH" />
<field signature="System.Action action" newName="$qH" />
<field signature="[UniTask]Cysharp.Threading.Tasks.YieldAwaitable/Awaiter &lt;&gt;u__1" newName="$QH" />
<method signature="void TEngine.UpdateDriver/&lt;AddUpdateListenerImp&gt;d__12::SetStateMachine([TEngine.Runtime]TEngine.UpdateDriver/&lt;AddUpdateListenerImp&gt;d__12&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$tV" oldStackTraceSignature="TEngine.&lt;AddUpdateListenerImp&gt;d__12:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$A.$fc:$tV(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.UpdateDriver/MainBehaviour" newFullName="" status="NotRenamed">
<field signature="System.Action UpdateEvent" newName="$lH" />
@@ -8912,6 +9346,7 @@
<field signature="string url" newName="$Cb" />
<field signature="[UnityEngine.UnityWebRequestModule]UnityEngine.Networking.UnityWebRequest &lt;unityWebRequest&gt;5__2" newName="$db" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask`1/Awaiter&lt;string&gt; &lt;&gt;u__1" newName="$Db" />
<method signature="void TEngine.Utility/Http/&lt;Get&gt;d__0::SetStateMachine([TEngine.Runtime]TEngine.Utility/Http/&lt;Get&gt;d__0&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$BU" oldStackTraceSignature="TEngine.&lt;Get&gt;d__0:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$A.$CA:$BU(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.Utility/Http/&lt;OnDownloadFile&gt;d__12" newFullName="$A.$aA/$cA/$FA" status="Renamed">
<field signature="int &lt;&gt;1__state" newName="$Tb" />
@@ -9006,6 +9441,7 @@
<field signature="string postData" newName="$gb" />
<field signature="[UnityEngine.UnityWebRequestModule]UnityEngine.Networking.UnityWebRequest &lt;unityWebRequest&gt;5__2" newName="$Gb" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask`1/Awaiter&lt;string&gt; &lt;&gt;u__1" newName="$hb" />
<method signature="void TEngine.Utility/Http/&lt;Post&gt;d__1::SetStateMachine([TEngine.Runtime]TEngine.Utility/Http/&lt;Post&gt;d__1&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$cU" oldStackTraceSignature="TEngine.&lt;Post&gt;d__1:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$A.$dA:$cU(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.Utility/Http/&lt;Post&gt;d__2" newFullName="$A.$aA/$cA/$DA" status="Renamed">
<field signature="int &lt;&gt;1__state" newName="$Hb" />
@@ -9015,6 +9451,7 @@
<field signature="System.Collections.Generic.Dictionary`2&lt;string,string&gt; formFields" newName="$Jb" />
<field signature="[UnityEngine.UnityWebRequestModule]UnityEngine.Networking.UnityWebRequest &lt;unityWebRequest&gt;5__2" newName="$kb" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask`1/Awaiter&lt;string&gt; &lt;&gt;u__1" newName="$Kb" />
<method signature="void TEngine.Utility/Http/&lt;Post&gt;d__2::SetStateMachine([TEngine.Runtime]TEngine.Utility/Http/&lt;Post&gt;d__2&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$CU" oldStackTraceSignature="TEngine.&lt;Post&gt;d__2:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$A.$DA:$CU(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.Utility/Http/&lt;Post&gt;d__3" newFullName="$A.$aA/$cA/$eA" status="Renamed">
<field signature="int &lt;&gt;1__state" newName="$lb" />
@@ -9024,6 +9461,7 @@
<field signature="[UnityEngine.UnityWebRequestModule]UnityEngine.WWWForm formData" newName="$nb" />
<field signature="[UnityEngine.UnityWebRequestModule]UnityEngine.Networking.UnityWebRequest &lt;unityWebRequest&gt;5__2" newName="$Nb" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask`1/Awaiter&lt;string&gt; &lt;&gt;u__1" newName="$ob" />
<method signature="void TEngine.Utility/Http/&lt;Post&gt;d__3::SetStateMachine([TEngine.Runtime]TEngine.Utility/Http/&lt;Post&gt;d__3&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$dU" oldStackTraceSignature="TEngine.&lt;Post&gt;d__3:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$A.$eA:$dU(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.Utility/Http/&lt;SendWebRequest&gt;d__4" newFullName="$A.$aA/$cA/$EA" status="Renamed">
<field signature="int &lt;&gt;1__state" newName="$Ob" />
@@ -9031,6 +9469,7 @@
<field signature="[UnityEngine.UnityWebRequestModule]UnityEngine.Networking.UnityWebRequest unityWebRequest" newName="$Pb" />
<field signature="System.Threading.CancellationTokenSource cts" newName="$qb" />
<field signature="[UniTask]Cysharp.Threading.Tasks.UniTask`1/Awaiter&lt;System.ValueTuple`2&lt;bool,[UnityEngine.UnityWebRequestModule]UnityEngine.Networking.UnityWebRequest&gt;&gt; &lt;&gt;u__1" newName="$Qb" />
<method signature="void TEngine.Utility/Http/&lt;SendWebRequest&gt;d__4::SetStateMachine([TEngine.Runtime]TEngine.Utility/Http/&lt;SendWebRequest&gt;d__4&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$DU" oldStackTraceSignature="TEngine.&lt;SendWebRequest&gt;d__4:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$A.$EA:$DU(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.Utility/Json" newFullName="$A.$aA/$NA" status="Renamed">
<field signature="[TEngine.Runtime]TEngine.Utility/Json/IJsonHelper _jsonHelper" newName="$xB" />
@@ -9372,18 +9811,21 @@
<field signature="[UniTask]Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskVoidMethodBuilder &lt;&gt;t__builder" newName="$sB" />
<field signature="System.Action fun" newName="$SB" />
<field signature="[UniTask]Cysharp.Threading.Tasks.YieldAwaitable/Awaiter &lt;&gt;u__1" newName="$tB" />
<method signature="void TEngine.Utility/Unity/&lt;AddFixedUpdateListenerImp&gt;d__17::SetStateMachine([TEngine.Runtime]TEngine.Utility/Unity/&lt;AddFixedUpdateListenerImp&gt;d__17&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$EU" oldStackTraceSignature="TEngine.&lt;AddFixedUpdateListenerImp&gt;d__17:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$A.$mA:$EU(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.Utility/Unity/&lt;AddLateUpdateListenerImp&gt;d__19" newFullName="$A.$aA/$lA/$MA" status="Renamed">
<field signature="int &lt;&gt;1__state" newName="$TB" />
<field signature="[UniTask]Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskVoidMethodBuilder &lt;&gt;t__builder" newName="$uB" />
<field signature="System.Action fun" newName="$UB" />
<field signature="[UniTask]Cysharp.Threading.Tasks.YieldAwaitable/Awaiter &lt;&gt;u__1" newName="$vB" />
<method signature="void TEngine.Utility/Unity/&lt;AddLateUpdateListenerImp&gt;d__19::SetStateMachine([TEngine.Runtime]TEngine.Utility/Unity/&lt;AddLateUpdateListenerImp&gt;d__19&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$fU" oldStackTraceSignature="TEngine.&lt;AddLateUpdateListenerImp&gt;d__19:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$A.$MA:$fU(IAsyncStateMachine)" />
</type>
<type fullName="TEngine.Utility/Unity/&lt;AddUpdateListenerImp&gt;d__15" newFullName="$A.$aA/$lA/$LA" status="Renamed">
<field signature="int &lt;&gt;1__state" newName="$PB" />
<field signature="[UniTask]Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskVoidMethodBuilder &lt;&gt;t__builder" newName="$qB" />
<field signature="System.Action fun" newName="$QB" />
<field signature="[UniTask]Cysharp.Threading.Tasks.YieldAwaitable/Awaiter &lt;&gt;u__1" newName="$rB" />
<method signature="void TEngine.Utility/Unity/&lt;AddUpdateListenerImp&gt;d__15::SetStateMachine([TEngine.Runtime]TEngine.Utility/Unity/&lt;AddUpdateListenerImp&gt;d__15&amp;, System.Runtime.CompilerServices.IAsyncStateMachine)" newName="$eU" oldStackTraceSignature="TEngine.&lt;AddUpdateListenerImp&gt;d__15:SetStateMachine(IAsyncStateMachine)" newStackTraceSignature="$A.$LA:$eU(IAsyncStateMachine)" />
</type>
</assembly>
</mapping>

View File

@@ -2,37 +2,37 @@
"versions": [
{
"unity_version":"2019",
"hybridclr" : { "branch":"v8.3.0"},
"hybridclr" : { "branch":"v8.4.0"},
"il2cpp_plus": { "branch":"v2019-8.1.0"}
},
{
"unity_version":"2020",
"hybridclr" : { "branch":"v8.3.0"},
"hybridclr" : { "branch":"v8.4.0"},
"il2cpp_plus": { "branch":"v2020-8.1.0"}
},
{
"unity_version":"2021",
"hybridclr" : { "branch":"v8.3.0"},
"hybridclr" : { "branch":"v8.4.0"},
"il2cpp_plus": { "branch":"v2021-8.1.0"}
},
{
"unity_version":"2022",
"hybridclr" : { "branch":"v8.3.0"},
"hybridclr" : { "branch":"v8.4.0"},
"il2cpp_plus": { "branch":"v2022-8.2.0"}
},
{
"unity_version":"2022-tuanjie",
"hybridclr" : { "branch":"v8.3.0"},
"hybridclr" : { "branch":"v8.4.0"},
"il2cpp_plus": { "branch":"v2022-tuanjie-8.3.0"}
},
{
"unity_version":"2023",
"hybridclr" : { "branch":"v8.3.0"},
"hybridclr" : { "branch":"v8.4.0"},
"il2cpp_plus": { "branch":"v2023-8.1.0"}
},
{
"unity_version":"6000",
"hybridclr" : { "branch":"v8.3.0"},
"hybridclr" : { "branch":"v8.4.0"},
"il2cpp_plus": { "branch":"v6000-8.1.0"}
}
]

View File

@@ -136,8 +136,8 @@ namespace HybridCLR.Editor.Commands
options = buildOptions,
target = target,
targetGroup = BuildPipeline.GetBuildTargetGroup(target),
#if UNITY_2021_1_OR_NEWER
subtarget = (int)EditorUserBuildSettings.standaloneBuildSubtarget,
#if UNITY_SERVER
subtarget = (int)StandaloneBuildSubtarget.Server,
#endif
};

View File

@@ -1,5 +1,20 @@
# ReleaseLog
## 8.4.0
Release Date: 2025-07-26.
### Runtime
- **[new] IMPORTANT! support custom image format**
- [change] the type of field `offset` of ldsfld, stfld, ldthreadlocalfld、stthreadlocalfld changed from uint16_t to uint32_t so that supports class with huge static fields.
- [opt] optimize to use NewValueTypeVar_Ctor_0 for new zero-argument value type and System.Activator.CreateInstance&lt;T&gt;()
- [opt] optimize new ValueType with zero arguments.
### Editor
- [fix] fix the issue that `Texture Compression` option in Build Settings was changed after running `HybridCLR/Generate/All` on Android platform
## 8.3.0
Release Date: 2025-07-04.

View File

@@ -11,6 +11,9 @@ namespace HybridCLR
HOMOLOGOUS_ASSEMBLY_HAS_LOADED, // can not load supplementary metadata assembly for the same assembly
INVALID_HOMOLOGOUS_MODE, // invalid homologous image mode
PDB_BAD_FILE, // invalid pdb file
UNKNOWN_IMAGE_FORMAT,
UNSUPPORT_FORMAT_VERSION,
UNMATCH_FORMAT_VARIANT,
};
}

View File

@@ -1,6 +1,6 @@
{
"name": "com.code-philosophy.hybridclr",
"version": "8.3.0",
"version": "8.4.0",
"displayName": "HybridCLR",
"description": "HybridCLR is a fully featured, zero-cost, high-performance, low-memory solution for Unity's all-platform native c# hotupdate.",
"category": "Scripting",

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 2326b426d539e084dbddf7f7c23ed1bd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 241df8eaf3a34dc47a0873c37ddb2695
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,263 +0,0 @@
using dnlib.DotNet;
using Obfuz.Utils;
using System;
using System.Collections.Generic;
using System.Xml;
using UnityEngine;
namespace Obfuz.Conf
{
public interface IRule<T>
{
void InheritParent(T parentRule);
}
public interface IMethodRule<R> where R : IRule<R>
{
string Name { get; set; }
NameMatcher NameMatcher { get; set; }
R Rule { get; set; }
}
public abstract class MethodRuleBase<R> : IMethodRule<R> where R : IRule<R>
{
public string Name { get; set; }
public NameMatcher NameMatcher { get; set; }
public R Rule { get; set; }
}
public interface ITypeRule<T, R> where T : IMethodRule<R> where R : IRule<R>
{
string Name { get; set; }
NameMatcher NameMatcher { get; set; }
R Rule { get; set; }
List<T> Methods { get; set; }
}
public abstract class TypeRuleBase<T, R> : ITypeRule<T, R> where T : IMethodRule<R> where R : IRule<R>
{
public string Name { get; set; }
public NameMatcher NameMatcher { get; set; }
public R Rule { get; set; }
public List<T> Methods { get; set; }
}
public interface IAssemblyRule<TType, TMethod, TRule> where TType : ITypeRule<TMethod, TRule> where TMethod : IMethodRule<TRule> where TRule : IRule<TRule>
{
string Name { get; set; }
TRule Rule { get; set; }
List<TType> Types { get; set; }
}
public abstract class AssemblyRuleBase<TType, TMethod, TRule> : IAssemblyRule<TType, TMethod, TRule> where TType : ITypeRule<TMethod, TRule> where TMethod : IMethodRule<TRule> where TRule : IRule<TRule>
{
public string Name { get; set; }
public TRule Rule { get; set; }
public List<TType> Types { get; set; }
}
public class XmlAssemblyTypeMethodRuleParser<TAssembly, TType, TMethod, TRule>
where TMethod : IMethodRule<TRule>, new()
where TType : ITypeRule<TMethod, TRule>, new()
where TAssembly : IAssemblyRule<TType, TMethod, TRule>, new()
where TRule : IRule<TRule>, new()
{
private readonly HashSet<string> _toObfuscatedAssemblyNames;
private readonly Func<string, XmlElement, TRule> _ruleParser;
private readonly Action<string, XmlElement> _unknownNodeTypeHandler;
private readonly Dictionary<string, TAssembly> _assemblySpecs = new Dictionary<string, TAssembly>();
public XmlAssemblyTypeMethodRuleParser(IEnumerable<string> toObfuscatedAssemblyNames, Func<string, XmlElement, TRule> ruleParser, Action<string, XmlElement> unknownNodeTypeHandler)
{
_toObfuscatedAssemblyNames = new HashSet<string>(toObfuscatedAssemblyNames);
_ruleParser = ruleParser;
_unknownNodeTypeHandler = unknownNodeTypeHandler;
}
public Dictionary<string, TAssembly> AssemblySpecs => _assemblySpecs;
public void LoadConfigs(IEnumerable<string> configFiles)
{
foreach (var configFile in configFiles)
{
LoadConfig(configFile);
}
}
public void LoadConfig(string configFile)
{
if (string.IsNullOrEmpty(configFile))
{
throw new Exception($"Invalid xml file {configFile}, file name is empty");
}
Debug.Log($"ConfigurableObfuscationPolicy::LoadConfig {configFile}");
var doc = new XmlDocument();
doc.Load(configFile);
var root = doc.DocumentElement;
if (root.Name != "obfuz")
{
throw new Exception($"Invalid xml file {configFile}, root name should be 'obfuz'");
}
foreach (XmlNode node in root.ChildNodes)
{
if (!(node is XmlElement ele))
{
continue;
}
switch (ele.Name)
{
case "assembly":
{
TAssembly assSpec = ParseAssembly(configFile, ele);
_assemblySpecs.Add(assSpec.Name, assSpec);
break;
}
default:
{
if (_unknownNodeTypeHandler == null)
{
throw new Exception($"Invalid xml file {configFile}, unknown node {ele.Name}");
}
_unknownNodeTypeHandler(configFile, ele);
break;
}
}
}
}
private TAssembly ParseAssembly(string configFile, XmlElement ele)
{
var assemblySpec = new TAssembly();
string name = ele.GetAttribute("name");
if (!_toObfuscatedAssemblyNames.Contains(name))
{
throw new Exception($"Invalid xml file {configFile}, assembly name {name} isn't in toObfuscatedAssemblyNames");
}
if (_assemblySpecs.ContainsKey(name))
{
throw new Exception($"Invalid xml file {configFile}, assembly name {name} is duplicated");
}
assemblySpec.Name = name;
assemblySpec.Rule = _ruleParser(configFile, ele);
var types = new List<TType>();
assemblySpec.Types = types;
foreach (XmlNode node in ele.ChildNodes)
{
if (!(node is XmlElement childEle))
{
continue;
}
switch (childEle.Name)
{
case "type":
{
types.Add(ParseType(configFile, childEle));
break;
}
default:
{
throw new Exception($"Invalid xml file, unknown node {childEle.Name}");
}
}
}
return assemblySpec;
}
private TType ParseType(string configFile, XmlElement element)
{
var typeSpec = new TType();
string name = element.GetAttribute("name");
typeSpec.Name = name;
typeSpec.NameMatcher = new NameMatcher(name);
typeSpec.Rule = _ruleParser(configFile, element);
var methods = new List<TMethod>();
typeSpec.Methods = methods;
foreach (XmlNode node in element.ChildNodes)
{
if (!(node is XmlElement ele))
{
continue;
}
switch (ele.Name)
{
case "method":
{
methods.Add(ParseMethod(configFile, ele));
break;
}
default:
{
throw new Exception($"Invalid xml file, unknown node {ele.Name}");
}
}
}
return typeSpec;
}
private TMethod ParseMethod(string configFile, XmlElement element)
{
var methodSpec = new TMethod();
string name = element.GetAttribute("name");
methodSpec.Name = name;
methodSpec.NameMatcher = new NameMatcher(name);
methodSpec.Rule = _ruleParser(configFile, element);
return methodSpec;
}
public TRule GetMethodRule(MethodDef method, TRule defaultRule)
{
var assemblyName = method.DeclaringType.Module.Assembly.Name;
if (!_assemblySpecs.TryGetValue(assemblyName, out var assSpec))
{
return defaultRule;
}
string declaringTypeName = method.DeclaringType.FullName;
foreach (var typeSpec in assSpec.Types)
{
if (typeSpec.NameMatcher.IsMatch(declaringTypeName))
{
foreach (var methodSpec in typeSpec.Methods)
{
if (methodSpec.NameMatcher.IsMatch(method.Name))
{
return methodSpec.Rule;
}
}
return typeSpec.Rule;
}
}
return assSpec.Rule;
}
public void InheritParentRules(TRule defaultRule)
{
foreach (TAssembly assSpec in _assemblySpecs.Values)
{
assSpec.Rule.InheritParent(defaultRule);
foreach (TType typeSpec in assSpec.Types)
{
typeSpec.Rule.InheritParent(assSpec.Rule);
foreach (TMethod methodSpec in typeSpec.Methods)
{
methodSpec.Rule.InheritParent(typeSpec.Rule);
}
}
}
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 36a3e142db81f6d4bb54938525e31973
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,203 +0,0 @@
using dnlib.DotNet;
using Obfuz.Utils;
using System;
using System.Collections.Generic;
using System.Xml;
namespace Obfuz.Conf
{
public class XmlFieldRuleParser<R> where R : class, new()
{
private readonly HashSet<string> _toObfuscatedAssemblyNames;
private readonly Func<string, XmlElement, R> _ruleParser;
private readonly Action<string, XmlElement> _unknownNodeTypeHandler;
private readonly Dictionary<string, AssemblySpec> _assemblySpecs = new Dictionary<string, AssemblySpec>();
private class FieldSpec
{
public string Name { get; set; }
public NameMatcher NameMatcher { get; set; }
public R Rule { get; set; }
}
private class TypeSpec
{
public string Name { get; set; }
public NameMatcher NameMatcher { get; set; }
public List<FieldSpec> Fields { get; set; }
}
private class AssemblySpec
{
public string Name { get; set; }
public List<TypeSpec> Types { get; set; }
}
public XmlFieldRuleParser(IEnumerable<string> toObfuscatedAssemblyNames, Func<string, XmlElement, R> ruleParser, Action<string, XmlElement> unknownNodeTypeHandler)
{
_toObfuscatedAssemblyNames = new HashSet<string>(toObfuscatedAssemblyNames);
_ruleParser = ruleParser;
_unknownNodeTypeHandler = unknownNodeTypeHandler;
}
public void LoadConfigs(IEnumerable<string> configFiles)
{
foreach (var configFile in configFiles)
{
LoadConfig(configFile);
}
}
public void LoadConfig(string configFile)
{
if (string.IsNullOrEmpty(configFile))
{
throw new Exception($"Invalid xml file {configFile}, file name is empty");
}
var doc = new XmlDocument();
doc.Load(configFile);
var root = doc.DocumentElement;
if (root.Name != "obfuz")
{
throw new Exception($"Invalid xml file {configFile}, root name should be 'obfuz'");
}
foreach (XmlNode node in root.ChildNodes)
{
if (!(node is XmlElement ele))
{
continue;
}
switch (ele.Name)
{
case "assembly":
{
AssemblySpec assSpec = ParseAssembly(configFile, ele);
_assemblySpecs.Add(assSpec.Name, assSpec);
break;
}
default:
{
if (_unknownNodeTypeHandler == null)
{
throw new Exception($"Invalid xml file {configFile}, unknown node {ele.Name}");
}
_unknownNodeTypeHandler(configFile, ele);
break;
}
}
}
}
private AssemblySpec ParseAssembly(string configFile, XmlElement ele)
{
var assemblySpec = new AssemblySpec();
string name = ele.GetAttribute("name");
if (!_toObfuscatedAssemblyNames.Contains(name))
{
throw new Exception($"Invalid xml file {configFile}, assembly name {name} isn't in toObfuscatedAssemblyNames");
}
if (_assemblySpecs.ContainsKey(name))
{
throw new Exception($"Invalid xml file {configFile}, assembly name {name} is duplicated");
}
assemblySpec.Name = name;
var types = new List<TypeSpec>();
assemblySpec.Types = types;
foreach (XmlNode node in ele.ChildNodes)
{
if (!(node is XmlElement childEle))
{
continue;
}
switch (childEle.Name)
{
case "type":
{
types.Add(ParseType(configFile, childEle));
break;
}
default:
{
throw new Exception($"Invalid xml file, unknown node {childEle.Name}");
}
}
}
return assemblySpec;
}
private TypeSpec ParseType(string configFile, XmlElement element)
{
var typeSpec = new TypeSpec();
string name = element.GetAttribute("name");
typeSpec.Name = name;
typeSpec.NameMatcher = new NameMatcher(name);
var fields = new List<FieldSpec>();
typeSpec.Fields = fields;
foreach (XmlNode node in element.ChildNodes)
{
if (!(node is XmlElement ele))
{
continue;
}
switch (ele.Name)
{
case "field":
{
fields.Add(ParseField(configFile, ele));
break;
}
default:
{
throw new Exception($"Invalid xml file, unknown node {ele.Name}");
}
}
}
return typeSpec;
}
private FieldSpec ParseField(string configFile, XmlElement element)
{
var fieldSpec = new FieldSpec();
string name = element.GetAttribute("name");
fieldSpec.Name = name;
fieldSpec.NameMatcher = new NameMatcher(name);
fieldSpec.Rule = _ruleParser(configFile, element);
return fieldSpec;
}
public R GetFieldRule(FieldDef field)
{
var assemblyName = field.DeclaringType.Module.Assembly.Name;
if (!_assemblySpecs.TryGetValue(assemblyName, out var assSpec))
{
return null;
}
string declaringTypeName = field.DeclaringType.FullName;
foreach (var typeSpec in assSpec.Types)
{
if (typeSpec.NameMatcher.IsMatch(declaringTypeName))
{
foreach (var fieldSpec in typeSpec.Fields)
{
if (fieldSpec.NameMatcher.IsMatch(field.Name))
{
return fieldSpec.Rule;
}
}
}
}
return null;
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 1578270b9b81e1e4dba84d562c91090f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,544 +0,0 @@
using dnlib.DotNet;
using Obfuz.ObfusPasses;
using Obfuz.Utils;
using System;
using System.Collections.Generic;
using System.Xml;
using UnityEngine;
namespace Obfuz
{
public class ConfigurablePassPolicy
{
class PassRule
{
public ObfuscationPassType? enablePasses;
public ObfuscationPassType? disablePasses;
public ObfuscationPassType? addPasses;
public ObfuscationPassType? removePasses;
public ObfuscationPassType finalPasses;
public void InheritParent(PassRule parentRule, ObfuscationPassType globalEnabledPasses)
{
finalPasses = parentRule.finalPasses;
if (enablePasses != null)
{
finalPasses = enablePasses.Value;
}
if (disablePasses != null)
{
finalPasses = ~disablePasses.Value;
}
if (addPasses != null)
{
finalPasses |= addPasses.Value;
}
if (removePasses != null)
{
finalPasses &= ~removePasses.Value;
}
finalPasses &= globalEnabledPasses;
}
}
class SpecBase
{
public string name;
public NameMatcher nameMatcher;
public PassRule rule;
}
class MethodSpec : SpecBase
{
}
class FieldSpec : SpecBase
{
}
class PropertySpec : SpecBase
{
}
class EventSpec : SpecBase
{
}
class TypeSpec : SpecBase
{
public List<FieldSpec> fields = new List<FieldSpec>();
public List<MethodSpec> methods = new List<MethodSpec>();
public List<PropertySpec> properties = new List<PropertySpec>();
public List<EventSpec> events = new List<EventSpec>();
}
class AssemblySpec
{
public string name;
public NameMatcher nameMatcher;
public PassRule rule;
public List<TypeSpec> types = new List<TypeSpec>();
}
private readonly ObfuscationPassType _enabledPasses;
private readonly HashSet<string> _toObfuscatedAssemblyNames;
private readonly List<AssemblySpec> _assemblySpecs = new List<AssemblySpec>();
private readonly PassRule _defaultPassRule;
private string _curLoadingConfig;
public ConfigurablePassPolicy(IEnumerable<string> toObfuscatedAssemblyNames, ObfuscationPassType enabledPasses, List<string> configFiles)
{
_toObfuscatedAssemblyNames = new HashSet<string>(toObfuscatedAssemblyNames);
_enabledPasses = enabledPasses;
_defaultPassRule = new PassRule { finalPasses = enabledPasses };
LoadConfigs(configFiles);
InheritParentRules(enabledPasses);
}
private void LoadConfigs(IEnumerable<string> configFiles)
{
foreach (var configFile in configFiles)
{
LoadConfig(configFile);
}
}
private void InheritParentRules(ObfuscationPassType enablePasses)
{
var defaultRule = new PassRule
{
enablePasses = enablePasses,
finalPasses = enablePasses,
};
foreach (AssemblySpec assSpec in _assemblySpecs)
{
assSpec.rule.InheritParent(defaultRule, enablePasses);
foreach (TypeSpec typeSpec in assSpec.types)
{
typeSpec.rule.InheritParent(assSpec.rule, enablePasses);
foreach (FieldSpec fieldSpec in typeSpec.fields)
{
fieldSpec.rule.InheritParent(typeSpec.rule, enablePasses);
}
foreach (MethodSpec methodSpec in typeSpec.methods)
{
methodSpec.rule.InheritParent(typeSpec.rule, enablePasses);
}
foreach (PropertySpec propertySpec in typeSpec.properties)
{
propertySpec.rule.InheritParent(typeSpec.rule, enablePasses);
}
foreach (EventSpec eventSpec in typeSpec.events)
{
eventSpec.rule.InheritParent(typeSpec.rule, enablePasses);
}
}
}
}
public void LoadConfig(string configFile)
{
if (string.IsNullOrEmpty(configFile))
{
throw new Exception($"Invalid xml file {configFile}, file name is empty");
}
_curLoadingConfig = configFile;
Debug.Log($"ConfigurablePassPolicy::LoadConfig {configFile}");
var doc = new XmlDocument();
doc.Load(configFile);
var root = doc.DocumentElement;
if (root.Name != "obfuz")
{
throw new Exception($"Invalid xml file {configFile}, root name should be 'obfuz'");
}
foreach (XmlNode node in root.ChildNodes)
{
if (!(node is XmlElement ele))
{
continue;
}
switch (ele.Name)
{
case "assembly":
{
AssemblySpec assSpec = ParseAssembly(ele);
_assemblySpecs.Add(assSpec);
break;
}
default:
{
throw new Exception($"Invalid xml file {configFile}, unknown node {ele.Name}");
}
}
}
}
(bool, ObfuscationPassType) ParseObfuscationType(string obfuscationPassTypesStr)
{
bool delta = false;
if (obfuscationPassTypesStr[0] == '+' || obfuscationPassTypesStr[0] == '-')
{
delta = true;
obfuscationPassTypesStr = obfuscationPassTypesStr.Substring(1);
}
ObfuscationPassType passType = ObfuscationPassType.None;
foreach (var passName in obfuscationPassTypesStr.Split('|'))
{
if (Enum.TryParse<ObfuscationPassType>(passName, out var pass))
{
passType |= pass;
}
else
{
throw new Exception($"Invalid xml file {_curLoadingConfig}, unknown pass type {passName}");
}
}
return (delta, passType);
}
private PassRule ParseRule(XmlElement ele)
{
var r = new PassRule();
if (ele.HasAttribute("enable"))
{
string enablePassStr = ele.GetAttribute("enable");
if (string.IsNullOrEmpty(enablePassStr))
{
throw new Exception($"Invalid xml file {_curLoadingConfig}, enable attribute is empty");
}
var (delta, passType) = ParseObfuscationType(enablePassStr);
if (delta)
{
r.addPasses = passType;
}
else
{
r.enablePasses = passType;
}
}
if (ele.HasAttribute("disable"))
{
string disablePassStr = ele.GetAttribute("disable");
if (string.IsNullOrEmpty(disablePassStr))
{
throw new Exception($"Invalid xml file {_curLoadingConfig}, disable attribute is empty");
}
var (delta, passType) = ParseObfuscationType(disablePassStr);
if (delta)
{
r.removePasses = passType;
}
else
{
r.disablePasses = passType;
}
}
if (r.enablePasses != null && (r.disablePasses != null || r.addPasses != null || r.removePasses != null))
{
throw new Exception($"Invalid xml file {_curLoadingConfig}, enable and disable can't be used together");
}
if (r.disablePasses != null && (r.enablePasses != null || r.addPasses != null || r.removePasses != null))
{
throw new Exception($"Invalid xml file {_curLoadingConfig}, disable and enable can't be used together");
}
return r;
}
private AssemblySpec ParseAssembly(XmlElement ele)
{
var assemblySpec = new AssemblySpec();
string name = ele.GetAttribute("name");
if (!_toObfuscatedAssemblyNames.Contains(name))
{
throw new Exception($"Invalid xml file {_curLoadingConfig}, assembly name {name} isn't in toObfuscatedAssemblyNames");
}
assemblySpec.name = name;
assemblySpec.nameMatcher = new NameMatcher(name);
assemblySpec.rule = ParseRule(ele);
var types = assemblySpec.types;
foreach (XmlNode node in ele.ChildNodes)
{
if (!(node is XmlElement childEle))
{
continue;
}
switch (childEle.Name)
{
case "type":
{
types.Add(ParseType(childEle));
break;
}
default:
{
throw new Exception($"Invalid xml file, unknown node {childEle.Name}");
}
}
}
return assemblySpec;
}
private TypeSpec ParseType(XmlElement element)
{
var typeSpec = new TypeSpec();
string name = element.GetAttribute("name");
typeSpec.name = name;
typeSpec.nameMatcher = new NameMatcher(name);
typeSpec.rule = ParseRule(element);
List<FieldSpec> fields = typeSpec.fields;
List<MethodSpec> methods = typeSpec.methods;
List<PropertySpec> properties = typeSpec.properties;
List<EventSpec> events = typeSpec.events;
foreach (XmlNode node in element.ChildNodes)
{
if (!(node is XmlElement ele))
{
continue;
}
switch (ele.Name)
{
case "field":
{
fields.Add(ParseField(ele));
break;
}
case "method":
{
methods.Add(ParseMethod(ele));
break;
}
case "property":
{
properties.Add(ParseProperty(ele));
break;
}
case "event":
{
events.Add(ParseEvent(ele));
break;
}
default:
{
throw new Exception($"Invalid xml file, unknown node {ele.Name}");
}
}
}
return typeSpec;
}
private void ParseSpecObject(XmlElement element, SpecBase obj)
{
string name = element.GetAttribute("name");
obj.name = name;
obj.nameMatcher = new NameMatcher(name);
obj.rule = ParseRule(element);
}
private FieldSpec ParseField(XmlElement element)
{
var fieldSpec = new FieldSpec();
ParseSpecObject(element, fieldSpec);
return fieldSpec;
}
private MethodSpec ParseMethod(XmlElement element)
{
var methodSpec = new MethodSpec();
ParseSpecObject(element, methodSpec);
return methodSpec;
}
private PropertySpec ParseProperty(XmlElement element)
{
var propertySpec = new PropertySpec();
ParseSpecObject(element, propertySpec);
return propertySpec;
}
private EventSpec ParseEvent(XmlElement element)
{
var eventSpec = new EventSpec();
ParseSpecObject(element, eventSpec);
return eventSpec;
}
private readonly Dictionary<ModuleDef, (AssemblySpec, PassRule)> _modulePassRuleCaches = new Dictionary<ModuleDef, (AssemblySpec, PassRule)>();
private readonly Dictionary<TypeDef, (TypeSpec, PassRule)> _typePassRuleCaches = new Dictionary<TypeDef, (TypeSpec, PassRule)>();
private readonly Dictionary<MethodDef, (MethodSpec, PassRule)> _methodPassRuleCaches = new Dictionary<MethodDef, (MethodSpec, PassRule)>();
private readonly Dictionary<FieldDef, (FieldSpec, PassRule)> _fieldPassRuleCaches = new Dictionary<FieldDef, (FieldSpec, PassRule)>();
private readonly Dictionary<PropertyDef, (PropertySpec, PassRule)> _propertyPassRuleCaches = new Dictionary<PropertyDef, (PropertySpec, PassRule)>();
private readonly Dictionary<EventDef, (EventSpec, PassRule)> _eventPassRuleCaches = new Dictionary<EventDef, (EventSpec, PassRule)>();
private (AssemblySpec, PassRule) GetAssemblySpec(ModuleDef module)
{
if (!_modulePassRuleCaches.TryGetValue(module, out var result))
{
result = (null, _defaultPassRule);
string assName = module.Assembly.Name;
foreach (var ass in _assemblySpecs)
{
if (ass.nameMatcher.IsMatch(assName))
{
result = (ass, ass.rule);
break;
}
}
_modulePassRuleCaches.Add(module, result);
}
return result;
}
private (TypeSpec, PassRule) GetTypeSpec(TypeDef type)
{
if (!_typePassRuleCaches.TryGetValue(type, out var result))
{
var assResult = GetAssemblySpec(type.Module);
result = (null, assResult.Item2);
if (assResult.Item1 != null)
{
string typeName = type.FullName;
foreach (var typeSpec in assResult.Item1.types)
{
if (typeSpec.nameMatcher.IsMatch(typeName))
{
result = (typeSpec, typeSpec.rule);
break;
}
}
}
_typePassRuleCaches.Add(type, result);
}
return result;
}
private (MethodSpec, PassRule) GetMethodSpec(MethodDef method)
{
if (!_methodPassRuleCaches.TryGetValue(method, out var result))
{
var typeResult = GetTypeSpec(method.DeclaringType);
result = (null, typeResult.Item2);
if (typeResult.Item1 != null)
{
string methodName = method.Name;
foreach (var methodSpec in typeResult.Item1.methods)
{
if (methodSpec.nameMatcher.IsMatch(methodName))
{
result = (methodSpec, methodSpec.rule);
break;
}
}
}
_methodPassRuleCaches.Add(method, result);
}
return result;
}
private (FieldSpec, PassRule) GetFieldSpec(FieldDef field)
{
if (!_fieldPassRuleCaches.TryGetValue(field, out var result))
{
var typeResult = GetTypeSpec(field.DeclaringType);
result = (null, typeResult.Item2);
if (typeResult.Item1 != null)
{
string fieldName = field.Name;
foreach (var fieldSpec in typeResult.Item1.fields)
{
if (fieldSpec.nameMatcher.IsMatch(fieldName))
{
result = (fieldSpec, fieldSpec.rule);
break;
}
}
}
_fieldPassRuleCaches.Add(field, result);
}
return result;
}
private (PropertySpec, PassRule) GetPropertySpec(PropertyDef property)
{
if (!_propertyPassRuleCaches.TryGetValue(property, out var result))
{
var typeResult = GetTypeSpec(property.DeclaringType);
result = (null, typeResult.Item2);
if (typeResult.Item1 != null)
{
string propertyName = property.Name;
foreach (var propertySpec in typeResult.Item1.properties)
{
if (propertySpec.nameMatcher.IsMatch(propertyName))
{
result = (propertySpec, propertySpec.rule);
break;
}
}
}
_propertyPassRuleCaches.Add(property, result);
}
return result;
}
private (EventSpec, PassRule) GetEventSpec(EventDef eventDef)
{
if (!_eventPassRuleCaches.TryGetValue(eventDef, out var result))
{
var typeResult = GetTypeSpec(eventDef.DeclaringType);
result = (null, typeResult.Item2);
if (typeResult.Item1 != null)
{
string eventName = eventDef.Name;
foreach (var eventSpec in typeResult.Item1.events)
{
if (eventSpec.nameMatcher.IsMatch(eventName))
{
result = (eventSpec, eventSpec.rule);
break;
}
}
}
_eventPassRuleCaches.Add(eventDef, result);
}
return result;
}
public ObfuscationPassType GetAssemblyObfuscationPasses(ModuleDef module)
{
return GetAssemblySpec(module).Item2.finalPasses;
}
public ObfuscationPassType GetTypeObfuscationPasses(TypeDef type)
{
return GetTypeSpec(type).Item2.finalPasses;
}
public ObfuscationPassType GetMethodObfuscationPasses(MethodDef method)
{
return GetMethodSpec(method).Item2.finalPasses;
}
public ObfuscationPassType GetFieldObfuscationPasses(FieldDef field)
{
return GetFieldSpec(field).Item2.finalPasses;
}
public ObfuscationPassType GetPropertyObfuscationPasses(PropertyDef property)
{
return GetPropertySpec(property).Item2.finalPasses;
}
public ObfuscationPassType GetEventObfuscationPasses(EventDef eventDef)
{
return GetEventSpec(eventDef).Item2.finalPasses;
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 41044699810a34f4780e14de084bf7d7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,34 +0,0 @@
using System.Text;
namespace Obfuz.Editor
{
public static class ConstValues
{
public const string ObfuzInternalSymbolNamePrefix = "$Obfuz$";
public const string ObfuzRuntimeAssemblyName = "Obfuz.Runtime";
public const string ObfuzIgnoreAttributeFullName = "Obfuz.ObfuzIgnoreAttribute";
public const string ObfuzScopeFullName = "Obfuz.ObfuzScope";
public const string EncryptFieldAttributeFullName = "Obfuz.EncryptFieldAttribute";
public const string GeneratedEncryptionVirtualMachineFullName = "Obfuz.EncryptionVM.GeneratedEncryptionVirtualMachine";
public const string EmbeddedAttributeFullName = "Microsoft.CodeAnalysis.EmbeddedAttribute";
public const string MonoPInvokeCallbackAttributeName = "MonoPInvokeCallbackAttribute";
public const string ZluaLuaInvokeAttributeFullName = "Zlua.LuaInvokeAttribute";
public const string ZluaLuaCallbackAttributeFullName = "Zlua.LuaCallbackAttribute";
public const string ZluaLuaMarshalAsAttributeFullName = "Zlua.LuaMarshalAsAttribute";
public const string BurstCompileFullName = "Unity.Burst.BurstCompileAttribute";
public const string DOTSCompilerGeneratedAttributeFullName = "Unity.Jobs.DOTSCompilerGeneratedAttribute";
public const string RuntimeInitializedOnLoadMethodAttributeFullName = "UnityEngine.RuntimeInitializeOnLoadMethodAttribute";
public const string BlackboardEnumAttributeFullName = "Unity.Behavior.BlackboardEnumAttribute";
public const string CompilerGeneratedAttributeFullName = "System.Runtime.CompilerServices.CompilerGeneratedAttribute";
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: aee7817ed523a5e4ea42104013e8a775
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 3319ebe75a42f3d4d996846ca09ed099
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,269 +0,0 @@
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using Obfuz.Editor;
using Obfuz.Emit;
using Obfuz.Utils;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.Assertions;
namespace Obfuz.Data
{
public class ConstFieldAllocator : GroupByModuleEntityBase
{
private RandomCreator _randomCreator;
private IEncryptor _encryptor;
private TypeDef _holderTypeDef;
class ConstFieldInfo
{
public FieldDef field;
public object value;
}
class AnyComparer : IEqualityComparer<object>
{
public new bool Equals(object x, object y)
{
if (x is byte[] xBytes && y is byte[] yBytes)
{
return StructuralComparisons.StructuralEqualityComparer.Equals(xBytes, yBytes);
}
return x.Equals(y);
}
public static int ComputeHashCode(object obj)
{
return HashUtil.ComputePrimitiveOrStringOrBytesHashCode(obj);
}
public int GetHashCode(object obj)
{
return ComputeHashCode(obj);
}
}
private readonly Dictionary<object, ConstFieldInfo> _allocatedFields = new Dictionary<object, ConstFieldInfo>(new AnyComparer());
private readonly Dictionary<FieldDef, ConstFieldInfo> _field2Fields = new Dictionary<FieldDef, ConstFieldInfo>();
private readonly List<TypeDef> _holderTypeDefs = new List<TypeDef>();
private bool _done;
public ConstFieldAllocator()
{
}
public override void Init()
{
_randomCreator = EncryptionScope.localRandomCreator;
_encryptor = EncryptionScope.encryptor;
}
const int maxFieldCount = 1000;
private TypeSig GetTypeSigOfValue(object value)
{
ModuleDef mod = Module;
if (value is int)
return mod.CorLibTypes.Int32;
if (value is long)
return mod.CorLibTypes.Int64;
if (value is float)
return mod.CorLibTypes.Single;
if (value is double)
return mod.CorLibTypes.Double;
if (value is string)
return mod.CorLibTypes.String;
if (value is byte[])
return new SZArraySig(mod.CorLibTypes.Byte);
throw new NotSupportedException($"Unsupported type: {value.GetType()}");
}
private ConstFieldInfo CreateConstFieldInfo(object value)
{
ModuleDef mod = Module;
if (_holderTypeDef == null || _holderTypeDef.Fields.Count >= maxFieldCount)
{
using (var scope = new DisableTypeDefFindCacheScope(mod))
{
ITypeDefOrRef objectTypeRef = mod.Import(typeof(object));
_holderTypeDef = new TypeDefUser($"{ConstValues.ObfuzInternalSymbolNamePrefix}ConstFieldHolder${_holderTypeDefs.Count}", objectTypeRef);
mod.Types.Add(_holderTypeDef);
_holderTypeDefs.Add(_holderTypeDef);
}
}
var field = new FieldDefUser($"{ConstValues.ObfuzInternalSymbolNamePrefix}RVA_Value{_holderTypeDef.Fields.Count}", new FieldSig(GetTypeSigOfValue(value)), FieldAttributes.Static | FieldAttributes.Public);
field.DeclaringType = _holderTypeDef;
return new ConstFieldInfo
{
field = field,
value = value,
};
}
private FieldDef AllocateAny(object value)
{
if (_done)
{
throw new Exception("can't Allocate after done");
}
if (!_allocatedFields.TryGetValue(value, out var field))
{
field = CreateConstFieldInfo(value);
_allocatedFields.Add(value, field);
_field2Fields.Add(field.field, field);
}
return field.field;
}
public FieldDef Allocate(int value)
{
return AllocateAny(value);
}
public FieldDef Allocate(long value)
{
return AllocateAny(value);
}
public FieldDef Allocate(float value)
{
return AllocateAny(value);
}
public FieldDef Allocate(double value)
{
return AllocateAny(value);
}
public FieldDef Allocate(string value)
{
return AllocateAny(value);
}
public FieldDef Allocate(byte[] value)
{
return AllocateAny(value);
}
private void CreateCCtorOfRvaTypeDef(TypeDef type)
{
ModuleDef mod = Module;
var cctor = new MethodDefUser(".cctor",
MethodSig.CreateStatic(mod.CorLibTypes.Void),
MethodImplAttributes.IL | MethodImplAttributes.Managed,
MethodAttributes.Static | MethodAttributes.HideBySig | MethodAttributes.SpecialName | MethodAttributes.RTSpecialName | MethodAttributes.Private);
cctor.DeclaringType = type;
var body = new CilBody();
cctor.Body = body;
var ins = body.Instructions;
DefaultMetadataImporter importer = this.GetDefaultModuleMetadataImporter();
RvaDataAllocator rvaDataAllocator = GetEntity<RvaDataAllocator>();
// TODO. obfuscate init codes
foreach (var field in type.Fields)
{
ConstFieldInfo constInfo = _field2Fields[field];
IRandom localRandom = _randomCreator(HashUtil.ComputePrimitiveOrStringOrBytesHashCode(constInfo.value));
int ops = EncryptionUtil.GenerateEncryptionOpCodes(localRandom, _encryptor, 4);
int salt = localRandom.NextInt();
switch (constInfo.value)
{
case int i:
{
int encryptedValue = _encryptor.Encrypt(i, ops, salt);
RvaData rvaData = rvaDataAllocator.Allocate(encryptedValue);
ins.Add(Instruction.Create(OpCodes.Ldsfld, rvaData.field));
ins.Add(Instruction.CreateLdcI4(rvaData.offset));
ins.Add(Instruction.CreateLdcI4(ops));
ins.Add(Instruction.CreateLdcI4(salt));
ins.Add(Instruction.Create(OpCodes.Call, importer.DecryptFromRvaInt));
break;
}
case long l:
{
long encryptedValue = _encryptor.Encrypt(l, ops, salt);
RvaData rvaData = rvaDataAllocator.Allocate(encryptedValue);
ins.Add(Instruction.Create(OpCodes.Ldsfld, rvaData.field));
ins.Add(Instruction.CreateLdcI4(rvaData.offset));
ins.Add(Instruction.CreateLdcI4(ops));
ins.Add(Instruction.CreateLdcI4(salt));
ins.Add(Instruction.Create(OpCodes.Call, importer.DecryptFromRvaLong));
break;
}
case float f:
{
float encryptedValue = _encryptor.Encrypt(f, ops, salt);
RvaData rvaData = rvaDataAllocator.Allocate(encryptedValue);
ins.Add(Instruction.Create(OpCodes.Ldsfld, rvaData.field));
ins.Add(Instruction.CreateLdcI4(rvaData.offset));
ins.Add(Instruction.CreateLdcI4(ops));
ins.Add(Instruction.CreateLdcI4(salt));
ins.Add(Instruction.Create(OpCodes.Call, importer.DecryptFromRvaFloat));
break;
}
case double d:
{
double encryptedValue = _encryptor.Encrypt(d, ops, salt);
RvaData rvaData = rvaDataAllocator.Allocate(encryptedValue);
ins.Add(Instruction.Create(OpCodes.Ldsfld, rvaData.field));
ins.Add(Instruction.CreateLdcI4(rvaData.offset));
ins.Add(Instruction.CreateLdcI4(ops));
ins.Add(Instruction.CreateLdcI4(salt));
ins.Add(Instruction.Create(OpCodes.Call, importer.DecryptFromRvaDouble));
break;
}
case string s:
{
byte[] encryptedValue = _encryptor.Encrypt(s, ops, salt);
RvaData rvaData = rvaDataAllocator.Allocate(encryptedValue);
ins.Add(Instruction.Create(OpCodes.Ldsfld, rvaData.field));
ins.Add(Instruction.CreateLdcI4(rvaData.offset));
Assert.AreEqual(encryptedValue.Length, rvaData.size);
ins.Add(Instruction.CreateLdcI4(encryptedValue.Length));
ins.Add(Instruction.CreateLdcI4(ops));
ins.Add(Instruction.CreateLdcI4(salt));
ins.Add(Instruction.Create(OpCodes.Call, importer.DecryptFromRvaString));
break;
}
case byte[] bs:
{
byte[] encryptedValue = _encryptor.Encrypt(bs, 0, bs.Length, ops, salt);
Assert.AreEqual(encryptedValue.Length, bs.Length);
RvaData rvaData = rvaDataAllocator.Allocate(encryptedValue);
ins.Add(Instruction.Create(OpCodes.Ldsfld, rvaData.field));
ins.Add(Instruction.CreateLdcI4(rvaData.offset));
ins.Add(Instruction.CreateLdcI4(bs.Length));
ins.Add(Instruction.CreateLdcI4(ops));
ins.Add(Instruction.CreateLdcI4(salt));
ins.Add(Instruction.Create(OpCodes.Call, importer.DecryptFromRvaBytes));
break;
}
default: throw new NotSupportedException($"Unsupported type: {constInfo.value.GetType()}");
}
ins.Add(Instruction.Create(OpCodes.Stsfld, field));
}
ins.Add(Instruction.Create(OpCodes.Ret));
}
public override void Done()
{
if (_done)
{
throw new Exception("Already done");
}
_done = true;
foreach (var typeDef in _holderTypeDefs)
{
CreateCCtorOfRvaTypeDef(typeDef);
}
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: e75f5cdfd47370d4ea6c4dee7e55a881
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,324 +0,0 @@
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using Obfuz.Emit;
using Obfuz.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using UnityEngine.Assertions;
namespace Obfuz.Data
{
public struct RvaData
{
public readonly FieldDef field;
public readonly int offset;
public readonly int size;
public RvaData(FieldDef field, int offset, int size)
{
this.field = field;
this.offset = offset;
this.size = size;
}
}
public class RvaDataAllocator : GroupByModuleEntityBase
{
const int maxRvaDataSize = 2 * 1024;
// in HybridCLR version below 8.3.0, the max total static field size of a type is 16KB, so we limit the total size of RVA data to 16KB
const int maxTotalRvaDataFieldSizeInHybridCLR = 16 * 1024;
private IRandom _random;
class RvaField
{
public FieldDef holderDataField;
public FieldDef runtimeValueField;
public int encryptionOps;
public uint size;
public List<byte> bytes;
public int salt;
public void FillPaddingToSize(int newSize)
{
for (int i = bytes.Count; i < newSize; i++)
{
bytes.Add(0xAB);
}
}
public void FillPaddingToEnd()
{
// fill with random value
for (int i = bytes.Count; i < size; i++)
{
bytes.Add(0xAB);
}
}
}
private class RvaTypeDefInfo
{
public readonly TypeDef typeDef;
public readonly int index;
public readonly List<RvaField> rvaFields = new List<RvaField>();
public RvaTypeDefInfo(TypeDef typeDef, int index)
{
this.typeDef = typeDef;
this.index = index;
}
}
private RvaField _currentField;
private RvaTypeDefInfo _currentRvaType;
private readonly List<RvaTypeDefInfo> _rvaTypeDefs = new List<RvaTypeDefInfo>();
private readonly Dictionary<int, TypeDef> _dataHolderTypeBySizes = new Dictionary<int, TypeDef>();
private bool _done;
public RvaDataAllocator()
{
}
public override void Init()
{
_random = EncryptionScope.localRandomCreator(HashUtil.ComputeHash(Module.Name));
}
private (FieldDef, FieldDef) CreateDataHolderRvaField(TypeDef dataHolderType)
{
if (_currentRvaType == null || _currentRvaType.rvaFields.Count >= maxTotalRvaDataFieldSizeInHybridCLR / maxRvaDataSize - 1)
{
using (var scope = new DisableTypeDefFindCacheScope(Module))
{
var rvaTypeDef = new TypeDefUser($"$Obfuz$RVA${_rvaTypeDefs.Count}", Module.CorLibTypes.Object.ToTypeDefOrRef());
Module.Types.Add(rvaTypeDef);
_currentRvaType = new RvaTypeDefInfo(rvaTypeDef, _rvaTypeDefs.Count);
_rvaTypeDefs.Add(_currentRvaType);
}
}
var holderField = new FieldDefUser($"$RVA_Data{_currentRvaType.rvaFields.Count}", new FieldSig(dataHolderType.ToTypeSig()), FieldAttributes.InitOnly | FieldAttributes.Static | FieldAttributes.HasFieldRVA);
holderField.DeclaringType = _currentRvaType.typeDef;
var runtimeValueField = new FieldDefUser($"$RVA_Value{_currentRvaType.rvaFields.Count}", new FieldSig(new SZArraySig(Module.CorLibTypes.Byte)), FieldAttributes.Static | FieldAttributes.Public);
runtimeValueField.DeclaringType = _currentRvaType.typeDef;
return (holderField, runtimeValueField);
}
private TypeDef GetDataHolderType(int size)
{
size = (size + 15) & ~15; // align to 16 bytes
if (_dataHolderTypeBySizes.TryGetValue(size, out var type))
return type;
using (var scope = new DisableTypeDefFindCacheScope(Module))
{
var dataHolderType = new TypeDefUser($"$ObfuzRVA$DataHolder{size}", Module.Import(typeof(ValueType)));
dataHolderType.Attributes = TypeAttributes.Public | TypeAttributes.Sealed;
dataHolderType.Layout = TypeAttributes.ExplicitLayout;
dataHolderType.PackingSize = 1;
dataHolderType.ClassSize = (uint)size;
_dataHolderTypeBySizes.Add(size, dataHolderType);
Module.Types.Add(dataHolderType);
return dataHolderType;
}
}
private static int AlignTo(int size, int alignment)
{
return (size + alignment - 1) & ~(alignment - 1);
}
private RvaField CreateRvaField(int size)
{
TypeDef dataHolderType = GetDataHolderType(size);
var (holderDataField, runtimeValueField) = CreateDataHolderRvaField(dataHolderType);
var newRvaField = new RvaField
{
holderDataField = holderDataField,
runtimeValueField = runtimeValueField,
size = dataHolderType.ClassSize,
bytes = new List<byte>((int)dataHolderType.ClassSize),
encryptionOps = _random.NextInt(),
salt = _random.NextInt(),
};
_currentRvaType.rvaFields.Add(newRvaField);
return newRvaField;
}
private RvaField GetRvaField(int preservedSize, int alignment)
{
if (_done)
{
throw new Exception("can't GetRvaField after done");
}
Assert.IsTrue(preservedSize % alignment == 0);
// for big size, create a new field
if (preservedSize >= maxRvaDataSize)
{
return CreateRvaField(preservedSize);
}
if (_currentField != null)
{
int offset = AlignTo(_currentField.bytes.Count, alignment);
int expectedSize = offset + preservedSize;
if (expectedSize <= _currentField.size)
{
_currentField.FillPaddingToSize(offset);
return _currentField;
}
_currentField.FillPaddingToEnd();
}
_currentField = CreateRvaField(maxRvaDataSize);
return _currentField;
}
public RvaData Allocate(int value)
{
RvaField field = GetRvaField(4, 4);
int offset = field.bytes.Count;
Assert.IsTrue(offset % 4 == 0);
field.bytes.AddRange(BitConverter.GetBytes(value));
return new RvaData(field.runtimeValueField, offset, 4);
}
public RvaData Allocate(long value)
{
RvaField field = GetRvaField(8, 8);
int offset = field.bytes.Count;
Assert.IsTrue(offset % 8 == 0);
field.bytes.AddRange(BitConverter.GetBytes(value));
return new RvaData(field.runtimeValueField, offset, 8);
}
public RvaData Allocate(float value)
{
RvaField field = GetRvaField(4, 4);
int offset = field.bytes.Count;
Assert.IsTrue(offset % 4 == 0);
field.bytes.AddRange(BitConverter.GetBytes(value));
return new RvaData(field.runtimeValueField, offset, 4);
}
public RvaData Allocate(double value)
{
RvaField field = GetRvaField(8, 8);
int offset = field.bytes.Count;
Assert.IsTrue(offset % 8 == 0);
field.bytes.AddRange(BitConverter.GetBytes(value));
return new RvaData(field.runtimeValueField, offset, 8);
}
public RvaData Allocate(string value)
{
byte[] bytes = Encoding.UTF8.GetBytes(value);
return Allocate(bytes);
}
public RvaData Allocate(byte[] value)
{
RvaField field = GetRvaField(value.Length, 1);
int offset = field.bytes.Count;
field.bytes.AddRange(value);
return new RvaData(field.runtimeValueField, offset, value.Length);
}
private void AddVerifyCodes(IList<Instruction> insts, DefaultMetadataImporter importer)
{
int verifyIntValue = 0x12345678;
EncryptionScopeInfo encryptionScope = this.EncryptionScope;
IRandom verifyRandom = encryptionScope.localRandomCreator(verifyIntValue);
int verifyOps = EncryptionUtil.GenerateEncryptionOpCodes(verifyRandom, encryptionScope.encryptor, 4);
int verifySalt = verifyRandom.NextInt();
int encryptedVerifyIntValue = encryptionScope.encryptor.Encrypt(verifyIntValue, verifyOps, verifySalt);
insts.Add(Instruction.Create(OpCodes.Ldc_I4, verifyIntValue));
insts.Add(Instruction.CreateLdcI4(encryptedVerifyIntValue));
insts.Add(Instruction.CreateLdcI4(verifyOps));
insts.Add(Instruction.CreateLdcI4(verifySalt));
insts.Add(Instruction.Create(OpCodes.Call, importer.DecryptInt));
insts.Add(Instruction.Create(OpCodes.Call, importer.VerifySecretKey));
}
private void CreateCCtorOfRvaTypeDef()
{
foreach (RvaTypeDefInfo rvaTypeDef in _rvaTypeDefs)
{
ModuleDef mod = rvaTypeDef.typeDef.Module;
var cctorMethod = new MethodDefUser(".cctor",
MethodSig.CreateStatic(Module.CorLibTypes.Void),
MethodImplAttributes.IL | MethodImplAttributes.Managed,
MethodAttributes.Static | MethodAttributes.HideBySig | MethodAttributes.SpecialName | MethodAttributes.RTSpecialName | MethodAttributes.Private);
cctorMethod.DeclaringType = rvaTypeDef.typeDef;
//_rvaTypeDef.Methods.Add(cctor);
var body = new CilBody();
cctorMethod.Body = body;
var ins = body.Instructions;
DefaultMetadataImporter importer = this.GetDefaultModuleMetadataImporter();
AddVerifyCodes(ins, importer);
foreach (var field in rvaTypeDef.rvaFields)
{
// ldc
// newarr
// dup
// stsfld
// ldtoken
// RuntimeHelpers.InitializeArray(array, fieldHandle);
ins.Add(Instruction.Create(OpCodes.Ldc_I4, (int)field.size));
ins.Add(Instruction.Create(OpCodes.Newarr, field.runtimeValueField.FieldType.Next.ToTypeDefOrRef()));
ins.Add(Instruction.Create(OpCodes.Dup));
ins.Add(Instruction.Create(OpCodes.Dup));
ins.Add(Instruction.Create(OpCodes.Stsfld, field.runtimeValueField));
ins.Add(Instruction.Create(OpCodes.Ldtoken, field.holderDataField));
ins.Add(Instruction.Create(OpCodes.Call, importer.InitializedArray));
// EncryptionService.DecryptBlock(array, field.encryptionOps, field.salt);
ins.Add(Instruction.CreateLdcI4(field.encryptionOps));
ins.Add(Instruction.Create(OpCodes.Ldc_I4, field.salt));
ins.Add(Instruction.Create(OpCodes.Call, importer.DecryptBlock));
}
ins.Add(Instruction.Create(OpCodes.Ret));
}
}
private void SetFieldsRVA()
{
foreach (var field in _rvaTypeDefs.SelectMany(t => t.rvaFields))
{
Assert.IsTrue(field.bytes.Count <= field.size);
if (field.bytes.Count < field.size)
{
field.FillPaddingToEnd();
}
byte[] data = field.bytes.ToArray();
EncryptionScope.encryptor.EncryptBlock(data, field.encryptionOps, field.salt);
field.holderDataField.InitialValue = data;
}
}
public override void Done()
{
if (_done)
{
throw new Exception("can't call Done twice");
}
_done = true;
SetFieldsRVA();
CreateCCtorOfRvaTypeDef();
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: c00ca514f46605645bf40b0135e7e504
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: a513a192808ba5f47b1ef8a3ecf02533
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,310 +0,0 @@
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Obfuz.Emit
{
public class BasicBlock
{
public readonly List<Instruction> instructions = new List<Instruction>();
public readonly List<BasicBlock> inBlocks = new List<BasicBlock>();
public readonly List<BasicBlock> outBlocks = new List<BasicBlock>();
public bool inLoop;
public void AddTargetBasicBlock(BasicBlock target)
{
if (!outBlocks.Contains(target))
{
outBlocks.Add(target);
}
if (!target.inBlocks.Contains(this))
{
target.inBlocks.Add(this);
}
}
}
public class BasicBlockCollection
{
private readonly MethodDef _method;
private readonly List<BasicBlock> _blocks = new List<BasicBlock>();
private readonly Dictionary<Instruction, BasicBlock> _inst2BlockMap = new Dictionary<Instruction, BasicBlock>();
public IList<BasicBlock> Blocks => _blocks;
public BasicBlockCollection(MethodDef method, bool computeInLoop)
{
_method = method;
HashSet<Instruction> splitPoints = BuildSplitPoint(method);
BuildBasicBlocks(method, splitPoints);
BuildInOutGraph(method);
if (computeInLoop)
{
ComputeBlocksInLoop();
}
}
public void ComputeBlocksInLoop()
{
var loopBlocks = FindLoopBlocks(_blocks);
foreach (var block in loopBlocks)
{
block.inLoop = true;
}
}
public BasicBlock GetBasicBlockByInstruction(Instruction inst)
{
return _inst2BlockMap[inst];
}
private HashSet<Instruction> BuildSplitPoint(MethodDef method)
{
var insts = method.Body.Instructions;
var splitPoints = new HashSet<Instruction>();
foreach (ExceptionHandler eh in method.Body.ExceptionHandlers)
{
if (eh.TryStart != null)
{
splitPoints.Add(eh.TryStart);
}
if (eh.TryEnd != null)
{
splitPoints.Add(eh.TryEnd);
}
if (eh.HandlerStart != null)
{
splitPoints.Add(eh.HandlerStart);
}
if (eh.HandlerEnd != null)
{
splitPoints.Add(eh.HandlerEnd);
}
if (eh.FilterStart != null)
{
splitPoints.Add(eh.FilterStart);
}
}
for (int i = 0, n = insts.Count; i < n; i++)
{
Instruction curInst = insts[i];
Instruction nextInst = i + 1 < n ? insts[i + 1] : null;
switch (curInst.OpCode.FlowControl)
{
case FlowControl.Branch:
{
if (nextInst != null)
{
splitPoints.Add(nextInst);
}
splitPoints.Add((Instruction)curInst.Operand);
break;
}
case FlowControl.Cond_Branch:
{
if (nextInst != null)
{
splitPoints.Add(nextInst);
}
if (curInst.Operand is Instruction targetInst)
{
splitPoints.Add(targetInst);
}
else if (curInst.Operand is Instruction[] targetInsts)
{
foreach (var target in targetInsts)
{
splitPoints.Add(target);
}
}
break;
}
case FlowControl.Return:
{
if (nextInst != null)
{
splitPoints.Add(nextInst);
}
break;
}
case FlowControl.Throw:
{
if (nextInst != null)
{
splitPoints.Add(nextInst);
}
break;
}
}
}
return splitPoints;
}
private void BuildBasicBlocks(MethodDef method, HashSet<Instruction> splitPoints)
{
var insts = method.Body.Instructions;
BasicBlock curBlock = new BasicBlock();
foreach (Instruction inst in insts)
{
if (splitPoints.Contains(inst) && curBlock.instructions.Count > 0)
{
_blocks.Add(curBlock);
curBlock = new BasicBlock();
}
curBlock.instructions.Add(inst);
_inst2BlockMap.Add(inst, curBlock);
}
if (curBlock.instructions.Count > 0)
{
_blocks.Add(curBlock);
}
}
private void BuildInOutGraph(MethodDef method)
{
var insts = method.Body.Instructions;
for (int i = 0, n = _blocks.Count; i < n; i++)
{
BasicBlock curBlock = _blocks[i];
BasicBlock nextBlock = i + 1 < n ? _blocks[i + 1] : null;
Instruction lastInst = curBlock.instructions.Last();
switch (lastInst.OpCode.FlowControl)
{
case FlowControl.Branch:
{
Instruction targetInst = (Instruction)lastInst.Operand;
BasicBlock targetBlock = GetBasicBlockByInstruction(targetInst);
curBlock.AddTargetBasicBlock(targetBlock);
break;
}
case FlowControl.Cond_Branch:
{
if (lastInst.Operand is Instruction targetInst)
{
BasicBlock targetBlock = GetBasicBlockByInstruction(targetInst);
curBlock.AddTargetBasicBlock(targetBlock);
}
else if (lastInst.Operand is Instruction[] targetInsts)
{
foreach (var target in targetInsts)
{
BasicBlock targetBlock = GetBasicBlockByInstruction(target);
curBlock.AddTargetBasicBlock(targetBlock);
}
}
else
{
throw new Exception("Invalid operand type for conditional branch");
}
if (nextBlock != null)
{
curBlock.AddTargetBasicBlock(nextBlock);
}
break;
}
case FlowControl.Call:
case FlowControl.Next:
{
if (nextBlock != null)
{
curBlock.AddTargetBasicBlock(nextBlock);
}
break;
}
case FlowControl.Return:
case FlowControl.Throw:
{
break;
}
default: throw new NotSupportedException($"Unsupported flow control: {lastInst.OpCode.FlowControl} in method {method.FullName}");
}
}
}
private static HashSet<BasicBlock> FindLoopBlocks(List<BasicBlock> allBlocks)
{
// Tarjan算法找强连通分量
var sccList = FindStronglyConnectedComponents(allBlocks);
// 筛选有效循环
var loopBlocks = new HashSet<BasicBlock>();
foreach (var scc in sccList)
{
// 有效循环需满足以下条件之一:
// 1. 分量包含多个块
// 2. 单个块有自环(跳转自己)
if (scc.Count > 1 ||
(scc.Count == 1 && scc[0].outBlocks.Contains(scc[0])))
{
foreach (var block in scc)
{
loopBlocks.Add(block);
}
}
}
return loopBlocks;
}
private static List<List<BasicBlock>> FindStronglyConnectedComponents(List<BasicBlock> allBlocks)
{
int index = 0;
var stack = new Stack<BasicBlock>();
var indexes = new Dictionary<BasicBlock, int>();
var lowLinks = new Dictionary<BasicBlock, int>();
var onStack = new HashSet<BasicBlock>();
var sccList = new List<List<BasicBlock>>();
foreach (var block in allBlocks.Where(b => !indexes.ContainsKey(b)))
{
StrongConnect(block);
}
return sccList;
void StrongConnect(BasicBlock v)
{
indexes[v] = index;
lowLinks[v] = index;
index++;
stack.Push(v);
onStack.Add(v);
foreach (var w in v.outBlocks)
{
if (!indexes.ContainsKey(w))
{
StrongConnect(w);
lowLinks[v] = System.Math.Min(lowLinks[v], lowLinks[w]);
}
else if (onStack.Contains(w))
{
lowLinks[v] = System.Math.Min(lowLinks[v], indexes[w]);
}
}
if (lowLinks[v] == indexes[v])
{
var scc = new List<BasicBlock>();
BasicBlock w;
do
{
w = stack.Pop();
onStack.Remove(w);
scc.Add(w);
} while (!w.Equals(v));
sccList.Add(scc);
}
}
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 77c19c023bb7f77489998d994a3be1bd
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,423 +0,0 @@
using dnlib.DotNet;
using System;
using System.Reflection;
using UnityEngine.Assertions;
namespace Obfuz.Emit
{
public class EncryptionServiceMetadataImporter
{
private readonly ModuleDef _module;
private readonly Type _encryptionServiceType;
private IMethod _encryptBlock;
private IMethod _decryptBlock;
private IMethod _encryptInt;
private IMethod _decryptInt;
private IMethod _encryptLong;
private IMethod _decryptLong;
private IMethod _encryptFloat;
private IMethod _decryptFloat;
private IMethod _encryptDouble;
private IMethod _decryptDouble;
private IMethod _encryptString;
private IMethod _decryptString;
private IMethod _encryptBytes;
private IMethod _decryptBytes;
private IMethod _decryptFromRvaInt;
private IMethod _decryptFromRvaLong;
private IMethod _decryptFromRvaFloat;
private IMethod _decryptFromRvaDouble;
private IMethod _decryptFromRvaString;
private IMethod _decryptFromRvaBytes;
private IMethod _decryptInitializeArray;
public IMethod EncryptBlock => _encryptBlock;
public IMethod DecryptBlock => _decryptBlock;
public IMethod EncryptInt => _encryptInt;
public IMethod DecryptInt => _decryptInt;
public IMethod EncryptLong => _encryptLong;
public IMethod DecryptLong => _decryptLong;
public IMethod EncryptFloat => _encryptFloat;
public IMethod DecryptFloat => _decryptFloat;
public IMethod EncryptDouble => _encryptDouble;
public IMethod DecryptDouble => _decryptDouble;
public IMethod EncryptString => _encryptString;
public IMethod DecryptString => _decryptString;
public IMethod EncryptBytes => _encryptBytes;
public IMethod DecryptBytes => _decryptBytes;
public IMethod DecryptFromRvaInt => _decryptFromRvaInt;
public IMethod DecryptFromRvaLong => _decryptFromRvaLong;
public IMethod DecryptFromRvaFloat => _decryptFromRvaFloat;
public IMethod DecryptFromRvaDouble => _decryptFromRvaDouble;
public IMethod DecryptFromRvaBytes => _decryptFromRvaBytes;
public IMethod DecryptFromRvaString => _decryptFromRvaString;
public IMethod DecryptInitializeArray => _decryptInitializeArray;
public EncryptionServiceMetadataImporter(ModuleDef mod, Type encryptionServiceType)
{
_module = mod;
_encryptionServiceType = encryptionServiceType;
_encryptBlock = mod.Import(encryptionServiceType.GetMethod("EncryptBlock", new[] { typeof(byte[]), typeof(int), typeof(int) }));
Assert.IsNotNull(_encryptBlock);
_decryptBlock = mod.Import(encryptionServiceType.GetMethod("DecryptBlock", new[] { typeof(byte[]), typeof(int), typeof(int) }));
Assert.IsNotNull(_decryptBlock);
_encryptInt = mod.Import(encryptionServiceType.GetMethod("Encrypt", new[] { typeof(int), typeof(int), typeof(int) }));
Assert.IsNotNull(_encryptInt);
_decryptInt = mod.Import(encryptionServiceType.GetMethod("Decrypt", new[] { typeof(int), typeof(int), typeof(int) }));
Assert.IsNotNull(_decryptInt);
_encryptLong = mod.Import(encryptionServiceType.GetMethod("Encrypt", new[] { typeof(long), typeof(int), typeof(int) }));
Assert.IsNotNull(_encryptLong);
_decryptLong = mod.Import(encryptionServiceType.GetMethod("Decrypt", new[] { typeof(long), typeof(int), typeof(int) }));
Assert.IsNotNull(_decryptLong);
_encryptFloat = mod.Import(encryptionServiceType.GetMethod("Encrypt", new[] { typeof(float), typeof(int), typeof(int) }));
Assert.IsNotNull(_encryptFloat);
_decryptFloat = mod.Import(encryptionServiceType.GetMethod("Decrypt", new[] { typeof(float), typeof(int), typeof(int) }));
Assert.IsNotNull(_decryptFloat);
_encryptDouble = mod.Import(encryptionServiceType.GetMethod("Encrypt", new[] { typeof(double), typeof(int), typeof(int) }));
Assert.IsNotNull(_encryptDouble);
_decryptDouble = mod.Import(encryptionServiceType.GetMethod("Decrypt", new[] { typeof(double), typeof(int), typeof(int) }));
Assert.IsNotNull(_decryptDouble);
_encryptString = mod.Import(encryptionServiceType.GetMethod("Encrypt", new[] { typeof(string), typeof(int), typeof(int) }));
Assert.IsNotNull(_encryptString);
_decryptString = mod.Import(encryptionServiceType.GetMethod("DecryptString", new[] { typeof(byte[]), typeof(int), typeof(int), typeof(int), typeof(int) }));
Assert.IsNotNull(_decryptString);
_encryptBytes = mod.Import(encryptionServiceType.GetMethod("Encrypt", new[] { typeof(byte[]), typeof(int), typeof(int), typeof(int), typeof(int) }));
Assert.IsNotNull(_encryptBytes);
_decryptBytes = mod.Import(encryptionServiceType.GetMethod("Decrypt", new[] { typeof(byte[]), typeof(int), typeof(int), typeof(int), typeof(int) }));
Assert.IsNotNull(_decryptBytes);
_decryptFromRvaInt = mod.Import(encryptionServiceType.GetMethod("DecryptFromRvaInt", new[] { typeof(byte[]), typeof(int), typeof(int), typeof(int) }));
Assert.IsNotNull(_decryptFromRvaInt);
_decryptFromRvaLong = mod.Import(encryptionServiceType.GetMethod("DecryptFromRvaLong", new[] { typeof(byte[]), typeof(int), typeof(int), typeof(int) }));
Assert.IsNotNull(_decryptFromRvaLong);
_decryptFromRvaFloat = mod.Import(encryptionServiceType.GetMethod("DecryptFromRvaFloat", new[] { typeof(byte[]), typeof(int), typeof(int), typeof(int) }));
Assert.IsNotNull(_decryptFromRvaFloat);
_decryptFromRvaDouble = mod.Import(encryptionServiceType.GetMethod("DecryptFromRvaDouble", new[] { typeof(byte[]), typeof(int), typeof(int), typeof(int) }));
Assert.IsNotNull(_decryptFromRvaDouble);
_decryptFromRvaBytes = mod.Import(encryptionServiceType.GetMethod("DecryptFromRvaBytes", new[] { typeof(byte[]), typeof(int), typeof(int), typeof(int), typeof(int) }));
Assert.IsNotNull(_decryptFromRvaBytes);
_decryptFromRvaString = mod.Import(encryptionServiceType.GetMethod("DecryptFromRvaString", new[] { typeof(byte[]), typeof(int), typeof(int), typeof(int), typeof(int) }));
Assert.IsNotNull(_decryptFromRvaString);
_decryptInitializeArray = mod.Import(encryptionServiceType.GetMethod("DecryptInitializeArray", new[] { typeof(System.Array), typeof(System.RuntimeFieldHandle), typeof(int), typeof(int), typeof(int) }));
Assert.IsNotNull(_decryptInitializeArray);
}
}
public class DefaultMetadataImporter : GroupByModuleEntityBase
{
private EncryptionServiceMetadataImporter _defaultEncryptionServiceMetadataImporter;
private EncryptionServiceMetadataImporter _staticDefaultEncryptionServiceMetadataImporter;
private EncryptionServiceMetadataImporter _dynamicDefaultEncryptionServiceMetadataImporter;
public DefaultMetadataImporter()
{
}
public override void Init()
{
ModuleDef mod = Module;
var constUtilityType = typeof(ConstUtility);
_castIntAsFloat = mod.Import(constUtilityType.GetMethod("CastIntAsFloat"));
Assert.IsNotNull(_castIntAsFloat, "CastIntAsFloat not found");
_castLongAsDouble = mod.Import(constUtilityType.GetMethod("CastLongAsDouble"));
Assert.IsNotNull(_castLongAsDouble, "CastLongAsDouble not found");
_castFloatAsInt = mod.Import(constUtilityType.GetMethod("CastFloatAsInt"));
Assert.IsNotNull(_castFloatAsInt, "CastFloatAsInt not found");
_castDoubleAsLong = mod.Import(constUtilityType.GetMethod("CastDoubleAsLong"));
Assert.IsNotNull(_castDoubleAsLong, "CastDoubleAsLong not found");
_initializeArray = mod.Import(typeof(System.Runtime.CompilerServices.RuntimeHelpers).GetMethod("InitializeArray", new[] { typeof(Array), typeof(RuntimeFieldHandle) }));
Assert.IsNotNull(_initializeArray);
_verifySecretKey = mod.Import(typeof(AssetUtility).GetMethod("VerifySecretKey", new[] { typeof(int), typeof(int) }));
Assert.IsNotNull(_verifySecretKey, "VerifySecretKey not found");
_obfuscationTypeMapperRegisterType = mod.Import(typeof(ObfuscationTypeMapper).GetMethod("RegisterType", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static, null, new[] { typeof(string) }, null));
Assert.IsNotNull(_obfuscationTypeMapperRegisterType, "ObfuscationTypeMapper.RegisterType not found");
var exprUtilityType = typeof(ExprUtility);
_addInt = mod.Import(exprUtilityType.GetMethod("Add", new[] { typeof(int), typeof(int) }));
Assert.IsNotNull(_addInt, "ExprUtility.Add(int, int) not found");
_addLong = mod.Import(exprUtilityType.GetMethod("Add", new[] { typeof(long), typeof(long) }));
Assert.IsNotNull(_addLong, "ExprUtility.Add(long, long) not found");
_addFloat = mod.Import(exprUtilityType.GetMethod("Add", new[] { typeof(float), typeof(float) }));
Assert.IsNotNull(_addFloat, "ExprUtility.Add(float, float) not found");
_addDouble = mod.Import(exprUtilityType.GetMethod("Add", new[] { typeof(double), typeof(double) }));
Assert.IsNotNull(_addDouble, "ExprUtility.Add(double, double) not found");
_addIntPtr = mod.Import(exprUtilityType.GetMethod("Add", new[] { typeof(IntPtr), typeof(IntPtr) }));
Assert.IsNotNull(_addIntPtr, "ExprUtility.Add(IntPtr, IntPtr) not found");
_addIntPtrInt = mod.Import(exprUtilityType.GetMethod("Add", new[] { typeof(IntPtr), typeof(int) }));
Assert.IsNotNull(_addIntPtrInt, "ExprUtility.Add(IntPtr, int) not found");
_subtractInt = mod.Import(exprUtilityType.GetMethod("Subtract", new[] { typeof(int), typeof(int) }));
Assert.IsNotNull(_subtractInt, "ExprUtility.Subtract(int, int) not found");
_subtractLong = mod.Import(exprUtilityType.GetMethod("Subtract", new[] { typeof(long), typeof(long) }));
Assert.IsNotNull(_subtractLong, "ExprUtility.Subtract(long, long) not found");
_subtractFloat = mod.Import(exprUtilityType.GetMethod("Subtract", new[] { typeof(float), typeof(float) }));
Assert.IsNotNull(_subtractFloat, "ExprUtility.Subtract(float, float) not found");
_subtractDouble = mod.Import(exprUtilityType.GetMethod("Subtract", new[] { typeof(double), typeof(double) }));
Assert.IsNotNull(_subtractDouble, "ExprUtility.Subtract(double, double) not found");
_subtractIntPtr = mod.Import(exprUtilityType.GetMethod("Subtract", new[] { typeof(IntPtr), typeof(IntPtr) }));
Assert.IsNotNull(_subtractIntPtr, "ExprUtility.Subtract(IntPtr, IntPtr) not found");
_subtractIntPtrInt = mod.Import(exprUtilityType.GetMethod("Subtract", new[] { typeof(IntPtr), typeof(int) }));
Assert.IsNotNull(_subtractIntPtrInt, "ExprUtility.Subtract(IntPtr, int) not found");
_multiplyInt = mod.Import(exprUtilityType.GetMethod("Multiply", new[] { typeof(int), typeof(int) }));
Assert.IsNotNull(_multiplyInt, "ExprUtility.Multiply(int, int) not found");
_multiplyLong = mod.Import(exprUtilityType.GetMethod("Multiply", new[] { typeof(long), typeof(long) }));
Assert.IsNotNull(_multiplyLong, "ExprUtility.Multiply(long, long) not found");
_multiplyFloat = mod.Import(exprUtilityType.GetMethod("Multiply", new[] { typeof(float), typeof(float) }));
Assert.IsNotNull(_multiplyFloat, "ExprUtility.Multiply(float, float) not found");
_multiplyDouble = mod.Import(exprUtilityType.GetMethod("Multiply", new[] { typeof(double), typeof(double) }));
Assert.IsNotNull(_multiplyDouble, "ExprUtility.Multiply(double, double) not found");
_multiplyIntPtr = mod.Import(exprUtilityType.GetMethod("Multiply", new[] { typeof(IntPtr), typeof(IntPtr) }));
Assert.IsNotNull(_multiplyIntPtr, "ExprUtility.Multiply(IntPtr, IntPtr) not found");
_multiplyIntPtrInt = mod.Import(exprUtilityType.GetMethod("Multiply", new[] { typeof(IntPtr), typeof(int) }));
Assert.IsNotNull(_multiplyIntPtrInt, "ExprUtility.Multiply(IntPtr, int) not found");
_divideInt = mod.Import(exprUtilityType.GetMethod("Divide", new[] { typeof(int), typeof(int) }));
Assert.IsNotNull(_divideInt, "ExprUtility.Divide(int, int) not found");
_divideLong = mod.Import(exprUtilityType.GetMethod("Divide", new[] { typeof(long), typeof(long) }));
Assert.IsNotNull(_divideLong);
_divideFloat = mod.Import(exprUtilityType.GetMethod("Divide", new[] { typeof(float), typeof(float) }));
Assert.IsNotNull(_divideFloat, "ExprUtility.Divide(float, float) not found");
_divideDouble = mod.Import(exprUtilityType.GetMethod("Divide", new[] { typeof(double), typeof(double) }));
Assert.IsNotNull(_divideDouble, "ExprUtility.Divide(double, double) not found");
_divideUnInt = mod.Import(exprUtilityType.GetMethod("DivideUn", new[] { typeof(int), typeof(int) }));
Assert.IsNotNull(_divideUnInt, "ExprUtility.DivideUn(int, int) not found");
_divideUnLong = mod.Import(exprUtilityType.GetMethod("DivideUn", new[] { typeof(long), typeof(long) }));
Assert.IsNotNull(_divideUnLong, "ExprUtility.DivideUn(long, long) not found");
_remInt = mod.Import(exprUtilityType.GetMethod("Rem", new[] { typeof(int), typeof(int) }));
Assert.IsNotNull(_remInt, "ExprUtility.Rem(int, int) not found");
_remLong = mod.Import(exprUtilityType.GetMethod("Rem", new[] { typeof(long), typeof(long) }));
Assert.IsNotNull(_remLong, "ExprUtility.Rem(long, long) not found");
_remFloat = mod.Import(exprUtilityType.GetMethod("Rem", new[] { typeof(float), typeof(float) }));
Assert.IsNotNull(_remFloat, "ExprUtility.Rem(float, float) not found");
_remDouble = mod.Import(exprUtilityType.GetMethod("Rem", new[] { typeof(double), typeof(double) }));
Assert.IsNotNull(_remDouble, "ExprUtility.Rem(double, double) not found");
_remUnInt = mod.Import(exprUtilityType.GetMethod("RemUn", new[] { typeof(int), typeof(int) }));
Assert.IsNotNull(_remUnInt, "ExprUtility.RemUn(int, int) not found");
_remUnLong = mod.Import(exprUtilityType.GetMethod("RemUn", new[] { typeof(long), typeof(long) }));
Assert.IsNotNull(_remUnLong, "ExprUtility.RemUn(long, long) not found");
_negInt = mod.Import(exprUtilityType.GetMethod("Negate", new[] { typeof(int) }));
Assert.IsNotNull(_negInt, "ExprUtility.Negate(int) not found");
_negLong = mod.Import(exprUtilityType.GetMethod("Negate", new[] { typeof(long) }));
Assert.IsNotNull(_negLong, "ExprUtility.Negate(long) not found");
_negFloat = mod.Import(exprUtilityType.GetMethod("Negate", new[] { typeof(float) }));
Assert.IsNotNull(_negFloat, "ExprUtility.Negate(float) not found");
_negDouble = mod.Import(exprUtilityType.GetMethod("Negate", new[] { typeof(double) }));
Assert.IsNotNull(_negDouble, "ExprUtility.Negate(double) not found");
_andInt = mod.Import(exprUtilityType.GetMethod("And", new[] { typeof(int), typeof(int) }));
Assert.IsNotNull(_andInt, "ExprUtility.And(int, int) not found");
_andLong = mod.Import(exprUtilityType.GetMethod("And", new[] { typeof(long), typeof(long) }));
Assert.IsNotNull(_andLong, "ExprUtility.And(long, long) not found");
_orInt = mod.Import(exprUtilityType.GetMethod("Or", new[] { typeof(int), typeof(int) }));
Assert.IsNotNull(_orInt, "ExprUtility.Or(int, int) not found");
_orLong = mod.Import(exprUtilityType.GetMethod("Or", new[] { typeof(long), typeof(long) }));
Assert.IsNotNull(_orLong, "ExprUtility.Or(long, long) not found");
_xorInt = mod.Import(exprUtilityType.GetMethod("Xor", new[] { typeof(int), typeof(int) }));
Assert.IsNotNull(_xorInt, "ExprUtility.Xor(int, int) not found");
_xorLong = mod.Import(exprUtilityType.GetMethod("Xor", new[] { typeof(long), typeof(long) }));
Assert.IsNotNull(_xorLong, "ExprUtility.Xor(long, long) not found");
_notInt = mod.Import(exprUtilityType.GetMethod("Not", new[] { typeof(int) }));
Assert.IsNotNull(_notInt, "ExprUtility.Not(int) not found");
_notLong = mod.Import(exprUtilityType.GetMethod("Not", new[] { typeof(long) }));
Assert.IsNotNull(_notLong, "ExprUtility.Not(long) not found");
_shlInt = mod.Import(exprUtilityType.GetMethod("ShiftLeft", new[] { typeof(int), typeof(int) }));
Assert.IsNotNull(_shlInt, "ExprUtility.ShiftLeft(int, int) not found");
_shlLong = mod.Import(exprUtilityType.GetMethod("ShiftLeft", new[] { typeof(long), typeof(int) }));
Assert.IsNotNull(_shlLong, "ExprUtility.ShiftLeft(long, int) not found");
_shrInt = mod.Import(exprUtilityType.GetMethod("ShiftRight", new[] { typeof(int), typeof(int) }));
Assert.IsNotNull(_shrInt, "ExprUtility.ShiftRight(int, int) not found");
_shrLong = mod.Import(exprUtilityType.GetMethod("ShiftRight", new[] { typeof(long), typeof(int) }));
Assert.IsNotNull(_shrLong, "ExprUtility.ShiftRight(long, int) not found");
_shrUnInt = mod.Import(exprUtilityType.GetMethod("ShiftRightUn", new[] { typeof(int), typeof(int) }));
Assert.IsNotNull(_shrUnInt, "ExprUtility.ShiftRightUn(int, int) not found");
_shrUnLong = mod.Import(exprUtilityType.GetMethod("ShiftRightUn", new[] { typeof(long), typeof(int) }));
Assert.IsNotNull(_shrUnLong, "ExprUtility.ShiftRightUn(long, int) not found");
_staticDefaultEncryptionServiceMetadataImporter = new EncryptionServiceMetadataImporter(mod, typeof(EncryptionService<DefaultStaticEncryptionScope>));
_dynamicDefaultEncryptionServiceMetadataImporter = new EncryptionServiceMetadataImporter(mod, typeof(EncryptionService<DefaultDynamicEncryptionScope>));
if (EncryptionScopeProvider.IsDynamicSecretAssembly(mod))
{
_defaultEncryptionServiceMetadataImporter = _dynamicDefaultEncryptionServiceMetadataImporter;
}
else
{
_defaultEncryptionServiceMetadataImporter = _staticDefaultEncryptionServiceMetadataImporter;
}
}
public override void Done()
{
}
public EncryptionServiceMetadataImporter GetEncryptionServiceMetadataImporterOfModule(ModuleDef mod)
{
return EncryptionScopeProvider.IsDynamicSecretAssembly(mod) ? _dynamicDefaultEncryptionServiceMetadataImporter : _staticDefaultEncryptionServiceMetadataImporter;
}
private ModuleDef _module;
private IMethod _castIntAsFloat;
private IMethod _castLongAsDouble;
private IMethod _castFloatAsInt;
private IMethod _castDoubleAsLong;
private IMethod _initializeArray;
private IMethod _verifySecretKey;
private IMethod _obfuscationTypeMapperRegisterType;
private IMethod _addInt;
private IMethod _addLong;
private IMethod _addFloat;
private IMethod _addDouble;
private IMethod _addIntPtr;
private IMethod _addIntPtrInt;
private IMethod _subtractInt;
private IMethod _subtractLong;
private IMethod _subtractFloat;
private IMethod _subtractDouble;
private IMethod _subtractIntPtr;
private IMethod _subtractIntPtrInt;
private IMethod _multiplyInt;
private IMethod _multiplyLong;
private IMethod _multiplyFloat;
private IMethod _multiplyDouble;
private IMethod _multiplyIntPtr;
private IMethod _multiplyIntPtrInt;
private IMethod _divideInt;
private IMethod _divideLong;
private IMethod _divideFloat;
private IMethod _divideDouble;
private IMethod _divideUnInt;
private IMethod _divideUnLong;
private IMethod _remInt;
private IMethod _remLong;
private IMethod _remFloat;
private IMethod _remDouble;
private IMethod _remUnInt;
private IMethod _remUnLong;
private IMethod _negInt;
private IMethod _negLong;
private IMethod _negFloat;
private IMethod _negDouble;
private IMethod _andInt;
private IMethod _andLong;
private IMethod _orInt;
private IMethod _orLong;
private IMethod _xorInt;
private IMethod _xorLong;
private IMethod _notInt;
private IMethod _notLong;
private IMethod _shlInt;
private IMethod _shlLong;
private IMethod _shrInt;
private IMethod _shrLong;
private IMethod _shrUnInt;
private IMethod _shrUnLong;
public IMethod CastIntAsFloat => _castIntAsFloat;
public IMethod CastLongAsDouble => _castLongAsDouble;
public IMethod CastFloatAsInt => _castFloatAsInt;
public IMethod CastDoubleAsLong => _castDoubleAsLong;
public IMethod InitializedArray => _initializeArray;
public IMethod VerifySecretKey => _verifySecretKey;
public IMethod ObfuscationTypeMapperRegisterType => _obfuscationTypeMapperRegisterType;
public IMethod EncryptBlock => _defaultEncryptionServiceMetadataImporter.EncryptBlock;
public IMethod DecryptBlock => _defaultEncryptionServiceMetadataImporter.DecryptBlock;
public IMethod EncryptInt => _defaultEncryptionServiceMetadataImporter.EncryptInt;
public IMethod DecryptInt => _defaultEncryptionServiceMetadataImporter.DecryptInt;
public IMethod EncryptLong => _defaultEncryptionServiceMetadataImporter.EncryptLong;
public IMethod DecryptLong => _defaultEncryptionServiceMetadataImporter.DecryptLong;
public IMethod EncryptFloat => _defaultEncryptionServiceMetadataImporter.EncryptFloat;
public IMethod DecryptFloat => _defaultEncryptionServiceMetadataImporter.DecryptFloat;
public IMethod EncryptDouble => _defaultEncryptionServiceMetadataImporter.EncryptDouble;
public IMethod DecryptDouble => _defaultEncryptionServiceMetadataImporter.DecryptDouble;
public IMethod EncryptString => _defaultEncryptionServiceMetadataImporter.EncryptString;
public IMethod DecryptString => _defaultEncryptionServiceMetadataImporter.DecryptString;
public IMethod EncryptBytes => _defaultEncryptionServiceMetadataImporter.EncryptBytes;
public IMethod DecryptBytes => _defaultEncryptionServiceMetadataImporter.DecryptBytes;
public IMethod DecryptFromRvaInt => _defaultEncryptionServiceMetadataImporter.DecryptFromRvaInt;
public IMethod DecryptFromRvaLong => _defaultEncryptionServiceMetadataImporter.DecryptFromRvaLong;
public IMethod DecryptFromRvaFloat => _defaultEncryptionServiceMetadataImporter.DecryptFromRvaFloat;
public IMethod DecryptFromRvaDouble => _defaultEncryptionServiceMetadataImporter.DecryptFromRvaDouble;
public IMethod DecryptFromRvaBytes => _defaultEncryptionServiceMetadataImporter.DecryptFromRvaBytes;
public IMethod DecryptFromRvaString => _defaultEncryptionServiceMetadataImporter.DecryptFromRvaString;
public IMethod DecryptInitializeArray => _defaultEncryptionServiceMetadataImporter.DecryptInitializeArray;
public IMethod AddInt => _addInt;
public IMethod AddLong => _addLong;
public IMethod AddFloat => _addFloat;
public IMethod AddDouble => _addDouble;
public IMethod AddIntPtr => _addIntPtr;
public IMethod AddIntPtrInt => _addIntPtrInt;
public IMethod SubtractInt => _subtractInt;
public IMethod SubtractLong => _subtractLong;
public IMethod SubtractFloat => _subtractFloat;
public IMethod SubtractDouble => _subtractDouble;
public IMethod SubtractIntPtr => _subtractIntPtr;
public IMethod SubtractIntPtrInt => _subtractIntPtrInt;
public IMethod MultiplyInt => _multiplyInt;
public IMethod MultiplyLong => _multiplyLong;
public IMethod MultiplyFloat => _multiplyFloat;
public IMethod MultiplyDouble => _multiplyDouble;
public IMethod MultiplyIntPtr => _multiplyIntPtr;
public IMethod MultiplyIntPtrInt => _multiplyIntPtrInt;
public IMethod DivideInt => _divideInt;
public IMethod DivideLong => _divideLong;
public IMethod DivideFloat => _divideFloat;
public IMethod DivideDouble => _divideDouble;
public IMethod DivideUnInt => _divideUnInt;
public IMethod DivideUnLong => _divideUnLong;
public IMethod RemInt => _remInt;
public IMethod RemLong => _remLong;
public IMethod RemFloat => _remFloat;
public IMethod RemDouble => _remDouble;
public IMethod RemUnInt => _remUnInt;
public IMethod RemUnLong => _remUnLong;
public IMethod NegInt => _negInt;
public IMethod NegLong => _negLong;
public IMethod NegFloat => _negFloat;
public IMethod NegDouble => _negDouble;
public IMethod AndInt => _andInt;
public IMethod AndLong => _andLong;
public IMethod OrInt => _orInt;
public IMethod OrLong => _orLong;
public IMethod XorInt => _xorInt;
public IMethod XorLong => _xorLong;
public IMethod NotInt => _notInt;
public IMethod NotLong => _notLong;
public IMethod ShlInt => _shlInt;
public IMethod ShlLong => _shlLong;
public IMethod ShrInt => _shrInt;
public IMethod ShrLong => _shrLong;
public IMethod ShrUnInt => _shrUnInt;
public IMethod ShrUnLong => _shrUnLong;
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 76438ce96146edd469872feada7857ba
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,15 +0,0 @@
namespace Obfuz.Emit
{
public static class EntityExtensions
{
public static T GetEntity<T>(this IGroupByModuleEntity entity) where T : IGroupByModuleEntity, new()
{
return entity.Manager.GetEntity<T>(entity.Module);
}
public static DefaultMetadataImporter GetDefaultModuleMetadataImporter(this IGroupByModuleEntity entity)
{
return entity.GetEntity<DefaultMetadataImporter>();
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 6e9557733f180764692756653eb60f88
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,967 +0,0 @@
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using Obfuz.Utils;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using UnityEngine.Assertions;
namespace Obfuz.Emit
{
enum EvalDataType
{
None,
Int32,
Int64,
Float,
Double,
I,
Ref,
ValueType,
Token,
Unknown,
}
struct EvalDataTypeWithSig
{
public readonly EvalDataType type;
public readonly TypeSig typeSig;
public EvalDataTypeWithSig(EvalDataType type, TypeSig typeSig)
{
this.type = type;
this.typeSig = typeSig;
}
public override string ToString()
{
return $"{type} ({typeSig})";
}
}
class InstructionParameterInfo
{
public readonly EvalDataType op1;
public readonly EvalDataType op2;
public readonly EvalDataType retType;
public InstructionParameterInfo(EvalDataType op1, EvalDataType op2, EvalDataType retType)
{
this.op1 = op1;
this.op2 = op2;
this.retType = retType;
}
}
class EvalStackState
{
public bool visited;
public readonly List<EvalDataTypeWithSig> inputStackDatas = new List<EvalDataTypeWithSig>();
public readonly List<EvalDataTypeWithSig> runStackDatas = new List<EvalDataTypeWithSig>();
}
class EvalStackCalculator
{
private readonly MethodDef _method;
private readonly BasicBlockCollection _basicBlocks;
private readonly Dictionary<Instruction, InstructionParameterInfo> _instructionParameterInfos = new Dictionary<Instruction, InstructionParameterInfo>();
private readonly Dictionary<Instruction, EvalDataType> _evalStackTopDataTypeAfterInstructions = new Dictionary<Instruction, EvalDataType>();
private readonly Dictionary<BasicBlock, EvalStackState> _blockEvalStackStates;
public EvalStackCalculator(MethodDef method)
{
_method = method;
_basicBlocks = new BasicBlockCollection(method, false);
_blockEvalStackStates = _basicBlocks.Blocks.ToDictionary(b => b, b => new EvalStackState());
SimulateRunAllBlocks();
}
public BasicBlockCollection BasicBlockCollection => _basicBlocks;
public bool TryGetParameterInfo(Instruction inst, out InstructionParameterInfo info)
{
return _instructionParameterInfos.TryGetValue(inst, out info);
}
public bool TryGetPushResult(Instruction inst, out EvalDataType result)
{
return _evalStackTopDataTypeAfterInstructions.TryGetValue(inst, out result);
}
public EvalStackState GetEvalStackState(BasicBlock basicBlock)
{
return _blockEvalStackStates[basicBlock];
}
private void PushStack(List<EvalDataTypeWithSig> datas, TypeSig type)
{
type = type.RemovePinnedAndModifiers();
switch (type.ElementType)
{
case ElementType.Void: break;
case ElementType.Boolean:
case ElementType.Char:
case ElementType.I1:
case ElementType.U1:
case ElementType.I2:
case ElementType.U2:
case ElementType.I4:
case ElementType.U4:
datas.Add(new EvalDataTypeWithSig(EvalDataType.Int32, null));
break;
case ElementType.I8:
case ElementType.U8:
datas.Add(new EvalDataTypeWithSig(EvalDataType.Int64, null));
break;
case ElementType.R4:
datas.Add(new EvalDataTypeWithSig(EvalDataType.Float, null));
break;
case ElementType.R8:
datas.Add(new EvalDataTypeWithSig(EvalDataType.Double, null));
break;
case ElementType.I:
case ElementType.U:
case ElementType.Ptr:
case ElementType.FnPtr:
case ElementType.ByRef:
datas.Add(new EvalDataTypeWithSig(EvalDataType.I, null));
break;
case ElementType.String:
case ElementType.Class:
case ElementType.Array:
case ElementType.SZArray:
case ElementType.Object:
datas.Add(new EvalDataTypeWithSig(EvalDataType.Ref, type));
break;
case ElementType.ValueType:
{
TypeDef typeDef = type.ToTypeDefOrRef().ResolveTypeDefThrow();
if (typeDef.IsEnum)
{
PushStack(datas, typeDef.GetEnumUnderlyingType());
}
else
{
PushStack(datas, new EvalDataTypeWithSig(EvalDataType.ValueType, type));
}
break;
}
case ElementType.GenericInst:
{
GenericInstSig genericInstSig = (GenericInstSig)type;
TypeDef typeDef = genericInstSig.GenericType.ToTypeDefOrRef().ResolveTypeDefThrow();
if (!typeDef.IsValueType)
{
PushStack(datas, new EvalDataTypeWithSig(EvalDataType.Ref, type));
}
else if (typeDef.IsEnum)
{
PushStack(datas, typeDef.GetEnumUnderlyingType());
}
else
{
PushStack(datas, new EvalDataTypeWithSig(EvalDataType.ValueType, type));
}
break;
}
case ElementType.TypedByRef:
{
// TypedByRef is a special type used in dynamic method invocation and reflection.
// It is treated as a reference type in the evaluation stack.
PushStack(datas, new EvalDataTypeWithSig(EvalDataType.ValueType, type));
break;
}
case ElementType.Var:
case ElementType.MVar:
PushStack(datas, new EvalDataTypeWithSig(EvalDataType.ValueType, type));
break;
case ElementType.ValueArray:
case ElementType.R:
case ElementType.CModOpt:
case ElementType.CModReqd:
case ElementType.Internal:
case ElementType.Module:
case ElementType.Sentinel:
PushStack(datas, EvalDataType.Unknown);
break;
default: throw new Exception($"Unsupported type: {type} in method: {_method.FullName}.");
}
}
private void PushStack(List<EvalDataTypeWithSig> datas, ITypeDefOrRef type)
{
PushStack(datas, type.ToTypeSig());
}
private void PushStack(List<EvalDataTypeWithSig> datas, EvalDataType type)
{
Assert.IsTrue(type != EvalDataType.ValueType, "Cannot push EvalDataType.Value without type sig onto the stack.");
datas.Add(new EvalDataTypeWithSig(type, null));
}
private void PushStack(List<EvalDataTypeWithSig> datas, EvalDataTypeWithSig type)
{
datas.Add(type);
}
private void PushStackObject(List<EvalDataTypeWithSig> datas)
{
datas.Add(new EvalDataTypeWithSig(EvalDataType.Ref, _method.Module.CorLibTypes.Object));
}
private EvalDataType CalcBasicBinOpRetType(EvalDataType op1, EvalDataType op2)
{
switch (op1)
{
case EvalDataType.Int32:
{
switch (op2)
{
case EvalDataType.Int32: return EvalDataType.Int32;
case EvalDataType.Int64: return EvalDataType.Int64;
case EvalDataType.I: return EvalDataType.I;
default: throw new Exception($"Unsupported operand type: {op2} for {op1} in binary operation.");
}
}
case EvalDataType.Int64:
{
switch (op2)
{
case EvalDataType.Int32: return EvalDataType.Int64;
case EvalDataType.Int64:
case EvalDataType.I:
return EvalDataType.Int64;
default: throw new Exception($"Unsupported operand type: {op2} for {op1} in binary operation.");
}
}
case EvalDataType.I:
{
switch (op2)
{
case EvalDataType.Int32: return EvalDataType.I;
case EvalDataType.Int64: return EvalDataType.Int64;
case EvalDataType.I: return EvalDataType.I;
default: throw new Exception($"Unsupported operand type: {op2} for {op1} in binary operation.");
}
}
case EvalDataType.Float:
{
switch (op2)
{
case EvalDataType.Float: return EvalDataType.Float;
case EvalDataType.Double: return EvalDataType.Double;
default: throw new Exception($"Unsupported operand type: {op2} for {op1} in binary operation.");
}
}
case EvalDataType.Double:
{
switch (op2)
{
case EvalDataType.Float:
case EvalDataType.Double: return EvalDataType.Double;
default: throw new Exception($"Unsupported operand type: {op2} for {op1} in binary operation.");
}
}
default: throw new Exception($"Unsupported operand type: {op1} in binary operation.");
}
}
private void SimulateRunAllBlocks()
{
bool methodHasReturnValue = !MetaUtil.IsVoidType(_method.ReturnType);
CilBody body = _method.Body;
if (body.HasExceptionHandlers)
{
foreach (ExceptionHandler handler in body.ExceptionHandlers)
{
if (handler.IsFilter)
{
BasicBlock bb = _basicBlocks.GetBasicBlockByInstruction(handler.FilterStart);
var inputStackDatas = _blockEvalStackStates[bb].inputStackDatas;
if (inputStackDatas.Count == 0)
{
inputStackDatas.Add(new EvalDataTypeWithSig(EvalDataType.Ref, handler.CatchType.ToTypeSig()));
}
}
if (handler.IsCatch || handler.IsFilter)
{
BasicBlock bb = _basicBlocks.GetBasicBlockByInstruction(handler.HandlerStart);
var inputStackDatas = _blockEvalStackStates[bb].inputStackDatas;
if (inputStackDatas.Count == 0)
{
inputStackDatas.Add(new EvalDataTypeWithSig(EvalDataType.Ref, handler.CatchType.ToTypeSig()));
}
}
}
}
var newPushedDatas = new List<EvalDataTypeWithSig>();
IList<TypeSig> methodTypeGenericArgument = _method.DeclaringType.GenericParameters.Count > 0
? (IList<TypeSig>)_method.DeclaringType.GenericParameters.Select(p => (TypeSig)new GenericVar(p.Number)).ToList()
: null;
IList<TypeSig> methodMethodGenericArgument = _method.GenericParameters.Count > 0
? (IList<TypeSig>)_method.GenericParameters.Select(p => (TypeSig)new GenericMVar(p.Number)).ToList()
: null;
var gac = new GenericArgumentContext(methodTypeGenericArgument, methodMethodGenericArgument);
var corLibTypes = _method.Module.CorLibTypes;
var blockWalkStack = new Stack<BasicBlock>(_basicBlocks.Blocks.Reverse());
while (blockWalkStack.Count > 0)
{
BasicBlock block = blockWalkStack.Pop();
EvalStackState state = _blockEvalStackStates[block];
if (state.visited)
continue;
state.visited = true;
state.runStackDatas.AddRange(state.inputStackDatas);
List<EvalDataTypeWithSig> stackDatas = state.runStackDatas;
foreach (var inst in block.instructions)
{
int stackSize = stackDatas.Count;
newPushedDatas.Clear();
switch (inst.OpCode.Code)
{
case Code.Nop: break;
case Code.Break: break;
case Code.Ldarg_0:
case Code.Ldarg_1:
case Code.Ldarg_2:
case Code.Ldarg_3:
case Code.Ldarg:
case Code.Ldarg_S:
{
PushStack(newPushedDatas, inst.GetParameter(_method.Parameters).Type);
break;
}
case Code.Ldarga:
case Code.Ldarga_S:
{
PushStack(newPushedDatas, EvalDataType.I);
break;
}
case Code.Ldloc_0:
case Code.Ldloc_1:
case Code.Ldloc_2:
case Code.Ldloc_3:
case Code.Ldloc:
case Code.Ldloc_S:
{
PushStack(newPushedDatas, inst.GetLocal(body.Variables).Type);
break;
}
case Code.Ldloca:
case Code.Ldloca_S:
{
PushStack(newPushedDatas, EvalDataType.I);
break;
}
case Code.Stloc_0:
case Code.Stloc_1:
case Code.Stloc_2:
case Code.Stloc_3:
case Code.Stloc:
case Code.Stloc_S:
{
Assert.IsTrue(stackSize > 0);
break;
}
case Code.Starg:
case Code.Starg_S:
{
Assert.IsTrue(stackSize > 0);
break;
}
case Code.Ldnull:
{
PushStackObject(newPushedDatas);
break;
}
case Code.Ldc_I4_M1:
case Code.Ldc_I4_0:
case Code.Ldc_I4_1:
case Code.Ldc_I4_2:
case Code.Ldc_I4_3:
case Code.Ldc_I4_4:
case Code.Ldc_I4_5:
case Code.Ldc_I4_6:
case Code.Ldc_I4_7:
case Code.Ldc_I4_8:
case Code.Ldc_I4:
case Code.Ldc_I4_S:
{
PushStack(newPushedDatas, EvalDataType.Int32);
break;
}
case Code.Ldc_I8:
{
PushStack(newPushedDatas, EvalDataType.Int64);
break;
}
case Code.Ldc_R4:
{
PushStack(newPushedDatas, EvalDataType.Float);
break;
}
case Code.Ldc_R8:
{
PushStack(newPushedDatas, EvalDataType.Double);
break;
}
case Code.Dup:
{
Assert.IsTrue(stackSize > 0);
EvalDataTypeWithSig type = stackDatas[stackSize - 1];
PushStack(newPushedDatas, type);
PushStack(newPushedDatas, type);
break;
}
case Code.Pop:
{
break;
}
case Code.Jmp:
{
break;
}
case Code.Call:
case Code.Callvirt:
{
IMethod calledMethod = (IMethod)inst.Operand;
MethodSig methodSig = MetaUtil.GetInflatedMethodSig(calledMethod, gac);
PushStack(newPushedDatas, methodSig.RetType);
break;
}
case Code.Calli:
{
MethodSig methodSig = (MethodSig)inst.Operand;
PushStack(newPushedDatas, methodSig.RetType);
break;
}
case Code.Ret:
{
break;
}
case Code.Br:
case Code.Br_S:
case Code.Brfalse:
case Code.Brfalse_S:
case Code.Brtrue:
case Code.Brtrue_S:
case Code.Beq:
case Code.Beq_S:
case Code.Bge:
case Code.Bge_S:
case Code.Bge_Un:
case Code.Bge_Un_S:
case Code.Bgt:
case Code.Bgt_S:
case Code.Bgt_Un:
case Code.Bgt_Un_S:
case Code.Ble:
case Code.Ble_S:
case Code.Ble_Un:
case Code.Ble_Un_S:
case Code.Blt:
case Code.Blt_S:
case Code.Blt_Un:
case Code.Blt_Un_S:
case Code.Bne_Un:
case Code.Bne_Un_S:
{
// Branch instructions do not change the stack.
break;
}
case Code.Ceq:
case Code.Cgt:
case Code.Cgt_Un:
case Code.Clt:
case Code.Clt_Un:
{
Assert.IsTrue(stackSize >= 2);
EvalDataType op2 = stackDatas[stackSize - 1].type;
EvalDataType op1 = stackDatas[stackSize - 2].type;
EvalDataType ret = EvalDataType.Int32;
_instructionParameterInfos.Add(inst, new InstructionParameterInfo(op1, op2, ret));
PushStack(newPushedDatas, ret);
break;
}
case Code.Switch:
{
// Switch instruction does not change the stack.
break;
}
case Code.Ldind_I1:
case Code.Ldind_U1:
case Code.Ldind_I2:
case Code.Ldind_U2:
case Code.Ldind_I4:
case Code.Ldind_U4:
{
Assert.IsTrue(stackSize > 0);
PushStack(newPushedDatas, EvalDataType.Int32);
break;
}
case Code.Ldind_I8:
{
Assert.IsTrue(stackSize > 0);
PushStack(newPushedDatas, EvalDataType.Int64);
break;
}
case Code.Ldind_I:
{
Assert.IsTrue(stackSize > 0);
PushStack(newPushedDatas, EvalDataType.I);
break;
}
case Code.Ldind_Ref:
{
Assert.IsTrue(stackSize > 0);
PushStackObject(newPushedDatas);
break;
}
case Code.Ldind_R4:
{
Assert.IsTrue(stackSize > 0);
PushStack(newPushedDatas, EvalDataType.Float);
break;
}
case Code.Ldind_R8:
{
Assert.IsTrue(stackSize > 0);
PushStack(newPushedDatas, EvalDataType.Double);
break;
}
case Code.Stind_I1:
case Code.Stind_I2:
case Code.Stind_I4:
case Code.Stind_I8:
case Code.Stind_I:
case Code.Stind_R4:
case Code.Stind_R8:
case Code.Stind_Ref:
{
Assert.IsTrue(stackSize >= 2);
break;
}
case Code.Add:
case Code.Add_Ovf:
case Code.Add_Ovf_Un:
case Code.Sub:
case Code.Sub_Ovf:
case Code.Sub_Ovf_Un:
case Code.Mul:
case Code.Mul_Ovf:
case Code.Mul_Ovf_Un:
case Code.Div:
case Code.Div_Un:
case Code.Rem:
case Code.Rem_Un:
case Code.And:
case Code.Or:
case Code.Xor:
{
Assert.IsTrue(stackSize >= 2);
EvalDataType op2 = stackDatas[stackSize - 1].type;
EvalDataType op1 = stackDatas[stackSize - 2].type;
EvalDataType ret = CalcBasicBinOpRetType(op1, op2);
_instructionParameterInfos.Add(inst, new InstructionParameterInfo(op1, op2, ret));
PushStack(newPushedDatas, ret);
break;
}
case Code.Shl:
case Code.Shr:
case Code.Shr_Un:
{
Assert.IsTrue(stackSize >= 2);
EvalDataType op2 = stackDatas[stackSize - 1].type;
EvalDataType op1 = stackDatas[stackSize - 2].type;
if (op1 != EvalDataType.Int32 && op1 != EvalDataType.Int64 && op1 != EvalDataType.I)
throw new Exception($"Unsupported operand type: {op1} in shift operation.");
if (op2 != EvalDataType.Int32 && op2 != EvalDataType.Int64)
throw new Exception($"Unsupported operand type: {op2} for {op1} in shift operation.");
EvalDataType ret = op1;
_instructionParameterInfos.Add(inst, new InstructionParameterInfo(op1, op2, ret));
PushStack(newPushedDatas, ret);
break;
}
case Code.Neg:
{
Assert.IsTrue(stackSize > 0);
EvalDataType op = stackDatas[stackSize - 1].type;
EvalDataType ret = op;
switch (op)
{
case EvalDataType.Int32:
case EvalDataType.Int64:
case EvalDataType.I:
case EvalDataType.Float:
case EvalDataType.Double:
break;
default:
throw new Exception($"Unsupported operand type: {op} in unary operation.");
}
_instructionParameterInfos.Add(inst, new InstructionParameterInfo(op, EvalDataType.None, ret));
PushStack(newPushedDatas, ret);
break;
}
case Code.Not:
{
Assert.IsTrue(stackSize > 0);
EvalDataType op = stackDatas[stackSize - 1].type;
EvalDataType ret = op;
if (op != EvalDataType.Int32 && op != EvalDataType.Int64 && op != EvalDataType.I)
throw new Exception($"Unsupported operand type: {op} in unary operation.");
_instructionParameterInfos.Add(inst, new InstructionParameterInfo(op, EvalDataType.None, ret));
PushStack(newPushedDatas, ret);
break;
}
case Code.Conv_I1:
case Code.Conv_U1:
case Code.Conv_I2:
case Code.Conv_U2:
case Code.Conv_I4:
case Code.Conv_U4:
{
PushStack(newPushedDatas, EvalDataType.Int32);
break;
}
case Code.Conv_I8:
case Code.Conv_U8:
{
PushStack(newPushedDatas, EvalDataType.Int64);
break;
}
case Code.Conv_I:
case Code.Conv_U:
{
PushStack(newPushedDatas, EvalDataType.I);
break;
}
case Code.Conv_R4:
{
PushStack(newPushedDatas, EvalDataType.Float);
break;
}
case Code.Conv_R8:
{
PushStack(newPushedDatas, EvalDataType.Double);
break;
}
case Code.Conv_Ovf_I1:
case Code.Conv_Ovf_I1_Un:
case Code.Conv_Ovf_U1:
case Code.Conv_Ovf_U1_Un:
case Code.Conv_Ovf_I2:
case Code.Conv_Ovf_I2_Un:
case Code.Conv_Ovf_U2:
case Code.Conv_Ovf_U2_Un:
case Code.Conv_Ovf_I4:
case Code.Conv_Ovf_I4_Un:
case Code.Conv_Ovf_U4:
case Code.Conv_Ovf_U4_Un:
{
PushStack(newPushedDatas, EvalDataType.Int32);
break;
}
case Code.Conv_Ovf_I8:
case Code.Conv_Ovf_I8_Un:
case Code.Conv_Ovf_U8:
case Code.Conv_Ovf_U8_Un:
{
PushStack(newPushedDatas, EvalDataType.Int64);
break;
}
case Code.Conv_Ovf_I:
case Code.Conv_Ovf_I_Un:
case Code.Conv_Ovf_U:
case Code.Conv_Ovf_U_Un:
{
PushStack(newPushedDatas, EvalDataType.I);
break;
}
case Code.Conv_R_Un:
{
PushStack(newPushedDatas, EvalDataType.Double);
break;
}
case Code.Cpobj:
case Code.Initobj:
case Code.Stobj:
{
break;
}
case Code.Ldobj:
{
PushStack(newPushedDatas, (ITypeDefOrRef)inst.Operand);
break;
}
case Code.Ldstr:
{
PushStack(newPushedDatas, new EvalDataTypeWithSig(EvalDataType.Ref, corLibTypes.String));
break;
}
case Code.Newobj:
{
IMethod ctor = (IMethod)inst.Operand;
PushStack(newPushedDatas, ctor.DeclaringType);
break;
}
case Code.Castclass:
{
PushStack(newPushedDatas, (ITypeDefOrRef)inst.Operand);
break;
}
case Code.Isinst:
{
Assert.IsTrue(stackSize > 0);
var obj = stackDatas[stackSize - 1];
Assert.IsTrue(obj.type == EvalDataType.Ref);
PushStack(newPushedDatas, obj);
break;
}
case Code.Unbox:
{
Assert.IsTrue(stackSize > 0);
PushStack(newPushedDatas, EvalDataType.I);
break;
}
case Code.Unbox_Any:
{
Assert.IsTrue(stackSize > 0);
PushStack(newPushedDatas, (ITypeDefOrRef)inst.Operand);
break;
}
case Code.Box:
{
Assert.IsTrue(stackSize > 0);
PushStackObject(newPushedDatas);
break;
}
case Code.Throw:
{
// Throw instruction does not change the stack.
break;
}
case Code.Rethrow:
{
// Rethrow instruction does not change the stack.
break;
}
case Code.Ldfld:
case Code.Ldsfld:
{
IField field = (IField)inst.Operand;
TypeSig fieldType = MetaUtil.InflateFieldSig(field, gac);
PushStack(newPushedDatas, fieldType);
break;
}
case Code.Ldflda:
case Code.Ldsflda:
{
PushStack(newPushedDatas, EvalDataType.I);
break;
}
case Code.Stfld:
case Code.Stsfld:
{
break;
}
case Code.Newarr:
{
Assert.IsTrue(stackSize > 0);
PushStack(newPushedDatas, new SZArraySig(((ITypeDefOrRef)inst.Operand).ToTypeSig()));
break;
}
case Code.Ldlen:
{
Assert.IsTrue(stackSize > 0);
PushStack(newPushedDatas, EvalDataType.I);
break;
}
case Code.Ldelema:
{
Assert.IsTrue(stackSize >= 2);
PushStack(newPushedDatas, EvalDataType.I);
break;
}
case Code.Ldelem_I1:
case Code.Ldelem_U1:
case Code.Ldelem_I2:
case Code.Ldelem_U2:
case Code.Ldelem_I4:
case Code.Ldelem_U4:
{
Assert.IsTrue(stackSize >= 2);
PushStack(newPushedDatas, EvalDataType.Int32);
break;
}
case Code.Ldelem_I8:
{
Assert.IsTrue(stackSize >= 2);
PushStack(newPushedDatas, EvalDataType.Int64);
break;
}
case Code.Ldelem_I:
{
Assert.IsTrue(stackSize >= 2);
PushStack(newPushedDatas, EvalDataType.I);
break;
}
case Code.Ldelem_R4:
{
Assert.IsTrue(stackSize >= 2);
PushStack(newPushedDatas, EvalDataType.Float);
break;
}
case Code.Ldelem_R8:
{
Assert.IsTrue(stackSize >= 2);
PushStack(newPushedDatas, EvalDataType.Double);
break;
}
case Code.Ldelem_Ref:
{
Assert.IsTrue(stackSize >= 2);
PushStackObject(newPushedDatas);
break;
}
case Code.Ldelem:
{
Assert.IsTrue(stackSize >= 2);
PushStack(newPushedDatas, (ITypeDefOrRef)inst.Operand);
break;
}
case Code.Stelem_I1:
case Code.Stelem_I2:
case Code.Stelem_I4:
case Code.Stelem_I8:
case Code.Stelem_I:
case Code.Stelem_R4:
case Code.Stelem_R8:
case Code.Stelem_Ref:
case Code.Stelem:
{
Assert.IsTrue(stackSize >= 3);
break;
}
case Code.Mkrefany:
{
PushStack(newPushedDatas, new EvalDataTypeWithSig(EvalDataType.ValueType, _method.Module.CorLibTypes.TypedReference));
break;
}
case Code.Refanytype:
{
PushStack(newPushedDatas, EvalDataType.Token);
break;
}
case Code.Refanyval:
{
Assert.IsTrue(stackSize > 0);
PushStack(newPushedDatas, EvalDataType.I);
break;
}
case Code.Ldtoken:
{
PushStack(newPushedDatas, EvalDataType.Token);
break;
}
case Code.Endfinally:
case Code.Leave:
case Code.Leave_S:
{
break;
}
case Code.Endfilter:
{
break;
}
case Code.Arglist:
{
break;
}
case Code.Ldftn:
case Code.Ldvirtftn:
{
PushStack(newPushedDatas, EvalDataType.Unknown);
break;
}
case Code.Localloc:
{
PushStack(newPushedDatas, EvalDataType.I);
break;
}
case Code.Unaligned:
case Code.Volatile:
case Code.Tailcall:
case Code.No:
case Code.Readonly:
case Code.Constrained:
{
break;
}
case Code.Cpblk:
case Code.Initblk:
{
break;
}
case Code.Sizeof:
{
PushStack(newPushedDatas, EvalDataType.Int32);
break;
}
default: throw new Exception($"not supported opcode: {inst} in method: {_method.FullName}.");
}
inst.CalculateStackUsage(methodHasReturnValue, out var pushed, out var pops);
if (pushed != newPushedDatas.Count)
{
throw new Exception($"Instruction {inst} in method {_method.FullName} pushed {newPushedDatas.Count} items, but expected {pushed} items.");
}
if (pops == -1)
{
stackDatas.Clear();
}
else
{
if (stackSize < pops)
{
throw new Exception($"Instruction {inst} in method {_method.FullName} pops {pops} items, but only {stackSize} items are available on the stack.");
}
stackDatas.RemoveRange(stackDatas.Count - pops, pops);
stackDatas.AddRange(newPushedDatas);
Assert.AreEqual(stackSize + pushed - pops, stackDatas.Count);
}
if (pushed > 0 && stackDatas.Count > 0)
{
_evalStackTopDataTypeAfterInstructions[inst] = stackDatas.Last().type;
}
}
foreach (BasicBlock outBb in block.outBlocks)
{
EvalStackState outState = _blockEvalStackStates[outBb];
if (outState.visited)
{
if (stackDatas.Count != outState.inputStackDatas.Count)
{
throw new Exception($"Block {block} in method {_method.FullName} has inconsistent stack data. Expected {outState.inputStackDatas.Count}, but got {stackDatas.Count}.");
}
}
else if (outState.inputStackDatas.Count != stackDatas.Count)
{
if (outState.inputStackDatas.Count > 0)
{
throw new Exception($"Block {outBb} in method {_method.FullName} has inconsistent stack data. Expected {outState.inputStackDatas.Count}, but got {stackDatas.Count}.");
}
outState.inputStackDatas.AddRange(stackDatas);
blockWalkStack.Push(outBb);
}
}
}
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: f25425a3077f6db41873dee4223d0abc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,89 +0,0 @@
using dnlib.DotNet;
using System;
using System.Collections.Generic;
namespace Obfuz.Emit
{
public interface IGroupByModuleEntity
{
GroupByModuleEntityManager Manager { get; set; }
ModuleDef Module { get; set; }
public EncryptionScopeProvider EncryptionScopeProvider { get; }
EncryptionScopeInfo EncryptionScope { get; set; }
void Init();
void Done();
}
public abstract class GroupByModuleEntityBase : IGroupByModuleEntity
{
public GroupByModuleEntityManager Manager { get; set; }
public ModuleDef Module { get; set; }
public EncryptionScopeInfo EncryptionScope { get; set; }
public EncryptionScopeProvider EncryptionScopeProvider => Manager.EncryptionScopeProvider;
public T GetEntity<T>() where T : IGroupByModuleEntity, new()
{
return Manager.GetEntity<T>(Module);
}
public abstract void Init();
public abstract void Done();
}
public class GroupByModuleEntityManager
{
private readonly Dictionary<(ModuleDef, Type), IGroupByModuleEntity> _moduleEntityManagers = new Dictionary<(ModuleDef, Type), IGroupByModuleEntity>();
public EncryptionScopeProvider EncryptionScopeProvider { get; set; }
public T GetEntity<T>(ModuleDef mod) where T : IGroupByModuleEntity, new()
{
var key = (mod, typeof(T));
if (_moduleEntityManagers.TryGetValue(key, out var emitManager))
{
return (T)emitManager;
}
else
{
T newEmitManager = new T();
newEmitManager.Manager = this;
newEmitManager.Module = mod;
newEmitManager.EncryptionScope = EncryptionScopeProvider.GetScope(mod);
newEmitManager.Init();
_moduleEntityManagers[key] = newEmitManager;
return newEmitManager;
}
}
public List<T> GetEntities<T>() where T : IGroupByModuleEntity, new()
{
var managers = new List<T>();
foreach (var kv in _moduleEntityManagers)
{
if (kv.Key.Item2 == typeof(T))
{
managers.Add((T)kv.Value);
}
}
return managers;
}
public void Done<T>() where T : IGroupByModuleEntity, new()
{
var managers = GetEntities<T>();
foreach (var manager in managers)
{
manager.Done();
}
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 0bfcb2b5a87851f469d201fc8978c109
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,74 +0,0 @@
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System;
using System.Collections.Generic;
namespace Obfuz.Emit
{
class ScopeLocalVariables : IDisposable
{
private readonly LocalVariableAllocator _localVariableAllocator;
private readonly List<Local> _allocatedVars = new List<Local>();
public IReadOnlyList<Local> AllocatedLocals => _allocatedVars;
public ScopeLocalVariables(LocalVariableAllocator localVariableAllocator)
{
_localVariableAllocator = localVariableAllocator;
}
public Local AllocateLocal(TypeSig type)
{
var local = _localVariableAllocator.AllocateLocal(type);
_allocatedVars.Add(local);
return local;
}
public void Dispose()
{
foreach (var local in _allocatedVars)
{
_localVariableAllocator.ReturnLocal(local);
}
}
}
class LocalVariableAllocator
{
private readonly MethodDef _method;
private readonly List<Local> _freeLocals = new List<Local>();
public LocalVariableAllocator(MethodDef method)
{
_method = method;
}
public Local AllocateLocal(TypeSig type)
{
foreach (var local in _freeLocals)
{
if (TypeEqualityComparer.Instance.Equals(local.Type, type))
{
_freeLocals.Remove(local);
return local;
}
}
var newLocal = new Local(type);
// _freeLocals.Add(newLocal);
_method.Body.Variables.Add(newLocal);
return newLocal;
}
public void ReturnLocal(Local local)
{
_freeLocals.Add(local);
}
public ScopeLocalVariables CreateScope()
{
return new ScopeLocalVariables(this);
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 955da34fbde179641a94108ec53405ce
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: fec4187cc1b96d5439ff908bcecd988f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,25 +0,0 @@
namespace Obfuz.EncryptionVM
{
public class EncryptionInstructionWithOpCode
{
public readonly ushort code;
public readonly IEncryptionInstruction function;
public EncryptionInstructionWithOpCode(ushort code, IEncryptionInstruction function)
{
this.code = code;
this.function = function;
}
public int Encrypt(int value, int[] secretKey, int salt)
{
return function.Encrypt(value, secretKey, salt);
}
public int Decrypt(int value, int[] secretKey, int salt)
{
return function.Decrypt(value, secretKey, salt);
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: ca9bd232ed2583f4bb5f330886a329e6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,24 +0,0 @@
using System.Collections.Generic;
namespace Obfuz.EncryptionVM
{
public interface IEncryptionInstruction
{
int Encrypt(int value, int[] secretKey, int salt);
int Decrypt(int value, int[] secretKey, int salt);
void GenerateEncryptCode(List<string> lines, string indent);
void GenerateDecryptCode(List<string> lines, string indent);
}
public abstract class EncryptionInstructionBase : IEncryptionInstruction
{
public abstract int Encrypt(int value, int[] secretKey, int salt);
public abstract int Decrypt(int value, int[] secretKey, int salt);
public abstract void GenerateEncryptCode(List<string> lines, string indent);
public abstract void GenerateDecryptCode(List<string> lines, string indent);
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: f7b9d087de770a5488a9069ddf697c2f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 981355cf75a9d234883b2a15c446f478
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,35 +0,0 @@
using System.Collections.Generic;
namespace Obfuz.EncryptionVM.Instructions
{
public class AddInstruction : EncryptionInstructionBase
{
private readonly int _addValue;
private readonly int _opKeyIndex;
public AddInstruction(int addValue, int opKeyIndex)
{
_addValue = addValue;
_opKeyIndex = opKeyIndex;
}
public override int Encrypt(int value, int[] secretKey, int salt)
{
return ((value + secretKey[_opKeyIndex]) ^ salt) + _addValue;
}
public override int Decrypt(int value, int[] secretKey, int salt)
{
return ((value - _addValue) ^ salt) - secretKey[_opKeyIndex];
}
public override void GenerateEncryptCode(List<string> lines, string indent)
{
lines.Add(indent + $"value = ((value + _secretKey[{_opKeyIndex}]) ^ salt) + {_addValue};");
}
public override void GenerateDecryptCode(List<string> lines, string indent)
{
lines.Add(indent + $"value = ((value - {_addValue}) ^ salt) - _secretKey[{_opKeyIndex}];");
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 6bdbdc5fd983f044a87e7b8ab8647aeb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,62 +0,0 @@
using System.Collections.Generic;
namespace Obfuz.EncryptionVM.Instructions
{
public class AddRotateXorInstruction : EncryptionInstructionBase
{
// x = x + p1 + secretKey[index1];
// x = Rotate(x, p2)
// x = x ^ p3 ^ salt;
private readonly int _addValue;
private readonly int _index1;
private readonly int _rotateBitNum;
private readonly int _xorValue;
public AddRotateXorInstruction(int addValue, int index1, int rotateBitNum, int xorValue)
{
_addValue = addValue;
_index1 = index1;
_rotateBitNum = rotateBitNum;
_xorValue = xorValue;
}
public override int Encrypt(int value, int[] secretKey, int salt)
{
value += _addValue + secretKey[_index1];
uint part1 = (uint)value << _rotateBitNum;
uint part2 = (uint)value >> (32 - _rotateBitNum);
value = (int)(part1 | part2);
value ^= _xorValue ^ salt;
return value;
}
public override int Decrypt(int value, int[] secretKey, int salt)
{
value ^= _xorValue ^ salt;
uint value2 = (uint)value >> _rotateBitNum;
uint part1 = (uint)value << (32 - _rotateBitNum);
value = (int)(value2 | part1);
value -= _addValue + secretKey[_index1];
return value;
}
public override void GenerateEncryptCode(List<string> lines, string indent)
{
lines.Add(indent + $"value += {_addValue} + _secretKey[{_index1}];");
lines.Add(indent + $"uint part1 = (uint)value << {_rotateBitNum};");
lines.Add(indent + $"uint part2 = (uint)value >> (32 - {_rotateBitNum});");
lines.Add(indent + $"value = (int)(part1 | part2);");
lines.Add(indent + $"value ^= {_xorValue} ^ salt;");
}
public override void GenerateDecryptCode(List<string> lines, string indent)
{
lines.Add(indent + $"value ^= {_xorValue} ^ salt;");
lines.Add(indent + $"uint value2 = (uint)value >> {_rotateBitNum};");
lines.Add(indent + $"uint part1 = (uint)value << (32 - {_rotateBitNum});");
lines.Add(indent + $"value = (int)(value2 | part1);");
lines.Add(indent + $"value -= {_addValue} + _secretKey[{_index1}];");
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: cda67c0dd0cadd24ea02c2988e34281a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,62 +0,0 @@
using System.Collections.Generic;
namespace Obfuz.EncryptionVM.Instructions
{
public class AddXorRotateInstruction : EncryptionInstructionBase
{
// x = x + p1 + secretKey[index1];
// x = x ^ p3 ^ salt;
// x = Rotate(x, p2)
private readonly int _addValue;
private readonly int _index1;
private readonly int _rotateBitNum;
private readonly int _xorValue;
public AddXorRotateInstruction(int addValue, int index1, int xorValue, int rotateBitNum)
{
_addValue = addValue;
_index1 = index1;
_rotateBitNum = rotateBitNum;
_xorValue = xorValue;
}
public override int Encrypt(int value, int[] secretKey, int salt)
{
value += _addValue + secretKey[_index1];
value ^= _xorValue ^ salt;
uint part1 = (uint)value << _rotateBitNum;
uint part2 = (uint)value >> (32 - _rotateBitNum);
value = (int)(part1 | part2);
return value;
}
public override int Decrypt(int value, int[] secretKey, int salt)
{
uint value2 = (uint)value >> _rotateBitNum;
uint part1 = (uint)value << (32 - _rotateBitNum);
value = (int)(value2 | part1);
value ^= _xorValue ^ salt;
value -= _addValue + secretKey[_index1];
return value;
}
public override void GenerateEncryptCode(List<string> lines, string indent)
{
lines.Add(indent + $"value += {_addValue} + _secretKey[{_index1}];");
lines.Add(indent + $"value ^= {_xorValue} ^ salt;");
lines.Add(indent + $"uint part1 = (uint)value << {_rotateBitNum};");
lines.Add(indent + $"uint part2 = (uint)value >> (32 - {_rotateBitNum});");
lines.Add(indent + $"value = (int)(part1 | part2);");
}
public override void GenerateDecryptCode(List<string> lines, string indent)
{
lines.Add(indent + $"uint part1 = (uint)value >> {_rotateBitNum};");
lines.Add(indent + $"uint part2 = (uint)value << (32 - {_rotateBitNum});");
lines.Add(indent + $"value = (int)(part1 | part2);");
lines.Add(indent + $"value ^= {_xorValue} ^ salt;");
lines.Add(indent + $"value -= {_addValue} + _secretKey[{_index1}];");
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: d806305e627be06469fb2d2c2cf98816
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,46 +0,0 @@
using System.Collections.Generic;
namespace Obfuz.EncryptionVM.Instructions
{
public class BitRotateInstruction : EncryptionInstructionBase
{
private readonly int _rotateBitNum;
private readonly int _opKeyIndex;
public BitRotateInstruction(int rotateBitNum, int opKeyIndex)
{
_rotateBitNum = rotateBitNum;
_opKeyIndex = opKeyIndex;
}
public override int Encrypt(int value, int[] secretKey, int salt)
{
uint part1 = (uint)value << _rotateBitNum;
uint part2 = (uint)value >> (32 - _rotateBitNum);
return ((int)(part1 | part2) ^ secretKey[_opKeyIndex]) + salt;
}
public override int Decrypt(int value, int[] secretKey, int salt)
{
uint value2 = (uint)((value - salt) ^ secretKey[_opKeyIndex]);
uint part1 = value2 >> _rotateBitNum;
uint part2 = value2 << (32 - _rotateBitNum);
return (int)(part1 | part2);
}
public override void GenerateEncryptCode(List<string> lines, string indent)
{
lines.Add(indent + $"uint part1 = (uint)value << {_rotateBitNum};");
lines.Add(indent + $"uint part2 = (uint)value >> (32 - {_rotateBitNum});");
lines.Add(indent + $"value = ((int)(part1 | part2) ^ _secretKey[{_opKeyIndex}]) + salt;");
}
public override void GenerateDecryptCode(List<string> lines, string indent)
{
lines.Add(indent + $"uint value2 = (uint)((value - salt) ^ _secretKey[{_opKeyIndex}]);");
lines.Add(indent + $"uint part1 = value2 >> {_rotateBitNum};");
lines.Add(indent + $"uint part2 = value2 << (32 - {_rotateBitNum});");
lines.Add(indent + $"value = (int)(part1 | part2);");
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: bccff31b9f07fcf4f821cee671f82caf
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,44 +0,0 @@
using System;
using System.Collections.Generic;
namespace Obfuz.EncryptionVM.Instructions
{
public class EncryptFunction : EncryptionInstructionBase
{
private readonly IEncryptionInstruction[] _instructions;
public EncryptFunction(IEncryptionInstruction[] instructions)
{
_instructions = instructions;
}
public override int Encrypt(int value, int[] secretKey, int salt)
{
foreach (var instruction in _instructions)
{
value = instruction.Encrypt(value, secretKey, salt);
}
return value;
}
public override int Decrypt(int value, int[] secretKey, int salt)
{
for (int i = _instructions.Length - 1; i >= 0; i--)
{
value = _instructions[i].Decrypt(value, secretKey, salt);
}
return value;
}
public override void GenerateEncryptCode(List<string> lines, string indent)
{
throw new NotImplementedException();
}
public override void GenerateDecryptCode(List<string> lines, string indent)
{
throw new NotImplementedException();
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: feafdb30f7b6d5143a89c7659bc16171
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,46 +0,0 @@
using Obfuz.Utils;
using System.Collections.Generic;
namespace Obfuz.EncryptionVM.Instructions
{
public class MultipleInstruction : EncryptionInstructionBase
{
private readonly int _multiValue;
private readonly int _revertMultiValue;
private readonly int _opKeyIndex;
public MultipleInstruction(int addValue, int opKeyIndex)
{
_multiValue = addValue;
_opKeyIndex = opKeyIndex;
_revertMultiValue = MathUtil.ModInverse32(addValue);
Verify();
}
private void Verify()
{
int a = 1122334;
UnityEngine.Assertions.Assert.AreEqual(a, a * _multiValue * _revertMultiValue);
}
public override int Encrypt(int value, int[] secretKey, int salt)
{
return value * _multiValue + secretKey[_opKeyIndex] + salt;
}
public override int Decrypt(int value, int[] secretKey, int salt)
{
return (value - secretKey[_opKeyIndex] - salt) * _revertMultiValue;
}
public override void GenerateEncryptCode(List<string> lines, string indent)
{
lines.Add(indent + $"value = value * {_multiValue} + _secretKey[{_opKeyIndex}] + salt;");
}
public override void GenerateDecryptCode(List<string> lines, string indent)
{
lines.Add(indent + $"value = (value - _secretKey[{_opKeyIndex}] - salt) * {_revertMultiValue};");
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: fd5fdfad694e0ae469bf6ca04c913220
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,65 +0,0 @@
using Obfuz.Utils;
using System.Collections.Generic;
namespace Obfuz.EncryptionVM.Instructions
{
public class MultipleRotateXorInstruction : EncryptionInstructionBase
{
// x = x * p1 + secretKey[index1];
// x = Rotate(x, p2)
// x = x ^ p3 ^ salt;
private readonly int _multipleValue;
private readonly int _revertMultipleValue;
private readonly int _index1;
private readonly int _rotateBitNum;
private readonly int _xorValue;
public MultipleRotateXorInstruction(int multipleValue, int index1, int rotateBitNum, int xorValue)
{
_multipleValue = multipleValue;
_revertMultipleValue = MathUtil.ModInverse32(multipleValue);
_index1 = index1;
_rotateBitNum = rotateBitNum;
_xorValue = xorValue;
}
public override int Encrypt(int value, int[] secretKey, int salt)
{
value = value * _multipleValue + secretKey[_index1];
uint part1 = (uint)value << _rotateBitNum;
uint part2 = (uint)value >> (32 - _rotateBitNum);
value = (int)(part1 | part2);
value ^= _xorValue ^ salt;
return value;
}
public override int Decrypt(int value, int[] secretKey, int salt)
{
value ^= _xorValue ^ salt;
uint value2 = (uint)value >> _rotateBitNum;
uint part1 = (uint)value << (32 - _rotateBitNum);
value = (int)(value2 | part1);
value = (value - secretKey[_index1]) * _revertMultipleValue;
return value;
}
public override void GenerateEncryptCode(List<string> lines, string indent)
{
lines.Add(indent + $"value = value * {_multipleValue} + _secretKey[{_index1}];");
lines.Add(indent + $"uint part1 = (uint)value << {_rotateBitNum};");
lines.Add(indent + $"uint part2 = (uint)value >> (32 - {_rotateBitNum});");
lines.Add(indent + $"value = (int)(part1 | part2);");
lines.Add(indent + $"value ^= {_xorValue} ^ salt;");
}
public override void GenerateDecryptCode(List<string> lines, string indent)
{
lines.Add(indent + $"value ^= {_xorValue} ^ salt;");
lines.Add(indent + $"uint value2 = (uint)value >> {_rotateBitNum};");
lines.Add(indent + $"uint part1 = (uint)value << (32 - {_rotateBitNum});");
lines.Add(indent + $"value = (int)(value2 | part1);");
lines.Add(indent + $"value = (value - _secretKey[{_index1}]) * {_revertMultipleValue};");
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: e3c8b55b35ff1554489fa657a714f485
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,65 +0,0 @@
using Obfuz.Utils;
using System.Collections.Generic;
namespace Obfuz.EncryptionVM.Instructions
{
public class MultipleXorRotateInstruction : EncryptionInstructionBase
{
// x = x * p1 + secretKey[index1];
// x = x ^ p3 ^ salt;
// x = Rotate(x, p2)
private readonly int _multipleValue;
private readonly int _revertMultipleValue;
private readonly int _index1;
private readonly int _rotateBitNum;
private readonly int _xorValue;
public MultipleXorRotateInstruction(int multipleValue, int index1, int xorValue, int rotateBitNum)
{
_multipleValue = multipleValue;
_revertMultipleValue = MathUtil.ModInverse32(multipleValue);
_index1 = index1;
_rotateBitNum = rotateBitNum;
_xorValue = xorValue;
}
public override int Encrypt(int value, int[] secretKey, int salt)
{
value = value * _multipleValue + secretKey[_index1];
value ^= _xorValue ^ salt;
uint part1 = (uint)value << _rotateBitNum;
uint part2 = (uint)value >> (32 - _rotateBitNum);
value = (int)(part1 | part2);
return value;
}
public override int Decrypt(int value, int[] secretKey, int salt)
{
uint value2 = (uint)value >> _rotateBitNum;
uint part1 = (uint)value << (32 - _rotateBitNum);
value = (int)(value2 | part1);
value ^= _xorValue ^ salt;
value = (value - secretKey[_index1]) * _revertMultipleValue;
return value;
}
public override void GenerateEncryptCode(List<string> lines, string indent)
{
lines.Add(indent + $"value = value * {_multipleValue} + _secretKey[{_index1}];");
lines.Add(indent + $"value ^= {_xorValue} ^ salt;");
lines.Add(indent + $"uint part1 = (uint)value << {_rotateBitNum};");
lines.Add(indent + $"uint part2 = (uint)value >> (32 - {_rotateBitNum});");
lines.Add(indent + $"value = (int)(part1 | part2);");
}
public override void GenerateDecryptCode(List<string> lines, string indent)
{
lines.Add(indent + $"uint value2 = (uint)value >> {_rotateBitNum};");
lines.Add(indent + $"uint part1 = (uint)value << (32 - {_rotateBitNum});");
lines.Add(indent + $"value = (int)(value2 | part1);");
lines.Add(indent + $"value ^= {_xorValue} ^ salt;");
lines.Add(indent + $"value = (value - _secretKey[{_index1}]) * {_revertMultipleValue};");
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: adc3dcde66795744fa4bdc753a2c599f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,62 +0,0 @@
using System.Collections.Generic;
namespace Obfuz.EncryptionVM.Instructions
{
public class XorAddRotateInstruction : EncryptionInstructionBase
{
// x = x ^ p3 ^ salt;
// x = x + p1 + secretKey[index1];
// x = Rotate(x, p2)
private readonly int _addValue;
private readonly int _index1;
private readonly int _rotateBitNum;
private readonly int _xorValue;
public XorAddRotateInstruction(int xorValue, int addValue, int index1, int rotateBitNum)
{
_addValue = addValue;
_index1 = index1;
_rotateBitNum = rotateBitNum;
_xorValue = xorValue;
}
public override int Encrypt(int value, int[] secretKey, int salt)
{
value ^= _xorValue ^ salt;
value += _addValue + secretKey[_index1];
uint part1 = (uint)value << _rotateBitNum;
uint part2 = (uint)value >> (32 - _rotateBitNum);
value = (int)(part1 | part2);
return value;
}
public override int Decrypt(int value, int[] secretKey, int salt)
{
uint value2 = (uint)value >> _rotateBitNum;
uint part1 = (uint)value << (32 - _rotateBitNum);
value = (int)(value2 | part1);
value -= _addValue + secretKey[_index1];
value ^= _xorValue ^ salt;
return value;
}
public override void GenerateEncryptCode(List<string> lines, string indent)
{
lines.Add(indent + $"value ^= {_xorValue} ^ salt;");
lines.Add(indent + $"value += {_addValue} + _secretKey[{_index1}];");
lines.Add(indent + $"uint part1 = (uint)value << {_rotateBitNum};");
lines.Add(indent + $"uint part2 = (uint)value >> (32 - {_rotateBitNum});");
lines.Add(indent + $"value = (int)(part1 | part2);");
}
public override void GenerateDecryptCode(List<string> lines, string indent)
{
lines.Add(indent + $"uint value2 = (uint)value >> {_rotateBitNum};");
lines.Add(indent + $"uint part1 = (uint)value << (32 - {_rotateBitNum});");
lines.Add(indent + $"value = (int)(value2 | part1);");
lines.Add(indent + $"value -= {_addValue} + _secretKey[{_index1}];");
lines.Add(indent + $"value ^= {_xorValue} ^ salt;");
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: ad8f4dd724d7ff845b0dd65861054d37
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,36 +0,0 @@
using System.Collections.Generic;
namespace Obfuz.EncryptionVM.Instructions
{
public class XorInstruction : EncryptionInstructionBase
{
private readonly int _xorValue;
private readonly int _opKeyIndex;
public XorInstruction(int xorValue, int opKeyIndex)
{
_xorValue = xorValue;
_opKeyIndex = opKeyIndex;
}
public override int Encrypt(int value, int[] secretKey, int salt)
{
return ((value ^ secretKey[_opKeyIndex]) + salt) ^ _xorValue;
}
public override int Decrypt(int value, int[] secretKey, int salt)
{
return ((value ^ _xorValue) - salt) ^ secretKey[_opKeyIndex];
}
public override void GenerateEncryptCode(List<string> lines, string indent)
{
lines.Add(indent + $"value = ((value ^ _secretKey[{_opKeyIndex}]) + salt) ^ {_xorValue};");
}
public override void GenerateDecryptCode(List<string> lines, string indent)
{
lines.Add(indent + $"value = ((value ^ {_xorValue}) - salt) ^ _secretKey[{_opKeyIndex}];");
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 2f16dd868e4473b45bfa9daaf7fabaf8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,65 +0,0 @@
using Obfuz.Utils;
using System.Collections.Generic;
namespace Obfuz.EncryptionVM.Instructions
{
public class XorMultipleRotateInstruction : EncryptionInstructionBase
{
// x = x ^ p3 ^ salt;
// x = x * p1 + secretKey[index1];
// x = Rotate(x, p2)
private readonly int _multipleValue;
private readonly int _revertMultipleValue;
private readonly int _index1;
private readonly int _rotateBitNum;
private readonly int _xorValue;
public XorMultipleRotateInstruction(int xorValue, int multipleValue, int index1, int rotateBitNum)
{
_multipleValue = multipleValue;
_revertMultipleValue = MathUtil.ModInverse32(multipleValue);
_index1 = index1;
_rotateBitNum = rotateBitNum;
_xorValue = xorValue;
}
public override int Encrypt(int value, int[] secretKey, int salt)
{
value ^= _xorValue ^ salt;
value = value * _multipleValue + secretKey[_index1];
uint part1 = (uint)value << _rotateBitNum;
uint part2 = (uint)value >> (32 - _rotateBitNum);
value = (int)(part1 | part2);
return value;
}
public override int Decrypt(int value, int[] secretKey, int salt)
{
uint value2 = (uint)value >> _rotateBitNum;
uint part1 = (uint)value << (32 - _rotateBitNum);
value = (int)(value2 | part1);
value = (value - secretKey[_index1]) * _revertMultipleValue;
value ^= _xorValue ^ salt;
return value;
}
public override void GenerateEncryptCode(List<string> lines, string indent)
{
lines.Add(indent + $"value ^= {_xorValue} ^ salt;");
lines.Add(indent + $"value = value * {_multipleValue} + _secretKey[{_index1}];");
lines.Add(indent + $"uint part1 = (uint)value << {_rotateBitNum};");
lines.Add(indent + $"uint part2 = (uint)value >> (32 - {_rotateBitNum});");
lines.Add(indent + $"value = (int)(part1 | part2);");
}
public override void GenerateDecryptCode(List<string> lines, string indent)
{
lines.Add(indent + $"uint value2 = (uint)value >> {_rotateBitNum};");
lines.Add(indent + $"uint part1 = (uint)value << (32 - {_rotateBitNum});");
lines.Add(indent + $"value = (int)(value2 | part1);");
lines.Add(indent + $"value = (value - _secretKey[{_index1}]) * {_revertMultipleValue};");
lines.Add(indent + $"value ^= {_xorValue} ^ salt;");
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 3eb7e6d475cfc14459d3850c5964ba52
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,17 +0,0 @@
namespace Obfuz.EncryptionVM
{
public class VirtualMachine
{
public const int SecretKeyLength = 1024;
public readonly int version;
public readonly string codeGenerationSecretKey;
public readonly EncryptionInstructionWithOpCode[] opCodes;
public VirtualMachine(int version, string codeGenerationSecretKey, EncryptionInstructionWithOpCode[] opCodes)
{
this.codeGenerationSecretKey = codeGenerationSecretKey;
this.opCodes = opCodes;
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: c6970e037654dcb49912783a40f3e1ba
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,203 +0,0 @@
using Obfuz.Utils;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using UnityEngine;
namespace Obfuz.EncryptionVM
{
public class VirtualMachineCodeGenerator
{
private readonly int _opCodeCount;
private readonly int _opCodeBits;
private readonly VirtualMachine _vm;
public VirtualMachineCodeGenerator(string vmCodeGenerateSecretKey, int opCodeCount)
{
_opCodeCount = opCodeCount;
_opCodeBits = EncryptionUtil.GetBitCount(opCodeCount - 1);
_vm = new VirtualMachineCreator(vmCodeGenerateSecretKey).CreateVirtualMachine(opCodeCount);
}
public VirtualMachineCodeGenerator(VirtualMachine vm)
{
_opCodeCount = vm.opCodes.Length;
_opCodeBits = EncryptionUtil.GetBitCount(_opCodeCount - 1);
_vm = vm;
}
public bool ValidateMatch(string outputFile)
{
if (!File.Exists(outputFile))
{
return false;
}
string oldCode = NormalizeText(File.ReadAllText(outputFile, Encoding.UTF8));
string newCode = NormalizeText(GenerateCode());
return oldCode == newCode;
}
private static string NormalizeText(string input)
{
return Regex.Replace(input, @"\s+", string.Empty);
}
public void Generate(string outputFile)
{
FileUtil.CreateParentDir(outputFile);
string code = GenerateCode();
File.WriteAllText(outputFile, code, Encoding.UTF8);
Debug.Log($"Generate EncryptionVM code to {outputFile}");
}
private string GenerateCode()
{
var lines = new List<string>();
AppendHeader(lines);
AppendEncryptCodes(lines);
AppendDecryptCodes(lines);
AppendTailer(lines);
return string.Join("\n", lines);
}
private void AppendEncryptCodes(List<string> lines)
{
lines.Add(@"
private int ExecuteEncrypt(int value, int opCode, int salt)
{
switch (opCode)
{");
foreach (var opCode in _vm.opCodes)
{
lines.Add($@" case {opCode.code}:
{{
// {opCode.function.GetType().Name}");
AppendEncryptCode(lines, opCode.function);
lines.Add(@" return value;
}");
}
lines.Add(@"
default:
throw new System.Exception($""Invalid opCode:{opCode}"");
}
}");
}
private void AppendDecryptCodes(List<string> lines)
{
lines.Add(@"
private int ExecuteDecrypt(int value, int opCode, int salt)
{
switch (opCode)
{");
foreach (var opCode in _vm.opCodes)
{
lines.Add($@" case {opCode.code}:
{{
// {opCode.function.GetType().Name}");
AppendDecryptCode(lines, opCode.function);
lines.Add(@" return value;
}");
}
lines.Add(@"
default:
throw new System.Exception($""Invalid opCode:{opCode}"");
}
}");
}
private void AppendHeader(List<string> lines)
{
lines.Add($"/// This file is auto-generated by Obfuz. Do not modify it.");
lines.Add($"///");
//lines.Add($"/// Created Time: {DateTime.Now}");
lines.Add($"/// Version: {_vm.version}");
lines.Add($"/// SecretKey: {_vm.codeGenerationSecretKey}");
lines.Add($"/// OpCodeCount: {_vm.opCodes.Length}");
lines.Add(@"
namespace Obfuz.EncryptionVM
{
public class GeneratedEncryptionVirtualMachine : Obfuz.EncryptorBase
{");
lines.Add($@"
private const int kOpCodeBits = {_opCodeBits};
private const int kOpCodeCount = {_opCodeCount};
private const int kOpCodeMask = {_opCodeCount - 1};
");
lines.Add(@"
private readonly int[] _secretKey;
public GeneratedEncryptionVirtualMachine(byte[] secretKey)
{
this._secretKey = ConvertToIntKey(secretKey);
}
public override int OpCodeCount => kOpCodeCount;
public override int Encrypt(int value, int opts, int salt)
{
uint uopts = (uint)opts;
uint revertOps = 0;
while (uopts != 0)
{
uint opCode = uopts & kOpCodeMask;
revertOps <<= kOpCodeBits;
revertOps |= opCode;
uopts >>= kOpCodeBits;
}
while (revertOps != 0)
{
uint opCode = revertOps & kOpCodeMask;
value = ExecuteEncrypt(value, (int)opCode, salt);
revertOps >>= kOpCodeBits;
}
return value;
}
public override int Decrypt(int value, int opts, int salt)
{
uint uopts = (uint)opts;
while (uopts != 0)
{
uint opCode = uopts & kOpCodeMask;
value = ExecuteDecrypt(value, (int)opCode, salt);
uopts >>= kOpCodeBits;
}
return value;
}
");
}
private void AppendTailer(List<string> lines)
{
lines.Add(@"
}
}
");
}
private void AppendEncryptCode(List<string> lines, IEncryptionInstruction instruction)
{
instruction.GenerateEncryptCode(lines, " ");
}
private void AppendDecryptCode(List<string> lines, IEncryptionInstruction instruction)
{
instruction.GenerateDecryptCode(lines, " ");
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 2246e9d3369eb3c45bc19ae0748d76ba
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,68 +0,0 @@
using Obfuz.EncryptionVM.Instructions;
using Obfuz.Utils;
using System;
using System.Collections.Generic;
namespace Obfuz.EncryptionVM
{
public class VirtualMachineCreator
{
private readonly string _vmGenerationSecretKey;
private readonly IRandom _random;
public const int CodeGenerationSecretKeyLength = 1024;
public const int VirtualMachineVersion = 1;
public VirtualMachineCreator(string vmGenerationSecretKey)
{
_vmGenerationSecretKey = vmGenerationSecretKey;
byte[] byteGenerationSecretKey = KeyGenerator.GenerateKey(vmGenerationSecretKey, CodeGenerationSecretKeyLength);
int[] intGenerationSecretKey = KeyGenerator.ConvertToIntKey(byteGenerationSecretKey);
_random = new RandomWithKey(intGenerationSecretKey, 0);
}
private readonly List<Func<IRandom, int, EncryptionInstructionBase>> _instructionCreators = new List<Func<IRandom, int, EncryptionInstructionBase>>
{
(r, len) => new AddInstruction(r.NextInt(), r.NextInt(len)),
(r, len) => new XorInstruction(r.NextInt(), r.NextInt(len)),
(r, len) => new BitRotateInstruction(r.NextInt(32), r.NextInt(len)),
(r, len) => new MultipleInstruction(r.NextInt() | 0x1, r.NextInt(len)),
(r, len) => new AddRotateXorInstruction(r.NextInt(), r.NextInt(len), r.NextInt(32), r.NextInt()),
(r, len) => new AddXorRotateInstruction(r.NextInt(), r.NextInt(len), r.NextInt(), r.NextInt(32)),
(r, len) => new XorAddRotateInstruction(r.NextInt(), r.NextInt(), r.NextInt(len), r.NextInt(32)),
(r, len) => new MultipleRotateXorInstruction(r.NextInt() | 0x1, r.NextInt(len), r.NextInt(32), r.NextInt()),
(r, len) => new MultipleXorRotateInstruction(r.NextInt() | 0x1, r.NextInt(len), r.NextInt(), r.NextInt(32)),
(r, len) => new XorMultipleRotateInstruction(r.NextInt(), r.NextInt() | 0x1, r.NextInt(len), r.NextInt(32)),
};
private IEncryptionInstruction CreateRandomInstruction(int intSecretKeyLength)
{
return _instructionCreators[_random.NextInt(_instructionCreators.Count)](_random, intSecretKeyLength);
}
private EncryptionInstructionWithOpCode CreateEncryptOpCode(ushort code)
{
IEncryptionInstruction inst = CreateRandomInstruction(VirtualMachine.SecretKeyLength / sizeof(int));
return new EncryptionInstructionWithOpCode(code, inst);
}
public VirtualMachine CreateVirtualMachine(int opCodeCount)
{
if (opCodeCount < 64)
{
throw new System.Exception("OpCode count should be >= 64");
}
if ((opCodeCount & (opCodeCount - 1)) != 0)
{
throw new System.Exception("OpCode count should be power of 2");
}
var opCodes = new EncryptionInstructionWithOpCode[opCodeCount];
for (int i = 0; i < opCodes.Length; i++)
{
opCodes[i] = CreateEncryptOpCode((ushort)i);
}
return new VirtualMachine(VirtualMachineVersion, _vmGenerationSecretKey, opCodes);
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 77d95ff5cf0b3aa4e96a055e37c381ba
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,90 +0,0 @@
using Obfuz.Utils;
using System.Collections.Generic;
using UnityEngine.Assertions;
namespace Obfuz.EncryptionVM
{
public class VirtualMachineSimulator : EncryptorBase
{
private readonly EncryptionInstructionWithOpCode[] _opCodes;
private readonly int[] _secretKey;
public override int OpCodeCount => _opCodes.Length;
public VirtualMachineSimulator(VirtualMachine vm, byte[] byteSecretKey)
{
_opCodes = vm.opCodes;
_secretKey = KeyGenerator.ConvertToIntKey(byteSecretKey);
VerifyInstructions();
}
private void VerifyInstructions()
{
int value = 0x11223344;
for (int i = 0; i < _opCodes.Length; i++)
{
int encryptedValue = _opCodes[i].Encrypt(value, _secretKey, i);
int decryptedValue = _opCodes[i].Decrypt(encryptedValue, _secretKey, i);
//Debug.Log($"instruction type:{_opCodes[i].function.GetType()}");
Assert.AreEqual(value, decryptedValue);
}
int ops = 11223344;
int salt = 789;
Assert.AreEqual(1, Decrypt(Encrypt(1, ops, salt), ops, salt));
Assert.AreEqual(1L, Decrypt(Encrypt(1L, ops, salt), ops, salt));
Assert.AreEqual(1.0f, Decrypt(Encrypt(1.0f, ops, salt), ops, salt));
Assert.AreEqual(1.0, Decrypt(Encrypt(1.0, ops, salt), ops, salt));
byte[] strBytes = Encrypt("abcdef", ops, salt);
Assert.AreEqual("abcdef", DecryptString(strBytes, 0, strBytes.Length, ops, salt));
var arr = new byte[100];
for (int i = 0; i < arr.Length; i++)
{
arr[i] = (byte)i;
}
EncryptBlock(arr, ops, salt);
DecryptBlock(arr, ops, salt);
for (int i = 0; i < arr.Length; i++)
{
Assert.AreEqual(i, arr[i]);
}
}
private List<uint> DecodeOps(uint ops)
{
var codes = new List<uint>();
while (ops != 0)
{
uint code = ops % (uint)_opCodes.Length;
codes.Add(code);
ops /= (uint)_opCodes.Length;
}
return codes;
}
public override int Encrypt(int value, int ops, int salt)
{
var codes = DecodeOps((uint)ops);
for (int i = codes.Count - 1; i >= 0; i--)
{
var opCode = _opCodes[codes[i]];
value = opCode.Encrypt(value, _secretKey, salt);
}
return value;
}
public override int Decrypt(int value, int ops, int salt)
{
var codes = DecodeOps((uint)ops);
foreach (var code in codes)
{
var opCode = _opCodes[code];
value = opCode.Decrypt(value, _secretKey, salt);
}
return value;
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 4f86f4d6faf49764a915d5c675091375
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: f47f2abd9eb7ba8469ba5cb1bb085d33
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,117 +0,0 @@
using Obfuz.Utils;
using System;
using System.Linq;
using System.Text;
namespace Obfuz.GarbageCodeGeneration
{
public class ConfigGarbageCodeGenerator : SpecificGarbageCodeGeneratorBase
{
private readonly string[] _types = new string[]
{
"bool",
"byte",
"short",
"int",
"long",
"float",
"double",
};
private string CreateRandomType(IRandom random)
{
return _types[random.NextInt(_types.Length)];
}
private string GetReadMethodNameOfType(string type)
{
switch (type)
{
case "bool": return "ReadBoolean";
case "byte": return "ReadByte";
case "short": return "ReadInt16";
case "int": return "ReadInt32";
case "long": return "ReadInt64";
case "float": return "ReadSingle";
case "double": return "ReadDouble";
default: throw new ArgumentException($"Unsupported type: {type}");
}
}
class FieldGenerationInfo
{
public int index;
public string name;
public string type;
}
class MethodGenerationInfo
{
public int index;
public string name;
}
protected override object CreateField(int index, IRandom random, GenerationParameters parameters)
{
return new FieldGenerationInfo
{
index = index,
name = $"x{index}",
type = CreateRandomType(random),
};
}
protected override object CreateMethod(int index, IRandom random, GenerationParameters parameters)
{
return new MethodGenerationInfo
{
index = index,
name = $"Load{index}",
};
}
protected override void GenerateUsings(StringBuilder result, IClassGenerationInfo cgi)
{
}
protected override void GenerateField(StringBuilder result, IClassGenerationInfo cgi, IRandom random, object field, string indent)
{
var fgi = (FieldGenerationInfo)field;
result.AppendLine($"{indent}public {fgi.type} {fgi.name};");
}
protected override void GenerateMethod(StringBuilder result, IClassGenerationInfo cgi, IRandom random, object method, string indent)
{
var mgi = (MethodGenerationInfo)method;
result.AppendLine($"{indent}public void {mgi.name}(BinaryReader reader)");
result.AppendLine($"{indent}{{");
string indent2 = indent + " ";
result.AppendLine($"{indent2}int a = 0;");
result.AppendLine($"{indent2}int b = 0;");
int maxN = 100;
var shuffledFields = cgi.Fields.ToList();
RandomUtil.ShuffleList(shuffledFields, random);
foreach (FieldGenerationInfo fgi in shuffledFields)
{
result.AppendLine($"{indent2}this.{fgi.name} = reader.{GetReadMethodNameOfType(fgi.type)}();");
if (random.NextInPercentage(0.5f))
{
result.AppendLine($"{indent2}a = b * {random.NextInt(maxN)} + reader.ReadInt32();");
result.AppendLine($"{indent2}b = a * reader.ReadInt32() + {random.NextInt(maxN)};");
}
if (random.NextInPercentage(0.5f))
{
result.AppendLine($"{indent2}a += {random.NextInt(0, 10000)};");
}
if (random.NextInPercentage(0.5f))
{
result.AppendLine($"{indent2}b += {random.NextInt(0, 10000)};");
}
}
result.AppendLine($"{indent}}}");
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 327cb4a465ff23944a5fea30bf3beeeb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,92 +0,0 @@
using Obfuz.Settings;
using Obfuz.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
namespace Obfuz.GarbageCodeGeneration
{
public class GarbageCodeGenerator
{
private const int CodeGenerationSecretKeyLength = 1024;
private readonly GarbageCodeGenerationSettings _settings;
private readonly int[] _intGenerationSecretKey;
public GarbageCodeGenerator(GarbageCodeGenerationSettings settings)
{
_settings = settings;
byte[] byteGenerationSecretKey = KeyGenerator.GenerateKey(settings.codeGenerationSecret, CodeGenerationSecretKeyLength);
_intGenerationSecretKey = KeyGenerator.ConvertToIntKey(byteGenerationSecretKey);
}
public void Generate()
{
GenerateTask(_settings.defaultTask);
if (_settings.additionalTasks != null && _settings.additionalTasks.Length > 0)
{
foreach (var task in _settings.additionalTasks)
{
GenerateTask(task);
}
}
}
public void CleanCodes()
{
Debug.Log($"Cleaning generated garbage codes begin.");
if (_settings.defaultTask != null)
{
FileUtil.RemoveDir(_settings.defaultTask.outputPath, true);
}
if (_settings.additionalTasks != null && _settings.additionalTasks.Length > 0)
{
foreach (var task in _settings.additionalTasks)
{
FileUtil.RemoveDir(task.outputPath, true);
}
}
}
private void GenerateTask(GarbageCodeGenerationTask task)
{
Debug.Log($"Generating garbage code with seed: {task.codeGenerationRandomSeed}, class count: {task.classCount}, method count per class: {task.methodCountPerClass}, types: {task.garbageCodeType}, output path: {task.outputPath}");
if (string.IsNullOrWhiteSpace(task.outputPath))
{
throw new Exception("outputPath of GarbageCodeGenerationTask is empty!");
}
var generator = CreateSpecificCodeGenerator(task.garbageCodeType);
var parameters = new GenerationParameters
{
random = new RandomWithKey(_intGenerationSecretKey, task.codeGenerationRandomSeed),
classNamespace = task.classNamespace,
classNamePrefix = task.classNamePrefix,
classCount = task.classCount,
methodCountPerClass = task.methodCountPerClass,
fieldCountPerClass = task.fieldCountPerClass,
outputPath = task.outputPath,
};
generator.Generate(parameters);
Debug.Log($"Generate garbage code end.");
}
private ISpecificGarbageCodeGenerator CreateSpecificCodeGenerator(GarbageCodeType type)
{
switch (type)
{
case GarbageCodeType.Config: return new ConfigGarbageCodeGenerator();
case GarbageCodeType.UI: return new UIGarbageCodeGenerator();
default: throw new NotSupportedException($"Garbage code type {type} is not supported.");
}
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: ff64fd1e6f7b8874db5a5228fab159f9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,22 +0,0 @@
using Obfuz.Settings;
using Obfuz.Utils;
namespace Obfuz.GarbageCodeGeneration
{
public class GenerationParameters
{
public IRandom random;
public string classNamespace;
public string classNamePrefix;
public int classCount;
public int methodCountPerClass;
public int fieldCountPerClass;
public string outputPath;
}
public interface ISpecificGarbageCodeGenerator
{
void Generate(GenerationParameters parameters);
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 74a17802b5aab2e40a3c89e0ddbcec0d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,106 +0,0 @@
using Obfuz.Utils;
using System.Collections.Generic;
using System.IO;
using System.Text;
using UnityEngine;
namespace Obfuz.GarbageCodeGeneration
{
public abstract class SpecificGarbageCodeGeneratorBase : ISpecificGarbageCodeGenerator
{
protected interface IClassGenerationInfo
{
string Namespace { get; set; }
string Name { get; set; }
IList<object> Fields { get; set; }
IList<object> Methods { get; set; }
}
protected class ClassGenerationInfo : IClassGenerationInfo
{
public string Namespace { get; set; }
public string Name { get; set; }
public IList<object> Fields { get; set; } = new List<object>();
public IList<object> Methods { get; set; } = new List<object>();
}
public virtual void Generate(GenerationParameters parameters)
{
FileUtil.RecreateDir(parameters.outputPath);
for (int i = 0; i < parameters.classCount; i++)
{
Debug.Log($"[{GetType().Name}] Generating class {i}");
var localRandom = new RandomWithKey(((RandomWithKey)parameters.random).Key, parameters.random.NextInt());
string outputFile = $"{parameters.outputPath}/__GeneratedGarbageClass_{i}.cs";
var result = new StringBuilder(64 * 1024);
GenerateClass(i, localRandom, result, parameters);
File.WriteAllText(outputFile, result.ToString(), Encoding.UTF8);
Debug.Log($"[{GetType().Name}] Generated class {i} to {outputFile}");
}
}
protected abstract object CreateField(int index, IRandom random, GenerationParameters parameters);
protected abstract object CreateMethod(int index, IRandom random, GenerationParameters parameters);
protected virtual IClassGenerationInfo CreateClassGenerationInfo(string classNamespace, string className, IRandom random, GenerationParameters parameters)
{
var cgi = new ClassGenerationInfo
{
Namespace = classNamespace,
Name = className,
};
for (int i = 0; i < parameters.fieldCountPerClass; i++)
{
cgi.Fields.Add(CreateField(i, random, parameters));
}
for (int i = 0; i < parameters.methodCountPerClass; i++)
{
cgi.Methods.Add(CreateMethod(i, random, parameters));
}
return cgi;
}
protected virtual void GenerateClass(int classIndex, IRandom random, StringBuilder result, GenerationParameters parameters)
{
IClassGenerationInfo cgi = CreateClassGenerationInfo(parameters.classNamespace, $"{parameters.classNamePrefix}{classIndex}", random, parameters);
result.AppendLine("using System;");
result.AppendLine("using System.Collections.Generic;");
result.AppendLine("using System.Linq;");
result.AppendLine("using System.IO;");
result.AppendLine("using UnityEngine;");
GenerateUsings(result, cgi);
result.AppendLine($"namespace {cgi.Namespace}");
result.AppendLine("{");
result.AppendLine($" public class {cgi.Name}");
result.AppendLine(" {");
string indent = " ";
foreach (object field in cgi.Fields)
{
GenerateField(result, cgi, random, field, indent);
}
foreach (object method in cgi.Methods)
{
GenerateMethod(result, cgi, random, method, indent);
}
result.AppendLine(" }");
result.AppendLine("}");
}
protected abstract void GenerateUsings(StringBuilder result, IClassGenerationInfo cgi);
protected abstract void GenerateField(StringBuilder result, IClassGenerationInfo cgi, IRandom random, object field, string indent);
protected abstract void GenerateMethod(StringBuilder result, IClassGenerationInfo cgi, IRandom random, object method, string indent);
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: bae18fd49482f00439d37f28a6a78d9b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,157 +0,0 @@
using Obfuz.Utils;
using System;
using System.Linq;
using System.Text;
namespace Obfuz.GarbageCodeGeneration
{
public class UIGarbageCodeGenerator : SpecificGarbageCodeGeneratorBase
{
/*
*
* public Button b1;
public Image b2;
public RawImage b30;
public Text b3;
public Slider b4;
public ScrollRect b5;
public Scrollbar b6;
public Mask b7;
public RectMask2D b70;
public Canvas b8;
public CanvasGroup b9;
public RectTransform b10;
public Transform b11;
public GameObject b12;
*/
private readonly string[] _types = new string[]
{
"Button",
"Image",
"RawImage",
"Text",
"Slider",
"ScrollRect",
"Scrollbar",
"Mask",
"RectMask2D",
"Canvas",
"CanvasGroup",
"RectTransform",
//"Transform",
//"GameObject",
};
private string CreateRandomType(IRandom random)
{
return _types[random.NextInt(_types.Length)];
}
private string GetReadMethodNameOfType(string type)
{
switch (type)
{
case "bool": return "ReadBoolean";
case "byte": return "ReadByte";
case "short": return "ReadInt16";
case "int": return "ReadInt32";
case "long": return "ReadInt64";
case "float": return "ReadSingle";
case "double": return "ReadDouble";
default: throw new ArgumentException($"Unsupported type: {type}");
}
}
class FieldGenerationInfo
{
public int index;
public string name;
public string type;
}
class MethodGenerationInfo
{
public int index;
public string name;
}
protected override object CreateField(int index, IRandom random, GenerationParameters parameters)
{
return new FieldGenerationInfo
{
index = index,
name = $"x{index}",
type = CreateRandomType(random),
};
}
protected override object CreateMethod(int index, IRandom random, GenerationParameters parameters)
{
return new MethodGenerationInfo
{
index = index,
name = $"Init{index}",
};
}
protected override void GenerateUsings(StringBuilder result, IClassGenerationInfo cgi)
{
result.AppendLine("using UnityEngine.UI;");
}
protected override void GenerateField(StringBuilder result, IClassGenerationInfo cgi, IRandom random, object field, string indent)
{
var fgi = (FieldGenerationInfo)field;
result.AppendLine($"{indent}public {fgi.type} {fgi.name};");
}
protected override void GenerateMethod(StringBuilder result, IClassGenerationInfo cgi, IRandom random, object method, string indent)
{
var mgi = (MethodGenerationInfo)method;
result.AppendLine($"{indent}public void {mgi.name}(GameObject go)");
result.AppendLine($"{indent}{{");
string indent2 = indent + " ";
result.AppendLine($"{indent2}int a = 0;");
result.AppendLine($"{indent2}int b = 0;");
int maxN = 100;
var shuffledFields = cgi.Fields.ToList();
RandomUtil.ShuffleList(shuffledFields, random);
foreach (FieldGenerationInfo fgi in shuffledFields)
{
if (random.NextInPercentage(0.5f))
{
result.AppendLine($"{indent2}this.{fgi.name} = go.transform.Find(\"ui/{fgi.name}\").GetComponent<{fgi.type}>();");
}
else
{
result.AppendLine($"{indent2}this.{fgi.name} = go.GetComponent<{fgi.type}>();");
}
if (random.NextInPercentage(0.5f))
{
result.AppendLine($"{indent2}a = b * {random.NextInt(maxN)} + go.layer;");
result.AppendLine($"{indent2}b = a * go.layer + {random.NextInt(maxN)};");
}
if (random.NextInPercentage(0.5f))
{
result.AppendLine($"{indent2}a *= {random.NextInt(0, 10000)};");
}
if (random.NextInPercentage(0.5f))
{
result.AppendLine($"{indent2}b /= {random.NextInt(0, 10000)};");
}
if (random.NextInPercentage(0.5f))
{
result.AppendLine($"{indent2}a = a * b << {random.NextInt(0, 10000)};");
}
if (random.NextInPercentage(0.5f))
{
result.AppendLine($"{indent2}b = a / b & {random.NextInt(0, 10000)};");
}
}
result.AppendLine($"{indent}}}");
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 5071c4b9c7f5aef409f3e7fdb45ecd8d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,15 +0,0 @@
using Obfuz.ObfusPasses;
namespace Obfuz
{
public interface IObfuscationPass
{
ObfuscationPassType Type { get; }
void Start();
void Stop();
void Process();
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: b7003f9503025794b8aa775d9ade335c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 120b2dcffd582e84dbb92003240824d1
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,53 +0,0 @@
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using Obfuz.Emit;
using System.Collections.Generic;
namespace Obfuz.ObfusPasses
{
public abstract class BasicBlockObfuscationPassBase : ObfuscationMethodPassBase
{
protected virtual bool ComputeBlockInLoop => true;
protected abstract bool TryObfuscateInstruction(MethodDef callingMethod, Instruction inst, BasicBlock block, int instructionIndex,
IList<Instruction> globalInstructions, List<Instruction> outputInstructions, List<Instruction> totalFinalInstructions);
protected override void ObfuscateData(MethodDef method)
{
BasicBlockCollection bbc = new BasicBlockCollection(method, ComputeBlockInLoop);
IList<Instruction> instructions = method.Body.Instructions;
var outputInstructions = new List<Instruction>();
var totalFinalInstructions = new List<Instruction>();
for (int i = 0; i < instructions.Count; i++)
{
Instruction inst = instructions[i];
BasicBlock block = bbc.GetBasicBlockByInstruction(inst);
outputInstructions.Clear();
if (TryObfuscateInstruction(method, inst, block, i, instructions, outputInstructions, totalFinalInstructions))
{
// current instruction may be the target of control flow instruction, so we can't remove it directly.
// we replace it with nop now, then remove it in CleanUpInstructionPass
inst.OpCode = outputInstructions[0].OpCode;
inst.Operand = outputInstructions[0].Operand;
totalFinalInstructions.Add(inst);
for (int k = 1; k < outputInstructions.Count; k++)
{
totalFinalInstructions.Add(outputInstructions[k]);
}
}
else
{
totalFinalInstructions.Add(inst);
}
}
instructions.Clear();
foreach (var obInst in totalFinalInstructions)
{
instructions.Add(obInst);
}
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: ae83aaf003665614092aabceabff3cf8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: cf68e45551825c547b137f6e5189937e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,166 +0,0 @@
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using Obfuz.Emit;
using Obfuz.Settings;
using Obfuz.Utils;
using System.Collections.Generic;
namespace Obfuz.ObfusPasses.CallObfus
{
class ObfusMethodContext
{
public MethodDef method;
public LocalVariableAllocator localVariableAllocator;
public IRandom localRandom;
public EncryptionScopeInfo encryptionScope;
}
public class CallObfusPass : ObfuscationMethodPassBase
{
public static CallObfuscationSettingsFacade CurrentSettings { get; private set; }
private readonly CallObfuscationSettingsFacade _settings;
private readonly SpecialWhiteListMethodCalculator _specialWhiteListMethodCache;
private IObfuscator _dynamicProxyObfuscator;
private IObfuscationPolicy _dynamicProxyPolicy;
public override ObfuscationPassType Type => ObfuscationPassType.CallObfus;
public CallObfusPass(CallObfuscationSettingsFacade settings)
{
_settings = settings;
CurrentSettings = settings;
_specialWhiteListMethodCache = new SpecialWhiteListMethodCalculator(settings.obfuscateCallToMethodInMscorlib);
}
public override void Stop()
{
_dynamicProxyObfuscator.Done();
}
public override void Start()
{
var ctx = ObfuscationPassContext.Current;
_dynamicProxyObfuscator = CreateObfuscator(ctx, _settings.proxyMode);
_dynamicProxyPolicy = new ConfigurableObfuscationPolicy(ctx.coreSettings.assembliesToObfuscate, _settings.ruleFiles);
}
private IObfuscator CreateObfuscator(ObfuscationPassContext ctx, ProxyMode mode)
{
switch (mode)
{
case ProxyMode.Dispatch:
return new DispatchProxyObfuscator(ctx.moduleEntityManager);
case ProxyMode.Delegate:
return new DelegateProxyObfuscator(ctx.moduleEntityManager);
default:
throw new System.NotSupportedException($"Unsupported proxy mode: {mode}");
}
}
protected override void ObfuscateData(MethodDef method)
{
BasicBlockCollection bbc = new BasicBlockCollection(method, false);
IList<Instruction> instructions = method.Body.Instructions;
var outputInstructions = new List<Instruction>();
var totalFinalInstructions = new List<Instruction>();
ObfuscationPassContext ctx = ObfuscationPassContext.Current;
var encryptionScope = ctx.moduleEntityManager.EncryptionScopeProvider.GetScope(method.Module);
var localRandom = encryptionScope.localRandomCreator(MethodEqualityComparer.CompareDeclaringTypes.GetHashCode(method));
var omc = new ObfusMethodContext
{
method = method,
localVariableAllocator = new LocalVariableAllocator(method),
localRandom = localRandom,
encryptionScope = encryptionScope,
};
Instruction lastInst = null;
for (int i = 0; i < instructions.Count; i++)
{
Instruction inst = instructions[i];
BasicBlock block = bbc.GetBasicBlockByInstruction(inst);
outputInstructions.Clear();
if (TryObfuscateInstruction(method, lastInst, inst, outputInstructions, omc))
{
// current instruction may be the target of control flow instruction, so we can't remove it directly.
// we replace it with nop now, then remove it in CleanUpInstructionPass
inst.OpCode = outputInstructions[0].OpCode;
inst.Operand = outputInstructions[0].Operand;
totalFinalInstructions.Add(inst);
for (int k = 1; k < outputInstructions.Count; k++)
{
totalFinalInstructions.Add(outputInstructions[k]);
}
}
else
{
totalFinalInstructions.Add(inst);
}
lastInst = inst;
}
instructions.Clear();
foreach (var obInst in totalFinalInstructions)
{
instructions.Add(obInst);
}
}
protected override bool NeedObfuscateMethod(MethodDef method)
{
return _dynamicProxyPolicy.NeedObfuscateCallInMethod(method);
}
private bool TryObfuscateInstruction(MethodDef callerMethod, Instruction lastInst, Instruction inst, List<Instruction> outputInstructions, ObfusMethodContext ctx)
{
IMethod calledMethod = inst.Operand as IMethod;
if (calledMethod == null || !calledMethod.IsMethod)
{
return false;
}
if (MetaUtil.ContainsContainsGenericParameter(calledMethod))
{
return false;
}
bool callVir;
switch (inst.OpCode.Code)
{
case Code.Call:
{
callVir = false;
break;
}
case Code.Callvirt:
{
if (lastInst != null && lastInst.OpCode.Code == Code.Constrained)
{
return false;
}
callVir = true;
break;
}
default: return false;
}
if (_specialWhiteListMethodCache.IsInWhiteList(calledMethod))
{
return false;
}
if (!_dynamicProxyPolicy.NeedObfuscateCalledMethod(callerMethod, calledMethod, callVir))
{
return false;
}
return _dynamicProxyObfuscator.Obfuscate(callerMethod, calledMethod, callVir, outputInstructions);
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 112178b770868274fb8119a4997a3420
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,300 +0,0 @@
using dnlib.DotNet;
using Obfuz.Conf;
using Obfuz.Settings;
using Obfuz.Utils;
using System;
using System.Collections.Generic;
using System.Xml;
namespace Obfuz.ObfusPasses.CallObfus
{
public class ConfigurableObfuscationPolicy : ObfuscationPolicyBase
{
class WhiteListAssembly
{
public string name;
public NameMatcher nameMatcher;
public bool? obfuscate;
public List<WhiteListType> types = new List<WhiteListType>();
}
class WhiteListType
{
public string name;
public NameMatcher nameMatcher;
public bool? obfuscate;
public List<WhiteListMethod> methods = new List<WhiteListMethod>();
}
class WhiteListMethod
{
public string name;
public NameMatcher nameMatcher;
public bool? obfuscate;
}
class ObfuscationRule : IRule<ObfuscationRule>
{
public ObfuscationLevel? obfuscationLevel;
public void InheritParent(ObfuscationRule parentRule)
{
if (obfuscationLevel == null)
obfuscationLevel = parentRule.obfuscationLevel;
}
}
class AssemblySpec : AssemblyRuleBase<TypeSpec, MethodSpec, ObfuscationRule>
{
}
class TypeSpec : TypeRuleBase<MethodSpec, ObfuscationRule>
{
}
class MethodSpec : MethodRuleBase<ObfuscationRule>
{
}
private static readonly ObfuscationRule s_default = new ObfuscationRule()
{
obfuscationLevel = ObfuscationLevel.Basic,
};
private readonly XmlAssemblyTypeMethodRuleParser<AssemblySpec, TypeSpec, MethodSpec, ObfuscationRule> _configParser;
private ObfuscationRule _global;
private readonly List<WhiteListAssembly> _whiteListAssemblies = new List<WhiteListAssembly>();
private readonly CachedDictionary<IMethod, bool> _whiteListMethodCache;
private readonly Dictionary<MethodDef, ObfuscationRule> _methodRuleCache = new Dictionary<MethodDef, ObfuscationRule>();
public ConfigurableObfuscationPolicy(List<string> toObfuscatedAssemblyNames, List<string> xmlConfigFiles)
{
_whiteListMethodCache = new CachedDictionary<IMethod, bool>(MethodEqualityComparer.CompareDeclaringTypes, this.ComputeIsInWhiteList);
_configParser = new XmlAssemblyTypeMethodRuleParser<AssemblySpec, TypeSpec, MethodSpec, ObfuscationRule>(toObfuscatedAssemblyNames,
ParseObfuscationRule, ParseGlobalElement);
LoadConfigs(xmlConfigFiles);
}
private void LoadConfigs(List<string> configFiles)
{
_configParser.LoadConfigs(configFiles);
if (_global == null)
{
_global = s_default;
}
else
{
_global.InheritParent(s_default);
}
_configParser.InheritParentRules(_global);
InheritWhitelistRules();
}
private void InheritWhitelistRules()
{
foreach (var ass in _whiteListAssemblies)
{
foreach (var type in ass.types)
{
if (type.obfuscate == null)
{
type.obfuscate = ass.obfuscate;
}
foreach (var method in type.methods)
{
if (method.obfuscate == null)
{
method.obfuscate = type.obfuscate;
}
}
}
}
}
private void ParseGlobalElement(string configFile, XmlElement ele)
{
switch (ele.Name)
{
case "global": _global = ParseObfuscationRule(configFile, ele); break;
case "whitelist": ParseWhitelist(ele); break;
default: throw new Exception($"Invalid xml file {configFile}, unknown node {ele.Name}");
}
}
private ObfuscationRule ParseObfuscationRule(string configFile, XmlElement ele)
{
var rule = new ObfuscationRule();
if (ele.HasAttribute("obfuscationLevel"))
{
rule.obfuscationLevel = ConfigUtil.ParseObfuscationLevel(ele.GetAttribute("obfuscationLevel"));
}
return rule;
}
private void ParseWhitelist(XmlElement ruleEle)
{
foreach (XmlNode xmlNode in ruleEle.ChildNodes)
{
if (!(xmlNode is XmlElement childEle))
{
continue;
}
switch (childEle.Name)
{
case "assembly":
{
var ass = ParseWhiteListAssembly(childEle);
_whiteListAssemblies.Add(ass);
break;
}
default: throw new Exception($"Invalid xml file, unknown node {childEle.Name}");
}
}
}
private WhiteListAssembly ParseWhiteListAssembly(XmlElement element)
{
var ass = new WhiteListAssembly();
ass.name = element.GetAttribute("name");
ass.nameMatcher = new NameMatcher(ass.name);
ass.obfuscate = ConfigUtil.ParseNullableBool(element.GetAttribute("obfuscate")) ?? false;
foreach (XmlNode node in element.ChildNodes)
{
if (!(node is XmlElement ele))
{
continue;
}
switch (ele.Name)
{
case "type":
ass.types.Add(ParseWhiteListType(ele));
break;
default:
throw new Exception($"Invalid xml file, unknown node {ele.Name}");
}
}
return ass;
}
private WhiteListType ParseWhiteListType(XmlElement element)
{
var type = new WhiteListType();
type.name = element.GetAttribute("name");
type.nameMatcher = new NameMatcher(type.name);
type.obfuscate = ConfigUtil.ParseNullableBool(element.GetAttribute("obfuscate"));
foreach (XmlNode node in element.ChildNodes)
{
if (!(node is XmlElement ele))
{
continue;
}
switch (ele.Name)
{
case "method":
{
type.methods.Add(ParseWhiteListMethod(ele));
break;
}
default: throw new Exception($"Invalid xml file, unknown node {ele.Name}");
}
}
return type;
}
private WhiteListMethod ParseWhiteListMethod(XmlElement element)
{
var method = new WhiteListMethod();
method.name = element.GetAttribute("name");
method.nameMatcher = new NameMatcher(method.name);
method.obfuscate = ConfigUtil.ParseNullableBool(element.GetAttribute("obfuscate"));
return method;
}
private ObfuscationRule GetMethodObfuscationRule(MethodDef method)
{
if (!_methodRuleCache.TryGetValue(method, out var rule))
{
rule = _configParser.GetMethodRule(method, _global);
_methodRuleCache[method] = rule;
}
return rule;
}
public override bool NeedObfuscateCallInMethod(MethodDef method)
{
ObfuscationRule rule = GetMethodObfuscationRule(method);
return rule.obfuscationLevel != null && rule.obfuscationLevel.Value >= ObfuscationLevel.Basic;
}
private bool ComputeIsInWhiteList(IMethod calledMethod)
{
ITypeDefOrRef declaringType = calledMethod.DeclaringType;
TypeSig declaringTypeSig = calledMethod.DeclaringType.ToTypeSig();
declaringTypeSig = declaringTypeSig.RemovePinnedAndModifiers();
switch (declaringTypeSig.ElementType)
{
case ElementType.ValueType:
case ElementType.Class:
{
break;
}
case ElementType.GenericInst:
{
if (MetaUtil.ContainsContainsGenericParameter(calledMethod))
{
return true;
}
break;
}
default: return true;
}
TypeDef typeDef = declaringType.ResolveTypeDef();
string assName = typeDef.Module.Assembly.Name;
string typeFullName = typeDef.FullName;
string methodName = calledMethod.Name;
foreach (var ass in _whiteListAssemblies)
{
if (!ass.nameMatcher.IsMatch(assName))
{
continue;
}
foreach (var type in ass.types)
{
if (!type.nameMatcher.IsMatch(typeFullName))
{
continue;
}
foreach (var method in type.methods)
{
if (method.nameMatcher.IsMatch(methodName))
{
return !method.obfuscate.Value;
}
}
return !type.obfuscate.Value;
}
return !ass.obfuscate.Value;
}
return false;
}
public override bool NeedObfuscateCalledMethod(MethodDef callerMethod, IMethod calledMethod, bool callVir)
{
if (_whiteListMethodCache.GetValue(calledMethod))
{
return false;
}
return true;
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: d9ea12b16c4b296459db8a60fb1615d6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,263 +0,0 @@
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using Obfuz.Data;
using Obfuz.Emit;
using Obfuz.Settings;
using Obfuz.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Obfuz.ObfusPasses.CallObfus
{
struct DelegateProxyMethodData
{
public readonly FieldDef delegateInstanceField;
public readonly MethodDef delegateInvokeMethod;
public DelegateProxyMethodData(FieldDef delegateInstanceField, MethodDef delegateInvokeMethod)
{
this.delegateInstanceField = delegateInstanceField;
this.delegateInvokeMethod = delegateInvokeMethod;
}
}
class DelegateProxyAllocator : GroupByModuleEntityBase
{
private readonly CachedDictionary<MethodSig, TypeDef> _delegateTypes;
private readonly HashSet<string> _allocatedDelegateNames = new HashSet<string>();
private TypeDef _delegateInstanceHolderType;
private bool _done;
class CallInfo
{
public string key1;
public int key2;
public IMethod method;
public bool callVir;
public int index;
public TypeDef delegateType;
public FieldDef delegateInstanceField;
public MethodDef delegateInvokeMethod;
public MethodDef proxyMethod;
}
private readonly Dictionary<MethodKey, CallInfo> _callMethods = new Dictionary<MethodKey, CallInfo>();
public DelegateProxyAllocator()
{
_delegateTypes = new CachedDictionary<MethodSig, TypeDef>(SignatureEqualityComparer.Instance, CreateDelegateForSignature);
}
public override void Init()
{
_delegateInstanceHolderType = CreateDelegateInstanceHolderTypeDef();
}
private string AllocateDelegateTypeName(MethodSig delegateInvokeSig)
{
uint hashCode = (uint)SignatureEqualityComparer.Instance.GetHashCode(delegateInvokeSig);
string typeName = $"$Obfuz$Delegate_{hashCode}";
if (_allocatedDelegateNames.Add(typeName))
{
return typeName;
}
for (int i = 0; ;i++)
{
typeName = $"$Obfuz$Delegate_{hashCode}_{i}";
if (_allocatedDelegateNames.Add(typeName))
{
return typeName;
}
}
}
private TypeDef CreateDelegateForSignature(MethodSig delegateInvokeSig)
{
ModuleDef mod = Module;
using (var scope = new DisableTypeDefFindCacheScope(mod))
{
string typeName = AllocateDelegateTypeName(delegateInvokeSig);
mod.Import(typeof(MulticastDelegate));
TypeDef delegateType = new TypeDefUser("", typeName, mod.CorLibTypes.GetTypeRef("System", "MulticastDelegate"));
delegateType.Attributes = TypeAttributes.Class | TypeAttributes.Sealed | TypeAttributes.Public;
mod.Types.Add(delegateType);
MethodDef ctor = new MethodDefUser(
".ctor",
MethodSig.CreateInstance(mod.CorLibTypes.Void, mod.CorLibTypes.Object, mod.CorLibTypes.IntPtr),
MethodImplAttributes.Runtime,
MethodAttributes.RTSpecialName | MethodAttributes.SpecialName | MethodAttributes.HideBySig | MethodAttributes.Public
);
ctor.DeclaringType = delegateType;
MethodDef invokeMethod = new MethodDefUser(
"Invoke",
MethodSig.CreateInstance(delegateInvokeSig.RetType, delegateInvokeSig.Params.ToArray()),
MethodImplAttributes.Runtime,
MethodAttributes.HideBySig | MethodAttributes.Public | MethodAttributes.NewSlot | MethodAttributes.Virtual
);
invokeMethod.DeclaringType = delegateType;
return delegateType;
}
}
private TypeDef CreateDelegateInstanceHolderTypeDef()
{
ModuleDef mod = Module;
using (var scope = new DisableTypeDefFindCacheScope(mod))
{
string typeName = "$Obfuz$DelegateInstanceHolder";
TypeDef holderType = new TypeDefUser("", typeName, mod.CorLibTypes.Object.ToTypeDefOrRef());
holderType.Attributes = TypeAttributes.Class | TypeAttributes.Public;
mod.Types.Add(holderType);
return holderType;
}
}
private string AllocateFieldName(IMethod method, bool callVir)
{
uint hashCode = (uint)MethodEqualityComparer.CompareDeclaringTypes.GetHashCode(method);
string typeName = $"$Obfuz$Delegate$Field_{hashCode}_{callVir}";
if (_allocatedDelegateNames.Add(typeName))
{
return typeName;
}
for (int i = 0; ; i++)
{
typeName = $"$Obfuz$Delegate$Field_{hashCode}_{callVir}_{i}";
if (_allocatedDelegateNames.Add(typeName))
{
return typeName;
}
}
}
private MethodDef CreateProxyMethod(string name, IMethod calledMethod, bool callVir, MethodSig delegateInvokeSig)
{
var proxyMethod = new MethodDefUser(name, delegateInvokeSig, MethodImplAttributes.Managed, MethodAttributes.Public | MethodAttributes.Static);
var body = new CilBody();
proxyMethod.Body = body;
var ins = body.Instructions;
foreach (Parameter param in proxyMethod.Parameters)
{
ins.Add(Instruction.Create(OpCodes.Ldarg, param));
}
ins.Add(Instruction.Create(callVir ? OpCodes.Callvirt : OpCodes.Call, calledMethod));
ins.Add(Instruction.Create(OpCodes.Ret));
return proxyMethod;
}
public DelegateProxyMethodData Allocate(IMethod method, bool callVir, MethodSig delegateInvokeSig)
{
var key = new MethodKey(method, callVir);
if (!_callMethods.TryGetValue(key, out var callInfo))
{
TypeDef delegateType = _delegateTypes.GetValue(delegateInvokeSig);
MethodDef delegateInvokeMethod = delegateType.FindMethod("Invoke");
string fieldName = AllocateFieldName(method, callVir);
FieldDef delegateInstanceField = new FieldDefUser(fieldName, new FieldSig(delegateType.ToTypeSig()), FieldAttributes.Public | FieldAttributes.Static | FieldAttributes.InitOnly);
string key1 = $"{method.FullName}_{callVir}";
callInfo = new CallInfo
{
key1 = key1,
key2 = HashUtil.ComputePrimitiveOrStringOrBytesHashCode(key1) * 33445566,
method = method,
callVir = callVir,
delegateType = delegateType,
delegateInstanceField = delegateInstanceField,
delegateInvokeMethod = delegateInvokeMethod,
proxyMethod = CreateProxyMethod($"{fieldName}$Proxy", method, callVir, delegateInvokeSig),
};
_callMethods.Add(key, callInfo);
}
return new DelegateProxyMethodData(callInfo.delegateInstanceField, callInfo.delegateInvokeMethod);
}
public override void Done()
{
if (_done)
{
throw new Exception("Already done");
}
_done = true;
ModuleDef mod = Module;
// for stable order, we sort methods by name
List<CallInfo> callMethodList = _callMethods.Values.ToList();
callMethodList.Sort((a, b) => a.key1.CompareTo(b.key1));
var cctor = new MethodDefUser(".cctor",
MethodSig.CreateStatic(mod.CorLibTypes.Void),
MethodImplAttributes.IL | MethodImplAttributes.Managed,
MethodAttributes.Static | MethodAttributes.HideBySig | MethodAttributes.SpecialName | MethodAttributes.RTSpecialName | MethodAttributes.Private);
cctor.DeclaringType = _delegateInstanceHolderType;
//_rvaTypeDef.Methods.Add(cctor);
var body = new CilBody();
cctor.Body = body;
var ins = body.Instructions;
// var arr = new array[];
// var d = new delegate;
// arr[index] = d;
int index = 0;
ins.Add(Instruction.CreateLdcI4(callMethodList.Count));
ins.Add(Instruction.Create(OpCodes.Newarr, mod.CorLibTypes.Object));
foreach (CallInfo ci in callMethodList)
{
ci.index = index;
_delegateInstanceHolderType.Methods.Add(ci.proxyMethod);
ins.Add(Instruction.Create(OpCodes.Dup));
ins.Add(Instruction.CreateLdcI4(index));
ins.Add(Instruction.Create(OpCodes.Ldnull));
ins.Add(Instruction.Create(OpCodes.Ldftn, ci.proxyMethod));
MethodDef ctor = ci.delegateType.FindMethod(".ctor");
UnityEngine.Assertions.Assert.IsNotNull(ctor, $"Delegate type {ci.delegateType.FullName} does not have a constructor.");
ins.Add(Instruction.Create(OpCodes.Newobj, ctor));
ins.Add(Instruction.Create(OpCodes.Stelem_Ref));
++index;
}
List<CallInfo> callMethodList2 = callMethodList.ToList();
callMethodList2.Sort((a, b) => a.key2.CompareTo(b.key2));
EncryptionScopeInfo encryptionScope = EncryptionScope;
DefaultMetadataImporter importer = this.GetDefaultModuleMetadataImporter();
RvaDataAllocator rvaDataAllocator = this.GetEntity<RvaDataAllocator>();
foreach (CallInfo ci in callMethodList2)
{
_delegateInstanceHolderType.Fields.Add(ci.delegateInstanceField);
ins.Add(Instruction.Create(OpCodes.Dup));
IRandom localRandom = encryptionScope.localRandomCreator(HashUtil.ComputePrimitiveOrStringOrBytesHashCode(ci.key1));
int ops = EncryptionUtil.GenerateEncryptionOpCodes(localRandom, encryptionScope.encryptor, 4);
int salt = localRandom.NextInt();
int encryptedValue = encryptionScope.encryptor.Encrypt(ci.index, ops, salt);
RvaData rvaData = rvaDataAllocator.Allocate(encryptedValue);
ins.Add(Instruction.Create(OpCodes.Ldsfld, rvaData.field));
ins.Add(Instruction.CreateLdcI4(rvaData.offset));
ins.Add(Instruction.CreateLdcI4(ops));
ins.Add(Instruction.CreateLdcI4(salt));
ins.Add(Instruction.Create(OpCodes.Call, importer.DecryptFromRvaInt));
ins.Add(Instruction.Create(OpCodes.Ldelem_Ref));
ins.Add(Instruction.Create(OpCodes.Stsfld, ci.delegateInstanceField));
}
ins.Add(Instruction.Create(OpCodes.Pop));
ins.Add(Instruction.Create(OpCodes.Ret));
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 02761bacbed8a8b489ae3e7f49f0f84a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,83 +0,0 @@
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using Obfuz.Data;
using Obfuz.Emit;
using Obfuz.Settings;
using Obfuz.Utils;
using System.Collections.Generic;
using System.Linq;
namespace Obfuz.ObfusPasses.CallObfus
{
public class DelegateProxyObfuscator : ObfuscatorBase
{
private readonly GroupByModuleEntityManager _entityManager;
public DelegateProxyObfuscator(GroupByModuleEntityManager moduleEntityManager)
{
_entityManager = moduleEntityManager;
}
public override void Done()
{
_entityManager.Done<DelegateProxyAllocator>();
}
private MethodSig CreateProxyMethodSig(ModuleDef module, IMethod method)
{
MethodSig methodSig = MetaUtil.ToSharedMethodSig(module.CorLibTypes, MetaUtil.GetInflatedMethodSig(method, null));
//MethodSig methodSig = MetaUtil.GetInflatedMethodSig(method).Clone();
//methodSig.Params
switch (MetaUtil.GetThisArgType(method))
{
case ThisArgType.Class:
{
methodSig.Params.Insert(0, module.CorLibTypes.Object);
break;
}
case ThisArgType.ValueType:
{
methodSig.Params.Insert(0, module.CorLibTypes.IntPtr);
break;
}
}
return MethodSig.CreateStatic(methodSig.RetType, methodSig.Params.ToArray());
}
public override bool Obfuscate(MethodDef callingMethod, IMethod calledMethod, bool callVir, List<Instruction> obfuscatedInstructions)
{
DelegateProxyAllocator allocator = _entityManager.GetEntity<DelegateProxyAllocator>(callingMethod.Module);
LocalVariableAllocator localVarAllocator = new LocalVariableAllocator(callingMethod);
MethodSig methodSig = CreateProxyMethodSig(callingMethod.Module, calledMethod);
DelegateProxyMethodData proxyData = allocator.Allocate(calledMethod, callVir, methodSig);
bool isVoidReturn = MetaUtil.IsVoidType(methodSig.RetType);
using (var varScope = localVarAllocator.CreateScope())
{
List<Local> localVars = new List<Local>();
if (!isVoidReturn)
{
varScope.AllocateLocal(methodSig.RetType);
}
foreach (var p in methodSig.Params)
{
localVars.Add(varScope.AllocateLocal(p));
}
// save args
for (int i = localVars.Count - 1; i >= 0; i--)
{
obfuscatedInstructions.Add(Instruction.Create(OpCodes.Stloc, localVars[i]));
}
obfuscatedInstructions.Add(Instruction.Create(OpCodes.Ldsfld, proxyData.delegateInstanceField));
foreach (var local in localVars)
{
obfuscatedInstructions.Add(Instruction.Create(OpCodes.Ldloc, local));
}
obfuscatedInstructions.Add(Instruction.Create(OpCodes.Callvirt, proxyData.delegateInvokeMethod));
}
return true;
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 1102cd9f03de27c4b9fde3d6a87277c7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,273 +0,0 @@
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using Obfuz.Editor;
using Obfuz.Emit;
using Obfuz.Settings;
using Obfuz.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using MethodImplAttributes = dnlib.DotNet.MethodImplAttributes;
using TypeAttributes = dnlib.DotNet.TypeAttributes;
namespace Obfuz.ObfusPasses.CallObfus
{
public struct ProxyCallMethodData
{
public readonly MethodDef proxyMethod;
public readonly int encryptOps;
public readonly int salt;
public readonly int encryptedIndex;
public readonly int index;
public ProxyCallMethodData(MethodDef proxyMethod, int encryptOps, int salt, int encryptedIndex, int index)
{
this.proxyMethod = proxyMethod;
this.encryptOps = encryptOps;
this.salt = salt;
this.encryptedIndex = encryptedIndex;
this.index = index;
}
}
class ModuleDispatchProxyAllocator : GroupByModuleEntityBase
{
private bool _done;
private CallObfuscationSettingsFacade _settings;
class MethodProxyInfo
{
public MethodDef proxyMethod;
public int index;
public int encryptedOps;
public int salt;
public int encryptedIndex;
}
private readonly Dictionary<MethodKey, MethodProxyInfo> _methodProxys = new Dictionary<MethodKey, MethodProxyInfo>();
class CallInfo
{
public string id;
public IMethod method;
public bool callVir;
}
class DispatchMethodInfo
{
public MethodDef methodDef;
public List<CallInfo> methods = new List<CallInfo>();
}
private readonly Dictionary<MethodSig, List<DispatchMethodInfo>> _dispatchMethods = new Dictionary<MethodSig, List<DispatchMethodInfo>>(SignatureEqualityComparer.Instance);
private TypeDef _proxyTypeDef;
public ModuleDispatchProxyAllocator()
{
}
public override void Init()
{
_settings = CallObfusPass.CurrentSettings;
}
private TypeDef CreateProxyTypeDef()
{
ModuleDef mod = Module;
using (var scope = new DisableTypeDefFindCacheScope(mod))
{
var typeDef = new TypeDefUser($"{ConstValues.ObfuzInternalSymbolNamePrefix}ProxyCall", mod.CorLibTypes.Object.ToTypeDefOrRef());
typeDef.Attributes = TypeAttributes.NotPublic | TypeAttributes.Sealed;
mod.Types.Add(typeDef);
return typeDef;
}
}
private readonly HashSet<string> _uniqueMethodNames = new HashSet<string>();
private string ToUniqueMethodName(string originalName)
{
if (_uniqueMethodNames.Add(originalName))
{
return originalName;
}
for (int index = 1; ; index++)
{
string uniqueName = $"{originalName}${index}";
if (_uniqueMethodNames.Add(uniqueName))
{
return uniqueName;
}
}
}
private string CreateDispatchMethodName(MethodSig methodSig, int index)
{
// use a stable name for the dispatch method, so that we can reuse it across different modules
// this is important for cross-module calls
return ToUniqueMethodName($"{ConstValues.ObfuzInternalSymbolNamePrefix}Dispatch_{HashUtil.ComputeHash(methodSig.Params) & 0xFFFF}_{HashUtil.ComputeHash(methodSig.RetType) & 0xFFFFFF}");
}
private MethodDef CreateDispatchMethodInfo(MethodSig methodSig, int index)
{
if (_proxyTypeDef == null)
{
_proxyTypeDef = CreateProxyTypeDef();
}
MethodDef methodDef = new MethodDefUser(CreateDispatchMethodName(methodSig, index), methodSig,
MethodImplAttributes.IL | MethodImplAttributes.Managed,
MethodAttributes.Static | MethodAttributes.Public);
methodDef.DeclaringType = _proxyTypeDef;
return methodDef;
}
private MethodSig CreateDispatchMethodSig(IMethod method)
{
ModuleDef mod = Module;
MethodSig methodSig = MetaUtil.ToSharedMethodSig(mod.CorLibTypes, MetaUtil.GetInflatedMethodSig(method, null));
//MethodSig methodSig = MetaUtil.GetInflatedMethodSig(method).Clone();
//methodSig.Params
switch (MetaUtil.GetThisArgType(method))
{
case ThisArgType.Class:
{
methodSig.Params.Insert(0, mod.CorLibTypes.Object);
break;
}
case ThisArgType.ValueType:
{
methodSig.Params.Insert(0, mod.CorLibTypes.IntPtr);
break;
}
}
// extra param for index
methodSig.Params.Add(mod.CorLibTypes.Int32);
return MethodSig.CreateStatic(methodSig.RetType, methodSig.Params.ToArray());
}
private int GenerateSalt(IRandom random)
{
return random.NextInt();
}
private int GenerateEncryptOps(IRandom random)
{
return EncryptionUtil.GenerateEncryptionOpCodes(random, EncryptionScope.encryptor, _settings.obfuscationLevel);
}
private DispatchMethodInfo GetDispatchMethod(IMethod method)
{
MethodSig methodSig = CreateDispatchMethodSig(method);
if (!_dispatchMethods.TryGetValue(methodSig, out var dispatchMethods))
{
dispatchMethods = new List<DispatchMethodInfo>();
_dispatchMethods.Add(methodSig, dispatchMethods);
}
if (dispatchMethods.Count == 0 || dispatchMethods.Last().methods.Count >= _settings.maxProxyMethodCountPerDispatchMethod)
{
var newDispatchMethodInfo = new DispatchMethodInfo
{
methodDef = CreateDispatchMethodInfo(methodSig, dispatchMethods.Count),
};
dispatchMethods.Add(newDispatchMethodInfo);
}
return dispatchMethods.Last();
}
private IRandom CreateRandomForMethod(IMethod method, bool callVir)
{
int seed = MethodEqualityComparer.CompareDeclaringTypes.GetHashCode(method);
return EncryptionScope.localRandomCreator(seed);
}
public ProxyCallMethodData Allocate(IMethod method, bool callVir)
{
if (_done)
{
throw new Exception("can't Allocate after done");
}
var key = new MethodKey(method, callVir);
if (!_methodProxys.TryGetValue(key, out var proxyInfo))
{
var methodDispatcher = GetDispatchMethod(method);
int index = methodDispatcher.methods.Count;
IRandom localRandom = CreateRandomForMethod(method, callVir);
int encryptOps = GenerateEncryptOps(localRandom);
int salt = GenerateSalt(localRandom);
int encryptedIndex = EncryptionScope.encryptor.Encrypt(index, encryptOps, salt);
proxyInfo = new MethodProxyInfo()
{
proxyMethod = methodDispatcher.methodDef,
index = index,
encryptedOps = encryptOps,
salt = salt,
encryptedIndex = encryptedIndex,
};
methodDispatcher.methods.Add(new CallInfo { id = $"{method}{(callVir ? "" : "v")}", method = method, callVir = callVir });
_methodProxys.Add(key, proxyInfo);
}
return new ProxyCallMethodData(proxyInfo.proxyMethod, proxyInfo.encryptedOps, proxyInfo.salt, proxyInfo.encryptedIndex, proxyInfo.index);
}
public override void Done()
{
if (_done)
{
throw new Exception("Already done");
}
_done = true;
if (_proxyTypeDef == null)
{
return;
}
// for stable order, we sort methods by name
var methodWithNamePairList = _proxyTypeDef.Methods.Select(m => (m, m.ToString())).ToList();
methodWithNamePairList.Sort((a, b) => a.Item2.CompareTo(b.Item2));
_proxyTypeDef.Methods.Clear();
foreach (var methodPair in methodWithNamePairList)
{
methodPair.Item1.DeclaringType = _proxyTypeDef;
}
foreach (DispatchMethodInfo dispatchMethod in _dispatchMethods.Values.SelectMany(ms => ms))
{
var methodDef = dispatchMethod.methodDef;
var methodSig = methodDef.MethodSig;
var body = new CilBody();
methodDef.Body = body;
var ins = body.Instructions;
foreach (Parameter param in methodDef.Parameters)
{
ins.Add(Instruction.Create(OpCodes.Ldarg, param));
}
var switchCases = new List<Instruction>();
var switchInst = Instruction.Create(OpCodes.Switch, switchCases);
ins.Add(switchInst);
var ret = Instruction.Create(OpCodes.Ret);
// sort methods by signature to ensure stable order
//dispatchMethod.methods.Sort((a, b) => a.id.CompareTo(b.id));
foreach (CallInfo ci in dispatchMethod.methods)
{
var callTargetMethod = Instruction.Create(ci.callVir ? OpCodes.Callvirt : OpCodes.Call, ci.method);
switchCases.Add(callTargetMethod);
ins.Add(callTargetMethod);
ins.Add(Instruction.Create(OpCodes.Br, ret));
}
ins.Add(ret);
}
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 16b960455f093854d927c2dbd47a4826
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

Some files were not shown because too many files have changed in this diff Show More