//
// SecretRewardsLayer::showDialogDiamond from 0x6cd044 to 0x6cd5e2 (1438 bytes)
//
// 1 xrefs:
// > SecretRewardsLayer::onShop @ 0x6cd6f4
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:57:00 +0000
//
unsigned int __fastcall SecretRewardsLayer::showDialogDiamond(SecretRewardsLayer *this)
{
GameStatsManager *v2; // r5
GameStatsManager *v3; // r0
GameManager *Stat; // r0
int v5; // r2
GameManager *v6; // r0
cocos2d::CCObject *v7; // r0
cocos2d::CCObject *v8; // r0
cocos2d::CCObject *v9; // r0
cocos2d::CCObject *v10; // r0
cocos2d::CCObject *v11; // r0
cocos2d::CCString *v12; // r0
const char *CString; // r11
size_t v14; // r0
cocos2d::CCObject *v15; // r0
GameManager *v16; // r0
GameManager *v17; // r0
cocos2d::CCString *v18; // r0
const char *v19; // r10
size_t v20; // r0
cocos2d::CCObject *v21; // r0
cocos2d::CCObject *v22; // r0
int v23; // r4
int v24; // r3
cocos2d::CCDirector *v25; // r5
cocos2d::CCObject *v27; // r0
cocos2d::CCObject *v28; // r0
cocos2d::CCObject *v29; // r0
int v30; // [sp+4h] [bp-28h]
int v31; // [sp+4h] [bp-28h]
int v32; // [sp+4h] [bp-28h]
int v33; // [sp+4h] [bp-28h]
int v34; // [sp+4h] [bp-28h]
int v35; // [sp+4h] [bp-28h]
int v36; // [sp+4h] [bp-28h]
int v37; // [sp+Ch] [bp-20h] BYREF
int v38; // [sp+10h] [bp-1Ch]
int v39; // [sp+14h] [bp-18h]
int v40; // [sp+18h] [bp-14h] BYREF
int v41; // [sp+1Ch] [bp-10h]
int v42; // [sp+20h] [bp-Ch]
v2 = (GameStatsManager *)cocos2d::CCArray::create(this);
v3 = (GameStatsManager *)GameStatsManager::sharedState(v2);
Stat = (GameManager *)GameStatsManager::getStat(v3, "13");
if ( (int)Stat >= 1000 && (v6 = (GameManager *)GameManager::sharedState(Stat), GameManager::getUGV(v6, "37")) )
{
v37 = 0;
v38 = 0;
v39 = 0;
std::string::__init(&v37, "Diamond Shopkeeper", 0x12u);
v40 = 0;
v41 = 0;
v42 = 0;
std::string::__init(&v40, "ShINe! sHiMmer!", 0x1Du);
LOWORD(v30) = -1;
BYTE2(v30) = -1;
v27 = (cocos2d::CCObject *)DialogObject::create((int)&v37, (int)&v40, 43, 1065353216, 0, v30);
cocos2d::CCArray::addObject(v2, v27);
std::string::~string((int)&v40);
std::string::~string((int)&v37);
v37 = 0;
v38 = 0;
v39 = 0;
std::string::__init(&v37, "Diamond Shopkeeper", 0x12u);
v40 = 0;
v41 = 0;
v42 = 0;
std::string::__init(&v40, "YOU! ShiNy! sParKLe!", 0x28u);
LOWORD(v35) = -1;
BYTE2(v35) = -1;
v28 = (cocos2d::CCObject *)DialogObject::create((int)&v37, (int)&v40, 41, 1065353216, 0, v35);
cocos2d::CCArray::addObject(v2, v28);
std::string::~string((int)&v40);
std::string::~string((int)&v37);
v37 = 0;
v38 = 0;
v39 = 0;
std::string::__init(&v37, "Diamond Shopkeeper", 0x12u);
v40 = 0;
v41 = 0;
v42 = 0;
std::string::__init(&v40, "...", 0x1Du);
LOWORD(v36) = -1;
BYTE2(v36) = -1;
v29 = (cocos2d::CCObject *)DialogObject::create((int)&v37, (int)&v40, 48, 1065353216, 0, v36);
cocos2d::CCArray::addObject(v2, v29);
std::string::~string((int)&v40);
std::string::~string((int)&v37);
v23 = 1;
}
else
{
switch ( *((_DWORD *)this + 102) )
{
case 0:
v37 = 0;
v38 = 0;
v39 = 0;
std::string::__init(&v37, "Diamond Shopkeeper", 0x12u);
v40 = 0;
v41 = 0;
v42 = 0;
std::string::__init(&v40, "gLiTz sCraPe sParKLe TwiNkLe...", 0x39u);
LOWORD(v30) = -1;
BYTE2(v30) = -1;
v7 = (cocos2d::CCObject *)DialogObject::create((int)&v37, (int)&v40, 42, 1065353216, 0, v30);
cocos2d::CCArray::addObject(v2, v7);
std::string::~string((int)&v40);
std::string::~string((int)&v37);
v37 = 0;
v38 = 0;
v39 = 0;
std::string::__init(&v37, "Diamond Shopkeeper", 0x12u);
v40 = 0;
v41 = 0;
v42 = 0;
std::string::__init(&v40, "....", 0x1Eu);
LOWORD(v31) = -1;
BYTE2(v31) = -1;
v8 = (cocos2d::CCObject *)DialogObject::create((int)&v37, (int)&v40, 40, 1065353216, 0, v31);
cocos2d::CCArray::addObject(v2, v8);
goto LABEL_8;
case 1:
v37 = 0;
v38 = 0;
v39 = 0;
std::string::__init(&v37, "Diamond Shopkeeper", 0x12u);
v40 = 0;
v41 = 0;
v42 = 0;
std::string::__init(&v40, "gRasP sHinEe tWinKleR... cLiNk!", 0x3Fu);
LOWORD(v30) = -1;
BYTE2(v30) = -1;
v9 = (cocos2d::CCObject *)DialogObject::create((int)&v37, (int)&v40, 43, 1065353216, 0, v30);
cocos2d::CCArray::addObject(v2, v9);
std::string::~string((int)&v40);
std::string::~string((int)&v37);
v37 = 0;
v38 = 0;
v39 = 0;
std::string::__init(&v37, "Diamond Shopkeeper", 0x12u);
v40 = 0;
v41 = 0;
v42 = 0;
std::string::__init(&v40, "bRinG ShiNy!", 0x38u);
LOWORD(v32) = -1;
BYTE2(v32) = -1;
v10 = (cocos2d::CCObject *)DialogObject::create((int)&v37, (int)&v40, 41, 1065353216, 0, v32);
cocos2d::CCArray::addObject(v2, v10);
goto LABEL_8;
case 2:
v37 = 0;
v38 = 0;
v39 = 0;
std::string::__init(&v37, "Diamond Shopkeeper", 0x12u);
v40 = 0;
v41 = 0;
v42 = 0;
std::string::__init(&v40, "sHimMeR glOrP... cRyStAl sHine!", 0x39u);
LOWORD(v30) = -1;
BYTE2(v30) = -1;
v11 = (cocos2d::CCObject *)DialogObject::create((int)&v37, (int)&v40, 42, 1065353216, 0, v30);
cocos2d::CCArray::addObject(v2, v11);
std::string::~string((int)&v40);
std::string::~string((int)&v37);
v37 = 0;
v38 = 0;
v39 = 0;
std::string::__init(&v37, "Diamond Shopkeeper", 0x12u);
v12 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i... bRinG ShiNy!",
(const char *)&stru_3DC.st_info);
CString = (const char *)cocos2d::CCString::getCString(v12);
v40 = 0;
v41 = 0;
v42 = 0;
v14 = strlen(CString);
std::string::__init(&v40, CString, v14);
LOWORD(v33) = -1;
BYTE2(v33) = -1;
v15 = (cocos2d::CCObject *)DialogObject::create((int)&v37, (int)&v40, 41, 1065353216, 0, v33);
cocos2d::CCArray::addObject(v2, v15);
std::string::~string((int)&v40);
v16 = (GameManager *)std::string::~string((int)&v37);
v17 = (GameManager *)GameManager::sharedState(v16);
GameManager::setUGV(v17, "37", (_BYTE *)&dword_0 + 1);
break;
case 3:
v37 = 0;
v38 = 0;
v39 = 0;
std::string::__init(&v37, "Diamond Shopkeeper", 0x12u);
v18 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i... gLiSten gLoRp sPaRkle?",
(const char *)&stru_3DC.st_info);
v19 = (const char *)cocos2d::CCString::getCString(v18);
v40 = 0;
v41 = 0;
v42 = 0;
v20 = strlen(v19);
std::string::__init(&v40, v19, v20);
LOWORD(v30) = -1;
BYTE2(v30) = -1;
v21 = (cocos2d::CCObject *)DialogObject::create((int)&v37, (int)&v40, 47, 1061997773, 0, v30);
cocos2d::CCArray::addObject(v2, v21);
std::string::~string((int)&v40);
std::string::~string((int)&v37);
v37 = 0;
v38 = 0;
v39 = 0;
std::string::__init(&v37, "Diamond Shopkeeper", 0x12u);
v40 = 0;
v41 = 0;
v42 = 0;
std::string::__init(&v40, "..... sHiNY?", 0x42u);
LOWORD(v34) = -1;
BYTE2(v34) = -1;
v22 = (cocos2d::CCObject *)DialogObject::create((int)&v37, (int)&v40, 48, 1065353216, 0, v34);
cocos2d::CCArray::addObject(v2, v22);
LABEL_8:
std::string::~string((int)&v40);
std::string::~string((int)&v37);
break;
default:
break;
}
v23 = 0;
v24 = *((_DWORD *)this + 102) + 1;
if ( v24 > 3 )
*((_DWORD *)this + 102) = 0;
else
*((_DWORD *)this + 102) = v24;
}
v25 = DialogLayer::createWithObjects(v2, (cocos2d::CCArray *)byte_4, v5);
(*(void (__fastcall **)(SecretRewardsLayer *, cocos2d::CCDirector *, int))(*(_DWORD *)this + 232))(this, v25, 100);
(*(void (__fastcall **)(cocos2d::CCDirector *, int))(*(_DWORD *)v25 + 36))(v25, 3);
if ( v23 )
*((_DWORD *)v25 + 122) = (char *)this + 316;
DialogLayer::updateChatPlacement(v25, 0);
return DialogLayer::animateInRandomSide(v25);
}