//
// sub_1001CB24C from 0x1001cb24c to 0x1001cbbe4 (2456 bytes)
//
// 1 xrefs:
// > GJShopLayer::ccTouchBegan @ 0x1001cc1c4
//
// 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 11:00:20 +0000
//
void __fastcall sub_1001CB24C(_DWORD *a1)
{
_QWORD *v2; // x0
__int64 v3; // x20
__int64 v4; // x0
__int64 UGV; // x0
__int64 v6; // x21
char isSpecialChestUnlocked; // w0
char v8; // w21
const std::string::value_type *v9; // x1
int v10; // w21
__int64 v11; // x22
int v12; // w8
const std::string::value_type *v13; // x1
char *v14; // x0
char *v15; // x0
__int64 v16; // x0
__int64 v17; // x0
char *v18; // x0
char *v19; // x0
char *v20; // x0
__int64 v21; // x0
char *v22; // x0
char *v23; // x0
char *v24; // x0
_BYTE *v25; // x20
__int64 *v26; // x21
char *v27; // x0
char *v28; // x0
char *v29; // x0
char *v30; // x1
std::string::size_type size; // x9
char v32; // w8
bool v33; // nf
std::string *v34; // x8
__int64 v35; // x0
char *CString; // x0
char *v37; // x1
char *v38; // x0
char *v39; // x0
__int64 v40; // x20
char *v41; // x0
int v42; // w8
__int64 v43; // x0
__int64 v44; // x0
std::string v45; // [xsp+10h] [xbp-320h] BYREF
void *v46[2]; // [xsp+28h] [xbp-308h] BYREF
char v47; // [xsp+3Fh] [xbp-2F1h]
void *v48[2]; // [xsp+40h] [xbp-2F0h] BYREF
char v49; // [xsp+57h] [xbp-2D9h]
void *v50[2]; // [xsp+58h] [xbp-2D8h] BYREF
char v51; // [xsp+6Fh] [xbp-2C1h]
void *v52[2]; // [xsp+70h] [xbp-2C0h] BYREF
char v53; // [xsp+87h] [xbp-2A9h]
void *v54[2]; // [xsp+88h] [xbp-2A8h] BYREF
char v55; // [xsp+9Fh] [xbp-291h]
void *__dst[2]; // [xsp+A0h] [xbp-290h] BYREF
__int64 v57; // [xsp+B0h] [xbp-280h]
std::string v58; // [xsp+C0h] [xbp-270h] BYREF
void *v59[2]; // [xsp+D8h] [xbp-258h] BYREF
char v60; // [xsp+EFh] [xbp-241h]
void *v61[2]; // [xsp+F0h] [xbp-240h] BYREF
char v62; // [xsp+107h] [xbp-229h]
void *__p[2]; // [xsp+108h] [xbp-228h] BYREF
char v64; // [xsp+11Fh] [xbp-211h]
void *v65[2]; // [xsp+120h] [xbp-210h] BYREF
char v66; // [xsp+137h] [xbp-1F9h]
void *v67[2]; // [xsp+138h] [xbp-1F8h] BYREF
char v68; // [xsp+14Fh] [xbp-1E1h]
void *v69[2]; // [xsp+150h] [xbp-1E0h] BYREF
char v70; // [xsp+167h] [xbp-1C9h]
void *v71[2]; // [xsp+168h] [xbp-1C8h] BYREF
char v72; // [xsp+17Fh] [xbp-1B1h]
void *v73[2]; // [xsp+180h] [xbp-1B0h] BYREF
char v74; // [xsp+197h] [xbp-199h]
void *v75[2]; // [xsp+198h] [xbp-198h] BYREF
char v76; // [xsp+1AFh] [xbp-181h]
void *v77[2]; // [xsp+1B0h] [xbp-180h] BYREF
char v78; // [xsp+1C7h] [xbp-169h]
void *v79[2]; // [xsp+1C8h] [xbp-168h] BYREF
char v80; // [xsp+1DFh] [xbp-151h]
void *v81[2]; // [xsp+1E0h] [xbp-150h] BYREF
char v82; // [xsp+1F7h] [xbp-139h]
void *v83[2]; // [xsp+1F8h] [xbp-138h] BYREF
char v84; // [xsp+20Fh] [xbp-121h]
void *v85[2]; // [xsp+210h] [xbp-120h] BYREF
char v86; // [xsp+227h] [xbp-109h]
void *v87[2]; // [xsp+228h] [xbp-108h] BYREF
char v88; // [xsp+23Fh] [xbp-F1h]
void *v89[2]; // [xsp+240h] [xbp-F0h] BYREF
char v90; // [xsp+257h] [xbp-D9h]
void *v91[2]; // [xsp+258h] [xbp-D8h] BYREF
char v92; // [xsp+26Fh] [xbp-C1h]
void *v93[2]; // [xsp+270h] [xbp-C0h] BYREF
char v94; // [xsp+287h] [xbp-A9h]
void *v95[2]; // [xsp+288h] [xbp-A8h] BYREF
char v96; // [xsp+29Fh] [xbp-91h]
void *v97[2]; // [xsp+2A0h] [xbp-90h] BYREF
char v98; // [xsp+2B7h] [xbp-79h]
void *v99[2]; // [xsp+2B8h] [xbp-78h] BYREF
char v100; // [xsp+2CFh] [xbp-61h]
void *v101[2]; // [xsp+2D0h] [xbp-60h] BYREF
char v102; // [xsp+2E7h] [xbp-49h]
std::string v103; // [xsp+2E8h] [xbp-48h] BYREF
v2 = sub_100009900(&v103, "zzz");
v3 = sub_1002E736C(v2);
v4 = GameManager::sharedState(v3);
UGV = GameManager::getUGV(v4, "31");
if ( !(_DWORD)UGV )
{
v12 = a1[130];
v10 = 6;
v11 = 2;
if ( v12 > 4 )
{
if ( v12 <= 6 )
{
if ( v12 != 5 )
{
std::string::assign(&v103, "It's best if you stop doing that.");
v10 = 34;
goto LABEL_101;
}
v26 = (__int64 *)FMODAudioEngine::sharedEngine();
sub_100009900(v79, "dangerLoop.mp3");
FMODAudioEngine::playMusic(v26, (__int64)v79, 1, 0, 0.0);
if ( v80 < 0 )
operator delete(v79[0]);
sub_100009900(v77, "The Shopkeeper");
sub_100009900(v75, "Some things are better left alone.");
v27 = DialogObject::create((__int64)v77, (__int64)v75, 32, 0, 0xFFFFFF, 1.0);
sub_1002E74E0(v3, v27);
if ( v76 < 0 )
operator delete(v75[0]);
if ( v78 < 0 )
operator delete(v77[0]);
sub_100009900(v73, "The Shopkeeper");
sub_100009900(v71, "Oh no... Not again.");
v28 = DialogObject::create((__int64)v73, (__int64)v71, 34, 0, 0xFFFFFF, 1.0);
sub_1002E74E0(v3, v28);
if ( v72 < 0 )
operator delete(v71[0]);
if ( v74 < 0 )
operator delete(v73[0]);
sub_100009900(v69, "The Shopkeeper");
sub_100009900(v67, "Just... just STOP tapping and it will be fine!");
v29 = DialogObject::create((__int64)v69, (__int64)v67, 36, 0, 0xFFFFFF, 1.0);
sub_1002E74E0(v3, v29);
if ( v68 < 0 )
operator delete(v67[0]);
if ( v70 < 0 )
operator delete(v69[0]);
v10 = 6;
}
else
{
switch ( v12 )
{
case 7:
std::string::assign(&v103, "...");
v10 = 35;
goto LABEL_101;
case 8:
std::string::assign(&v103, "I feel, strange...");
v10 = 32;
break;
case 9:
sub_100009900(v65, "Zolguroth");
sub_100009900(__p, "You dare touch a god?");
v14 = DialogObject::create((__int64)v65, (__int64)__p, 33, 0, 0xFFFFFF, 1.0);
sub_1002E74E0(v3, v14);
if ( v64 < 0 )
operator delete(__p[0]);
if ( v66 < 0 )
operator delete(v65[0]);
sub_100009900(v61, "Zolguroth");
sub_100009900(v59, "You will regret your actions here today.");
v15 = DialogObject::create((__int64)v61, (__int64)v59, 33, 0, 0xFFFFFF, 1.0);
sub_1002E74E0(v3, v15);
if ( v60 < 0 )
operator delete(v59[0]);
if ( v62 < 0 )
operator delete(v61[0]);
v17 = GameManager::sharedState(v16);
if ( *(char *)(v17 + 655) < 0 )
{
sub_1000097D0(__dst, *(void **)(v17 + 632), *(_QWORD *)(v17 + 640));
}
else
{
*(_OWORD *)__dst = *(_OWORD *)(v17 + 632);
v57 = *(_QWORD *)(v17 + 648);
}
if ( v57 >= 0 )
v30 = (char *)__dst;
else
v30 = (char *)__dst[0];
sub_100009900(&v58, v30);
if ( SHIBYTE(v57) < 0 )
operator delete(__dst[0]);
size = HIBYTE(v58.__r_.__value_.__r.__words[2]);
v32 = HIBYTE(v58.__r_.__value_.__r.__words[2]);
if ( (v58.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
size = v58.__r_.__value_.__l.__size_;
if ( !size )
{
std::string::assign(&v58, "...");
v32 = HIBYTE(v58.__r_.__value_.__r.__words[2]);
}
v33 = v32 < 0;
v34 = &v58;
if ( v33 )
v34 = (std::string *)v58.__r_.__value_.__r.__words[0];
v35 = sub_1003065B0("I have big things planned\nfor you %s.", (const char *)v34);
CString = (char *)cocos2d::CCString::getCString(v35);
sub_100009900(__dst, CString);
sub_100009900(v54, "Zolguroth");
if ( v57 >= 0 )
v37 = (char *)__dst;
else
v37 = (char *)__dst[0];
sub_100009900(v52, v37);
v38 = DialogObject::create((__int64)v54, (__int64)v52, 33, 0, 0xFFFFFF, 1.0);
sub_1002E74E0(v3, v38);
if ( v53 < 0 )
operator delete(v52[0]);
if ( v55 < 0 )
operator delete(v54[0]);
sub_100009900(v50, "Zolguroth");
sub_100009900(v48, "Now... BEGONE!");
v39 = DialogObject::create((__int64)v50, (__int64)v48, 33, 0, 0xFFFFFF, 1.0);
sub_1002E74E0(v3, v39);
if ( v49 < 0 )
operator delete(v48[0]);
if ( v51 < 0 )
operator delete(v50[0]);
if ( SHIBYTE(v57) < 0 )
operator delete(__dst[0]);
if ( SHIBYTE(v58.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v58.__r_.__value_.__l.__data_);
break;
default:
goto LABEL_101;
}
}
v11 = 4;
goto LABEL_101;
}
if ( v12 > 1 )
{
if ( v12 == 2 )
{
v13 = "Stop with the poking!";
}
else
{
if ( v12 == 3 )
{
std::string::assign(&v103, "You are getting on my nerves.");
v10 = 31;
goto LABEL_101;
}
v13 = "I'm warning you!";
}
std::string::assign(&v103, v13);
v10 = 30;
LABEL_101:
if ( (unsigned int)sub_1002E757C(v3) )
{
v40 = (__int64)DialogLayer::createWithObjects(v3, v11);
}
else
{
sub_100009900(v46, "The Shopkeeper");
if ( SHIBYTE(v103.__r_.__value_.__r.__words[2]) < 0 )
sub_1000097D0(&v45, v103.__r_.__value_.__l.__data_, v103.__r_.__value_.__l.__size_);
else
v45 = v103;
v41 = DialogObject::create((__int64)v46, (__int64)&v45, v10, 0, 0xFFFFFF, 1.0);
v40 = DialogLayer::create((__int64)v41, v11);
if ( SHIBYTE(v45.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v45.__r_.__value_.__l.__data_);
if ( v47 < 0 )
operator delete(v46[0]);
}
*(_BYTE *)(v40 + 617) = 1;
(*(void (__fastcall **)(_DWORD *, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v40, 100);
DialogLayer::updateChatPlacement(v40, 0);
DialogLayer::animateInRandomSide(v40);
v42 = a1[130];
if ( v42 >= 9 )
{
*(_QWORD *)(v40 + 624) = a1 + 104;
*(_BYTE *)(v40 + 640) = 1;
v43 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v40 + 72LL))(v40, 1);
v44 = GameManager::sharedState(v43);
GameManager::setUGV(v44, "31", 1);
v42 = a1[130];
}
a1[130] = v42 + 1;
goto LABEL_113;
}
if ( v12 )
{
if ( v12 == 1 )
std::string::assign(&v103, "Can you stop?");
goto LABEL_101;
}
v9 = "What do you want?";
LABEL_5:
std::string::assign(&v103, v9);
v10 = 29;
v11 = 2;
goto LABEL_101;
}
a1[130] = 0;
v6 = GameStatsManager::sharedState(UGV);
sub_100009900(v101, "0022");
isSpecialChestUnlocked = GameStatsManager::isSpecialChestUnlocked(v6, v101);
v8 = isSpecialChestUnlocked;
if ( v102 < 0 )
{
operator delete(v101[0]);
if ( (v8 & 1) != 0 )
goto LABEL_4;
}
else if ( (isSpecialChestUnlocked & 1) != 0 )
{
LABEL_4:
v9 = "Can I help you?";
goto LABEL_5;
}
sub_100009900(v99, "The Shopkeeper");
sub_100009900(v97, "Hey, Welcome back!");
v18 = DialogObject::create((__int64)v99, (__int64)v97, 5, 0, 0xFFFFFF, 1.0);
sub_1002E74E0(v3, v18);
if ( v98 < 0 )
operator delete(v97[0]);
if ( v100 < 0 )
operator delete(v99[0]);
sub_100009900(v95, "The Shopkeeper");
sub_100009900(v93, "Sorry, I think I fell asleep earlier. Did I miss something?");
v19 = DialogObject::create((__int64)v95, (__int64)v93, 29, 0, 0xFFFFFF, 1.0);
sub_1002E74E0(v3, v19);
if ( v94 < 0 )
operator delete(v93[0]);
if ( v96 < 0 )
operator delete(v95[0]);
sub_100009900(v91, "The Shopkeeper");
sub_100009900(v89, "Oh yea! Someone left this package here for you.");
v20 = DialogObject::create((__int64)v91, (__int64)v89, 5, 0, 0xFFFFFF, 1.0);
sub_1002E74E0(v3, v20);
if ( v90 < 0 )
operator delete(v89[0]);
if ( v92 < 0 )
operator delete(v91[0]);
sub_100009900(v87, "The Shopkeeper");
v21 = sub_1003065B0("Who is %s?", "Zolguroth");
v22 = (char *)cocos2d::CCString::getCString(v21);
sub_100009900(v85, v22);
v23 = DialogObject::create((__int64)v87, (__int64)v85, 29, 0, 0xFFFFFF, 1.0);
sub_1002E74E0(v3, v23);
if ( v86 < 0 )
operator delete(v85[0]);
if ( v88 < 0 )
operator delete(v87[0]);
sub_100009900(v83, "The Shopkeeper");
sub_100009900(v81, "I really need to get that thing checked...");
v24 = DialogObject::create((__int64)v83, (__int64)v81, 34, 0, 0xFFFFFF, 1.0);
sub_1002E74E0(v3, v24);
if ( v82 < 0 )
operator delete(v81[0]);
if ( v84 < 0 )
operator delete(v83[0]);
v25 = DialogLayer::createWithObjects(v3, 2);
v25[617] = 1;
*((_QWORD *)v25 + 78) = a1 + 104;
(*(void (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v25 + 72LL))(v25, 2);
(*(void (__fastcall **)(_DWORD *, _BYTE *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v25, 100);
DialogLayer::updateChatPlacement((__int64)v25, 0);
DialogLayer::animateInRandomSide((__int64)v25);
LABEL_113:
if ( SHIBYTE(v103.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v103.__r_.__value_.__l.__data_);
}