// // SecretRewardsLayer::showDialog01 from 0x1403d7e50 to 0x1403d9788 (6456 bytes) // // 2 xrefs: // > SecretRewardsLayer::onShop @ 0x1403d6886 // > @ 0x1406d7df0 // // 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=4 void SecretRewardsLayer::showDialog01(SecretRewardsLayer *a1) { float v1; // xmm0_4 cocos2d::CCArray *v3; // rsi GameStatsManager *v4; // rcx GameManager *v5; // rcx char v6; // r15 char *v7; // rax char *v8; // rax char *v9; // rax char *v10; // rax char *v11; // rax char *v12; // rax int v13; // r8d char *v14; // rax char *v15; // rax char *v16; // rax char *v17; // rax char *v18; // rax char *v19; // rax char *v20; // rax char *v21; // rax char *v22; // rax cocos2d::CCString *v23; // rax const char *CString; // rax size_t v25; // rbx size_t v26; // r8 char *v27; // rax cocos2d::CCString *v28; // rax const char *v29; // rax char *v30; // rax char *v31; // rax char *v32; // rax char *v33; // rax GameManager *v34; // rcx cocos2d::CCString *v35; // rax const char *v36; // rax size_t v37; // rbx char *v38; // rax char *v39; // rax char *v40; // rax DialogLayer *DialogLayer; // rdi DialogDelegate *v42; // rcx cocos2d::CCDirector *v43; // rax cocos2d::CCLayer_vtbl *v44; // rbx const cocos2d::CCPoint *v45; // rax char v46[8]; // [rsp+30h] [rbp-50h] BYREF __int64 v47; // [rsp+38h] [rbp-48h] __int64 v48; // [rsp+40h] [rbp-40h] __int64 v49; // [rsp+48h] [rbp-38h] __int128 v50; // [rsp+50h] [rbp-30h] BYREF __int64 v51; // [rsp+60h] [rbp-20h] __int64 v52; // [rsp+68h] [rbp-18h] __int128 *v53; // [rsp+B8h] [rbp+38h] __int16 v54; // [rsp+C0h] [rbp+40h] BYREF char v55; // [rsp+C2h] [rbp+42h] v3 = (cocos2d::CCArray *)cocos2d::CCArray::create(a1); v4 = (GameStatsManager *)qword_1406C2EE8; if ( !qword_1406C2EE8 ) { v53 = (__int128 *)operator new(0x3E0u); qword_1406C2EE8 = sub_1401D0AE0((__int64)v53); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8); v4 = (GameStatsManager *)qword_1406C2EE8; } if ( GameStatsManager::getStat(v4, "13") < 500 ) goto LABEL_32; v5 = (GameManager *)qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v53 = (__int128 *)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v53); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v5 = (GameManager *)qword_1406C2ED8; } if ( GameManager::getUGV(v5, "10") ) { v6 = 1; v54 = -1; v55 = -1; v50 = 0; v51 = 0; v52 = 15; *(_QWORD *)&v50 = sub_14003AA10(0x40u); v51 = 53; v52 = 63; strcpy((char *)v50, "Oh, the diamonds.\nYou found them."); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v7 = DialogObject::create((__int64)v46, (__int64)&v50, 10, 1.0, 0, (__int64)&v54); cocos2d::CCArray::addObject(v3, (struct cocos2d::CCObject *)v7); v54 = -1; v55 = -1; v50 = 0; v51 = 0; v52 = 15; *(_QWORD *)&v50 = sub_14003AA10(0x40u); v51 = 55; v52 = 63; strcpy((char *)v50, "Alright come in, quickly before someone sees you."); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v8 = DialogObject::create((__int64)v46, (__int64)&v50, 13, 1.0, 0, (__int64)&v54); cocos2d::CCArray::addObject(v3, (struct cocos2d::CCObject *)v8); v54 = -1; v55 = -1; v50 = 0; v51 = 0; v52 = 15; *(_QWORD *)&v50 = sub_14003AA10(0x30u); v51 = 37; v52 = 47; strcpy((char *)v50, "You never know who might be watching."); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v9 = DialogObject::create((__int64)v46, (__int64)&v50, 8, 1.0, 0, (__int64)&v54); cocos2d::CCArray::addObject(v3, (struct cocos2d::CCObject *)v9); v53 = &v50; v54 = -1; v55 = -1; v50 = 0; v51 = 0; v52 = 15; *(_QWORD *)&v50 = sub_14003AA10(0x20u); v51 = 21; v52 = 31; v1 = 0.0000000025668347; strcpy((char *)v50, "..."); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v10 = DialogObject::create((__int64)v46, (__int64)&v50, 9, 1.0, 0, (__int64)&v54); cocos2d::CCArray::addObject(v3, (struct cocos2d::CCObject *)v10); } else { LABEL_32: v6 = 0; switch ( a1->m_scratchDialogIndex ) { case 0: v54 = -1; v55 = -1; v50 = 0; v51 = 0; v52 = 15; *(_QWORD *)&v50 = sub_14003AA10(0x20u); v51 = 28; v52 = 31; strcpy((char *)v50, "Uhm, there is no rope."); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v11 = DialogObject::create((__int64)v46, (__int64)&v50, 8, 1.0, 0, (__int64)&v54); cocos2d::CCArray::addObject(v3, (struct cocos2d::CCObject *)v11); v54 = -1; v55 = -1; v50 = 0; v51 = 0; v52 = 15; *(_QWORD *)&v50 = sub_14003AA10(0x40u); v51 = 54; v52 = 63; strcpy((char *)v50, "Just... Pretend this never happened."); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v12 = DialogObject::create((__int64)v46, (__int64)&v50, 9, 1.0, 0, (__int64)&v54); cocos2d::CCArray::addObject(v3, (struct cocos2d::CCObject *)v12); v53 = &v50; v54 = -1; v55 = -1; v50 = 0; v51 = 0; v52 = 15; *(_QWORD *)&v50 = sub_14003AA10(0x20u); v51 = 21; v52 = 31; v1 = 0.0000000025668347; strcpy((char *)v50, "..."); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v13 = 8; goto LABEL_24; case 1: v54 = -1; v55 = -1; v50 = 0; v51 = 0; v52 = 15; *(_QWORD *)&v50 = sub_14003AA10(0x30u); v51 = 38; v52 = 47; strcpy((char *)v50, "I'm gonna need you to stop doing that."); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v14 = DialogObject::create((__int64)v46, (__int64)&v50, 13, 1.0, 0, (__int64)&v54); cocos2d::CCArray::addObject(v3, (struct cocos2d::CCObject *)v14); v54 = -1; v55 = -1; v50 = 0; v51 = 0; v52 = 15; *(_QWORD *)&v50 = sub_14003AA10(0x40u); v51 = 48; v52 = 63; strcpy((char *)v50, "If RubRub sees this I am in BIG trouble."); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v15 = DialogObject::create((__int64)v46, (__int64)&v50, 8, 1.0, 0, (__int64)&v54); cocos2d::CCArray::addObject(v3, (struct cocos2d::CCObject *)v15); v53 = &v50; v54 = -1; v55 = -1; v50 = 0; v51 = 0; v52 = 15; *(_QWORD *)&v50 = sub_14003AA10(0x30u); v51 = 36; v52 = 47; v1 = 2.6762319e20; strcpy((char *)v50, "I hate that guy..."); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v13 = 12; goto LABEL_24; case 2: v54 = -1; v55 = -1; v50 = 0; v51 = 0; v52 = 15; *(_QWORD *)&v50 = sub_14003AA10(0x40u); v51 = 59; v52 = 63; strcpy((char *)v50, "Finally, I thought you wou..."); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v16 = DialogObject::create((__int64)v46, (__int64)&v50, 10, 1.0, 0, (__int64)&v54); cocos2d::CCArray::addObject(v3, (struct cocos2d::CCObject *)v16); v54 = -1; v55 = -1; v50 = 0; v51 = 0; v52 = 15; *(_QWORD *)&v50 = sub_14003AA10(0x30u); v51 = 40; v52 = 47; strcpy((char *)v50, "Wait, You're not the delivery guy."); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v17 = DialogObject::create((__int64)v46, (__int64)&v50, 11, 1.0, 0, (__int64)&v54); cocos2d::CCArray::addObject(v3, (struct cocos2d::CCObject *)v17); v54 = -1; v55 = -1; v50 = 0; v51 = 0; v52 = 15; *(_QWORD *)&v50 = sub_14003AA10(0x50u); v51 = 64; v52 = 79; strcpy((char *)v50, "How am I supposed to run a shop if I don't have any merchandise?"); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v18 = DialogObject::create((__int64)v46, (__int64)&v50, 12, 1.0, 0, (__int64)&v54); cocos2d::CCArray::addObject(v3, (struct cocos2d::CCObject *)v18); v54 = -1; v55 = -1; v50 = 0; v51 = 0; v52 = 15; *(_QWORD *)&v50 = sub_14003AA10(0x20u); v51 = 24; v52 = 31; strcpy((char *)v50, "I mean, what shop?"); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v19 = DialogObject::create((__int64)v46, (__int64)&v50, 13, 1.0, 0, (__int64)&v54); cocos2d::CCArray::addObject(v3, (struct cocos2d::CCObject *)v19); v53 = &v50; v54 = -1; v55 = -1; v50 = 0; v51 = 0; v52 = 15; *(_QWORD *)&v50 = sub_14003AA10(0x20u); v51 = 21; v52 = 31; v1 = 0.0000000025668347; strcpy((char *)v50, "..."); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v13 = 8; goto LABEL_24; case 3: v54 = -1; v55 = -1; v50 = 0; v51 = 0; v52 = 15; *(_QWORD *)&v50 = sub_14003AA10(0x60u); v51 = 89; v52 = 95; strcpy( (char *)v50, "Look, I can't let you in.\nNot without the... stuff."); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v20 = DialogObject::create((__int64)v46, (__int64)&v50, 8, 1.0, 0, (__int64)&v54); cocos2d::CCArray::addObject(v3, (struct cocos2d::CCObject *)v20); v54 = -1; v55 = -1; v50 = 0; v51 = 0; v52 = 15; *(_QWORD *)&v50 = sub_14003AA10(0x50u); v51 = 64; v52 = 79; strcpy((char *)v50, "I'm not even supposed to be here.\nI'm just a glitch in the code."); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v21 = DialogObject::create((__int64)v46, (__int64)&v50, 13, 1.0, 0, (__int64)&v54); cocos2d::CCArray::addObject(v3, (struct cocos2d::CCObject *)v21); v54 = -1; v55 = -1; v50 = 0; v51 = 0; v52 = 15; *(_QWORD *)&v50 = sub_14003AA10(0x20u); v51 = 23; v52 = 31; strcpy((char *)v50, "Did you hear something?"); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v22 = DialogObject::create((__int64)v46, (__int64)&v50, 8, 1.0, 0, (__int64)&v54); cocos2d::CCArray::addObject(v3, (struct cocos2d::CCObject *)v22); v53 = &v50; v54 = -1; v55 = -1; v50 = 0; v51 = 0; v52 = 15; *(_QWORD *)&v50 = sub_14003AA10(0x20u); v51 = 21; v52 = 31; v1 = 0.0000000025668347; strcpy((char *)v50, "..."); goto LABEL_23; case 4: v54 = -1; v55 = -1; v23 = cocos2d::CCString::createWithFormat( "Alright, alright. If you collect\n%i Diamonds I will let you in.", 500); CString = cocos2d::CCString::getCString(v23); v50 = 0; v51 = 0; v52 = 0; v25 = -1; v26 = -1; do ++v26; while ( CString[v26] ); sub_14003A930(&v50, CString, v26); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v27 = DialogObject::create((__int64)v46, (__int64)&v50, 10, 1.0, 0, (__int64)&v54); cocos2d::CCArray::addObject(v3, (struct cocos2d::CCObject *)v27); v54 = -1; v55 = -1; v28 = cocos2d::CCString::createWithFormat("Usually the limit is %i, but you look a bit scary.", 1000); v29 = cocos2d::CCString::getCString(v28); v50 = 0; v51 = 0; v52 = 0; do ++v25; while ( v29[v25] ); sub_14003A930(&v50, v29, v25); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v30 = DialogObject::create((__int64)v46, (__int64)&v50, 13, 1.0, 0, (__int64)&v54); cocos2d::CCArray::addObject(v3, (struct cocos2d::CCObject *)v30); v54 = -1; v55 = -1; v50 = 0; v51 = 0; v52 = 15; *(_QWORD *)&v50 = sub_14003AA10(0x40u); v51 = 52; v52 = 63; strcpy((char *)v50, "Just, get out of here before someone sees you."); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v31 = DialogObject::create((__int64)v46, (__int64)&v50, 11, 1.0, 0, (__int64)&v54); cocos2d::CCArray::addObject(v3, (struct cocos2d::CCObject *)v31); v54 = -1; v55 = -1; v50 = 0; v51 = 0; v52 = 15; *(_QWORD *)&v50 = sub_14003AA10(0x20u); v51 = 29; v52 = 31; strcpy((char *)v50, "Do you smell burning chicken?"); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v32 = DialogObject::create((__int64)v46, (__int64)&v50, 8, 1.0, 0, (__int64)&v54); cocos2d::CCArray::addObject(v3, (struct cocos2d::CCObject *)v32); v53 = &v50; v54 = -1; v55 = -1; v50 = 0; v51 = 0; v52 = 15; *(_QWORD *)&v50 = sub_14003AA10(0x20u); v51 = 21; v52 = 31; v1 = 0.0000000025668347; strcpy((char *)v50, "..."); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v33 = DialogObject::create((__int64)v46, (__int64)&v50, 9, 1.0, 0, (__int64)&v54); cocos2d::CCArray::addObject(v3, (struct cocos2d::CCObject *)v33); v34 = (GameManager *)qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v53 = (__int128 *)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v53); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v34 = (GameManager *)qword_1406C2ED8; } GameManager::setUGV(v34, "10", 1); break; case 5: v54 = -1; v55 = -1; v35 = cocos2d::CCString::createWithFormat("Collect %i Diamonds and I will let you in.", 500); v36 = cocos2d::CCString::getCString(v35); v50 = 0; v51 = 0; v52 = 0; v37 = -1; do ++v37; while ( v36[v37] ); sub_14003A930(&v50, v36, v37); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v38 = DialogObject::create((__int64)v46, (__int64)&v50, 10, 0.80000001, 0, (__int64)&v54); cocos2d::CCArray::addObject(v3, (struct cocos2d::CCObject *)v38); v54 = -1; v55 = -1; v50 = 0; v51 = 0; v52 = 15; *(_QWORD *)&v50 = sub_14003AA10(0x30u); v51 = 38; v52 = 47; strcpy((char *)v50, "Now go away, RubRub might be watching."); v47 = 0; v48 = 7; v49 = 15; strcpy(v46, "Scratch"); v39 = DialogObject::create((__int64)v46, (__int64)&v50, 8, 1.0, 0, (__int64)&v54); cocos2d::CCArray::addObject(v3, (struct cocos2d::CCObject *)v39); v53 = &v50; v54 = -1; v55 = -1; v50 = 0; v51 = 0; v52 = 15; *(_QWORD *)&v50 = sub_14003AA10(0x20u); v51 = 21; v52 = 31; v1 = 0.0000000025668347; strcpy((char *)v50, "..."); LABEL_23: strcpy(v46, "Scratch"); v49 = 15; v48 = 7; v47 = 0; v13 = 9; LABEL_24: v40 = DialogObject::create((__int64)v46, (__int64)&v50, v13, 1.0, 0, (__int64)&v54); cocos2d::CCArray::addObject(v3, (struct cocos2d::CCObject *)v40); break; default: break; } if ( ++a1->m_scratchDialogIndex > 5 ) a1->m_scratchDialogIndex = 0; } DialogLayer = DialogLayer::createDialogLayer(nullptr, v3, 2); a1->addChild_0(a1, DialogLayer, 100); DialogLayer->setTag(DialogLayer, 1); if ( v6 ) { v42 = &a1->DialogDelegate; DialogLayer->m_delegate = &a1->DialogDelegate; } v43 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v42); cocos2d::CCDirector::getWinSize(v43); v44 = DialogLayer->m_mainLayer->__vftable; cocos2d::CCPoint::CCPoint(v1, *(float *)&v53 * 0.5); v44->setPosition_0(DialogLayer->m_mainLayer, v45); DialogLayer::animateInRandomSide(DialogLayer); }
GD Web Decomp Icon

GD Web Decomp

Raw Source