@@ -74,6 +74,7 @@ static void Main()
7474 string overwolfCoreCUPath = "" ;
7575 string overwolfSubscriptionsPath = "" ;
7676 string overwolfExtensionsDllPath = "" ; // Overwolf.Extensions.dll
77+ string overwolfBDDllPath = "" ; // Overwolf.Extensions.dll
7778
7879 bool isElevated ;
7980 using ( WindowsIdentity identity = WindowsIdentity . GetCurrent ( ) )
@@ -135,6 +136,11 @@ static void Main()
135136 {
136137 overwolfSubscriptionsPath = dir + "\\ Overwolf.Subscriptions.dll" ;
137138 Console . WriteLine ( "Overwolf.Subscriptions.dll found!" ) ;
139+ }
140+ if ( File . Exists ( dir + "\\ OverWolf.Client.BL.dll" ) )
141+ {
142+ overwolfBDDllPath = dir + "\\ OverWolf.Client.BL.dll" ;
143+ Console . WriteLine ( "OverWolf.Client.BL.dll found!" ) ;
138144 }
139145 }
140146 //Console.Write("Enter \"Overwolf.Client.Core.dll\" path");
@@ -264,6 +270,40 @@ static void Main()
264270 Console . WriteLine ( "||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||" ) ;
265271 }
266272
273+ if ( File . Exists ( overwolfBDDllPath ) )
274+ {
275+ var resolver = new DefaultAssemblyResolver ( ) ;
276+ resolver . AddSearchDirectory ( Path . GetDirectoryName ( overwolfBDDllPath ) ) ;
277+ ReaderParameters reader = new ReaderParameters { AssemblyResolver = resolver , ReadWrite = true , ReadingMode = ReadingMode . Immediate , InMemory = true } ;
278+ AssemblyDefinition overwolfSubscriptions = AssemblyDefinition . ReadAssembly ( overwolfBDDllPath , reader ) ;
279+ TypeDefinition overwolfSubscriptionsModel = overwolfSubscriptions . MainModule . GetType ( "OverWolf.Client.BL.ODKv2.Managers.DataManager.ExtensionDataManager" ) ;
280+
281+ foreach ( var m in overwolfSubscriptionsModel . Methods )
282+ {
283+ if ( m . Name == "BlockUnauthorizedExtension" )
284+ {
285+ m . Body . Instructions . Clear ( ) ;
286+
287+ m . Body . Instructions . Add ( Instruction . Create ( OpCodes . Ldc_I4_0 ) ) ;
288+ m . Body . Instructions . Add ( Instruction . Create ( OpCodes . Ret ) ) ;
289+
290+ }
291+
292+ if ( m . Name == "ValidateExtensionIntallation" )
293+ {
294+ Console . WriteLine ( "ValidateExtensionIntallation patched auch" ) ;
295+ m . Body . Instructions . Clear ( ) ;
296+
297+ m . Body . Instructions . Add ( Instruction . Create ( OpCodes . Ldc_I4_1 ) ) ;
298+ m . Body . Instructions . Add ( Instruction . Create ( OpCodes . Ret ) ) ;
299+
300+
301+ }
302+ }
303+
304+ overwolfSubscriptions . Write ( overwolfBDDllPath ) ;
305+ }
306+
267307 if ( File . Exists ( overwolfSubscriptionsPath ) )
268308 {
269309 bool successful = true ;
0 commit comments