//
// GJPathPage::showCantAffordMessage from 0x6d4510 to 0x6d4740 (560 bytes)
//
// 1 xrefs:
// > GJPathPage::onUnlock @ 0x6d47d6
//
// 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:05 +0000
//
int __fastcall GJPathPage::showCantAffordMessage(GJPathPage *this, GJStoreItem *a2)
{
const char *v4; // r9
size_t v5; // r0
int v6; // r3
char *v7; // r1
int *v8; // r3
int v9; // r1
int v10; // r2
int v11; // r0
int v12; // r1
_BYTE *v13; // r2
int v14; // r10
int *v15; // r3
int v16; // r1
int v17; // r2
int v18; // r0
int v19; // r1
_BYTE *v20; // r2
DialogLayer *v21; // r0
int v22; // r2
int v23; // r3
cocos2d::CCDirector *v24; // r10
int v26; // [sp+4h] [bp-54h]
int v27; // [sp+Ch] [bp-4Ch] BYREF
int v28; // [sp+10h] [bp-48h]
_BYTE *v29; // [sp+14h] [bp-44h]
int v30[3]; // [sp+18h] [bp-40h] BYREF
int v31[3]; // [sp+24h] [bp-34h] BYREF
int v32[3]; // [sp+30h] [bp-28h] BYREF
int v33[3]; // [sp+3Ch] [bp-1Ch] BYREF
int v34; // [sp+48h] [bp-10h] BYREF
int v35; // [sp+4Ch] [bp-Ch]
_BYTE *v36; // [sp+50h] [bp-8h]
v27 = 0;
v28 = 0;
v29 = nullptr;
std::string::__init(&v27, &unk_B6B226, 0);
if ( *((_DWORD *)a2 + 78) == 4 )
v4 = "Diamond Shards";
else
v4 = "Mana Orbs";
memset(v30, 0, sizeof(v30));
v5 = strlen(v4);
std::string::__init(v30, v4, v5);
if ( *((int *)this + 135) > 2 )
*((_DWORD *)this + 135) = 0;
v6 = *((_DWORD *)this + 135);
if ( v6 == 1 )
{
std::operator+(v31, "Collect more ", (unsigned __int8 *)v30);
v8 = std::string::append(v31, ".", 1u);
v9 = v8[1];
v10 = v8[2];
v34 = *v8;
v35 = v9;
v36 = (_BYTE *)v10;
*v8 = 0;
v8[1] = 0;
v8[2] = 0;
if ( (v27 & 1) != 0 )
{
*v29 = 0;
v28 = 0;
}
else
{
LOWORD(v27) = 0;
}
std::string::reserve(&v27, 0);
v11 = v34;
v12 = v35;
v13 = v36;
v34 = 0;
v35 = 0;
v36 = nullptr;
v27 = v11;
v28 = v12;
v29 = v13;
std::string::~string((int)&v34);
std::string::~string((int)v31);
goto LABEL_15;
}
if ( v6 != 2 )
{
if ( v6 )
v7 = " ";
else
v7 = "You cannot afford that path.";
std::string::assign(&v27, v7);
LABEL_15:
v14 = 5;
goto LABEL_21;
}
std::operator+(v32, "You do not have enough ", (unsigned __int8 *)v30);
v15 = std::string::append(v32, ".", 1u);
v14 = 6;
v16 = v15[1];
v17 = v15[2];
v34 = *v15;
v35 = v16;
v36 = (_BYTE *)v17;
*v15 = 0;
v15[1] = 0;
v15[2] = 0;
if ( (v27 & 1) != 0 )
{
*v29 = 0;
v28 = 0;
}
else
{
LOWORD(v27) = 0;
}
std::string::reserve(&v27, 0);
v18 = v34;
v19 = v35;
v20 = v36;
v34 = 0;
v35 = 0;
v36 = nullptr;
v27 = v18;
v28 = v19;
v29 = v20;
std::string::~string((int)&v34);
std::string::~string((int)v32);
LABEL_21:
memset(v33, 0, sizeof(v33));
std::string::__init(v33, "The Shopkeeper", 0xEu);
std::string::basic_string(&v34, (int)&v27);
LOWORD(v26) = -1;
BYTE2(v26) = -1;
v21 = (DialogLayer *)DialogObject::create((int)v33, (int)&v34, v14, 1065353216, 0, v26);
v24 = DialogLayer::create(v21, (DialogObject *)((char *)&dword_0 + 2), v22, v23);
std::string::~string((int)&v34);
std::string::~string((int)v33);
(*(void (__fastcall **)(GJPathPage *, cocos2d::CCDirector *, int))(*(_DWORD *)this + 232))(this, v24, 100);
DialogLayer::updateChatPlacement(v24, 0);
DialogLayer::animateIn(v24, 1u);
++*((_DWORD *)this + 135);
std::string::~string((int)v30);
return std::string::~string((int)&v27);
}