// // SecretRewardsLayer::showDialogMechanic from 0x1405704d0 to 0x140571736 (4710 bytes) // // 2 xrefs: // > SecretRewardsLayer::onShop @ 0x14056c232 // > @ 0x14092c720 // // This function is hookable on this platform (idp: pc, 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:34:21 +0000 // // Hidden C++ exception states: #wind=4 __int64 __fastcall SecretRewardsLayer::showDialogMechanic(_DWORD *a1) { cocos2d::CCArray *v2; // rdi __int64 v3; // rcx int Stat; // r14d __int64 v5; // rcx char v6; // r15 void **v7; // rax void **v8; // rax void **v9; // rax void **v10; // rax void **v11; // rax int v12; // ecx int v13; // ecx int v14; // ecx int v15; // ecx void **v16; // rax cocos2d::CCString *v17; // rax const char *v18; // rax size_t v19; // r8 void **v20; // rax void **v21; // rax int v22; // r8d void **v23; // rax cocos2d::CCString *v24; // rax const char *CString; // rax size_t v26; // r8 void **v27; // rax void **v28; // rax __int64 v29; // rcx void **v30; // rax void **v31; // rax void **v32; // rax void **v33; // rax void **v34; // rax cocos2d::CCNode *DialogLayer; // r14 __int64 v36; // rcx __int64 v37; // rax __int64 v38; // rdi __int64 v39; // rbx __int64 v40; // rax __int128 v42; // [rsp+30h] [rbp-50h] BYREF __int64 v43; // [rsp+40h] [rbp-40h] __int64 v44; // [rsp+48h] [rbp-38h] __int128 v45; // [rsp+50h] [rbp-30h] BYREF __int64 v46; // [rsp+60h] [rbp-20h] __int64 v47; // [rsp+68h] [rbp-18h] __int128 *v48; // [rsp+B8h] [rbp+38h] BYREF __int16 v49; // [rsp+C0h] [rbp+40h] BYREF char v50; // [rsp+C2h] [rbp+42h] v2 = (cocos2d::CCArray *)cocos2d::CCArray::create(a1); v3 = qword_14090BFE0; if ( !qword_14090BFE0 ) { v48 = (__int128 *)operator new(0x3E8u); qword_14090BFE0 = sub_1402D6480((__int64)v48); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0); v3 = qword_14090BFE0; } Stat = GameStatsManager::getStat(v3, "13"); if ( Stat >= 2000 ) { v5 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v48 = (__int128 *)operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v48); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v5 = qword_14090BFD0; } if ( GameManager::getUGV(v5, &word_14075A9C4) ) { v6 = 1; v48 = &v42; v49 = -1; v50 = -1; v42 = 0; v43 = 0; v44 = 0; *(_QWORD *)&v42 = sub_14003D460(0x40u); v43 = 56; v44 = 63; strcpy((char *)v42, "Now that's an impressive collection of Diamonds!"); v46 = 12; v47 = 15; strcpy((char *)&v45, "The Mechanic"); BYTE13(v45) = 0; HIWORD(v45) = 0; v7 = DialogObject::create((__int64)&v45, (__int64)&v42, 39, 1.0, 0, (__int64)&v49); cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v7); v48 = &v45; v49 = -1; v50 = -1; v45 = 0; v46 = 0; v47 = 0; *(_QWORD *)&v45 = sub_14003D460(0x30u); v46 = 35; v47 = 47; strcpy((char *)v45, "If anyone asks I didn't let you in."); v43 = 12; v44 = 15; strcpy((char *)&v42, "The Mechanic"); BYTE13(v42) = 0; HIWORD(v42) = 0; v8 = DialogObject::create((__int64)&v42, (__int64)&v45, 37, 1.0, 0, (__int64)&v49); cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v8); v48 = &v45; v49 = -1; v50 = -1; v45 = 0; v46 = 0; v47 = 0; *(_QWORD *)&v45 = sub_14003D460(0x50u); v46 = 67; v47 = 79; strcpy((char *)v45, "Scratch keeps trying to sneak past my security..."); v43 = 12; v44 = 15; strcpy((char *)&v42, "The Mechanic"); BYTE13(v42) = 0; HIWORD(v42) = 0; v9 = DialogObject::create((__int64)&v42, (__int64)&v45, 50, 1.0, 0, (__int64)&v49); cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v9); v48 = &v45; v49 = -1; v50 = -1; v45 = 0; v46 = 0; v47 = 0; *(_QWORD *)&v45 = sub_14003D460(0x30u); v46 = 41; v47 = 47; strcpy((char *)v45, "I CAN'T SEE!?"); v43 = 12; v44 = 15; strcpy((char *)&v42, "The Mechanic"); BYTE13(v42) = 0; HIWORD(v42) = 0; v10 = DialogObject::create((__int64)&v42, (__int64)&v45, 44, 1.0, 0, (__int64)&v49); cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v10); v48 = &v45; v49 = -1; v50 = -1; v45 = 0; v46 = 0; v47 = 0; *(_QWORD *)&v45 = sub_14003D460(0x40u); v46 = 61; v47 = 63; strcpy((char *)v45, "Ah sorry, my goggles were off.\nCome in."); v43 = 12; v44 = 15; strcpy((char *)&v42, "The Mechanic"); BYTE13(v42) = 0; HIWORD(v42) = 0; v11 = DialogObject::create((__int64)&v42, (__int64)&v45, 51, 1.0, 0, (__int64)&v49); cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v11); goto LABEL_28; } } v6 = 0; v12 = a1[145]; if ( !v12 ) { v48 = &v45; v49 = -1; v50 = -1; v45 = 0; v46 = 0; v47 = 0; *(_QWORD *)&v45 = sub_14003D460(0x30u); v46 = 44; v47 = 47; strcpy((char *)v45, "I'm in the middle of a job.\nCome back later."); v43 = 12; v44 = 15; strcpy((char *)&v42, "The Mechanic"); BYTE13(v42) = 0; HIWORD(v42) = 0; v33 = DialogObject::create((__int64)&v42, (__int64)&v45, 38, 1.0, 0, (__int64)&v49); cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v33); v48 = &v45; v49 = -1; v50 = -1; v45 = 0; v46 = 0; v47 = 0; *(_QWORD *)&v45 = sub_14003D460(0x40u); v46 = 57; v47 = 63; strcpy((char *)v45, "Can never get any peace and quiet in this game..."); goto LABEL_24; } v13 = v12 - 1; if ( !v13 ) { v48 = &v45; v49 = -1; v50 = -1; v45 = 0; v46 = 0; v47 = 0; *(_QWORD *)&v45 = sub_14003D460(0x20u); v46 = 30; v47 = 31; strcpy((char *)v45, "You again!? What now!?"); v43 = 12; v44 = 15; strcpy((char *)&v42, "The Mechanic"); BYTE13(v42) = 0; HIWORD(v42) = 0; v31 = DialogObject::create((__int64)&v42, (__int64)&v45, 46, 1.0, 0, (__int64)&v49); cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v31); v48 = &v45; v49 = -1; v50 = -1; v45 = 0; v46 = 0; v47 = 0; *(_QWORD *)&v45 = sub_14003D460(0x30u); v46 = 32; v47 = 47; strcpy((char *)v45, "I'm busy go bother someone else."); v43 = 12; v44 = 15; strcpy((char *)&v42, "The Mechanic"); BYTE13(v42) = 0; HIWORD(v42) = 0; v32 = DialogObject::create((__int64)&v42, (__int64)&v45, 51, 1.0, 0, (__int64)&v49); cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v32); v48 = &v45; v49 = -1; v50 = -1; v45 = 0; v46 = 0; v47 = 0; *(_QWORD *)&v45 = sub_14003D460(0x50u); v46 = 78; v47 = 79; strcpy((char *)v45, "You take one job then all of a sudden you're bugfixing the whole game."); LABEL_24: BYTE13(v42) = 0; HIWORD(v42) = 0; strcpy((char *)&v42, "The Mechanic"); v44 = 15; v43 = 12; v22 = 37; goto LABEL_25; } v14 = v13 - 1; if ( !v14 ) { v48 = &v45; v49 = -1; v50 = -1; v45 = 0; v46 = 0; v47 = 0; *(_QWORD *)&v45 = sub_14003D460(0x50u); v46 = 65; v47 = 79; strcpy((char *)v45, "Hmm so if I push here... maybe..."); v43 = 12; v44 = 15; strcpy((char *)&v42, "The Mechanic"); BYTE13(v42) = 0; HIWORD(v42) = 0; v30 = DialogObject::create((__int64)&v42, (__int64)&v45, 45, 1.0, 0, (__int64)&v49); cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v30); v48 = &v45; v49 = -1; v50 = -1; v45 = 0; v46 = 0; v47 = 0; *(_QWORD *)&v45 = sub_14003D460(0x20u); v46 = 27; v47 = 31; strcpy((char *)v45, "No, still broken..."); v43 = 12; v44 = 15; strcpy((char *)&v42, "The Mechanic"); BYTE13(v42) = 0; HIWORD(v42) = 0; v22 = 49; LABEL_25: v34 = DialogObject::create((__int64)&v42, (__int64)&v45, v22, 1.0, 0, (__int64)&v49); cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v34); goto LABEL_26; } v15 = v14 - 1; if ( !v15 ) { v48 = &v45; v49 = -1; v50 = -1; v45 = 0; v46 = 0; v47 = 0; *(_QWORD *)&v45 = sub_14003D460(0x40u); v46 = 62; v47 = 63; strcpy((char *)v45, "I have enough work as it is, can't go around helping everyone."); v43 = 12; v44 = 15; strcpy((char *)&v42, "The Mechanic"); BYTE13(v42) = 0; HIWORD(v42) = 0; v23 = DialogObject::create((__int64)&v42, (__int64)&v45, 51, 1.0, 0, (__int64)&v49); cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v23); v48 = &v42; v49 = -1; v50 = -1; v24 = cocos2d::CCString::createWithFormat( "Collect %i Diamonds so I know you're legit, then we can talk.", 2000); CString = cocos2d::CCString::getCString(v24); v42 = 0; v43 = 0; v44 = 0; v26 = -1; do ++v26; while ( CString[v26] ); sub_14003D230(&v42, CString, v26); v46 = 12; v47 = 15; strcpy((char *)&v45, "The Mechanic"); BYTE13(v45) = 0; HIWORD(v45) = 0; v27 = DialogObject::create((__int64)&v45, (__int64)&v42, 37, 1.0, 0, (__int64)&v49); cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v27); v48 = &v45; v49 = -1; v50 = -1; v45 = 0; v46 = 0; v47 = 0; *(_QWORD *)&v45 = sub_14003D460(0x40u); v46 = 53; v47 = 63; strcpy((char *)v45, "Who ordered this thing it doesn't even fit..."); v43 = 12; v44 = 15; strcpy((char *)&v42, "The Mechanic"); BYTE13(v42) = 0; HIWORD(v42) = 0; v28 = DialogObject::create((__int64)&v42, (__int64)&v45, 49, 1.0, 0, (__int64)&v49); cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v28); v29 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v48 = (__int128 *)operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v48); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v29 = qword_14090BFD0; } GameManager::setUGV(v29, &word_14075A9C4, 1u); goto LABEL_26; } if ( v15 == 1 ) { v48 = &v45; v49 = -1; v50 = -1; v45 = 0; v46 = 0; v47 = 0; *(_QWORD *)&v45 = sub_14003D460(0x30u); v46 = 42; v47 = 47; strcpy((char *)v45, "Scanning user..."); v43 = 12; v44 = 15; strcpy((char *)&v42, "The Mechanic"); BYTE13(v42) = 0; HIWORD(v42) = 0; v16 = DialogObject::create((__int64)&v42, (__int64)&v45, 49, 1.0, 0, (__int64)&v49); cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v16); v48 = &v42; v49 = -1; v50 = -1; v17 = cocos2d::CCString::createWithFormat( "Scan complete.\nDiamonds: %i, Required: %i", Stat, 2000); v18 = cocos2d::CCString::getCString(v17); v42 = 0; v43 = 0; v44 = 0; v19 = -1; do ++v19; while ( v18[v19] ); sub_14003D230(&v42, v18, v19); v46 = 12; v47 = 15; strcpy((char *)&v45, "The Mechanic"); BYTE13(v45) = 0; HIWORD(v45) = 0; v20 = DialogObject::create((__int64)&v45, (__int64)&v42, 45, 1.0, 0, (__int64)&v49); cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v20); v48 = &v45; v49 = -1; v50 = -1; v45 = 0; v46 = 0; v47 = 0; *(_QWORD *)&v45 = sub_14003D460(0x30u); v46 = 40; v47 = 47; strcpy((char *)v45, "Hey who are you trying to fool?!"); v43 = 12; v44 = 15; strcpy((char *)&v42, "The Mechanic"); BYTE13(v42) = 0; HIWORD(v42) = 0; v21 = DialogObject::create((__int64)&v42, (__int64)&v45, 46, 1.0, 0, (__int64)&v49); cocos2d::CCArray::addObject(v2, (struct cocos2d::CCObject *)v21); v48 = &v45; v49 = -1; v50 = -1; v45 = 0; v46 = 0; v47 = 0; *(_QWORD *)&v45 = sub_14003D460(0x60u); v46 = 92; v47 = 95; strcpy((char *)v45, "Come back when you have\ncollected more Diamonds..."); v43 = 12; v44 = 15; strcpy((char *)&v42, "The Mechanic"); BYTE13(v42) = 0; HIWORD(v42) = 0; v22 = 50; goto LABEL_25; } LABEL_26: if ( (int)++a1[145] > 4 ) a1[145] = 0; LABEL_28: DialogLayer = DialogLayer::createDialogLayer(0, (__int64)v2, 4u); (*(void (__fastcall **)(_DWORD *, cocos2d::CCNode *, __int64))(*(_QWORD *)a1 + 456LL))(a1, DialogLayer, 100); (*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)DialogLayer + 64LL))(DialogLayer, 4); if ( v6 ) *((_QWORD *)DialogLayer + 78) = a1 + 102; v37 = cocos2d::CCDirector::sharedDirector(v36); cocos2d::CCDirector::getWinSize(v37, &v48); v38 = **((_QWORD **)DialogLayer + 70); v39 = *((_QWORD *)DialogLayer + 70); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v49, *(float *)&v48 * 0.5, *((float *)&v48 + 1) * 0.5); (*(void (__fastcall **)(__int64, __int64))(v38 + 184))(v39, v40); return DialogLayer::animateInRandomSide(DialogLayer); }
GD Web Decomp Icon

GD Web Decomp

Raw Source