// // CreatorLayer::onSecretVault from 0x6cae6c to 0x6cb2a4 (1080 bytes) // // 3 xrefs: // > @ 0x6e460 // > CreatorLayer::init @ 0x6cc8a8 // > @ 0x122b9f8 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // void CreatorLayer::onSecretVault(CreatorLayer *a1, cocos2d::CCObject *a2) { GameStatsManager *v3; // x0 char v4; // cf char v5; // zf int m_vaultDialogIndex; // w0 int v7; // w0 DialogObject *v8; // x0 DialogLayer *v9; // x23 void *v10; // x0 void *v11; // x0 void *v12; // x0 cocos2d::CCDirector *v13; // x20 cocos2d::CCScene *v14; // x0 cocos2d::CCTransitionFade *v15; // x0 unsigned int *v16; // x1 int v17; // w2 unsigned int *v18; // x1 int v19; // w2 unsigned int *v20; // x1 int v21; // w2 __int64 v22; // [xsp+50h] [xbp+50h] BYREF __int64 v23; // [xsp+58h] [xbp+58h] BYREF __int64 v24; // [xsp+60h] [xbp+60h] BYREF cocos2d::_ccColor3B v25; // 0:w5.3 v3 = GameStatsManager::sharedState(); if ( GameStatsManager::getStat(v3, "13") > 49 ) { v13 = cocos2d::CCDirector::sharedDirector(); v14 = SecretLayer2::scene(); v15 = cocos2d::CCTransitionFade::create(0.5, v14); cocos2d::CCDirector::replaceScene(v13, v15); } else { sub_D153B8((int)&v22, "zzz"); m_vaultDialogIndex = a1->m_vaultDialogIndex; if ( m_vaultDialogIndex < 0 ) v7 = llroundf((float)((float)rand() * 4.6566e-10) * 10.0); else v7 = m_vaultDialogIndex + 1; a1->m_vaultDialogIndex = v7; if ( !(!v5 & v4) ) { switch ( v7 ) { case 0: goto LABEL_5; case 1: sub_D1798C(&v22, "I can't let you in.", 19); break; case 2: sub_D1798C(&v22, "Player used knock.\nIt's not very effective.", 49); break; case 3: sub_D1798C(&v22, "Don't you have something better to do?", 38); break; case 4: sub_D1798C(&v22, "That is a bad idea...", 21); break; case 5: sub_D1798C(&v22, "...", 15); break; case 6: sub_D1798C(&v22, "I guess you don't like rules...", 31); break; case 7: sub_D1798C(&v22, "RubRub told me not to let anyone in.", 36); break; case 8: sub_D1798C(&v22, "This is not the door you are looking for.", 41); break; case 9: sub_D1798C(&v22, "I don't understand why you keep clicking...", 43); break; case 10: sub_D1798C(&v22, "Trust me, you don't want to come in here.", 47); break; default: a1->m_vaultDialogIndex = 0; LABEL_5: sub_D1798C(&v22, "You are not ready...", 20); break; } } sub_D153B8((int)&v23, "The Keymaster"); sub_D18D28(&v24, &v22); v8 = (DialogObject *)DialogObject::create( (DialogObject *)&v23, (std::string)&v24, (std::string)2LL, 0, 1.0, (bool)&unk_FFFFFF, v25); v9 = DialogLayer::create(v8, (int)&dword_0 + 2); v10 = (void *)(v24 - 24); if ( (__int64 *)(v24 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v20 = (unsigned int *)(v24 - 8); do v21 = __ldaxr(v20); while ( __stlxr(v21 - 1, v20) ); } else { v21 = *(_DWORD *)(v24 - 8); *(_DWORD *)(v24 - 8) = v21 - 1; } if ( v21 <= 0 ) operator delete(v10); } v11 = (void *)(v23 - 24); if ( (__int64 *)(v23 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v18 = (unsigned int *)(v23 - 8); do v19 = __ldaxr(v18); while ( __stlxr(v19 - 1, v18) ); } else { v19 = *(_DWORD *)(v23 - 8); *(_DWORD *)(v23 - 8) = v19 - 1; } if ( v19 <= 0 ) operator delete(v11); } a1->addChild_0(a1, v9, 100); DialogLayer::updateChatPlacement(v9, Center); DialogLayer::animateInRandomSide(v9); v12 = (void *)(v22 - 24); if ( (__int64 *)(v22 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v16 = (unsigned int *)(v22 - 8); do v17 = __ldaxr(v16); while ( __stlxr(v17 - 1, v16) ); } else { v17 = *(_DWORD *)(v22 - 8); *(_DWORD *)(v22 - 8) = v17 - 1; } if ( v17 <= 0 ) operator delete(v12); } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source