// // GJShopLayer::showReactMessage from 0x1402acfa0 to 0x1402ae61c (5756 bytes) // // 2 xrefs: // > GJShopLayer::ccTouchBegan @ 0x1402aeb51 // > @ 0x1406d2270 // // 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 // // Hidden C++ exception states: #wind=12 void GJShopLayer::showReactMessage(GJShopLayer *a1) { float v2; // xmm0_4 unsigned __int64 v3; // rsi int v4; // ebx int v5; // r15d FMODAudioEngine *v6; // r12 GameManager *v7; // rcx __int64 v8; // r14 __int64 v9; // rcx char *v10; // rax char *v11; // rax char *v12; // rax cocos2d::CCString *v13; // rax const char *v14; // rax size_t v15; // rdi char *v16; // rax char *v17; // rax DialogLayer *DialogLayer; // rdi __int64 v19; // rcx cocos2d::CCDirector *v20; // rax cocos2d::CCLayer_vtbl *v21; // rbx const cocos2d::CCPoint *v22; // rax char *v23; // rax char *v24; // rax char *v25; // rax char *v26; // rax FMODAudioEngine *v27; // rcx char *v28; // rax char *v29; // rax char *v30; // rax char *v31; // rax char *v32; // rax char *v33; // rax char *v34; // rax char *v35; // rax __int64 v36; // rdx _QWORD *v37; // rdx size_t v38; // rdi size_t v39; // r8 unsigned __int64 v40; // r12 void **v41; // rbx unsigned __int64 v42; // rcx __int64 v43; // rbx _WORD *v44; // rax void *v45; // rcx void **v46; // rdx cocos2d::CCString *v47; // rax const char *CString; // rax size_t v49; // r8 void **v50; // rdx char *v51; // rax char *v52; // rax void *v53; // rcx void *v54; // rcx __int64 v55; // rdx __int64 v56; // rcx __int64 v57; // r8 __int64 v58; // r9 int v59; // r8d cocos2d::CCArray *v60; // rdx DialogObject *v61; // rcx void **v62; // rbx char *v63; // rax DialogLayer *v64; // rdi __int64 v65; // rcx cocos2d::CCDirector *v66; // rax cocos2d::CCLayer_vtbl *v67; // rbx const cocos2d::CCPoint *v68; // rax GameManager *v69; // rcx void *v70; // rcx __int16 v71; // [rsp+38h] [rbp-D0h] BYREF char v72; // [rsp+3Ah] [rbp-CEh] void **v73; // [rsp+48h] [rbp-C0h] FMODAudioEngine *v74; // [rsp+50h] [rbp-B8h] __int128 v75; // [rsp+58h] [rbp-B0h] BYREF __int64 v76; // [rsp+68h] [rbp-A0h] __int64 v77; // [rsp+70h] [rbp-98h] _WORD *v78; // [rsp+78h] [rbp-90h] __int128 v79; // [rsp+80h] [rbp-88h] BYREF __int64 v80; // [rsp+90h] [rbp-78h] __int64 v81; // [rsp+98h] [rbp-70h] void *v82[2]; // [rsp+A0h] [rbp-68h] BYREF __int64 v83; // [rsp+B0h] [rbp-58h] unsigned __int64 v84; // [rsp+B8h] [rbp-50h] void *Src[2]; // [rsp+C0h] [rbp-48h] BYREF unsigned __int64 v86; // [rsp+D0h] [rbp-38h] __int64 v87; // [rsp+D8h] [rbp-30h] void *Block[2]; // [rsp+E0h] [rbp-28h] BYREF __int64 v89; // [rsp+F0h] [rbp-18h] unsigned __int64 v90; // [rsp+F8h] [rbp-10h] _QWORD v91[4]; // [rsp+100h] [rbp-8h] BYREF v2 = 0.0; *(_OWORD *)Src = 0; v86 = 3; v3 = 15; v87 = 15; LODWORD(Src[0]) = 8026746; v4 = 2; v5 = 6; LODWORD(v78) = 2; v6 = (FMODAudioEngine *)cocos2d::CCArray::create(a1); v74 = v6; v7 = (GameManager *)qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v73 = (void **)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v73); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v7 = (GameManager *)qword_1406C2ED8; } v8 = 0x7FFFFFFFFFFFFFFFLL; if ( !GameManager::getUGV(v7, (const char *)&word_14055A648) ) { switch ( a1->m_zolgurothDialogIndex ) { case 0: v3 = 31; v23 = (char *)sub_14003AA10(0x20u); v86 = 17; v87 = 31; v2 = 7.1434513e31; strcpy(v23, "What do you want?"); Src[0] = v23; v4 = 2; v5 = 29; goto LABEL_62; case 1: v86 = 13; memmove(Src, "Can you stop?", 0xDu); BYTE5(Src[1]) = 0; v3 = v87; v4 = 2; goto LABEL_62; case 2: v3 = 47; v24 = (char *)sub_14003AA10(0x30u); v86 = 37; v87 = 47; v2 = 0.23670667; strcpy(v24, "Stop with the poking!"); Src[0] = v24; v4 = 2; v5 = 30; goto LABEL_62; case 3: v3 = 47; v25 = (char *)sub_14003AA10(0x30u); v86 = 37; v87 = 47; v2 = 2.0789149e-19; strcpy(v25, "You are getting on my nerves."); Src[0] = v25; v4 = 2; v5 = 31; goto LABEL_62; case 4: v3 = 31; v26 = (char *)sub_14003AA10(0x20u); v86 = 24; v87 = 31; strcpy(v26, "I'm warning you!"); v2 = 1.6126443e-19; Src[0] = v26; v4 = 2; v5 = 30; goto LABEL_62; case 5: v73 = v82; v83 = 14; v84 = 15; strcpy((char *)v82, "dangerLoop.mp3"); HIBYTE(v82[1]) = 0; v27 = (FMODAudioEngine *)qword_1406C2E88; if ( !qword_1406C2E88 ) { v74 = (FMODAudioEngine *)operator new(0x888u); qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v74); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88); v27 = (FMODAudioEngine *)qword_1406C2E88; } FMODAudioEngine::playMusic(v27, (__int64)v82, 1, 0.0); v73 = Block; v71 = -1; v72 = -1; *(_OWORD *)Block = 0; v89 = 0; v90 = 15; Block[0] = sub_14003AA10(0x30u); v89 = 42; v90 = 47; strcpy((char *)Block[0], "Some things are better left alone."); v83 = 14; v84 = 15; strcpy((char *)v82, "The Shopkeeper"); HIBYTE(v82[1]) = 0; v28 = DialogObject::create((__int64)v82, (__int64)Block, 32, 1.0, 0, (__int64)&v71); cocos2d::CCArray::addObject((cocos2d::CCArray *)v6, (struct cocos2d::CCObject *)v28); v73 = Block; v71 = -1; v72 = -1; *(_OWORD *)Block = 0; v89 = 0; v90 = 15; Block[0] = sub_14003AA10(0x20u); v89 = 19; v90 = 31; strcpy((char *)Block[0], "Oh no... Not again."); v83 = 14; v84 = 15; strcpy((char *)v82, "The Shopkeeper"); HIBYTE(v82[1]) = 0; v29 = DialogObject::create((__int64)v82, (__int64)Block, 34, 1.0, 0, (__int64)&v71); cocos2d::CCArray::addObject((cocos2d::CCArray *)v6, (struct cocos2d::CCObject *)v29); v73 = Block; v71 = -1; v72 = -1; *(_OWORD *)Block = 0; v89 = 0; v90 = 15; Block[0] = sub_14003AA10(0x40u); v89 = 54; v90 = 63; strcpy((char *)Block[0], "Just... just STOP tapping and it will be fine!"); v83 = 14; v84 = 15; v2 = 1.9431574e-19; strcpy((char *)v82, "The Shopkeeper"); HIBYTE(v82[1]) = 0; v30 = DialogObject::create((__int64)v82, (__int64)Block, 36, 1.0, 0, (__int64)&v71); cocos2d::CCArray::addObject((cocos2d::CCArray *)v6, (struct cocos2d::CCObject *)v30); v4 = 4; LODWORD(v78) = 4; goto LABEL_62; case 6: v3 = 47; v31 = (char *)sub_14003AA10(0x30u); v86 = 33; v87 = 47; v2 = 1.3267092e31; strcpy(v31, "It's best if you stop doing that."); Src[0] = v31; v4 = 2; v5 = 34; goto LABEL_62; case 7: v3 = 31; v32 = (char *)sub_14003AA10(0x20u); v86 = 29; v87 = 31; strcpy(v32, "..."); v2 = 0.010634944; Src[0] = v32; v4 = 2; v5 = 35; goto LABEL_62; case 8: v3 = 63; v33 = (char *)sub_14003AA10(0x40u); v86 = 50; v87 = 63; strcpy(v33, "I feel, strange..."); v2 = 8.3031437e-10; Src[0] = v33; v4 = 4; v5 = 32; LODWORD(v78) = 4; goto LABEL_62; case 9: v73 = (void **)&v79; v71 = -1; v72 = -1; v79 = 0; v80 = 0; v81 = 15; *(_QWORD *)&v79 = sub_14003AA10(0x20u); v80 = 29; v81 = 31; strcpy((char *)v79, "You dare touch a god?"); v76 = 9; v77 = 15; *(_QWORD *)&v75 = *(_QWORD *)"Zolguroth"; *((_QWORD *)&v75 + 1) = (unsigned __int8)aZolguroth[8]; BYTE9(v75) = 0; v34 = DialogObject::create((__int64)&v75, (__int64)&v79, 33, 1.0, 0, (__int64)&v71); cocos2d::CCArray::addObject((cocos2d::CCArray *)v6, (struct cocos2d::CCObject *)v34); v73 = (void **)&v75; v71 = -1; v72 = -1; v75 = 0; v76 = 0; v77 = 15; *(_QWORD *)&v75 = sub_14003AA10(0x40u); v76 = 48; v77 = 63; strcpy((char *)v75, "You will regret your actions here today."); v80 = 9; v81 = 15; *(_QWORD *)&v79 = *(_QWORD *)"Zolguroth"; *((_QWORD *)&v79 + 1) = (unsigned __int8)aZolguroth[8]; BYTE9(v79) = 0; v35 = DialogObject::create((__int64)&v79, (__int64)&v75, 33, 1.0, 0, (__int64)&v71); cocos2d::CCArray::addObject((cocos2d::CCArray *)v6, (struct cocos2d::CCObject *)v35); v36 = qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v73 = (void **)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v73); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v36 = qword_1406C2ED8; } sub_14003BDB0((__int64)v91, v36 + 616); v37 = v91; if ( v91[3] > 0xFu ) v37 = (_QWORD *)v91[0]; *(_OWORD *)v82 = 0; v83 = 0; v84 = 0; v38 = -1; v39 = -1; do ++v39; while ( *((_BYTE *)v37 + v39) ); sub_14003A930(v82, v37, v39); sub_14003A830((__int64)v91); if ( v83 ) goto LABEL_44; v40 = v84; if ( v84 < 3 ) { v42 = v84 >> 1; if ( v84 <= 0x7FFFFFFFFFFFFFFFLL - (v84 >> 1) ) { v43 = 15; if ( v84 + v42 > 0xF ) v43 = v84 + v42; } else { v43 = 0x7FFFFFFFFFFFFFFFLL; } v44 = sub_14003AA10(v43 + 1); v78 = v44; v83 = 3; v84 = v43; *v44 = *(_WORD *)"..."; v44[1] = (unsigned __int8)asc_14053DBB0[2]; if ( v40 > 0xF ) { v45 = v82[0]; if ( v40 + 1 >= 0x1000 ) { v45 = *((void **)v82[0] - 1); if ( (unsigned __int64)((char *)v82[0] - (char *)v45 - 8) > 0x1F ) LABEL_55: invalid_parameter_noinfo_noreturn(); } j_j_free(v45); v44 = v78; } v82[0] = v44; } else { v41 = v82; if ( v84 > 0xF ) v41 = (void **)v82[0]; v83 = 3; memmove(v41, "...", 3u); *((_BYTE *)v41 + 3) = 0; } v6 = v74; LABEL_44: v46 = v82; if ( v84 > 0xF ) v46 = (void **)v82[0]; v47 = cocos2d::CCString::createWithFormat( "I have big things planned\nfor you %s.", (const char *)v46); CString = cocos2d::CCString::getCString(v47); *(_OWORD *)Block = 0; v89 = 0; v90 = 0; v49 = -1; do ++v49; while ( CString[v49] ); sub_14003A930(Block, CString, v49); v73 = (void **)&v79; v71 = -1; v72 = -1; v50 = Block; if ( v90 > 0xF ) v50 = (void **)Block[0]; v79 = 0; v80 = 0; v81 = 0; do ++v38; while ( *((_BYTE *)v50 + v38) ); sub_14003A930(&v79, v50, v38); v76 = 9; v77 = 15; *(_QWORD *)&v75 = *(_QWORD *)"Zolguroth"; *((_QWORD *)&v75 + 1) = (unsigned __int8)aZolguroth[8]; BYTE9(v75) = 0; v51 = DialogObject::create((__int64)&v75, (__int64)&v79, 33, 1.0, 0, (__int64)&v71); cocos2d::CCArray::addObject((cocos2d::CCArray *)v6, (struct cocos2d::CCObject *)v51); v73 = (void **)&v75; v71 = -1; v72 = -1; v75 = 0; v76 = 0; v77 = 15; *(_QWORD *)&v75 = sub_14003AA10(0x50u); v76 = 68; v77 = 79; strcpy((char *)v75, "Now... BEGONE!"); v80 = 9; v81 = 15; v2 = *(float *)"Zolguroth"; *(_QWORD *)&v79 = *(_QWORD *)"Zolguroth"; *((_QWORD *)&v79 + 1) = (unsigned __int8)aZolguroth[8]; BYTE9(v79) = 0; v52 = DialogObject::create((__int64)&v79, (__int64)&v75, 33, 1.0, 0, (__int64)&v71); cocos2d::CCArray::addObject((cocos2d::CCArray *)v6, (struct cocos2d::CCObject *)v52); v4 = 4; LODWORD(v78) = 4; if ( v90 > 0xF ) { v53 = Block[0]; if ( v90 + 1 >= 0x1000 ) { v53 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v53 - 8) > 0x1F ) goto LABEL_55; } j_j_free(v53); } if ( v84 > 0xF ) { v54 = v82[0]; if ( v84 + 1 >= 0x1000 ) { v54 = *((void **)v82[0] - 1); if ( (unsigned __int64)((char *)v82[0] - (char *)v54 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v54); } goto LABEL_62; default: goto LABEL_62; } } a1->m_zolgurothDialogIndex = 0; v73 = (void **)&v75; v2 = 0.0; v75 = 0; v76 = 4; v77 = 15; strcpy((char *)&v75, "0022"); v9 = qword_1406C2EE8; if ( !qword_1406C2EE8 ) { v74 = (FMODAudioEngine *)operator new(0x3E0u); qword_1406C2EE8 = sub_1401D0AE0((__int64)v74); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8); v9 = qword_1406C2EE8; } if ( !GameStatsManager::isSpecialChestUnlocked(v9, &v75) ) { v73 = Block; v71 = -1; v72 = -1; *(_OWORD *)Block = 0; v89 = 0; v90 = 15; Block[0] = sub_14003AA10(0x20u); v89 = 18; v90 = 31; strcpy((char *)Block[0], "Hey, Welcome back!"); v83 = 14; v84 = 15; strcpy((char *)v82, "The Shopkeeper"); HIBYTE(v82[1]) = 0; v10 = DialogObject::create((__int64)v82, (__int64)Block, 5, 1.0, 0, (__int64)&v71); cocos2d::CCArray::addObject((cocos2d::CCArray *)v6, (struct cocos2d::CCObject *)v10); v73 = Block; v71 = -1; v72 = -1; *(_OWORD *)Block = 0; v89 = 0; v90 = 15; Block[0] = sub_14003AA10(0x50u); v89 = 65; v90 = 79; strcpy((char *)Block[0], "Sorry, I think I fell asleep earlier. Did I miss something?"); v83 = 14; v84 = 15; strcpy((char *)v82, "The Shopkeeper"); HIBYTE(v82[1]) = 0; v11 = DialogObject::create((__int64)v82, (__int64)Block, 29, 1.0, 0, (__int64)&v71); cocos2d::CCArray::addObject((cocos2d::CCArray *)v6, (struct cocos2d::CCObject *)v11); v73 = Block; v71 = -1; v72 = -1; *(_OWORD *)Block = 0; v89 = 0; v90 = 15; Block[0] = sub_14003AA10(0x40u); v89 = 63; v90 = 63; strcpy((char *)Block[0], "Oh yea! Someone left this package here for you."); v83 = 14; v84 = 15; strcpy((char *)v82, "The Shopkeeper"); HIBYTE(v82[1]) = 0; v12 = DialogObject::create((__int64)v82, (__int64)Block, 5, 1.0, 0, (__int64)&v71); cocos2d::CCArray::addObject((cocos2d::CCArray *)v6, (struct cocos2d::CCObject *)v12); v73 = (void **)&v75; v71 = -1; v72 = -1; v13 = cocos2d::CCString::createWithFormat("Who is %s?", "Zolguroth"); v14 = cocos2d::CCString::getCString(v13); v75 = 0; v76 = 0; v77 = 0; v15 = -1; do ++v15; while ( v14[v15] ); sub_14003A930(&v75, v14, v15); v83 = 14; v84 = 15; strcpy((char *)v82, "The Shopkeeper"); HIBYTE(v82[1]) = 0; v16 = DialogObject::create((__int64)v82, (__int64)&v75, 29, 1.0, 0, (__int64)&v71); cocos2d::CCArray::addObject((cocos2d::CCArray *)v6, (struct cocos2d::CCObject *)v16); v73 = Block; v71 = -1; v72 = -1; *(_OWORD *)Block = 0; v89 = 0; v90 = 15; Block[0] = sub_14003AA10(0x40u); v89 = 62; v90 = 63; strcpy((char *)Block[0], "I really need to get that thing checked..."); v83 = 14; v84 = 15; strcpy((char *)v82, "The Shopkeeper"); HIBYTE(v82[1]) = 0; v17 = DialogObject::create((__int64)v82, (__int64)Block, 34, 1.0, 0, (__int64)&v71); cocos2d::CCArray::addObject((cocos2d::CCArray *)v6, (struct cocos2d::CCObject *)v17); DialogLayer = DialogLayer::createDialogLayer(nullptr, (cocos2d::CCArray *)v6, 2); DialogLayer->m_skippable = 1; DialogLayer->m_delegate = &a1->DialogDelegate; DialogLayer->setTag(DialogLayer, 2); a1->addChild_0(a1, DialogLayer, 100); v20 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v19); cocos2d::CCDirector::getWinSize(v20); v21 = DialogLayer->m_mainLayer->__vftable; cocos2d::CCPoint::CCPoint(1.9431574e-19, *(float *)&v74 * 0.5); v21->setPosition_0(DialogLayer->m_mainLayer, v22); DialogLayer::animateInRandomSide(DialogLayer); goto LABEL_79; } v86 = 15; memmove(Src, "Can I help you?", 0xFu); HIBYTE(Src[1]) = 0; v3 = v87; v4 = 2; v5 = 29; LABEL_62: if ( cocos2d::CCArray::count((cocos2d::CCArray *)v6) ) { v59 = v4; v60 = (cocos2d::CCArray *)v6; v61 = nullptr; } else { v73 = v82; v71 = -1; v72 = -1; *(_OWORD *)v82 = 0; v83 = 0; v84 = 0; v62 = Src; if ( v3 > 0xF ) v62 = (void **)Src[0]; if ( v86 > 0x7FFFFFFFFFFFFFFFLL ) sub_140007B50(v56, v55, v57, v58); v84 = 15; if ( v86 > 0xF ) { if ( (v86 | 0xF) <= 0x7FFFFFFFFFFFFFFFLL ) { v8 = v86 | 0xF; if ( (v86 | 0xF) < 0x16 ) v8 = 22; } v82[0] = sub_14003AA10(v8 + 1); v83 = v86; v84 = v8; memcpy(v82[0], v62, v86 + 1); } else { v83 = v86; *(_OWORD *)v82 = *(_OWORD *)v62; } v89 = 14; v90 = 15; v2 = 1.9431574e-19; strcpy((char *)Block, "The Shopkeeper"); HIBYTE(Block[1]) = 0; v63 = DialogObject::create((__int64)Block, (__int64)v82, v5, 1.0, 0, (__int64)&v71); v59 = (int)v78; v60 = nullptr; v61 = (DialogObject *)v63; } v64 = DialogLayer::createDialogLayer(v61, v60, v59); v64->m_skippable = 1; a1->addChild_0(a1, v64, 100); v66 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v65); cocos2d::CCDirector::getWinSize(v66); v67 = v64->m_mainLayer->__vftable; cocos2d::CCPoint::CCPoint(v2, *(float *)&v74 * 0.5); v67->setPosition_0(v64->m_mainLayer, v68); DialogLayer::animateInRandomSide(v64); if ( a1->m_zolgurothDialogIndex >= 9 ) { v64->m_delegate = &a1->DialogDelegate; v64->m_noRemove = 1; v64->setTag(v64, 1); v69 = (GameManager *)qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v73 = (void **)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v73); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v69 = (GameManager *)qword_1406C2ED8; } GameManager::setUGV(v69, (const char *)&word_14055A648, 1); } ++a1->m_zolgurothDialogIndex; LABEL_79: if ( v3 > 0xF ) { v70 = Src[0]; if ( v3 + 1 >= 0x1000 ) { v70 = *((void **)Src[0] - 1); if ( (unsigned __int64)((char *)Src[0] - (char *)v70 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v70); } }