// // GJObjectDecoder::getDecodedObject from 0x140284060 to 0x1402844fc (1180 bytes) // // 2 xrefs: // > @ 0x14056d878 // > @ 0x1406d14fc // // 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=3 cocos2d::CCObject *GJObjectDecoder::getDecodedObject(GJObjectDecoder *a1, int a2, DS_Dictionary *a3) { GJGameLevel *v4; // rax GJGameLevel *v5; // rsi cocos2d::CCObject *result; // rax cocos2d::CCObject *v7; // rdi int v8; // eax int v9; // eax __int64 StringForKey; // rax int v11; // eax int v12; // ebx float v13; // xmm0_4 int v14; // eax int v15; // ebx float v16; // xmm0_4 unsigned int v17; // eax unsigned int v18; // ebx float v19; // xmm0_4 int v20; // eax cocos2d::CCObject *v21; // rbx int v22; // eax unsigned int v23; // eax struct cocos2d::CCArray *ArrayForKey; // rax struct cocos2d::CCArray *v25; // rdi cocos2d::CCObject *v26; // rcx int v27; // eax unsigned int v28; // eax int v29; // eax int v30; // eax GJSmartTemplate *v31; // rbx int v32; // eax __int64 v33; // rax int v34; // eax GJLevelList *v35; // rbx GJGameLevel *v36; // [rsp+30h] [rbp-58h] cocos2d::CCObject *v37; // [rsp+30h] [rbp-58h] char *v38; // [rsp+30h] [rbp-58h] __int128 v39; // [rsp+38h] [rbp-50h] BYREF __int64 v40; // [rsp+48h] [rbp-40h] __int64 v41; // [rsp+50h] [rbp-38h] _BYTE v42[32]; // [rsp+58h] [rbp-30h] BYREF switch ( a2 ) { case 4: v36 = (GJGameLevel *)operator new(0x5C8u); v4 = GJGameLevel::GJGameLevel(v36); v5 = v4; if ( v4 ) { if ( v4->init(v4) ) { cocos2d::CCObject::autorelease(v5); GJGameLevel::dataLoaded(v5, a3); return v5; } ((void (__fastcall *)(GJGameLevel *, __int64))v5->~GJGameLevel)(v5, 1); v5 = nullptr; } GJGameLevel::dataLoaded(v5, a3); result = v5; break; case 5: result = cocos2d::CCObject::createWithCoder(a3); break; case 6: result = SongInfoObject::createWithCoder(a3); break; case 7: v39 = 0; v40 = 0; v41 = 15; LOBYTE(v39) = 0; v7 = GJChallengeItem::create(0, 0, 0, 0, (__int64)&v39); DS_Dictionary::getIntegerForKey(a3, (const char *)&word_140531EA4); LODWORD(v7[1].__vftable) = v8; DS_Dictionary::getIntegerForKey(a3, (const char *)&word_140531E90); v7[1].m_unknown2 = v9; LOBYTE(v7[1].m_nZOrder) = DS_Dictionary::getBoolForKey(a3, "6"); StringForKey = DS_Dictionary::getStringForKey(a3, v42, &word_140531E88); sub_140051590((__int64)&v7[2], StringForKey); sub_14003A830((__int64)v42); DS_Dictionary::getIntegerForKey(a3, (const char *)&word_140531EA0); v12 = v11; v7[1].m_nLuaID = v11; v13 = (float)((float)rand() / 32767.0) * 1000.0; v7[1].m_uID = (int)v13; HIDWORD(v7[1].__vftable) = (int)v13 + v12; DS_Dictionary::getIntegerForKey(a3, (const char *)&word_140531E9C); v15 = v14; v7[1].m_uUnknown = v14; v16 = (float)((float)rand() / 32767.0) * 1000.0; v7[1].m_uIndexInArray = (int)v16; v7[1].m_eObjType = (int)v16 + v15; DS_Dictionary::getIntegerForKey(a3, (const char *)&word_140531E94); v18 = v17; v7[1].m_uAutoReleaseCount = v17; v19 = (float)((float)rand() / 32767.0) * 1000.0; v7[1].m_uReference = (int)v19; v7[1].m_nTag = (int)v19 + v18; DS_Dictionary::getIntegerForKey(a3, "8"); v7[1].m_uOrderOfArrival = v20; result = v7; break; case 8: v39 = 0; v40 = 0; v41 = 15; LOBYTE(v39) = 0; v21 = GJRewardItem::create(0, 0, (__int64)&v39); DS_Dictionary::getIntegerForKey(a3, (const char *)&word_140531EA4); LODWORD(v21[1].__vftable) = v22; DS_Dictionary::getIntegerForKey(a3, (const char *)&word_140531EA0); v21[1].m_uID = v23; ArrayForKey = DS_Dictionary::getArrayForKey(a3, (const char *)&word_140531E9C, 0); v25 = ArrayForKey; if ( *(struct cocos2d::CCArray **)&v21[1].m_nTag != ArrayForKey ) { if ( ArrayForKey ) cocos2d::CCObject::retain(ArrayForKey); v26 = *(cocos2d::CCObject **)&v21[1].m_nTag; if ( v26 ) cocos2d::CCObject::release(v26); *(_QWORD *)&v21[1].m_nTag = v25; } result = v21; break; case 9: v37 = (cocos2d::CCObject *)operator new(0x48u); cocos2d::CCObject::CCObject(v37); v37->__vftable = (cocos2d::CCObject_vtbl *)&GJRewardObject::`vftable'; LODWORD(v37[1].__vftable) = 0; *(_QWORD *)&v37[1].m_uID = 0; cocos2d::CCObject::autorelease(v37); DS_Dictionary::getIntegerForKey(a3, (const char *)&word_140531EA4); LODWORD(v37[1].__vftable) = v27; DS_Dictionary::getIntegerForKey(a3, (const char *)&word_140531EA0); v37[1].m_uID = v28; DS_Dictionary::getIntegerForKey(a3, (const char *)&word_140531E9C); v37[1].m_nLuaID = v29; DS_Dictionary::getIntegerForKey(a3, (const char *)&word_140531E94); HIDWORD(v37[1].__vftable) = v30; result = v37; break; case 10: v31 = GJSmartTemplate::create(); GJSmartTemplate::dataLoaded(v31, a3); result = v31; break; case 11: v38 = (char *)operator new(0x80u); cocos2d::CCObject::CCObject((cocos2d::CCObject *)v38); *(_QWORD *)v38 = &GJSmartPrefab::`vftable'; *(_OWORD *)(v38 + 56) = 0; *((_QWORD *)v38 + 9) = 0; *((_QWORD *)v38 + 10) = 15; v38[56] = 0; *(_OWORD *)(v38 + 88) = 0; *((_QWORD *)v38 + 13) = 0; *((_QWORD *)v38 + 14) = 15; v38[88] = 0; *((_QWORD *)v38 + 15) = 0; v32 = dword_1406BA174; *((_DWORD *)v38 + 30) = dword_1406BA174; dword_1406BA174 = v32 + 1; cocos2d::CCObject::autorelease((cocos2d::CCObject *)v38); v33 = DS_Dictionary::getStringForKey(a3, v42, &word_140531EA4); sub_140051590((__int64)(v38 + 88), v33); sub_14003A830((__int64)v42); DS_Dictionary::getIntegerForKey(a3, (const char *)&word_140531EA0); *((_DWORD *)v38 + 31) = v34; result = (cocos2d::CCObject *)v38; break; case 12: v35 = GJLevelList::create_1(); GJLevelList::dataLoaded(v35, a3); result = v35; break; default: result = nullptr; break; } return result; }