// // SecretRewardsLayer::showDialog03 from 0xb9be30 to 0xb9cb9c (3436 bytes) // // 2 xrefs: // > SecretRewardsLayer::onShop @ 0xb9e174 // > @ 0x7de60 // // 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 13:02:44 +0000 // __int64 __fastcall SecretRewardsLayer::showDialog03(SecretRewardsLayer *this) { GameStatsManager *v2; // x22 GameStatsManager *v3; // x0 GameManager *Stat; // x0 int v5; // w19 int v6; // w19 DialogLayer *v7; // x19 GameManager *v9; // x0 cocos2d::CCObject *v10; // x0 cocos2d::CCObject *v11; // x0 cocos2d::CCObject *v12; // x0 cocos2d::CCObject *v13; // x0 cocos2d::CCString *v14; // x0 size_t v15; // x0 cocos2d::CCObject *v16; // x0 cocos2d::CCObject *v17; // x0 cocos2d::CCObject *v18; // x0 GameManager *v19; // x0 GameManager *v20; // x0 cocos2d::CCObject *v21; // x0 cocos2d::CCObject *v22; // x0 cocos2d::CCObject *v23; // x0 cocos2d::CCObject *v24; // x0 cocos2d::CCObject *v25; // x0 cocos2d::CCObject *v26; // x0 cocos2d::CCObject *v27; // x0 cocos2d::CCObject *v28; // x0 cocos2d::CCObject *v29; // x0 cocos2d::CCObject *v30; // x0 cocos2d::CCString *v31; // x0 size_t v32; // x0 cocos2d::CCObject *v33; // x0 cocos2d::CCObject *v34; // x0 cocos2d::CCObject *v35; // x0 char *CString; // [xsp+58h] [xbp+58h] char *v37; // [xsp+58h] [xbp+58h] GameManager *v38; // [xsp+68h] [xbp+68h] BYREF __int64 v39; // [xsp+70h] [xbp+70h] void *v40; // [xsp+78h] [xbp+78h] __int64 v41; // [xsp+80h] [xbp+80h] BYREF __int64 v42; // [xsp+88h] [xbp+88h] void *v43; // [xsp+90h] [xbp+90h] v2 = (GameStatsManager *)cocos2d::CCArray::create(_stack_chk_guard); v3 = (GameStatsManager *)GameStatsManager::sharedState(v2); Stat = (GameManager *)GameStatsManager::getStat(v3, "13"); if ( (int)Stat > 199 && (v9 = (GameManager *)GameManager::sharedState(Stat), (unsigned __int8)GameManager::getUGV(v9, "21")) ) { v38 = nullptr; v39 = 0; v40 = nullptr; std::string::__init((__int64 *)&v38, "Potbor", 6u); v41 = 0; v42 = 0; v43 = nullptr; std::string::__init(&v41, "You found all the diamonds!?", 0x24u); v10 = (cocos2d::CCObject *)DialogObject::create((char *)&v38, (char *)&v41, 21, 0, 0xFFFFFF, 1.0); cocos2d::CCArray::addObject(v2, v10); if ( (v41 & 1) != 0 ) operator delete(v43); if ( ((unsigned __int8)v38 & 1) != 0 ) operator delete(v40); v38 = nullptr; v39 = 0; v40 = nullptr; std::string::__init((__int64 *)&v38, "Potbor", 6u); v41 = 0; v42 = 0; v43 = nullptr; std::string::__init( &v41, "Just need to check: \n" " 1, 2, 3, 200. Yup, all there!", 0x71u); v11 = (cocos2d::CCObject *)DialogObject::create((char *)&v38, (char *)&v41, 22, 0, 0xFFFFFF, 1.0); cocos2d::CCArray::addObject(v2, v11); if ( (v41 & 1) != 0 ) operator delete(v43); if ( ((unsigned __int8)v38 & 1) != 0 ) operator delete(v40); v38 = nullptr; v39 = 0; v40 = nullptr; std::string::__init((__int64 *)&v38, "Potbor", 6u); v41 = 0; v42 = 0; v43 = nullptr; std::string::__init(&v41, "My first customer, how exciting!", 0x20u); v12 = (cocos2d::CCObject *)DialogObject::create((char *)&v38, (char *)&v41, 20, 0, 0xFFFFFF, 1.0); cocos2d::CCArray::addObject(v2, v12); if ( (v41 & 1) != 0 ) operator delete(v43); if ( ((unsigned __int8)v38 & 1) != 0 ) operator delete(v40); v38 = nullptr; v39 = 0; v40 = nullptr; std::string::__init((__int64 *)&v38, "Potbor", 6u); v41 = 0; v42 = 0; v43 = nullptr; std::string::__init(&v41, "...", 0x15u); v13 = (cocos2d::CCObject *)DialogObject::create((char *)&v38, (char *)&v41, 19, 0, 0xFFFFFF, 1.0); cocos2d::CCArray::addObject(v2, v13); if ( (v41 & 1) != 0 ) operator delete(v43); if ( ((unsigned __int8)v38 & 1) != 0 ) operator delete(v40); v7 = (DialogLayer *)DialogLayer::createWithObjects(v2, (cocos2d::CCArray *)((char *)&dword_0 + 2)); (*(void (__fastcall **)(SecretRewardsLayer *, DialogLayer *, __int64))(*(_QWORD *)this + 464LL))(this, v7, 100); (*(void (__fastcall **)(DialogLayer *, __int64))(*(_QWORD *)v7 + 72LL))(v7, 2); *((_QWORD *)v7 + 78) = (char *)this + 408; } else { v5 = *((_DWORD *)this + 143); switch ( v5 ) { case 0: v38 = nullptr; v39 = 0; v40 = nullptr; std::string::__init((__int64 *)&v38, "Potbor", 6u); v41 = 0; v42 = 0; v43 = nullptr; std::string::__init(&v41, "Oh, a customer!", 0x15u); v28 = (cocos2d::CCObject *)DialogObject::create((char *)&v38, (char *)&v41, 21, 0, 0xFFFFFF, 1.0); cocos2d::CCArray::addObject(v2, v28); if ( (v41 & 1) != 0 ) operator delete(v43); if ( ((unsigned __int8)v38 & 1) != 0 ) operator delete(v40); v38 = nullptr; v39 = 0; v40 = nullptr; std::string::__init((__int64 *)&v38, "Potbor", 6u); v41 = 0; v42 = 0; v43 = nullptr; std::string::__init(&v41, "I never had a customer before.", 0x1Eu); v29 = (cocos2d::CCObject *)DialogObject::create((char *)&v38, (char *)&v41, 22, 0, 0xFFFFFF, 1.0); cocos2d::CCArray::addObject(v2, v29); if ( (v41 & 1) != 0 ) operator delete(v43); if ( ((unsigned __int8)v38 & 1) != 0 ) operator delete(v40); v38 = nullptr; v39 = 0; v40 = nullptr; std::string::__init((__int64 *)&v38, "Potbor", 6u); v41 = 0; v42 = 0; v43 = nullptr; std::string::__init(&v41, "... Not sure what to do.", 0x30u); v30 = (cocos2d::CCObject *)DialogObject::create((char *)&v38, (char *)&v41, 19, 0, 0xFFFFFF, 1.0); cocos2d::CCArray::addObject(v2, v30); goto LABEL_52; case 1: v38 = nullptr; v39 = 0; v40 = nullptr; std::string::__init((__int64 *)&v38, "Potbor", 6u); v41 = 0; v42 = 0; v43 = nullptr; std::string::__init(&v41, "Let me check the manual.", 0x18u); v25 = (cocos2d::CCObject *)DialogObject::create((char *)&v38, (char *)&v41, 24, 0, 0xFFFFFF, 1.0); cocos2d::CCArray::addObject(v2, v25); if ( (v41 & 1) != 0 ) operator delete(v43); if ( ((unsigned __int8)v38 & 1) != 0 ) operator delete(v40); v38 = nullptr; v39 = 0; v40 = nullptr; std::string::__init((__int64 *)&v38, "Potbor", 6u); v41 = 0; v42 = 0; v43 = nullptr; std::string::__init( &v41, "The Shopkeepers handbook: \nYou give stuff, they pay money.", 0x50u); v26 = (cocos2d::CCObject *)DialogObject::create((char *)&v38, (char *)&v41, 22, 0, 0xFFFFFF, 1.0); cocos2d::CCArray::addObject(v2, v26); if ( (v41 & 1) != 0 ) operator delete(v43); if ( ((unsigned __int8)v38 & 1) != 0 ) operator delete(v40); v38 = nullptr; v39 = 0; v40 = nullptr; std::string::__init((__int64 *)&v38, "Potbor", 6u); v41 = 0; v42 = 0; v43 = nullptr; std::string::__init(&v41, "... Sounds simple enough.", 0x31u); v27 = (cocos2d::CCObject *)DialogObject::create((char *)&v38, (char *)&v41, 23, 0, 0xFFFFFF, 1.0); cocos2d::CCArray::addObject(v2, v27); if ( (v41 & 1) != 0 ) goto LABEL_65; goto LABEL_53; case 2: v38 = nullptr; v39 = 0; v40 = nullptr; std::string::__init((__int64 *)&v38, "Potbor", 6u); v41 = 0; v42 = 0; v43 = nullptr; std::string::__init(&v41, "Page 2: Refund policy\nNo refunds!", 0x37u); v21 = (cocos2d::CCObject *)DialogObject::create((char *)&v38, (char *)&v41, 25, 0, 0xFFFFFF, 1.0); cocos2d::CCArray::addObject(v2, v21); if ( (v41 & 1) != 0 ) operator delete(v43); if ( ((unsigned __int8)v38 & 1) != 0 ) operator delete(v40); v38 = nullptr; v39 = 0; v40 = nullptr; std::string::__init((__int64 *)&v38, "Potbor", 6u); v41 = 0; v42 = 0; v43 = nullptr; std::string::__init( &v41, "Page 3: Shopkeeper etiquette\n... Probably not important.", 0x5Au); v22 = (cocos2d::CCObject *)DialogObject::create((char *)&v38, (char *)&v41, 20, 0, 0xFFFFFF, 1.0); cocos2d::CCArray::addObject(v2, v22); if ( (v41 & 1) != 0 ) operator delete(v43); if ( ((unsigned __int8)v38 & 1) != 0 ) operator delete(v40); v38 = nullptr; v39 = 0; v40 = nullptr; std::string::__init((__int64 *)&v38, "Potbor", 6u); v41 = 0; v42 = 0; v43 = nullptr; std::string::__init( &v41, "Page 4: Self destruct mechanism\nThe page is missing...", 0x4Cu); v23 = (cocos2d::CCObject *)DialogObject::create((char *)&v38, (char *)&v41, 22, 0, 0xFFFFFF, 1.0); cocos2d::CCArray::addObject(v2, v23); if ( (v41 & 1) != 0 ) operator delete(v43); if ( ((unsigned __int8)v38 & 1) != 0 ) operator delete(v40); v38 = nullptr; v39 = 0; v40 = nullptr; std::string::__init((__int64 *)&v38, "Potbor", 6u); v41 = 0; v42 = 0; v43 = nullptr; std::string::__init(&v41, "Not sure if I should be worried about this.", 0x2Bu); v24 = (cocos2d::CCObject *)DialogObject::create((char *)&v38, (char *)&v41, 23, 0, 0xFFFFFF, 1.0); cocos2d::CCArray::addObject(v2, v24); goto LABEL_52; case 3: v38 = nullptr; v39 = 0; v40 = nullptr; std::string::__init((__int64 *)&v38, "Potbor", 6u); v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Page 394: Customer must have %i diamonds.", (const char *)&qword_C8); CString = (char *)cocos2d::CCString::getCString(v14); v41 = 0; v42 = 0; v43 = nullptr; v15 = strlen(CString); std::string::__init(&v41, CString, v15); v16 = (cocos2d::CCObject *)DialogObject::create((char *)&v38, (char *)&v41, 24, 0, 0xFFFFFF, 1.0); cocos2d::CCArray::addObject(v2, v16); if ( (v41 & 1) != 0 ) operator delete(v43); if ( ((unsigned __int8)v38 & 1) != 0 ) operator delete(v40); v38 = nullptr; v39 = 0; v40 = nullptr; std::string::__init((__int64 *)&v38, "Potbor", 6u); v41 = 0; v42 = 0; v43 = nullptr; std::string::__init(&v41, "What's a diamond?", 0x11u); v17 = (cocos2d::CCObject *)DialogObject::create((char *)&v38, (char *)&v41, 22, 0, 0xFFFFFF, 1.0); cocos2d::CCArray::addObject(v2, v17); if ( (v41 & 1) != 0 ) operator delete(v43); if ( ((unsigned __int8)v38 & 1) != 0 ) operator delete(v40); v38 = nullptr; v39 = 0; v40 = nullptr; std::string::__init((__int64 *)&v38, "Potbor", 6u); v41 = 0; v42 = 0; v43 = nullptr; std::string::__init(&v41, "...", 0x15u); v18 = (cocos2d::CCObject *)DialogObject::create((char *)&v38, (char *)&v41, 20, 0, 0xFFFFFF, 1.0); cocos2d::CCArray::addObject(v2, v18); if ( (v41 & 1) != 0 ) operator delete(v43); v19 = (GameManager *)(unsigned __int8)v38; if ( ((unsigned __int8)v38 & 1) != 0 ) operator delete(v40); v20 = (GameManager *)GameManager::sharedState(v19); GameManager::setUGV(v20, "21", 1u); v5 = *((_DWORD *)this + 143); break; case 4: v38 = nullptr; v39 = 0; v40 = nullptr; std::string::__init((__int64 *)&v38, "Potbor", 6u); v31 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"You must collect %i Diamonds before I can let " "you in the Shop!", (const char *)&qword_C8); v37 = (char *)cocos2d::CCString::getCString(v31); v41 = 0; v42 = 0; v43 = nullptr; v32 = strlen(v37); std::string::__init(&v41, v37, v32); v33 = (cocos2d::CCObject *)DialogObject::create((char *)&v38, (char *)&v41, 25, 0, 0xFFFFFF, 0.8); cocos2d::CCArray::addObject(v2, v33); if ( (v41 & 1) != 0 ) operator delete(v43); if ( ((unsigned __int8)v38 & 1) != 0 ) operator delete(v40); v38 = nullptr; v39 = 0; v40 = nullptr; std::string::__init((__int64 *)&v38, "Potbor", 6u); v41 = 0; v42 = 0; v43 = nullptr; std::string::__init(&v41, "It says so in the handbook...", 0x2Fu); v34 = (cocos2d::CCObject *)DialogObject::create((char *)&v38, (char *)&v41, 23, 0, 0xFFFFFF, 1.0); cocos2d::CCArray::addObject(v2, v34); if ( (v41 & 1) != 0 ) operator delete(v43); if ( ((unsigned __int8)v38 & 1) != 0 ) operator delete(v40); v38 = nullptr; v39 = 0; v40 = nullptr; std::string::__init((__int64 *)&v38, "Potbor", 6u); v41 = 0; v42 = 0; v43 = nullptr; std::string::__init(&v41, "...", 0x15u); v35 = (cocos2d::CCObject *)DialogObject::create((char *)&v38, (char *)&v41, 20, 0, 0xFFFFFF, 1.0); cocos2d::CCArray::addObject(v2, v35); LABEL_52: if ( (v41 & 1) != 0 ) LABEL_65: operator delete(v43); LABEL_53: if ( ((unsigned __int8)v38 & 1) != 0 ) operator delete(v40); v5 = *((_DWORD *)this + 143); break; default: break; } v6 = v5 + 1; if ( v6 >= 5 ) v6 = 0; *((_DWORD *)this + 143) = v6; v7 = (DialogLayer *)DialogLayer::createWithObjects(v2, (cocos2d::CCArray *)((char *)&dword_0 + 2)); (*(void (__fastcall **)(SecretRewardsLayer *, DialogLayer *, __int64))(*(_QWORD *)this + 464LL))(this, v7, 100); (*(void (__fastcall **)(DialogLayer *, __int64))(*(_QWORD *)v7 + 72LL))(v7, 2); } DialogLayer::updateChatPlacement((__int64)v7, 0); DialogLayer::animateInRandomSide(v7); return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source