Untitled diff

Created Diff never expires
34 removals
40 lines
112 additions
106 lines
/* @class OSSystemExtensionPointListener */
/* @class OSSystemExtensionPointListener */
-(char)listener:(void *)arg2 shouldAcceptNewConnection:(void *)arg3 {
-(char)listener:(void *)arg2 shouldAcceptNewConnection:(void *)arg3 {
var_38 = [arg2 retain];
r12 = self;
r14 = [arg3 retain];
r13 = [arg2 retain];
os_unfair_lock_lock(self + 0x8);
rax = [arg3 retain];
rax = [self currentConnection];
if (rax != 0x0) {
rax = [rax retain];
r15 = rax;
[rax invalidate];
rax = [rax valueForEntitlement:@"com.apple.private.security.storage.SystemExtensionManagement"];
[rax release];
rax = [rax retain];
[self setCurrentConnection:r14];
var_40 = rax;
os_unfair_lock_unlock(self + 0x8);
if (*(int8_t *)__systemextensions_framework_testing_active != 0x0) {
objc_initWeak(&var_30, r14);
os_unfair_lock_lock(r12 + 0x8);
*(&var_40 - 0x28) = *__NSConcreteStackBlock;
rax = [r12 currentConnection];
*(&var_40 - 0x20) = 0xffffffffc2000000;
rax = [rax retain];
*(&var_40 - 0x18) = ___69-[OSSystemExtensionPointListener listener:shouldAcceptNewConnection:]_block_invoke;
[rax invalidate];
*(&var_40 - 0x10) = ___block_descriptor_48_e8_32s40w_e5_v8?0l;
[rax release];
*(&var_40 - 0x8) = self;
[r12 setCurrentConnection:r15];
objc_copyWeak(&var_40, &var_30);
os_unfair_lock_unlock(r12 + 0x8);
[r14 setInvalidationHandler:&var_68];
objc_initWeak(&var_30, r15);
*(&var_70 - 0x28) = *__NSConcreteStackBlock;
*(&var_48 - 0x28) = *__NSConcreteStackBlock;
*(&var_70 - 0x20) = 0xffffffffc2000000;
*(&var_48 - 0x20) = 0xffffffffc2000000;
*(&var_70 - 0x18) = ___69-[OSSystemExtensionPointListener listener:shouldAcceptNewConnection:]_block_invoke.396;
*(&var_48 - 0x18) = ___69-[OSSystemExtensionPointListener listener:shouldAcceptNewConnection:]_block_invoke;
*(&var_70 - 0x10) = ___block_descriptor_48_e8_32s40w_e5_v8?0l;
*(&var_48 - 0x10) = ___block_descriptor_48_e8_32s40w_e5_v8?0l;
*(&var_70 - 0x8) = self;
*(&var_48 - 0x8) = r12;
objc_copyWeak(&var_70, &var_30);
objc_copyWeak(&var_48, &var_30);
[r14 setInterruptionHandler:&var_98];
[r15 setInvalidationHandler:&var_70];
rax = [NSXPCInterface interfaceWithProtocol:@protocol(_OSSystemExtensionPointInterface)];
*(&var_78 - 0x28) = *__NSConcreteStackBlock;
rax = [rax retain];
*(&var_78 - 0x20) = 0xffffffffc2000000;
[r14 setExportedInterface:rax];
*(&var_78 - 0x18) = ___69-[OSSystemExtensionPointListener listener:shouldAcceptNewConnection:]_block_invoke.407;
[rax release];
*(&var_78 - 0x10) = ___block_descriptor_48_e8_32s40w_e5_v8?0l;
[r14 setExportedObject:self];
*(&var_78 - 0x8) = r12;
[r14 resume];
objc_copyWeak(&var_78, &var_30);
objc_destroyWeak(&var_70);
[r15 setInterruptionHandler:&var_A0];
objc_destroyWeak(&var_40);
rax = [NSXPCInterface interfaceWithProtocol:@protocol(_OSSystemExtensionPointInterface)];
objc_destroyWeak(&var_30);
rax = [rax retain];
[r14 release];
[r15 setExportedInterface:rax];
[var_38 release];
[rax release];
return 0x1;
[r15 setExportedObject:r12];
[r15 resume];
objc_destroyWeak(&var_78);
objc_destroyWeak(&var_48);
objc_destroyWeak(&var_30);
r14 = 0x1;
r13 = r13;
}
else {
rbx = rax;
if (rax != 0x0 && [rbx isKindOfClass:[NSNumber class]] != 0x0) {
if ([rbx boolValue] == 0x0) {
r14 = 0x0;
NSLog(@"XPC denied because caller lacks entitlement");
[r15 invalidate];
}
else {
os_unfair_lock_lock(r12 + 0x8);
rax = [r12 currentConnection];
rax = [rax retain];
[rax invalidate];
[rax release];
[r12 setCurrentConnection:r15];
os_unfair_lock_unlock(r12 + 0x8);
objc_initWeak(&var_30, r15);
*(&var_48 - 0x28) = *__NSConcreteStackBlock;
*(&var_48 - 0x20) = 0xffffffffc2000000;
*(&var_48 - 0x18) = ___69-[OSSystemExtensionPointListener listener:shouldAcceptNewConnection:]_block_invoke;
*(&var_48 - 0x10) = ___block_descriptor_48_e8_32s40w_e5_v8?0l;
*(&var_48 - 0x8) = r12;
objc_copyWeak(&var_48, &var_30);
[r15 setInvalidationHandler:&var_70];
*(&var_78 - 0x28) = *__NSConcreteStackBlock;
*(&var_78 - 0x20) = 0xffffffffc2000000;
*(&var_78 - 0x18) = ___69-[OSSystemExtensionPointListener listener:shouldAcceptNewConnection:]_block_invoke.407;
*(&var_78 - 0x10) = ___block_descriptor_48_e8_32s40w_e5_v8?0l;
*(&var_78 - 0x8) = r12;
objc_copyWeak(&var_78, &var_30);
[r15 setInterruptionHandler:&var_A0];
rax = [NSXPCInterface interfaceWithProtocol:@protocol(_OSSystemExtensionPointInterface)];
rax = [rax retain];
[r15 setExportedInterface:rax];
[rax release];
[r15 setExportedObject:r12];
[r15 resume];
objc_destroyWeak(&var_78);
objc_destroyWeak(&var_48);
objc_destroyWeak(&var_30);
r14 = 0x1;
r13 = r13;
}
}
else {
r14 = 0x0;
NSLog(@"XPC denied because caller lacks entitlement");
[r15 invalidate];
}
}
[var_40 release];
[r15 release];
[r13 release];
rax = r14 & 0xff;
}
else {
rax = -[OSSystemExtensionPointListener listener:shouldAcceptNewConnection:].cold.1();
}
return rax;
}
}