// // GameStatsManager::generateItemUnlockableData from 0x10002aed0 to 0x10002b907 (2615 bytes) // // 4 xrefs: // > GameStatsManager::init @ 0x10001f7cc // > GameStatsManager::generateItemUnlockableData @ 0x10002b24c // > GameStatsManager::generateItemUnlockableData @ 0x10002b538 // > GameStatsManager::generateItemUnlockableData @ 0x10002b818 // // 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 12:19:27 +0000 // void __fastcall GameStatsManager::generateItemUnlockableData(__int64 a1, __int64 a2) { __int64 v2; // rax int v3; // eax unsigned int v4; // r13d unsigned int v5; // r14d __int64 v6; // rsi _OWORD *v7; // r15 __int64 v8; // rax char *v9; // rbx __int64 v10; // rax __int64 v11; // rdi __int64 v12; // rax __int64 v13; // rdi __int64 v14; // rax __int64 v15; // r12 __int64 v16; // rdi __int64 v17; // rdx __int64 v18; // rcx __int64 v19; // r8 __int64 v20; // r9 __int64 v21; // rbx __int64 v22; // rsi __int64 v23; // rbx int v24; // esi unsigned int v25; // ecx __int64 v26; // rax char *v27; // rbx __int64 v28; // rax __int64 v29; // rdi __int64 v30; // rax __int64 v31; // rdi __int64 v32; // rax __int64 v33; // r12 __int64 v34; // rdi __int64 v35; // rdx __int64 v36; // rcx __int64 v37; // r8 __int64 v38; // r9 __int64 v39; // rbx __int64 v40; // rsi __int64 v41; // rax int v42; // ebx __int64 v43; // rax char *v44; // rbx __int64 v45; // rax __int64 v46; // rdi __int64 v47; // rax __int64 v48; // rdi __int64 v49; // rax __int64 v50; // r12 __int64 v51; // rdi __int64 v52; // rdx __int64 v53; // rcx __int64 v54; // r8 __int64 v55; // r9 __int64 v56; // rbx __int64 v57; // rsi __int64 v58; // rbx __int64 v59; // rbx __int64 v60[3]; // [rsp+0h] [rbp-70h] BYREF __int64 v61; // [rsp+18h] [rbp-58h] int v62; // [rsp+20h] [rbp-50h] int v63; // [rsp+24h] [rbp-4Ch] __int64 (__fastcall **v64)(); // [rsp+28h] [rbp-48h] _BYTE v65[16]; // [rsp+30h] [rbp-40h] BYREF void *__p; // [rsp+40h] [rbp-30h] v61 = a1; if ( !*(_QWORD *)(a1 + 832) ) { v2 = cocos2d::CCDictionary::create(a1, a2); *(_QWORD *)(v61 + 832) = v2; cocos2d::CCObject::retain(v2); v64 = off_100AB7358; v3 = 0; do { v63 = v3; v4 = dword_100A03BF0[v3]; v62 = dword_100A03C2C[v3]; v5 = dword_100A03C68[v3]; do { v6 = AchievementManager::sharedState(); AchievementManager::achievementForUnlock(v60, v6, v5, v4); if ( (v60[0] & 1) != 0 ) { if ( !v60[1] ) goto LABEL_12; } else if ( !(LOBYTE(v60[0]) >> 1) ) { LABEL_12: v7 = nullptr; v8 = qword_100BE0EF8; if ( qword_100BE0EF8 ) goto LABEL_20; goto LABEL_13; } v7 = operator new(0x38u); v7[2] = 0; v7[1] = 0; *v7 = 0; *((_QWORD *)v7 + 6) = 0; cocos2d::CCObject::CCObject(v7); *(_QWORD *)v7 = v64; cocos2d::CCObject::autorelease(v7); v6 = 1; (*(void (__fastcall **)(_OWORD *, __int64))(*(_QWORD *)v7 + 72LL))(v7, 1); v8 = qword_100BE0EF8; if ( qword_100BE0EF8 ) goto LABEL_20; LABEL_13: v9 = (char *)operator new(0x398u); cocos2d::CCNode::CCNode(v9); *(_QWORD *)v9 = off_100AB6AA0; v9[314] = 0; *((_OWORD *)v9 + 20) = 0; *((_OWORD *)v9 + 21) = 0; *((_OWORD *)v9 + 22) = 0; *((_OWORD *)v9 + 23) = 0; *((_OWORD *)v9 + 24) = 0; *((_QWORD *)v9 + 50) = 0; *((_DWORD *)v9 + 102) = 1065353216; *((_OWORD *)v9 + 26) = 0; *((_OWORD *)v9 + 27) = 0; *((_DWORD *)v9 + 112) = 1065353216; *(_OWORD *)(v9 + 456) = 0; *(_OWORD *)(v9 + 472) = 0; *(_OWORD *)(v9 + 488) = 0; *(_OWORD *)(v9 + 504) = 0; *(_OWORD *)(v9 + 520) = 0; *(_OWORD *)(v9 + 536) = 0; *((_QWORD *)v9 + 69) = 0; *((_DWORD *)v9 + 140) = 1065353216; *(_OWORD *)(v9 + 568) = 0; *(_OWORD *)(v9 + 584) = 0; *((_DWORD *)v9 + 150) = 1065353216; *((_QWORD *)v9 + 102) = 0; *((_QWORD *)v9 + 104) = 0; *((_OWORD *)v9 + 53) = 0; *((_OWORD *)v9 + 38) = 0; *((_OWORD *)v9 + 39) = 0; *((_OWORD *)v9 + 40) = 0; *((_OWORD *)v9 + 41) = 0; *((_OWORD *)v9 + 42) = 0; *((_OWORD *)v9 + 43) = 0; *((_OWORD *)v9 + 44) = 0; *((_OWORD *)v9 + 45) = 0; *((_OWORD *)v9 + 46) = 0; *((_OWORD *)v9 + 47) = 0; *(_OWORD *)(v9 + 764) = 0; *(_OWORD *)(v9 + 793) = 0; *((_OWORD *)v9 + 49) = 0; *((_QWORD *)v9 + 105) = v9 + 848; *(_OWORD *)(v9 + 872) = 0; *((_QWORD *)v9 + 108) = v9 + 872; *((_OWORD *)v9 + 56) = 0; *((_QWORD *)v9 + 111) = v9 + 896; *((_WORD *)v9 + 456) = 0; *((_DWORD *)v9 + 229) = 0; qword_100BE0EF8 = (__int64)v9; v6 = 1; v10 = sub_10088E820("%i", v60[0]); *((_QWORD *)v9 + 40) = v10; v11 = v10; cocos2d::CCObject::retain(v10); v12 = cocos2d::CCDictionary::create(v11, 1); *((_QWORD *)v9 + 103) = v12; v13 = v12; cocos2d::CCObject::retain(v12); v14 = cocos2d::CCDictionary::create(v13, 1); v15 = v14; v16 = *((_QWORD *)v9 + 59); if ( v16 != v14 ) { if ( v14 ) { cocos2d::CCObject::retain(v14); v16 = *((_QWORD *)v9 + 59); } if ( v16 ) cocos2d::CCObject::release(v16); *((_QWORD *)v9 + 59) = v15; } GameStatsManager::setupIconCredits(v9); GameStatsManager::createStoreItems(v9, 1, v17, v18, v19, v20, v60[0]); GameStatsManager::createSecretChestItems((__int64)v9, 1); GameStatsManager::createSpecialChestItems((__int64 **)v9, 1); GameStatsManager::generateItemUnlockableData(v9); v8 = qword_100BE0EF8; LABEL_20: v21 = *(_QWORD *)(v8 + 328); GameStatsManager::getItemKey(v65, v6, v5, v4); v22 = (__int64)v65; v23 = cocos2d::CCDictionary::objectForKey(v21, v65); if ( (v65[0] & 1) != 0 ) operator delete(__p); if ( v23 != 0 && v7 == nullptr ) { v7 = operator new(0x38u); v7[2] = 0; v7[1] = 0; *v7 = 0; *((_QWORD *)v7 + 6) = 0; cocos2d::CCObject::CCObject(v7); *(_QWORD *)v7 = v64; cocos2d::CCObject::autorelease(v7); v24 = *(_DWORD *)(v23 + 364); v25 = v24 - 1; v22 = (unsigned int)(v24 + 4); if ( v25 >= 4 ) v22 = 4; (*(void (__fastcall **)(_OWORD *, __int64))(*(_QWORD *)v7 + 72LL))(v7, v22); } v26 = qword_100BE0EF8; if ( !qword_100BE0EF8 ) { v27 = (char *)operator new(0x398u); cocos2d::CCNode::CCNode(v27); *(_QWORD *)v27 = off_100AB6AA0; v27[314] = 0; *((_OWORD *)v27 + 20) = 0; *((_OWORD *)v27 + 21) = 0; *((_OWORD *)v27 + 22) = 0; *((_OWORD *)v27 + 23) = 0; *((_OWORD *)v27 + 24) = 0; *((_QWORD *)v27 + 50) = 0; *((_DWORD *)v27 + 102) = 1065353216; *((_OWORD *)v27 + 26) = 0; *((_OWORD *)v27 + 27) = 0; *((_DWORD *)v27 + 112) = 1065353216; *(_OWORD *)(v27 + 456) = 0; *(_OWORD *)(v27 + 472) = 0; *(_OWORD *)(v27 + 488) = 0; *(_OWORD *)(v27 + 504) = 0; *(_OWORD *)(v27 + 520) = 0; *(_OWORD *)(v27 + 536) = 0; *((_QWORD *)v27 + 69) = 0; *((_DWORD *)v27 + 140) = 1065353216; *(_OWORD *)(v27 + 568) = 0; *(_OWORD *)(v27 + 584) = 0; *((_DWORD *)v27 + 150) = 1065353216; *((_QWORD *)v27 + 102) = 0; *((_QWORD *)v27 + 104) = 0; *((_OWORD *)v27 + 53) = 0; *((_OWORD *)v27 + 38) = 0; *((_OWORD *)v27 + 39) = 0; *((_OWORD *)v27 + 40) = 0; *((_OWORD *)v27 + 41) = 0; *((_OWORD *)v27 + 42) = 0; *((_OWORD *)v27 + 43) = 0; *((_OWORD *)v27 + 44) = 0; *((_OWORD *)v27 + 45) = 0; *((_OWORD *)v27 + 46) = 0; *((_OWORD *)v27 + 47) = 0; *(_OWORD *)(v27 + 764) = 0; *(_OWORD *)(v27 + 793) = 0; *((_OWORD *)v27 + 49) = 0; *((_QWORD *)v27 + 105) = v27 + 848; *(_OWORD *)(v27 + 872) = 0; *((_QWORD *)v27 + 108) = v27 + 872; *((_OWORD *)v27 + 56) = 0; *((_QWORD *)v27 + 111) = v27 + 896; *((_WORD *)v27 + 456) = 0; *((_DWORD *)v27 + 229) = 0; qword_100BE0EF8 = (__int64)v27; v22 = 1; v28 = sub_10088E820("%i", v60[0]); *((_QWORD *)v27 + 40) = v28; v29 = v28; cocos2d::CCObject::retain(v28); v30 = cocos2d::CCDictionary::create(v29, 1); *((_QWORD *)v27 + 103) = v30; v31 = v30; cocos2d::CCObject::retain(v30); v32 = cocos2d::CCDictionary::create(v31, 1); v33 = v32; v34 = *((_QWORD *)v27 + 59); if ( v34 != v32 ) { if ( v32 ) { cocos2d::CCObject::retain(v32); v34 = *((_QWORD *)v27 + 59); } if ( v34 ) cocos2d::CCObject::release(v34); *((_QWORD *)v27 + 59) = v33; } GameStatsManager::setupIconCredits(v27); GameStatsManager::createStoreItems(v27, 1, v35, v36, v37, v38, v60[0]); GameStatsManager::createSecretChestItems((__int64)v27, 1); GameStatsManager::createSpecialChestItems((__int64 **)v27, 1); GameStatsManager::generateItemUnlockableData(v27); v26 = qword_100BE0EF8; } v39 = *(_QWORD *)(v26 + 352); GameStatsManager::getItemKey(v65, v22, v5, v4); v40 = (__int64)v65; v41 = cocos2d::CCDictionary::valueForKey(v39, v65); v42 = cocos2d::CCString::intValue(v41); if ( (v65[0] & 1) != 0 ) operator delete(__p); if ( v42 > 0 && v7 == nullptr ) { v7 = operator new(0x38u); v7[2] = 0; v7[1] = 0; *v7 = 0; *((_QWORD *)v7 + 6) = 0; cocos2d::CCObject::CCObject(v7); *(_QWORD *)v7 = v64; cocos2d::CCObject::autorelease(v7); v40 = 2; (*(void (__fastcall **)(_OWORD *, __int64))(*(_QWORD *)v7 + 72LL))(v7, 2); } v43 = qword_100BE0EF8; if ( !qword_100BE0EF8 ) { v44 = (char *)operator new(0x398u); cocos2d::CCNode::CCNode(v44); *(_QWORD *)v44 = off_100AB6AA0; v44[314] = 0; *((_OWORD *)v44 + 20) = 0; *((_OWORD *)v44 + 21) = 0; *((_OWORD *)v44 + 22) = 0; *((_OWORD *)v44 + 23) = 0; *((_OWORD *)v44 + 24) = 0; *((_QWORD *)v44 + 50) = 0; *((_DWORD *)v44 + 102) = 1065353216; *((_OWORD *)v44 + 26) = 0; *((_OWORD *)v44 + 27) = 0; *((_DWORD *)v44 + 112) = 1065353216; *(_OWORD *)(v44 + 456) = 0; *(_OWORD *)(v44 + 472) = 0; *(_OWORD *)(v44 + 488) = 0; *(_OWORD *)(v44 + 504) = 0; *(_OWORD *)(v44 + 520) = 0; *(_OWORD *)(v44 + 536) = 0; *((_QWORD *)v44 + 69) = 0; *((_DWORD *)v44 + 140) = 1065353216; *(_OWORD *)(v44 + 568) = 0; *(_OWORD *)(v44 + 584) = 0; *((_DWORD *)v44 + 150) = 1065353216; *((_QWORD *)v44 + 102) = 0; *((_QWORD *)v44 + 104) = 0; *((_OWORD *)v44 + 53) = 0; *((_OWORD *)v44 + 38) = 0; *((_OWORD *)v44 + 39) = 0; *((_OWORD *)v44 + 40) = 0; *((_OWORD *)v44 + 41) = 0; *((_OWORD *)v44 + 42) = 0; *((_OWORD *)v44 + 43) = 0; *((_OWORD *)v44 + 44) = 0; *((_OWORD *)v44 + 45) = 0; *((_OWORD *)v44 + 46) = 0; *((_OWORD *)v44 + 47) = 0; *(_OWORD *)(v44 + 764) = 0; *(_OWORD *)(v44 + 793) = 0; *((_OWORD *)v44 + 49) = 0; *((_QWORD *)v44 + 105) = v44 + 848; *(_OWORD *)(v44 + 872) = 0; *((_QWORD *)v44 + 108) = v44 + 872; *((_OWORD *)v44 + 56) = 0; *((_QWORD *)v44 + 111) = v44 + 896; *((_WORD *)v44 + 456) = 0; *((_DWORD *)v44 + 229) = 0; qword_100BE0EF8 = (__int64)v44; v40 = 1; v45 = sub_10088E820("%i", v60[0]); *((_QWORD *)v44 + 40) = v45; v46 = v45; cocos2d::CCObject::retain(v45); v47 = cocos2d::CCDictionary::create(v46, 1); *((_QWORD *)v44 + 103) = v47; v48 = v47; cocos2d::CCObject::retain(v47); v49 = cocos2d::CCDictionary::create(v48, 1); v50 = v49; v51 = *((_QWORD *)v44 + 59); if ( v51 != v49 ) { if ( v49 ) { cocos2d::CCObject::retain(v49); v51 = *((_QWORD *)v44 + 59); } if ( v51 ) cocos2d::CCObject::release(v51); *((_QWORD *)v44 + 59) = v50; } GameStatsManager::setupIconCredits(v44); GameStatsManager::createStoreItems(v44, 1, v52, v53, v54, v55, v60[0]); GameStatsManager::createSecretChestItems((__int64)v44, 1); GameStatsManager::createSpecialChestItems((__int64 **)v44, 1); GameStatsManager::generateItemUnlockableData(v44); v43 = qword_100BE0EF8; } v56 = *(_QWORD *)(v43 + 368); GameStatsManager::getItemKey(v65, v40, v5, v4); v57 = (__int64)v65; v58 = cocos2d::CCDictionary::objectForKey(v56, v65); if ( (v65[0] & 1) != 0 ) operator delete(__p); if ( v58 ) { if ( !v7 ) { v7 = operator new(0x38u); v7[2] = 0; v7[1] = 0; *v7 = 0; *((_QWORD *)v7 + 6) = 0; cocos2d::CCObject::CCObject(v7); *(_QWORD *)v7 = v64; cocos2d::CCObject::autorelease(v7); v57 = 3; (*(void (__fastcall **)(_OWORD *, __int64))(*(_QWORD *)v7 + 72LL))(v7, 3); } } else if ( !v7 ) { goto LABEL_54; } v59 = *(_QWORD *)(v61 + 832); GameStatsManager::getItemKey(v65, v57, v5, v4); cocos2d::CCDictionary::setObject(v59, v7, v65); if ( (v65[0] & 1) != 0 ) operator delete(__p); LABEL_54: if ( (v60[0] & 1) != 0 ) operator delete((void *)v60[2]); ++v5; } while ( v62 != v5 ); v3 = v63 + 1; } while ( v63 != 14 ); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source