void initializeSwizzlers() { __int64 i_instanceMethodPairs; // x21 InstanceMethodPair *instanceMethodPair; // x19 Class cls; // x0 objc_class *cls_1; // x26 const char *sel; // x0 objc_method *meth_1; // x0 IMP *prevMethRef; // x25 __int64 i_classMethodPairs; // x21 ClassMethodPair *classMethodPair; // x19 Class Class; // x0 objc_class *cls_3; // x26 const char *sel_1; // x0 objc_method *ClassMethod; // x0 IMP *prevMethRef_1; // x25 __int64 i_appleInternalInstanceMethodPairs; // x21 AppleInternalInstanceMethodPair *appleInternalInstanceMethodPair; // x19 Class cls_2; // x0 objc_class *cls_4; // x26 const char *sel_2; // x0 objc_method *meth; // x0 IMP *prevMethRef_2; // x25 __int64 vars8; // [xsp+68h] [xbp+8h] i_instanceMethodPairs = 0; instanceMethodPair = &swizzled_class_instance_method_pairs; do { if ( (envDisableConformanceChecks != 1 || strncmp(instanceMethodPair->className, "NSObject", 8u) || strncmp(instanceMethodPair->selectorName, "conformsToProtocol:", 0x13u)) && (envDisableAVCaptureChecks != 1 || strncmp(instanceMethodPair->className, "AVCapture", 9u)) && (envEnableIOOnMainThread == 1 && envEnableAGPCChecks != 1 || strncmp(instanceMethodPair->className, "NSData", 6u)) ) { cls = objc_getClass(instanceMethodPair->className); if ( cls ) { cls_1 = cls; sel = sel_registerName(instanceMethodPair->selectorName); meth_1 = class_getInstanceMethod(cls_1, sel); prevMethRef = previousClassInstanceMethodImplementations[i_instanceMethodPairs]; *prevMethRef = method_setImplementation(meth_1, newClassInstanceMethodImplementations[i_instanceMethodPairs]); } else if ( envRPACDebug == 1 ) { fprintf( __stderrp, "Unable to swizzle selector %s of class %s \n", instanceMethodPair->selectorName, instanceMethodPair->className); } } ++i_instanceMethodPairs; ++instanceMethodPair; } while ( i_instanceMethodPairs != 8 ); i_classMethodPairs = 0; classMethodPair = &swizzled_class_class_method_pairs; do { if ( (envDisableConformanceChecks != 1 || strncmp(classMethodPair->className, "NSObject", 8u) || strncmp(classMethodPair->selectorName, "conformsToProtocol:", 0x13u)) && (envDisableAVCaptureChecks != 1 || strncmp(classMethodPair->className, "AVCapture", 9u)) && (envEnableIOOnMainThread == 1 && envEnableAGPCChecks != 1 || strncmp(classMethodPair->className, "NSData", 6u)) ) { Class = objc_getClass(classMethodPair->className); if ( Class ) { cls_3 = Class; sel_1 = sel_registerName(classMethodPair->selectorName); ClassMethod = class_getClassMethod(cls_3, sel_1); prevMethRef_1 = previousClassClassMethodImplementations[i_classMethodPairs]; *prevMethRef_1 = method_setImplementation(ClassMethod, newClassClassMethodImplementations[i_classMethodPairs]); } else if ( envRPACDebug == 1 ) { fprintf( __stderrp, "Unable to swizzle selector %s of class %s \n", classMethodPair->selectorName, classMethodPair->className); } } ++i_classMethodPairs; ++classMethodPair; } while ( i_classMethodPairs != 4 ); if ( (unsigned int)isAppleInternal() ) { i_appleInternalInstanceMethodPairs = 0; appleInternalInstanceMethodPair = &appleinternal_swizzled_class_instance_method_pairs; do { if ( (envDisableConformanceChecks != 1 || strncmp(appleInternalInstanceMethodPair->className, "NSObject", 8u) || strncmp(appleInternalInstanceMethodPair->selectorName, "conformsToProtocol:", 0x13u)) && (envDisableAVCaptureChecks != 1 || strncmp(appleInternalInstanceMethodPair->className, "AVCapture", 9u)) && (envEnableIOOnMainThread == 1 && envEnableAGPCChecks != 1 || strncmp(appleInternalInstanceMethodPair->className, "NSData", 6u)) ) { cls_2 = objc_getClass(appleInternalInstanceMethodPair->className); if ( cls_2 ) { cls_4 = cls_2; sel_2 = sel_registerName(appleInternalInstanceMethodPair->selectorName); meth = class_getInstanceMethod(cls_4, sel_2); prevMethRef_2 = previousAppleInternalClassInstanceMethodImplementations[i_appleInternalInstanceMethodPairs]; *prevMethRef_2 = method_setImplementation( meth, newAppleInternalClassInstanceMethodImplementations[i_appleInternalInstanceMethodPairs]); } else if ( envRPACDebug == 1 ) { fprintf( __stderrp, "Unable to swizzle selector %s of class %s \n", appleInternalInstanceMethodPair->selectorName, appleInternalInstanceMethodPair->className); } } ++i_appleInternalInstanceMethodPairs; ++appleInternalInstanceMethodPair; } while ( i_appleInternalInstanceMethodPairs != 3 ); } if ( ((vars8 ^ (2 * vars8)) & 0x4000000000000000LL) != 0 ) __break(0xC471u); initializeNSConditionSwizzling(); }