@@ -2443,16 +2443,70 @@ public static Class<?> loadMeManagerClass(ClassLoader classLoader) throws Except
24432443 });
24442444 }
24452445
2446- public synchronized static Class <?> loadVerifyKeyClass (ClassLoader classLoader ) throws Exception {
2446+ public static Class <?> loadVerifyKeyClass (ClassLoader classLoader ) throws Exception {
24472447 return UnobfuscatorCache .getInstance ().getClass (classLoader , () -> {
2448- var classList = dexkit .findClass (FindClass .create ().matcher (ClassMatcher .create ().addMethod (
2449- MethodMatcher .create ().addUsingNumber (2966 ).paramCount (1 ).addParamType (int .class )))).singleOrNull ();
2448+ var methodMatcher = MethodMatcher .create ().addUsingNumber (2966 ).paramCount (1 ).addParamType (int .class );
2449+ var result = dexkit .findMethod (FindMethod .create ().matcher (methodMatcher ));
2450+ if (result .isEmpty ())
2451+ throw new RuntimeException ("VerifyKey class not found" );
2452+ var classList = result .get (0 ).getDeclaredClass ();
24502453 if (classList == null )
24512454 throw new ClassNotFoundException ("VerifyKey class not found" );
24522455 return classList .getInstance (classLoader );
24532456 });
24542457 }
24552458
2459+ public static Constructor <?> loadVerifyKeyRunnableConstructor (ClassLoader classLoader ) throws Exception {
2460+ return UnobfuscatorCache .getInstance ().getConstructor (classLoader , () -> {
2461+ var data = dexkit .findMethod (
2462+ FindMethod .create ().matcher (MethodMatcher .create ()
2463+ .usingStrings ("deviceidentityverifier/verify Primary" )
2464+ )
2465+ ).singleOrNull ();
2466+ var clazz = data .getDeclaredClass ().getInstance (classLoader );
2467+ return ReflectionUtils .findConstructorUsingFilter (clazz , c -> c .getParameterCount () == 2 );
2468+ });
2469+ }
2470+
2471+ public static Number loadVerifyKeyInt (ClassLoader classLoader ) throws Exception {
2472+ return UnobfuscatorCache .getInstance ().getNumber (classLoader , () -> {
2473+ var method = loadVerifyKeyItemConstructor (classLoader );
2474+ var callers = dexkit .getMethodData (method ).getCallers ();
2475+ var resultMethod = callers .stream ().filter (i -> i .isMethod () && i .getDeclaredClassName ().contains ("IdentityVerificationActivity" )).findFirst ().orElse (null );
2476+ var usingNumbers = resultMethod .getUsingNumbers ();
2477+ var findMagicNumber = false ;
2478+ for (var i = 0 ; i < usingNumbers .size (); i ++) {
2479+ var n = usingNumbers .get (i );
2480+ if (n .intValue () == 2966 ) {
2481+ findMagicNumber = true ;
2482+ } else if (findMagicNumber ) {
2483+ return n ;
2484+ }
2485+ }
2486+ throw new RuntimeException ("VerifyKey int not found" );
2487+ });
2488+ }
2489+
2490+ public static Constructor <?> loadVerifyKeyItemConstructor (ClassLoader classLoader ) throws Exception {
2491+ return UnobfuscatorCache .getInstance ().getConstructor (classLoader , () -> {
2492+ var clazz = dexkit .findClass (FindClass .create ().matcher (ClassMatcher .create ().className ("IdentityVerificationActivity" , StringMatchType .EndsWith ))).singleOrNull ();
2493+ var methodResult = dexkit .findMethod (
2494+ FindMethod .create ().matcher (MethodMatcher .create ()
2495+ .addUsingNumber (2966 )
2496+ ).searchInClass (List .of (clazz ))
2497+ ).singleOrNull ();
2498+ var invokes = methodResult .getInvokes ();
2499+ for (var invoke : invokes ) {
2500+ if (!invoke .isConstructor ()) continue ;
2501+ var paramTypes = invoke .getParamTypes ();
2502+ if (paramTypes .size () != 2 ) continue ;
2503+ if (!paramTypes .get (1 ).getSimpleName ().equals ("List" )) continue ;
2504+ return invoke .getConstructorInstance (classLoader );
2505+ }
2506+ throw new RuntimeException ("VerifyKey constructor not found" );
2507+ });
2508+ }
2509+
24562510 public synchronized static Method loadMySearchBarMethod (ClassLoader classLoader ) throws Exception {
24572511 return UnobfuscatorCache .getInstance ().getMethod (classLoader , () -> {
24582512 Method method = findFirstMethodUsingStrings (classLoader , StringMatchType .EndsWith ,
@@ -2729,4 +2783,12 @@ public static Class loadProcessImageQualityClass(ClassLoader classLoader) throws
27292783 return classDataList .get (0 ).getInstance (classLoader );
27302784 });
27312785 }
2786+
2787+ public static Class <?> loadGetProfilePhoto (ClassLoader classLoader ) throws Exception {
2788+ return UnobfuscatorCache .getInstance ().getClass (classLoader , () -> findFirstClassUsingStrings (classLoader , StringMatchType .Contains , "ProfilePhotoManager/sendGetProfilePhoto" ));
2789+ }
2790+
2791+ public static Class <?> loadDialerProfilePictureLoader (ClassLoader classLoader ) throws Exception {
2792+ return UnobfuscatorCache .getInstance ().getClass (classLoader , () -> findFirstClassUsingStrings (classLoader , StringMatchType .Contains , "DialerProfilePictureLoader/syncFetchProfilePhoto/onPhotoReceived" ));
2793+ }
27322794}
0 commit comments