//
// cocos2d::CCDirector::pushScene from 0x100478b30 to 0x100478bd1 (161 bytes)
//
// 39 xrefs:
// > DailyLevelPage::onTheSafe @ 0x10021553b
// > MapPackCell::onClick @ 0x10023b4f6
// > CommentCell::onGoToLevel @ 0x10023decb
// > GJScoreCell::onViewProfile @ 0x10023eacd
// > GJNotificationCell::onViewTarget @ 0x100241826
// > LevelListCell::onClick @ 0x1002432e1
// > sub_10026EB90 @ 0x10026ebd7
// > CreatorLayer::onSavedLevels @ 0x1002830e6
// > CreatorLayer::onLeaderboards @ 0x100283138
// > CreatorLayer::onGauntlets @ 0x1002836ad
// > CreatorLayer::onFeaturedLevels @ 0x100283706
// > CreatorLayer::onTopLists @ 0x100283794
// > CreatorLayer::onMapPacks @ 0x1002837e6
// > CreatorLayer::onOnlineLevels @ 0x10028384a
// > CreatorLayer::onMyLevels @ 0x100283930
// > sub_100284730 @ 0x100284766
// > LevelInfoLayer::onGarage @ 0x1002aefc2
// > GameManager::returnToLastScene @ 0x100376a52
// > WorldSelectLayer::onGarage @ 0x1003ab9c2
// > GameLevelManager::gotoLevelPage @ 0x100549ef3
// > LevelSearchLayer::onSearch @ 0x10070716c
// > LevelSearchLayer::onSearch @ 0x1007071c6
// > LevelSearchLayer::onSearchUser @ 0x1007072f2
// > sub_100707480 @ 0x1007074e5
// > sub_1007074F0 @ 0x100707555
// > sub_100707560 @ 0x1007075c5
// > sub_1007075D0 @ 0x100707635
// > sub_100707640 @ 0x1007076a5
// > sub_1007076B0 @ 0x100707715
// > sub_100707720 @ 0x100707785
// > LevelSearchLayer::onFriends @ 0x1007077f5
// > LevelSearchLayer::onStarAward @ 0x100707865
// > sub_100709440 @ 0x1007094a5
// > ProfilePage::onMyLevels @ 0x1008a4090
// > ProfilePage::onMyLevels @ 0x1008a41c2
// > ProfilePage::onMyLists @ 0x1008a4271
// > ProfilePage::onMyLists @ 0x1008a43b2
// > AccountReviewPopup::onJumpRow @ 0x1009a1a7d
// > sub_1009A4070 @ 0x1009a4137
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:30:36 +0000
//
__int64 __fastcall cocos2d::CCDirector::pushScene(__int64 a1, _UNKNOWN **a2)
{
unsigned int v2; // ebx
_QWORD *v3; // r15
__int64 v5; // rdx
__int64 v6; // rcx
void *v7; // rax
void (__fastcall ***v8)(_QWORD, _QWORD *, __int64, __int64); // rdi
void (__fastcall ***v9)(_QWORD, _UNKNOWN **, __int64, __int64); // rdi
v2 = *(unsigned __int8 *)(a1 + 176);
if ( !(_BYTE)v2 )
{
v3 = a2;
*(_BYTE *)(a1 + 288) = 0;
sub_1007FEBF0(*(_QWORD *)(a1 + 296), a2);
*(_QWORD *)(a1 + 280) = a2;
if ( !a2
|| (a2 = &`typeinfo for'cocos2d::CCScene,
v7 = __dynamic_cast(
v3,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCScene,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCTransitionScene,
0),
LOBYTE(v6) = 1,
!v7) )
{
if ( !*(_BYTE *)(a1 + 404) )
{
v8 = *(void (__fastcall ****)(_QWORD, _QWORD *, __int64, __int64))(a1 + 360);
if ( v8 )
{
a2 = (_UNKNOWN **)v3;
(**v8)(v8, v3, v5, v6);
}
v9 = (void (__fastcall ***)(_QWORD, _UNKNOWN **, __int64, __int64))v3[40];
if ( v9 )
(**v9)(v9, a2, v5, v6);
}
LOBYTE(v6) = 0;
}
*(_BYTE *)(a1 + 176) = v6;
}
LOBYTE(v2) = v2 ^ 1;
return v2;
}