Merge branch 'dalvik-patches' into microg-dalvik-patch

This commit is contained in:
oSumAtrIX 2022-04-21 19:44:55 +02:00
commit 14a668ae91
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -11,7 +11,6 @@ import app.revanced.patcher.signature.PatternScanMethod
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.instruction.formats.Instruction11x
import org.jf.dexlib2.iface.instruction.formats.Instruction35c
private val packageMetadata = listOf(
@ -38,7 +37,7 @@ class HomeAdsPatch : Patch(
MethodSignatureMetadata(
"home-ads-method-1",
MethodMetadata(
"Ljco;",
"Ljke;",
"k",
),
PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value.
@ -88,7 +87,7 @@ class HomeAdsPatch : Patch(
MethodSignatureMetadata(
"home-ads-method-2",
MethodMetadata(
"Ljlv;",
"Ljsi;",
"<init>",
),
PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value.
@ -160,7 +159,7 @@ class HomeAdsPatch : Patch(
MethodSignatureMetadata(
"home-ads-method-3",
MethodMetadata(
"Ljkt;",
"Ljrh;",
"<init>",
),
PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value.
@ -187,10 +186,44 @@ class HomeAdsPatch : Patch(
"[B",
"[B",
"[B",
"[B",
"[B"
),
listOf(
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.MOVE_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
Opcode.IPUT_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
@ -225,13 +258,61 @@ class HomeAdsPatch : Patch(
Opcode.IPUT_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.NEW_INSTANCE,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT,
Opcode.NEW_INSTANCE,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.NEW_INSTANCE,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.CONST_16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.CONST_4,
Opcode.INVOKE_DIRECT,
Opcode.NEW_INSTANCE,
Opcode.MOVE_OBJECT_FROM16,
Opcode.CONST_16,
Opcode.INVOKE_DIRECT,
Opcode.NEW_INSTANCE,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_DIRECT,
Opcode.CONST_4,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.CONST_16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_DIRECT_RANGE,
Opcode.MOVE_OBJECT_FROM16
)
),
MethodSignature(
MethodSignatureMetadata(
"home-ads-method-4",
MethodMetadata(
"Ljkx;",
"Ljrk;",
"<init>",
),
PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value.
@ -281,7 +362,7 @@ class HomeAdsPatch : Patch(
MethodSignatureMetadata(
"home-ads-method-5",
MethodMetadata(
"Ljla;",
"Ljrn;",
"<init>",
),
PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value.
@ -334,7 +415,7 @@ class HomeAdsPatch : Patch(
MethodSignatureMetadata(
"home-ads-method-6",
MethodMetadata(
"Ljld;",
"Ljrq;",
"<init>",
),
PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value.
@ -361,7 +442,6 @@ class HomeAdsPatch : Patch(
"[B",
"[B",
"[B",
"[B",
"[B"
),
listOf(
@ -403,7 +483,7 @@ class HomeAdsPatch : Patch(
MethodSignatureMetadata(
"home-ads-method-7",
MethodMetadata(
"Ljle;",
"Ljrr;",
"<init>",
),
PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value.
@ -462,7 +542,7 @@ class HomeAdsPatch : Patch(
MethodSignatureMetadata(
"home-ads-method-8",
MethodMetadata(
"Ljlh;",
"Ljrt;",
"<init>",
),
PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value.
@ -489,7 +569,6 @@ class HomeAdsPatch : Patch(
"[B",
"[B",
"[B",
"[B",
"[B"
),
listOf(
@ -526,7 +605,7 @@ class HomeAdsPatch : Patch(
MethodSignatureMetadata(
"home-ads-method-9",
MethodMetadata(
"Ljli;",
"Ljru;",
"<init>",
),
PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value.
@ -554,7 +633,6 @@ class HomeAdsPatch : Patch(
"[B",
"[B",
"[B",
"[B",
"[B"
),
listOf(
@ -588,7 +666,7 @@ class HomeAdsPatch : Patch(
MethodSignatureMetadata(
"home-ads-method-10",
MethodMetadata(
"Ljlj;",
"Ljrv;",
"<init>",
),
PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value.
@ -615,7 +693,6 @@ class HomeAdsPatch : Patch(
"[B",
"[B",
"[B",
"[B",
"[B"
),
listOf(
@ -661,7 +738,7 @@ class HomeAdsPatch : Patch(
Opcode.NEW_INSTANCE,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.CONST_4,
Opcode.CONST_16,
Opcode.INVOKE_DIRECT,
Opcode.NEW_INSTANCE,
Opcode.MOVE_OBJECT_FROM16,
@ -671,8 +748,8 @@ class HomeAdsPatch : Patch(
MethodSignatureMetadata(
"home-ads-method-11",
MethodMetadata(
"Ljiw;",
"lG",
"Ljpm;",
"lX",
),
PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value.
packageMetadata,
@ -731,7 +808,7 @@ class HomeAdsPatch : Patch(
MethodSignatureMetadata(
"home-ads-method-12",
MethodMetadata(
"Ljjb;",
"Ljpr;",
"b",
),
PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value.
@ -799,7 +876,7 @@ class HomeAdsPatch : Patch(
MethodSignatureMetadata(
"home-ads-method-13",
MethodMetadata(
"Ljjv;",
"Ljqk;",
"<init>",
),
PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value.
@ -809,7 +886,15 @@ class HomeAdsPatch : Patch(
),
"V",
AccessFlags.PROTECTED or AccessFlags.CONSTRUCTOR,
listOf("L", "L", "L", "L", "Z", "L", "[B"),
listOf(
"L",
"L",
"L",
"L",
"L",
"[B",
"[B"
),
listOf(
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
@ -834,7 +919,7 @@ class HomeAdsPatch : Patch(
MethodSignatureMetadata(
"home-ads-method-14",
MethodMetadata(
"Ljjk;",
"Ljqa;",
"b",
),
PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value.
@ -898,7 +983,7 @@ class HomeAdsPatch : Patch(
MethodSignatureMetadata(
"home-ads-method-15",
MethodMetadata(
"Ljkl;",
"Ljra;",
"<init>",
),
PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value.
@ -910,6 +995,39 @@ class HomeAdsPatch : Patch(
AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
listOf("L", "I"),
listOf(
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.MOVE_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.MOVE_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.MOVE_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.MOVE_OBJECT,
Opcode.CHECK_CAST,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
@ -1002,7 +1120,7 @@ class HomeAdsPatch : Patch(
Opcode.NEW_INSTANCE,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.CONST_16,
Opcode.CONST_4,
Opcode.MOVE_OBJECT_FROM16,
Opcode.CONST_4,
Opcode.INVOKE_DIRECT,
@ -1013,10 +1131,6 @@ class HomeAdsPatch : Patch(
Opcode.NEW_INSTANCE,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_DIRECT,
Opcode.IGET_BOOLEAN,
Opcode.MOVE_FROM16,
Opcode.CONST_16,
Opcode.CONST_16,
Opcode.CONST_16,
Opcode.INVOKE_DIRECT_RANGE,
Opcode.MOVE_OBJECT_FROM16,
@ -1026,25 +1140,74 @@ class HomeAdsPatch : Patch(
Opcode.IGET_OBJECT,
Opcode.IGET_OBJECT,
Opcode.IGET_OBJECT,
Opcode.IGET_BOOLEAN,
Opcode.IGET_OBJECT,
Opcode.IGET_OBJECT,
Opcode.CONST_4,
Opcode.CONST_4,
Opcode.CONST_16,
Opcode.CONST_16,
Opcode.CONST_16,
Opcode.CONST_16,
Opcode.MOVE_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT,
Opcode.MOVE_OBJECT,
Opcode.INVOKE_DIRECT_RANGE,
Opcode.IPUT_OBJECT,
Opcode.NEW_INSTANCE,
Opcode.CONST,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
Opcode.NEW_INSTANCE,
Opcode.CONST_4,
Opcode.INVOKE_DIRECT,
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT,
Opcode.NEW_INSTANCE,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.CONST_4,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.RETURN_VOID
)
),
MethodSignature(
MethodSignatureMetadata(
"home-ads-method-16",
MethodMetadata(
"Ljkp;",
"Ljrd;",
"<init>",
),
PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value.
@ -1054,8 +1217,62 @@ class HomeAdsPatch : Patch(
),
"V",
AccessFlags.PROTECTED or AccessFlags.CONSTRUCTOR,
listOf("L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "Z", "L", "L", "[B", "[B", "[B", "[B", "[B"),
listOf(
"L",
"L",
"L",
"L",
"L",
"L",
"L",
"L",
"L",
"L",
"L",
"L",
"L",
"[B",
"[B",
"[B",
"[B"
),
listOf(
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.MOVE_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.MOVE_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
Opcode.IPUT_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
Opcode.IPUT_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
@ -1121,13 +1338,10 @@ class HomeAdsPatch : Patch(
Opcode.MOVE_OBJECT_FROM16,
Opcode.CONST_4,
Opcode.INVOKE_DIRECT,
Opcode.CONST_16,
Opcode.CONST_16,
Opcode.CONST_16,
Opcode.CONST_4,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_DIRECT_RANGE,
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT,
Opcode.NEW_INSTANCE,
Opcode.MOVE_OBJECT_FROM16,
@ -1145,7 +1359,7 @@ class HomeAdsPatch : Patch(
Opcode.NEW_INSTANCE,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.CONST_16,
Opcode.CONST_4,
Opcode.INVOKE_DIRECT,
Opcode.NEW_INSTANCE,
Opcode.MOVE_OBJECT_FROM16,
@ -1155,8 +1369,8 @@ class HomeAdsPatch : Patch(
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_DIRECT,
Opcode.CONST_16,
Opcode.CONST_16,
Opcode.CONST_16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
@ -1171,15 +1385,81 @@ class HomeAdsPatch : Patch(
Opcode.CONST_16,
Opcode.CONST_16,
Opcode.CONST_16,
Opcode.MOVE_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_DIRECT_RANGE,
Opcode.IPUT_OBJECT,
Opcode.NEW_INSTANCE,
Opcode.CONST_4,
Opcode.CONST_4,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_DIRECT_RANGE,
Opcode.IPUT_OBJECT,
Opcode.NEW_INSTANCE,
Opcode.CONST,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
Opcode.NEW_INSTANCE,
Opcode.CONST_4,
Opcode.INVOKE_DIRECT,
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT,
Opcode.NEW_INSTANCE,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.RETURN_VOID
)
),
MethodSignature(
MethodSignatureMetadata(
"home-ads-method-17",
MethodMetadata(
"Ljkq;",
"Ljre;",
"<init>",
),
PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value.
@ -1189,7 +1469,26 @@ class HomeAdsPatch : Patch(
),
"V",
AccessFlags.PROTECTED or AccessFlags.CONSTRUCTOR,
listOf("L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "[B", "[B", "[B", "[B", "[B"),
listOf(
"L",
"L",
"L",
"L",
"L",
"L",
"L",
"L",
"L",
"L",
"L",
"L",
"L",
"L",
"[B",
"[B",
"[B",
"[B"
),
listOf(
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
@ -1197,6 +1496,53 @@ class HomeAdsPatch : Patch(
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.MOVE_OBJECT,
Opcode.CHECK_CAST,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.MOVE_OBJECT,
Opcode.CHECK_CAST,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.MOVE_OBJECT,
Opcode.CHECK_CAST,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.MOVE_OBJECT,
Opcode.CHECK_CAST,
Opcode.IPUT_OBJECT,
@ -1211,6 +1557,130 @@ class HomeAdsPatch : Patch(
Opcode.MOVE_RESULT_OBJECT,
Opcode.MOVE_OBJECT,
Opcode.CHECK_CAST,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.NEW_INSTANCE,
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.NEW_INSTANCE,
Opcode.IF_NEZ,
Opcode.MOVE_OBJECT_FROM16,
Opcode.GOTO,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.NEW_INSTANCE,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.CONST_4,
Opcode.INVOKE_DIRECT,
Opcode.NEW_INSTANCE,
Opcode.MOVE_OBJECT_FROM16,
Opcode.CONST_16,
Opcode.INVOKE_DIRECT,
Opcode.NEW_INSTANCE,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_DIRECT,
Opcode.CONST_16,
Opcode.CONST_16,
Opcode.CONST_16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_DIRECT_RANGE,
Opcode.IPUT_OBJECT,
Opcode.NEW_INSTANCE,
Opcode.CONST_4,
Opcode.CONST_4,
Opcode.CONST_4,
Opcode.CONST_16,
Opcode.MOVE_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT,
Opcode.MOVE_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_DIRECT_RANGE,
Opcode.IPUT_OBJECT,
Opcode.NEW_INSTANCE,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
Opcode.NEW_INSTANCE,
Opcode.CONST_16,
Opcode.INVOKE_DIRECT,
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT,
Opcode.NEW_INSTANCE,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.SGET_OBJECT,
Opcode.MOVE_OBJECT_FROM16,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_OBJECT_FROM16,
Opcode.IF_EQZ,
Opcode.SGET_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.RETURN_VOID
)
)
)
@ -1222,13 +1692,9 @@ class HomeAdsPatch : Patch(
val implementation = result.method.implementation!!
val index = result.scanData.startIndex
val instructions = implementation.instructions
val register =
if (i < 2)
(instructions[index - 1] as Instruction11x).registerA
else
(instructions[index] as Instruction35c).registerC
implementation.injectHideCall(index, register)
val register = (instructions[index + (if (i < 2) -1 else 1)] as Instruction11x).registerA
implementation.injectHideCall(index + 2, register)
}
return PatchResultSuccess()