//
// GJShopLayer::showReactMessage from 0xa7dd58 to 0xa7ec28 (3792 bytes)
//
// 2 xrefs:
// > GJShopLayer::ccTouchBegan @ 0xa7ed80
// > ??> @ 0xb0608
//
// 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:00:30 +0000
//
__int64 __fastcall GJShopLayer::showReactMessage(GJShopLayer *this)
{
cocos2d::CCArray *v2; // x0
GameManager *v3; // x21
GameManager *v4; // x0
GameStatsManager *UGV; // x0
FMODAudioEngine *v6; // x0
unsigned int v7; // w25
int v8; // w27
__int64 v9; // x21
int v10; // w0
char v11; // w1
__int64 v13; // x25
_BOOL4 isSpecialChestUnlocked; // w25
cocos2d::CCObject *v15; // x0
cocos2d::CCObject *v16; // x0
cocos2d::CCObject *v17; // x0
cocos2d::CCString *v18; // x0
size_t v19; // x0
cocos2d::CCObject *v20; // x0
cocos2d::CCObject *v21; // x0
__int64 v22; // x0
__int64 v23; // x2
DialogLayer *v24; // x21
FMODAudioEngine *v25; // x24
int v26; // w4
int v27; // w5
int v28; // w6
int v29; // w7
cocos2d::CCObject *v30; // x0
cocos2d::CCObject *v31; // x0
cocos2d::CCObject *v32; // x0
cocos2d::CCObject *v33; // x0
cocos2d::CCObject *v34; // x0
GameManager *v35; // x0
__int64 v36; // x2
char v37; // w0
__int64 v38; // x0
__int64 v39; // x1
const char *v40; // x1
size_t v41; // x0
cocos2d::CCString *v42; // x0
size_t v43; // x0
const char *v44; // x1
size_t v45; // x0
cocos2d::CCObject *v46; // x0
cocos2d::CCObject *v47; // x0
DialogLayer *v48; // x0
__int64 v49; // x2
GameManager *v50; // x0
GameManager *v51; // x0
char v52; // [xsp+0h] [xbp+0h]
char *v53; // [xsp+68h] [xbp+68h]
char *v54; // [xsp+68h] [xbp+68h]
char *CString; // [xsp+68h] [xbp+68h]
char *v56; // [xsp+68h] [xbp+68h]
__int64 v57; // [xsp+78h] [xbp+78h] BYREF
size_t v58; // [xsp+80h] [xbp+80h]
void *v59; // [xsp+88h] [xbp+88h]
__int64 v60[2]; // [xsp+90h] [xbp+90h] BYREF
void *v61; // [xsp+A0h] [xbp+A0h]
__int64 v62[2]; // [xsp+A8h] [xbp+A8h] BYREF
void *v63; // [xsp+B8h] [xbp+B8h]
__int64 v64[2]; // [xsp+C0h] [xbp+C0h] BYREF
void *v65; // [xsp+D0h] [xbp+D0h]
__int64 v66[2]; // [xsp+D8h] [xbp+D8h] BYREF
void *v67; // [xsp+E8h] [xbp+E8h]
__int64 v68[2]; // [xsp+F0h] [xbp+F0h] BYREF
void *v69; // [xsp+100h] [xbp+100h]
__int64 v70[2]; // [xsp+108h] [xbp+108h] BYREF
void *v71; // [xsp+118h] [xbp+118h]
__int64 v72[2]; // [xsp+120h] [xbp+120h] BYREF
void *v73; // [xsp+130h] [xbp+130h]
__int64 v74[2]; // [xsp+138h] [xbp+138h] BYREF
void *v75; // [xsp+148h] [xbp+148h]
__int64 v76[2]; // [xsp+150h] [xbp+150h] BYREF
void *v77; // [xsp+160h] [xbp+160h]
__int64 v78[2]; // [xsp+168h] [xbp+168h] BYREF
void *v79; // [xsp+178h] [xbp+178h]
__int64 v80[2]; // [xsp+180h] [xbp+180h] BYREF
void *v81; // [xsp+190h] [xbp+190h]
__int64 v82[2]; // [xsp+198h] [xbp+198h] BYREF
void *v83; // [xsp+1A8h] [xbp+1A8h]
__int64 v84[2]; // [xsp+1B0h] [xbp+1B0h] BYREF
void *v85; // [xsp+1C0h] [xbp+1C0h]
__int64 v86[2]; // [xsp+1C8h] [xbp+1C8h] BYREF
void *v87; // [xsp+1D8h] [xbp+1D8h]
__int64 v88[2]; // [xsp+1E0h] [xbp+1E0h] BYREF
void *v89; // [xsp+1F0h] [xbp+1F0h]
__int64 v90[2]; // [xsp+1F8h] [xbp+1F8h] BYREF
void *v91; // [xsp+208h] [xbp+208h]
__int64 v92[2]; // [xsp+210h] [xbp+210h] BYREF
void *v93; // [xsp+220h] [xbp+220h]
__int64 v94[2]; // [xsp+228h] [xbp+228h] BYREF
void *v95; // [xsp+238h] [xbp+238h]
__int64 v96[2]; // [xsp+240h] [xbp+240h] BYREF
void *v97; // [xsp+250h] [xbp+250h]
__int64 v98[2]; // [xsp+258h] [xbp+258h] BYREF
void *v99; // [xsp+268h] [xbp+268h]
GameManager *v100[2]; // [xsp+270h] [xbp+270h] BYREF
void *v101; // [xsp+280h] [xbp+280h]
__int64 v102[2]; // [xsp+288h] [xbp+288h] BYREF
void *v103; // [xsp+298h] [xbp+298h]
__int64 v104; // [xsp+2A0h] [xbp+2A0h] BYREF
__int64 v105; // [xsp+2A8h] [xbp+2A8h]
void *v106; // [xsp+2B0h] [xbp+2B0h]
__int64 v107[2]; // [xsp+2B8h] [xbp+2B8h] BYREF
void *v108; // [xsp+2C8h] [xbp+2C8h]
__int64 v109[2]; // [xsp+2D0h] [xbp+2D0h] BYREF
void *v110; // [xsp+2E0h] [xbp+2E0h]
__int64 v111[2]; // [xsp+2E8h] [xbp+2E8h] BYREF
void *v112; // [xsp+2F8h] [xbp+2F8h]
__int64 v113[2]; // [xsp+300h] [xbp+300h] BYREF
void *v114; // [xsp+310h] [xbp+310h]
__int64 v115; // [xsp+318h] [xbp+318h] BYREF
__int64 v116; // [xsp+320h] [xbp+320h]
char *v117; // [xsp+328h] [xbp+328h]
__int64 v118; // [xsp+330h] [xbp+330h] BYREF
size_t v119; // [xsp+338h] [xbp+338h]
void *v120; // [xsp+340h] [xbp+340h]
v57 = 0;
v58 = 0;
v59 = nullptr;
v2 = (cocos2d::CCArray *)std::string::__init(&v57, "zzz", 3u);
v3 = (GameManager *)cocos2d::CCArray::create(v2);
v4 = (GameManager *)GameManager::sharedState(v3);
UGV = (GameStatsManager *)(unsigned __int8)GameManager::getUGV(v4, "31");
if ( !(_BYTE)UGV )
{
v6 = (FMODAudioEngine *)*((unsigned int *)this + 130);
switch ( (int)v6 )
{
case 0:
std::string::assign(&v57, "What do you want?");
goto LABEL_36;
case 1:
std::string::assign(&v57, "Can you stop?");
goto LABEL_3;
case 2:
std::string::assign(&v57, "Stop with the poking!");
goto LABEL_58;
case 3:
std::string::assign(&v57, "You are getting on my nerves.");
v7 = 2;
v8 = 31;
break;
case 4:
std::string::assign(&v57, "I'm warning you!");
LABEL_58:
v7 = 2;
v8 = 30;
break;
case 5:
v25 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(v6);
v82[0] = 0;
v82[1] = 0;
v83 = nullptr;
std::string::__init(v82, "dangerLoop.mp3", 0xEu);
FMODAudioEngine::playMusic(v25, (char *)v82, 1u, 0, v26, v27, v28, v29, 0.0, v52);
if ( (v82[0] & 1) != 0 )
operator delete(v83);
v84[0] = 0;
v84[1] = 0;
v85 = nullptr;
std::string::__init(v84, "The Shopkeeper", 0xEu);
v86[0] = 0;
v86[1] = 0;
v87 = nullptr;
std::string::__init(v86, "Some things are better left alone.", 0x2Au);
v30 = (cocos2d::CCObject *)DialogObject::create((char *)v84, (char *)v86, 32, 0, 0xFFFFFF, 1.0);
cocos2d::CCArray::addObject(v3, v30);
if ( (v86[0] & 1) != 0 )
operator delete(v87);
if ( (v84[0] & 1) != 0 )
operator delete(v85);
v88[0] = 0;
v88[1] = 0;
v89 = nullptr;
std::string::__init(v88, "The Shopkeeper", 0xEu);
v90[0] = 0;
v90[1] = 0;
v91 = nullptr;
std::string::__init(v90, "Oh no... Not again.", 0x13u);
v31 = (cocos2d::CCObject *)DialogObject::create((char *)v88, (char *)v90, 34, 0, 0xFFFFFF, 1.0);
cocos2d::CCArray::addObject(v3, v31);
if ( (v90[0] & 1) != 0 )
operator delete(v91);
if ( (v88[0] & 1) != 0 )
operator delete(v89);
v92[0] = 0;
v92[1] = 0;
v93 = nullptr;
std::string::__init(v92, "The Shopkeeper", 0xEu);
v94[0] = 0;
v94[1] = 0;
v95 = nullptr;
std::string::__init(v94, "Just... just STOP tapping and it will be fine!", 0x36u);
v32 = (cocos2d::CCObject *)DialogObject::create((char *)v92, (char *)v94, 36, 0, 0xFFFFFF, 1.0);
cocos2d::CCArray::addObject(v3, v32);
if ( (v94[0] & 1) != 0 )
operator delete(v95);
if ( (v92[0] & 1) != 0 )
operator delete(v93);
goto LABEL_56;
case 6:
std::string::assign(&v57, "It's best if you stop doing that.");
v7 = 2;
v8 = 34;
break;
case 7:
std::string::assign(&v57, "...");
v7 = 2;
v8 = 35;
break;
case 8:
std::string::assign(&v57, "I feel, strange...");
v7 = 4;
v8 = 32;
break;
case 9:
v97 = nullptr;
v96[0] = 0;
v96[1] = 0;
std::string::__init(v96, "Zolguroth", 9u);
v98[0] = 0;
v98[1] = 0;
v99 = nullptr;
std::string::__init(v98, "You dare touch a god?", 0x1Du);
v33 = (cocos2d::CCObject *)DialogObject::create((char *)v96, (char *)v98, 33, 0, 0xFFFFFF, 1.0);
cocos2d::CCArray::addObject(v3, v33);
if ( (v98[0] & 1) != 0 )
operator delete(v99);
if ( (v96[0] & 1) != 0 )
operator delete(v97);
v100[0] = nullptr;
v100[1] = nullptr;
v101 = nullptr;
std::string::__init((__int64 *)v100, "Zolguroth", 9u);
v102[0] = 0;
v102[1] = 0;
v103 = nullptr;
std::string::__init(v102, "You will regret your actions here today.", 0x30u);
v34 = (cocos2d::CCObject *)DialogObject::create((char *)v100, (char *)v102, 33, 0, 0xFFFFFF, 1.0);
cocos2d::CCArray::addObject(v3, v34);
if ( (v102[0] & 1) != 0 )
operator delete(v103);
v35 = (GameManager *)LOBYTE(v100[0]);
if ( ((__int64)v100[0] & 1) != 0 )
operator delete(v101);
v36 = GameManager::sharedState(v35) + 632;
v37 = *(_BYTE *)v36;
v104 = 0;
v105 = 0;
v106 = nullptr;
if ( (v37 & 1) != 0 )
{
std::string::__init(&v104, *(void **)(v36 + 16), *(_QWORD *)(v36 + 8));
}
else
{
v38 = *(_QWORD *)v36;
v39 = *(_QWORD *)(v36 + 8);
v106 = *(void **)(v36 + 16);
v104 = v38;
v105 = v39;
}
v40 = (char *)&v104 + 1;
if ( (v104 & 1) != 0 )
v40 = (const char *)v106;
v54 = (char *)v40;
v115 = 0;
v116 = 0;
v117 = nullptr;
v41 = strlen(v40);
std::string::__init(&v115, v54, v41);
if ( (v104 & 1) != 0 )
operator delete(v106);
if ( (v115 & 1) != 0 )
{
if ( v116 )
{
LABEL_79:
v42 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"I have big things planned\n"
"for you %s.",
v117);
goto LABEL_80;
}
}
else if ( (int)(unsigned __int8)v115 >> 1 )
{
goto LABEL_104;
}
std::string::assign(&v115, "...");
if ( (v115 & 1) != 0 )
goto LABEL_79;
LABEL_104:
v42 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"I have big things planned\nfor you %s.",
(const char *)&v115 + 1);
LABEL_80:
CString = (char *)cocos2d::CCString::getCString(v42);
v118 = 0;
v119 = 0;
v120 = nullptr;
v43 = strlen(CString);
std::string::__init(&v118, CString, v43);
v107[0] = 0;
v107[1] = 0;
v108 = nullptr;
std::string::__init(v107, "Zolguroth", 9u);
v44 = (char *)&v118 + 1;
if ( (v118 & 1) != 0 )
v44 = (const char *)v120;
v56 = (char *)v44;
v109[0] = 0;
v109[1] = 0;
v110 = nullptr;
v45 = strlen(v44);
std::string::__init(v109, v56, v45);
v46 = (cocos2d::CCObject *)DialogObject::create((char *)v107, (char *)v109, 33, 0, 0xFFFFFF, 1.0);
cocos2d::CCArray::addObject(v3, v46);
if ( (v109[0] & 1) != 0 )
operator delete(v110);
if ( (v107[0] & 1) != 0 )
operator delete(v108);
v111[0] = 0;
v111[1] = 0;
v112 = nullptr;
std::string::__init(v111, "Zolguroth", 9u);
v113[0] = 0;
v113[1] = 0;
v114 = nullptr;
std::string::__init(v113, "Now... BEGONE!", 0x44u);
v47 = (cocos2d::CCObject *)DialogObject::create((char *)v111, (char *)v113, 33, 0, 0xFFFFFF, 1.0);
cocos2d::CCArray::addObject(v3, v47);
if ( (v113[0] & 1) != 0 )
operator delete(v114);
if ( (v111[0] & 1) != 0 )
operator delete(v112);
if ( (v118 & 1) != 0 )
operator delete(v120);
if ( (v115 & 1) != 0 )
operator delete(v117);
LABEL_56:
v7 = 4;
v8 = 6;
break;
default:
LABEL_3:
v7 = 2;
v8 = 6;
break;
}
LABEL_4:
if ( (unsigned int)cocos2d::CCArray::count(v3) )
{
v9 = DialogLayer::createWithObjects(v3, (cocos2d::CCArray *)v7);
}
else
{
v115 = 0;
v116 = 0;
v117 = nullptr;
std::string::__init(&v115, "The Shopkeeper", 0xEu);
v118 = 0;
v119 = 0;
v120 = nullptr;
if ( (v57 & 1) != 0 )
{
std::string::__init(&v118, v59, v58);
}
else
{
v120 = v59;
v118 = v57;
v119 = v58;
}
v48 = (DialogLayer *)DialogObject::create((char *)&v115, (char *)&v118, v8, 0, 0xFFFFFF, 1.0);
v9 = DialogLayer::create(v48, (DialogObject *)v7);
if ( (v118 & 1) != 0 )
operator delete(v120);
if ( (v115 & 1) != 0 )
operator delete(v117);
}
*(_BYTE *)(v9 + 617) = 1;
(*(void (__fastcall **)(GJShopLayer *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v9, 100);
DialogLayer::updateChatPlacement(v9, 0);
DialogLayer::animateInRandomSide((DialogLayer *)v9);
v10 = *((_DWORD *)this + 130);
if ( v10 > 8 )
{
v49 = *(_QWORD *)v9;
*(_QWORD *)(v9 + 624) = (char *)this + 416;
*(_BYTE *)(v9 + 640) = 1;
v50 = (GameManager *)(*(__int64 (__fastcall **)(__int64, __int64))(v49 + 72))(v9, 1);
v51 = (GameManager *)GameManager::sharedState(v50);
GameManager::setUGV(v51, "31", 1u);
v10 = *((_DWORD *)this + 130);
}
v11 = v57;
*((_DWORD *)this + 130) = v10 + 1;
if ( (v11 & 1) == 0 )
return _stack_chk_guard;
LABEL_34:
operator delete(v59);
return _stack_chk_guard;
}
*((_DWORD *)this + 130) = 0;
v13 = GameStatsManager::sharedState(UGV);
v60[0] = 0;
v60[1] = 0;
v61 = nullptr;
std::string::__init(v60, "0022", 4u);
isSpecialChestUnlocked = GameStatsManager::isSpecialChestUnlocked(v13, (char *)v60);
if ( (v60[0] & 1) == 0 )
{
if ( !isSpecialChestUnlocked )
goto LABEL_13;
LABEL_35:
std::string::assign(&v57, "Can I help you?");
LABEL_36:
v7 = 2;
v8 = 29;
goto LABEL_4;
}
operator delete(v61);
if ( isSpecialChestUnlocked )
goto LABEL_35;
LABEL_13:
v62[0] = 0;
v62[1] = 0;
v63 = nullptr;
std::string::__init(v62, "The Shopkeeper", 0xEu);
v64[0] = 0;
v64[1] = 0;
v65 = nullptr;
std::string::__init(v64, "Hey, Welcome back!", 0x12u);
v15 = (cocos2d::CCObject *)DialogObject::create((char *)v62, (char *)v64, 5, 0, 0xFFFFFF, 1.0);
cocos2d::CCArray::addObject(v3, v15);
if ( (v64[0] & 1) != 0 )
operator delete(v65);
if ( (v62[0] & 1) != 0 )
operator delete(v63);
v66[0] = 0;
v66[1] = 0;
v67 = nullptr;
std::string::__init(v66, "The Shopkeeper", 0xEu);
v68[0] = 0;
v68[1] = 0;
v69 = nullptr;
std::string::__init(v68, "Sorry, I think I fell asleep earlier. Did I miss something?", 0x41u);
v16 = (cocos2d::CCObject *)DialogObject::create((char *)v66, (char *)v68, 29, 0, 0xFFFFFF, 1.0);
cocos2d::CCArray::addObject(v3, v16);
if ( (v68[0] & 1) != 0 )
operator delete(v69);
if ( (v66[0] & 1) != 0 )
operator delete(v67);
v70[0] = 0;
v70[1] = 0;
v71 = nullptr;
std::string::__init(v70, "The Shopkeeper", 0xEu);
v72[0] = 0;
v72[1] = 0;
v73 = nullptr;
std::string::__init(v72, "Oh yea! Someone left this package here for you.", 0x3Fu);
v17 = (cocos2d::CCObject *)DialogObject::create((char *)v70, (char *)v72, 5, 0, 0xFFFFFF, 1.0);
cocos2d::CCArray::addObject(v3, v17);
if ( (v72[0] & 1) != 0 )
operator delete(v73);
if ( (v70[0] & 1) != 0 )
operator delete(v71);
v74[0] = 0;
v74[1] = 0;
v75 = nullptr;
std::string::__init(v74, "The Shopkeeper", 0xEu);
v18 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Who is %s?",
"Zolguroth");
v53 = (char *)cocos2d::CCString::getCString(v18);
v76[0] = 0;
v76[1] = 0;
v77 = nullptr;
v19 = strlen(v53);
std::string::__init(v76, v53, v19);
v20 = (cocos2d::CCObject *)DialogObject::create((char *)v74, (char *)v76, 29, 0, 0xFFFFFF, 1.0);
cocos2d::CCArray::addObject(v3, v20);
if ( (v76[0] & 1) != 0 )
operator delete(v77);
if ( (v74[0] & 1) != 0 )
operator delete(v75);
v78[0] = 0;
v78[1] = 0;
v79 = nullptr;
std::string::__init(v78, "The Shopkeeper", 0xEu);
v80[0] = 0;
v80[1] = 0;
v81 = nullptr;
std::string::__init(v80, "I really need to get that thing checked...", 0x3Eu);
v21 = (cocos2d::CCObject *)DialogObject::create((char *)v78, (char *)v80, 34, 0, 0xFFFFFF, 1.0);
cocos2d::CCArray::addObject(v3, v21);
if ( (v80[0] & 1) != 0 )
operator delete(v81);
if ( (v78[0] & 1) != 0 )
operator delete(v79);
v22 = DialogLayer::createWithObjects(v3, (cocos2d::CCArray *)((char *)&dword_0 + 2));
v23 = *(_QWORD *)v22;
*(_QWORD *)(v22 + 624) = (char *)this + 416;
*(_BYTE *)(v22 + 617) = 1;
v24 = (DialogLayer *)v22;
(*(void (__fastcall **)(__int64, __int64))(v23 + 72))(v22, 2);
(*(void (__fastcall **)(GJShopLayer *, DialogLayer *, __int64))(*(_QWORD *)this + 464LL))(this, v24, 100);
DialogLayer::updateChatPlacement((__int64)v24, 0);
DialogLayer::animateInRandomSide(v24);
if ( (v57 & 1) != 0 )
goto LABEL_34;
return _stack_chk_guard;
}