Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save madordie/7bdcae5a58a5288059632586771ab48c to your computer and use it in GitHub Desktop.
Save madordie/7bdcae5a58a5288059632586771ab48c to your computer and use it in GitHub Desktop.
UINavigationController *__cdecl -[UINavigationController initWithNavigationBarClass:toolbarClass:](UINavigationController *self, SEL a2, Class a3, Class a4)
{
Class v4; // r14
Class v5; // r15
char v6; // al
UINavigationController *v7; // rax
UINavigationController *v8; // rbx
char v9; // al
UINavigationController *v11; // [rsp+0h] [rbp-30h]
__objc2_class *v12; // [rsp+8h] [rbp-28h]
v4 = a4;
v5 = a3;
if ( _UIApplicationLinkedOnVersion )
v6 = (unsigned int)_UIApplicationLinkedOnVersion > 0xCFFFF;
else
v6 = __UIApplicationLinkedOnOrAfter(851968LL);
if ( v6 )
{
v11 = self;
v12 = &OBJC_CLASS___UINavigationController;
v7 = (UINavigationController *)objc_msgSendSuper2(
&v11,
"initWithNibName:bundle:",
0LL,
0LL,
self,
&OBJC_CLASS___UINavigationController);
}
else
{
v7 = -[UINavigationController initWithNibName:bundle:](self, "initWithNibName:bundle:", 0LL, 0LL);
}
v8 = v7;
if ( v7 )
{
if ( _UIApplicationLinkedOnVersion )
v9 = (unsigned int)_UIApplicationLinkedOnVersion > 0xCFFFF;
else
v9 = __UIApplicationLinkedOnOrAfter(851968LL);
if ( v9 )
-[UINavigationController _commonNonCoderInit](v8, "_commonNonCoderInit");
-[UINavigationController setNavigationBarClass:](v8, "setNavigationBarClass:", v5);
-[UINavigationController _setToolbarClass:](v8, "_setToolbarClass:", v4);
}
return v8;
}
UINavigationController *__cdecl -[UINavigationController initWithNibName:bundle:](UINavigationController *self, SEL a2, id a3, id a4)
{
id v4; // r14
__int64 v5; // r15
UINavigationController *v6; // rbx
UINavigationController *v8; // [rsp+8h] [rbp-28h]
__objc2_class *v9; // [rsp+10h] [rbp-20h]
v4 = a4;
v5 = objc_retain(a3);
v8 = self;
v9 = &OBJC_CLASS___UINavigationController;
v6 = (UINavigationController *)objc_msgSendSuper2(&v8, "initWithNibName:bundle:", v5, v4);
objc_release(v5);
if ( v6 )
-[UINavigationController _commonNonCoderInit](v6, "_commonNonCoderInit");
return v6;
}
UIViewController *__cdecl -[UIViewController init](UIViewController *self, SEL a2)
{
return (UIViewController *)-[UIViewController initWithNibName:bundle:](self, "initWithNibName:bundle:", 0LL, 0LL);
}
UIViewController *__cdecl -[UIViewController initWithNibName:bundle:](UIViewController *self, SEL a2, id a3, id a4)
{
id v4; // r12
void *v5; // r15
__int64 v6; // r14
char *v7; // rbx
void *v8; // rax
__int64 v9; // rdi
char v10; // al
char v11; // al
UIViewController *v13; // [rsp+8h] [rbp-38h]
__objc2_class *v14; // [rsp+10h] [rbp-30h]
v4 = a4;
v5 = (void *)objc_retain(a3);
v6 = objc_retain(v4);
v13 = self;
v14 = &OBJC_CLASS___UIViewController;
v7 = (char *)objc_msgSendSuper2(&v13, "init");
if ( v7 )
{
v8 = objc_msgSend(v5, "copy");
v9 = *(_QWORD *)(v7 + 60);
*(_QWORD *)(v7 + 60) = v8;
objc_release(v9);
objc_storeStrong(v7 + 68, v4);
objc_msgSend(v7, "_populateInitialTraitCollection");
objc_msgSend(v7, "_doCommonSetup");
*(_QWORD *)(v7 + 580) = 15LL;
v7[328] |= 0x10u;
v10 = (unsigned __int64)objc_msgSend(v7, "_isPresentationContextByDefault");
objc_msgSend(v7, "setDefinesPresentationContext:", (unsigned int)v10);
v11 = (unsigned __int64)objc_msgSend(v7, "_restoresFocusAfterTransitionByDefault");
objc_msgSend(v7, "setRestoresFocusAfterTransition:", (unsigned int)v11);
v7[329] |= 0x40u;
*(_QWORD *)(v7 + 204) = 0LL;
*(_QWORD *)(v7 + 212) = _UIViewControllerDefaulModalPresentationStyle();
}
objc_release(v6);
objc_release(v5);
return (UIViewController *)v7;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment