-
-
Save eightbit-io/ed033b46249b80425dc01397f0a911e4 to your computer and use it in GitHub Desktop.
Installs package
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( !self->_isInstalling ) | |
{ | |
v4 = objc_msgSend(&OBJC_CLASS___NSFileManager, "defaultManager"); | |
v5 = (void *)objc_retainAutoreleasedReturnValue(v4); | |
v6 = (unsigned __int64)objc_msgSend(v5, "fileExistsAtPath:", v3); | |
objc_release(v5); | |
if ( !v6 ) | |
{ | |
self->_currentState = 9LL; | |
v21 = 9LL; | |
goto LABEL_5; | |
} | |
self->_isInstalling = 1; | |
v7 = objc_msgSend(&OBJC_CLASS___NSTask, "alloc"); | |
v8 = objc_msgSend(v7, "init"); | |
objc_msgSend(v8, "setLaunchPath:", CFSTR("/usr/sbin/installer")); | |
v9 = objc_msgSend(&OBJC_CLASS___NSArray, "alloc"); | |
v10 = objc_msgSend(v9, "initWithObjects:", CFSTR("-pkg"), v3, CFSTR("-target"), CFSTR("/"), 0LL); | |
v11 = v8; | |
((void (__fastcall *)(void *, const char *, void *))objc_msgSend)(v8, "setArguments:", v10); | |
objc_release(v10); | |
v12 = ((__int64 (__fastcall *)(void *, const char *))objc_msgSend)(&OBJC_CLASS___NSPipe, "pipe"); | |
v13 = (void *)objc_retainAutoreleasedReturnValue(v12); | |
((void (__fastcall *)(void *, const char *, void *))objc_msgSend)(v8, "setStandardOutput:", v13); | |
v14 = ((__int64 (__fastcall *)(void *, const char *))objc_msgSend)( | |
&OBJC_CLASS___NSNotificationCenter, | |
"defaultCenter"); | |
v15 = objc_retainAutoreleasedReturnValue(v14); | |
v16 = NSFileHandleReadToEndOfFileCompletionNotification; | |
v17 = ((__int64 (__fastcall *)(void *, const char *))objc_msgSend)(v13, "fileHandleForReading"); | |
v18 = objc_retainAutoreleasedReturnValue(v17); | |
((void (__fastcall *)(__int64, const char *, ZMLauncherMgr *, const char *, __int64, __int64))objc_msgSend)( | |
v15, | |
"addObserver:selector:name:object:", | |
self, | |
"installComplete:", | |
v16, | |
v18); | |
objc_release(v18); | |
objc_release(v15); | |
v19 = objc_msgSend(v13, "fileHandleForReading"); | |
v20 = (void *)objc_retainAutoreleasedReturnValue(v19); | |
objc_msgSend(v20, "readToEndOfFileInBackgroundAndNotify"); | |
objc_release(v20); | |
objc_msgSend(v11, "launch"); | |
self->_currentState = 3LL; | |
objc_release(v13); | |
objc_release(v11); | |
} | |
v21 = 3LL; | |
LABEL_5: | |
objc_release(v3); | |
return v21; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment