//
// sub_100485D8C from 0x100485d8c to 0x100486238 (1196 bytes)
//
// 1 xrefs:
// > LevelPage::addSecretDoor @ 0x1004858a4
//
// This function is hookable on this platform (idp: arm, 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 11:05:48 +0000
//
void __fastcall sub_100485D8C(__int64 a1)
{
__int64 v2; // x0
__int64 v3; // x0
__int64 v4; // x19
_QWORD *v5; // x0
char *v6; // x0
__int64 v7; // x0
void *v8; // x19
float v9; // s8
__int64 v10; // x0
float *v11; // x0
_OWORD *v12; // x0
float *v13; // x0
__int64 v14; // x0
char isItemUnlocked; // w21
_QWORD *v16; // x19
_QWORD *v17; // x19
__int64 v18; // x0
void *v19[2]; // [xsp+8h] [xbp-158h] BYREF
char v20; // [xsp+1Fh] [xbp-141h]
void *v21[2]; // [xsp+20h] [xbp-140h] BYREF
char v22; // [xsp+37h] [xbp-129h]
void *v23[2]; // [xsp+38h] [xbp-128h] BYREF
char v24; // [xsp+4Fh] [xbp-111h]
void *v25[2]; // [xsp+50h] [xbp-110h] BYREF
char v26; // [xsp+67h] [xbp-F9h]
void *__p[2]; // [xsp+68h] [xbp-F8h] BYREF
char v28; // [xsp+7Fh] [xbp-E1h]
void *v29[2]; // [xsp+80h] [xbp-E0h] BYREF
char v30; // [xsp+97h] [xbp-C9h]
void *v31[2]; // [xsp+98h] [xbp-C8h] BYREF
char v32; // [xsp+AFh] [xbp-B1h]
void *v33[2]; // [xsp+B0h] [xbp-B0h] BYREF
char v34; // [xsp+C7h] [xbp-99h]
void *v35[2]; // [xsp+C8h] [xbp-98h] BYREF
char v36; // [xsp+DFh] [xbp-81h]
void *v37[2]; // [xsp+E0h] [xbp-80h] BYREF
char v38; // [xsp+F7h] [xbp-69h]
void *v39[2]; // [xsp+F8h] [xbp-68h] BYREF
char v40; // [xsp+10Fh] [xbp-51h]
void *v41[2]; // [xsp+110h] [xbp-50h] BYREF
char v42; // [xsp+127h] [xbp-39h]
float v43; // [xsp+128h] [xbp-38h] BYREF
if ( (byte_100A109D8 & 1) == 0 )
{
v2 = GameManager::sharedState();
if ( GameManager::getUGV(v2, "7") )
{
v3 = GameManager::sharedState();
if ( GameManager::getUGV(v3, "8") )
{
byte_100A109D8 = 1;
v4 = cocos2d::CCDirector::sharedDirector();
v5 = SecretLayer4::scene();
v6 = cocos2d::CCTransitionFade::create_1((__int64)v5, 0.5);
cocos2d::CCDirector::replaceScene(v4, v6);
}
else
{
v14 = GameStatsManager::sharedState();
isItemUnlocked = GameStatsManager::isItemUnlocked(v14, 12, 4);
v16 = sub_1002E736C();
if ( (isItemUnlocked & 1) != 0 )
{
sub_100009900(v29, "The Gatekeeper");
sub_100009900(__p, "The Master Emblem!");
DialogObject::create((__int64)v29, (__int64)__p, 7, 1, 0xFFFFFF, 1.0);
sub_1002E74E0((__int64)v16);
if ( v28 < 0 )
operator delete(__p[0]);
if ( v30 < 0 )
operator delete(v29[0]);
sub_100009900(v25, "The Gatekeeper");
sub_100009900(v23, "Lord RubRub, I will open the gate for you.");
DialogObject::create((__int64)v25, (__int64)v23, 7, 0, 0xFFFFFF, 0.8);
sub_1002E74E0((__int64)v16);
if ( v24 < 0 )
operator delete(v23[0]);
if ( v26 < 0 )
operator delete(v25[0]);
sub_100009900(v21, "The Gatekeeper");
sub_100009900(v19, "Please, come in.");
DialogObject::create((__int64)v21, (__int64)v19, 7, 0, 0xFFFFFF, 1.0);
sub_1002E74E0((__int64)v16);
if ( v20 < 0 )
operator delete(v19[0]);
if ( v22 < 0 )
operator delete(v21[0]);
v17 = DialogLayer::createWithObjects((__int64)v16, 2);
v17[78] = a1 + 408;
(*(void (__fastcall **)(_QWORD *, __int64))(*v17 + 72LL))(v17, 2);
}
else
{
sub_100009900(v41, "The Gatekeeper");
sub_100009900(v39, "Who disturbs my slumber?");
DialogObject::create((__int64)v41, (__int64)v39, 7, 1, 0xFFFFFF, 1.0);
sub_1002E74E0((__int64)v16);
if ( v40 < 0 )
operator delete(v39[0]);
if ( v42 < 0 )
operator delete(v41[0]);
sub_100009900(v37, "The Gatekeeper");
sub_100009900(v35, "RubRub is that you?\nI cannot see in this light.");
DialogObject::create((__int64)v37, (__int64)v35, 7, 0, 0xFFFFFF, 1.0);
sub_1002E74E0((__int64)v16);
if ( v36 < 0 )
operator delete(v35[0]);
if ( v38 < 0 )
operator delete(v37[0]);
sub_100009900(v33, "The Gatekeeper");
sub_100009900(v31, "Show me the Master Emblem,\nand I will let you pass.");
DialogObject::create((__int64)v33, (__int64)v31, 7, 0, 0xFFFFFF, 1.0);
sub_1002E74E0((__int64)v16);
if ( v32 < 0 )
operator delete(v31[0]);
if ( v34 < 0 )
operator delete(v33[0]);
v17 = DialogLayer::createWithObjects((__int64)v16, 2);
}
v18 = cocos2d::CCDirector::sharedDirector();
(*(void (__fastcall **)(_QWORD, _QWORD *, __int64))(**(_QWORD **)(v18 + 272) + 464LL))(
*(_QWORD *)(v18 + 272),
v17,
1000);
DialogLayer::updateChatPlacement((__int64)v17, 0);
sub_1000909DC((__int64)v17, 2);
}
}
else if ( *(_QWORD *)(a1 + 568) )
{
v7 = GameManager::sharedState();
GameManager::setUGV(v7, "7", 1);
v8 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"secretDoorBtn2_closed_001.png");
(*(void (__fastcall **)(_QWORD, void *, __int64))(**(_QWORD **)(a1 + 568) + 464LL))(*(_QWORD *)(a1 + 568), v8, 2);
v9 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 568) + 328LL))(*(_QWORD *)(a1 + 568)) * 0.5;
v10 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 568) + 328LL))(*(_QWORD *)(a1 + 568));
sub_1000262BC(&v43, v9, *(float *)(v10 + 4) * 0.5);
(*(void (__fastcall **)(void *, float *))(*(_QWORD *)v8 + 184LL))(v8, &v43);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v8 + 1080LL))(v8, 0x100000302LL);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 568) + 912LL))(*(_QWORD *)(a1 + 568), 255);
(*(void (__fastcall **)(_QWORD, float))(**(_QWORD **)(a1 + 568) + 160LL))(*(_QWORD *)(a1 + 568), 2.0);
v11 = cocos2d::CCScaleTo::create_1(0.5, 1.0);
v12 = cocos2d::CCEaseBounceOut::create((__int64)v11);
cocos2d::CCNode::runAction(*(_QWORD *)(a1 + 568), (__int64)v12);
v13 = cocos2d::CCFadeOut::create(0.5);
cocos2d::CCNode::runAction((__int64)v8, (__int64)v13);
}
}
}