//
// GJShopLayer::showReactMessage from 0x4e2350 to 0x4e2b1c (1996 bytes)
//
// 1 xrefs:
// > GJShopLayer::ccTouchBegan @ 0x4e2f38
//
// 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 GJShopLayer::showReactMessage(GJShopLayer *a1)
{
cocos2d::CCArray *v2; // r0
cocos2d::CCArray *v3; // r5
GameManager *v4; // r0
GameStatsManager *v5; // r9
stl::StringData::Internal *v6; // r2
stl::StringData::Internal *v7; // r3
int isSpecialChestUnlocked; // r9
cocos2d::CCObject *v9; // r0
cocos2d::CCObject *v10; // r0
cocos2d::CCObject *v11; // r0
cocos2d::CCString *v12; // r0
char *CString; // r0
cocos2d::CCObject *v14; // r0
cocos2d::CCObject *v15; // r0
DialogLayer *v16; // r0
DialogLayer *v17; // r4
char *v18; // r1
int v19; // r8
std::string v20; // r9
char *v21; // r1
FMODAudioEngine *v22; // r9
cocos2d::CCObject *v23; // r0
cocos2d::CCObject *v24; // r0
cocos2d::CCObject *v25; // r0
void *p_m_characterFrame; // r0
cocos2d::CCObject *v27; // r0
cocos2d::CCObject *v28; // r0
cocos2d::CCString *v29; // r0
char *v30; // r0
cocos2d::CCObject *v31; // r0
cocos2d::CCObject *v32; // r0
DialogLayer *v33; // r5
DialogObject *v34; // r0
DialogLayer_vtbl *v35; // r3
GameManager *v36; // r0
int v37; // [sp+4h] [bp-98h]
int v38; // [sp+4h] [bp-98h]
int v39; // [sp+4h] [bp-98h]
int v40; // [sp+4h] [bp-98h]
int v41; // [sp+4h] [bp-98h]
int v42; // [sp+4h] [bp-98h]
int v43; // [sp+4h] [bp-98h]
int v44; // [sp+4h] [bp-98h]
int v45; // [sp+4h] [bp-98h]
int v46; // [sp+4h] [bp-98h]
_BYTE v47[4]; // [sp+1Ch] [bp-80h] BYREF
char *v48; // [sp+20h] [bp-7Ch] BYREF
DialogObject v49; // [sp+24h] [bp-78h] BYREF
char v50; // [sp+70h] [bp-2Ch] BYREF
_BYTE v51[4]; // [sp+74h] [bp-28h] BYREF
char *v52; // [sp+78h] [bp-24h] BYREF
char v53; // [sp+7Ch] [bp-20h] BYREF
_BYTE v54[4]; // [sp+80h] [bp-1Ch] BYREF
char v55; // [sp+84h] [bp-18h] BYREF
_BYTE v56[4]; // [sp+88h] [bp-14h] BYREF
char *v57; // [sp+8Ch] [bp-10h] BYREF
char *v58; // [sp+90h] [bp-Ch] BYREF
v2 = (cocos2d::CCArray *)sub_776584((int)v47, "zzz");
v3 = (cocos2d::CCArray *)cocos2d::CCArray::create(v2);
v4 = GameManager::sharedState();
if ( GameManager::getUGV(v4, "31") )
{
a1->m_zolgurothDialogIndex = 0;
v5 = GameStatsManager::sharedState();
sub_776584((int)&v48, "0022");
isSpecialChestUnlocked = GameStatsManager::isSpecialChestUnlocked((int)v5, &v48, v6, v7);
sub_774008(&v48);
if ( !isSpecialChestUnlocked )
{
sub_776584((int)&v49, "The Shopkeeper");
sub_776584((int)&v49.m_uID, "Hey, Welcome back!");
LOWORD(v37) = -1;
BYTE2(v37) = -1;
v9 = (cocos2d::CCObject *)DialogObject::create(
&v49,
(std::string)&v49.m_uID,
(std::string)5,
1065353216,
0.0,
v37);
cocos2d::CCArray::addObject(v3, v9);
sub_774008(&v49.m_uID);
sub_774008(&v49);
sub_776584((int)&v49.m_nLuaID, "The Shopkeeper");
sub_776584((int)&v49.m_nTag, "Sorry, I think I fell asleep earlier. Did I miss something?");
LOWORD(v38) = -1;
BYTE2(v38) = -1;
v10 = (cocos2d::CCObject *)DialogObject::create(
(DialogObject *)&v49.m_nLuaID,
(std::string)&v49.m_nTag,
(std::string)29,
1065353216,
0.0,
v38);
cocos2d::CCArray::addObject(v3, v10);
sub_774008(&v49.m_nTag);
sub_774008(&v49.m_nLuaID);
sub_776584((int)&v49.m_uReference, "The Shopkeeper");
sub_776584((int)&v49.m_uAutoReleaseCount, "Oh yea! Someone left this package here for you.");
LOWORD(v39) = -1;
BYTE2(v39) = -1;
v11 = (cocos2d::CCObject *)DialogObject::create(
(DialogObject *)&v49.m_uReference,
(std::string)&v49.m_uAutoReleaseCount,
(std::string)5,
1065353216,
0.0,
v39);
cocos2d::CCArray::addObject(v3, v11);
sub_774008(&v49.m_uAutoReleaseCount);
sub_774008(&v49.m_uReference);
sub_776584((int)&v49.m_eObjType, "The Shopkeeper");
v12 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Who is %s?",
"Zolguroth");
CString = (char *)cocos2d::CCString::getCString(v12);
sub_776584((int)&v49.m_uIndexInArray, CString);
LOWORD(v40) = -1;
BYTE2(v40) = -1;
v14 = (cocos2d::CCObject *)DialogObject::create(
(DialogObject *)&v49.m_eObjType,
(std::string)&v49.m_uIndexInArray,
(std::string)29,
1065353216,
0.0,
v40);
cocos2d::CCArray::addObject(v3, v14);
sub_774008(&v49.m_uIndexInArray);
sub_774008(&v49.m_eObjType);
sub_776584((int)&v49.m_uUnknown, "The Shopkeeper");
sub_776584((int)&v49.m_unknown2, "I really need to get that thing checked...");
LOWORD(v41) = -1;
BYTE2(v41) = -1;
v15 = (cocos2d::CCObject *)DialogObject::create(
(DialogObject *)&v49.m_uUnknown,
(std::string)&v49.m_unknown2,
(std::string)34,
1065353216,
0.0,
v41);
cocos2d::CCArray::addObject(v3, v15);
sub_774008(&v49.m_unknown2);
sub_774008(&v49.m_uUnknown);
v16 = DialogLayer::createWithObjects(v3, (int)&dword_0 + 2);
v16->m_skippable = 1;
v16->m_delegate = &a1->DialogDelegate;
v17 = v16;
v16->setTag(v16, 2);
a1->addChild_0(a1, v17, 100);
DialogLayer::updateChatPlacement(v17, Center);
DialogLayer::animateInRandomSide(v17);
goto LABEL_29;
}
v18 = "Can I help you?";
LABEL_5:
sub_7753D4((int)v47, v18);
v19 = 2;
v20.m_data.m_data = (stl::StringData::Internal *)(&dword_1C + 1);
}
else
{
switch ( a1->m_zolgurothDialogIndex )
{
case 0:
v18 = "What do you want?";
goto LABEL_5;
case 1:
sub_7753D4((int)v47, "Can you stop?");
goto LABEL_22;
case 2:
v21 = "Stop with the poking!";
goto LABEL_10;
case 3:
sub_7753D4((int)v47, "You are getting on my nerves.");
v19 = 2;
v20.m_data.m_data = (stl::StringData::Internal *)(&dword_1C + 3);
goto LABEL_23;
case 4:
v21 = "I'm warning you!";
LABEL_10:
sub_7753D4((int)v47, v21);
v19 = 2;
v20.m_data.m_data = (stl::StringData::Internal *)(&dword_1C + 2);
goto LABEL_23;
case 5:
v22 = FMODAudioEngine::sharedEngine();
sub_776584((int)&v49.m_nZOrder, "dangerLoop.mp3");
FMODAudioEngine::playMusic((FMOD::Channel *)v22, (int)&v49.m_nZOrder, 1, 0.0, 0);
sub_774008(&v49.m_nZOrder);
sub_776584((int)&v49.m_uOrderOfArrival, "The Shopkeeper");
sub_776584((int)&v49.m_unknown5, "Some things are better left alone.");
LOWORD(v37) = -1;
BYTE2(v37) = -1;
v23 = (cocos2d::CCObject *)DialogObject::create(
(DialogObject *)&v49.m_uOrderOfArrival,
(std::string)&v49.m_unknown5,
(std::string)32,
1065353216,
0.0,
v37);
cocos2d::CCArray::addObject(v3, v23);
sub_774008(&v49.m_unknown5);
sub_774008(&v49.m_uOrderOfArrival);
sub_776584((int)&v49.m_text, "The Shopkeeper");
sub_776584((int)&v49.m_character, "Oh no... Not again.");
LOWORD(v42) = -1;
BYTE2(v42) = -1;
v24 = (cocos2d::CCObject *)DialogObject::create(
(DialogObject *)&v49.m_text,
(std::string)&v49.m_character,
(std::string)34,
1065353216,
0.0,
v42);
cocos2d::CCArray::addObject(v3, v24);
sub_774008(&v49.m_character);
sub_774008(&v49.m_text);
sub_776584((int)&v49.m_characterFrame, "The Shopkeeper");
sub_776584((int)&v49.m_nameColor, "Just... just STOP tapping and it will be fine!");
LOWORD(v43) = -1;
BYTE2(v43) = -1;
v25 = (cocos2d::CCObject *)DialogObject::create(
(DialogObject *)&v49.m_characterFrame,
(std::string)&v49.m_nameColor,
(std::string)36,
1065353216,
0.0,
v43);
cocos2d::CCArray::addObject(v3, v25);
sub_774008(&v49.m_nameColor);
p_m_characterFrame = &v49.m_characterFrame;
goto LABEL_20;
case 6:
sub_7753D4((int)v47, "It's best if you stop doing that.");
v19 = 2;
v20.m_data.m_data = (stl::StringData::Internal *)(&dword_20 + 2);
goto LABEL_23;
case 7:
sub_7753D4((int)v47, "...");
v19 = 2;
v20.m_data.m_data = (stl::StringData::Internal *)(&dword_20 + 3);
goto LABEL_23;
case 8:
sub_7753D4((int)v47, "I feel, strange...");
v19 = 4;
v20.m_data.m_data = (stl::StringData::Internal *)&dword_20;
goto LABEL_23;
case 9:
sub_776584((int)&v49.m_textScale, "Zolguroth");
sub_776584((int)&v49.m_unskippable, "You dare touch a god?");
LOWORD(v37) = -1;
BYTE2(v37) = -1;
v27 = (cocos2d::CCObject *)DialogObject::create(
(DialogObject *)&v49.m_textScale,
(std::string)&v49.m_unskippable,
(std::string)33,
1065353216,
0.0,
v37);
cocos2d::CCArray::addObject(v3, v27);
sub_774008(&v49.m_unskippable);
sub_774008(&v49.m_textScale);
sub_776584((int)&v50, "Zolguroth");
sub_776584((int)v51, "You will regret your actions here today.");
LOWORD(v44) = -1;
BYTE2(v44) = -1;
v28 = (cocos2d::CCObject *)DialogObject::create(
(DialogObject *)&v50,
(std::string)v51,
(std::string)33,
1065353216,
0.0,
v44);
cocos2d::CCArray::addObject(v3, v28);
sub_774008(v51);
sub_774008(&v50);
GameManager::sharedState();
sub_775C20(&v52);
sub_776584((int)&v57, v52);
sub_774008(&v52);
if ( !*((_DWORD *)v57 - 3) )
sub_7753D4((int)&v57, "...");
v29 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"I have big things planned\nfor you %s.",
v57);
v30 = (char *)cocos2d::CCString::getCString(v29);
sub_776584((int)&v58, v30);
sub_776584((int)&v53, "Zolguroth");
sub_776584((int)v54, v58);
LOWORD(v45) = -1;
BYTE2(v45) = -1;
v31 = (cocos2d::CCObject *)DialogObject::create(
(DialogObject *)&v53,
(std::string)v54,
(std::string)33,
1065353216,
0.0,
v45);
cocos2d::CCArray::addObject(v3, v31);
sub_774008(v54);
sub_774008(&v53);
sub_776584((int)&v55, "Zolguroth");
sub_776584((int)v56, "Now... BEGONE!");
LOWORD(v46) = -1;
BYTE2(v46) = -1;
v32 = (cocos2d::CCObject *)DialogObject::create(
(DialogObject *)&v55,
(std::string)v56,
(std::string)33,
1065353216,
0.0,
v46);
cocos2d::CCArray::addObject(v3, v32);
sub_774008(v56);
sub_774008(&v55);
sub_774008(&v58);
p_m_characterFrame = &v57;
LABEL_20:
sub_774008(p_m_characterFrame);
v19 = 4;
break;
default:
LABEL_22:
v19 = 2;
break;
}
v20.m_data.m_data = (stl::StringData::Internal *)&byte_6;
}
LABEL_23:
if ( cocos2d::CCArray::count(v3) )
{
v33 = DialogLayer::createWithObjects(v3, v19);
}
else
{
sub_776584((int)&v57, "The Shopkeeper");
sub_775C20(&v58);
LOWORD(v37) = -1;
BYTE2(v37) = -1;
v34 = (DialogObject *)DialogObject::create((DialogObject *)&v57, (std::string)&v58, v20, 1065353216, 0.0, v37);
v33 = DialogLayer::create(v34, v19);
sub_774008(&v58);
sub_774008(&v57);
}
v33->m_skippable = 1;
a1->addChild_0(a1, v33, 100);
DialogLayer::updateChatPlacement(v33, Center);
DialogLayer::animateInRandomSide(v33);
if ( a1->m_zolgurothDialogIndex > 8 )
{
v33->m_delegate = &a1->DialogDelegate;
v35 = v33->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v33->m_noRemove = 1;
((void (__fastcall *)(DialogLayer *))v35->setTag)(v33);
v36 = GameManager::sharedState();
GameManager::setUGV(v36, "31", 1);
}
++a1->m_zolgurothDialogIndex;
LABEL_29:
sub_774008(v47);
}