// // AchievementManager::storeAchievementUnlocks from 0x678ff4 to 0x6792a8 (692 bytes) // // 2 xrefs: // > AchievementManager::init @ 0x679310 // > @ 0xcd9c0 // // This function is hookable on this platform (idp: arm, 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:50:20 +0000 // __int64 __fastcall AchievementManager::storeAchievementUnlocks(AchievementManager *this) { cocos2d::CCObject *v3; // x0 unsigned int v4; // w21 cocos2d::CCArray *v5; // x23 cocos2d::CCString *v6; // x0 const char *CString; // x0 char *v8; // x27 __int64 v9; // x22 size_t v10; // x0 __int64 v11; // x22 cocos2d::CCString *v12; // x22 const char *v13; // x0 size_t v14; // x0 size_t v15; // x0 cocos2d::CCObject *v16; // x27 const char *v17; // x0 size_t v18; // x0 char *v19; // [xsp+60h] [xbp+60h] char *v20; // [xsp+68h] [xbp+68h] int v21[2]; // [xsp+68h] [xbp+68h] __int64 v22; // [xsp+70h] [xbp+70h] BYREF __int64 v23; // [xsp+78h] [xbp+78h] void *v24; // [xsp+80h] [xbp+80h] __int64 v25[2]; // [xsp+88h] [xbp+88h] BYREF void *v26; // [xsp+98h] [xbp+98h] __int64 v27; // [xsp+A0h] [xbp+A0h] BYREF __int64 v28; // [xsp+A8h] [xbp+A8h] void *v29; // [xsp+B0h] [xbp+B0h] if ( !*((_QWORD *)this + 42) ) { v3 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(nullptr); *((_QWORD *)this + 42) = v3; v4 = 0; cocos2d::CCObject::retain(v3); v5 = (cocos2d::CCArray *)cocos2d::CCDictionary::allKeys(*((cocos2d::CCDictionary **)this + 41)); while ( 1 ) { if ( v4 >= (unsigned int)cocos2d::CCArray::count(v5) ) return _stack_chk_guard; v6 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v5, v4); CString = (const char *)cocos2d::CCString::getCString(v6); v27 = 0; v28 = 0; v8 = (char *)CString; v29 = nullptr; v9 = *((_QWORD *)this + 41); v10 = strlen(CString); std::string::__init(&v27, v8, v10); v11 = cocos2d::CCDictionary::objectForKey(v9, &v27); if ( (v27 & 1) != 0 ) operator delete(v29); v27 = 0; v28 = 0; v29 = nullptr; std::string::__init(&v27, "icon", 4u); v12 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v11, &v27); if ( (v27 & 1) != 0 ) operator delete(v29); if ( !v12 ) goto LABEL_13; v13 = (const char *)cocos2d::CCString::getCString(v12); v22 = 0; v20 = (char *)v13; v23 = 0; v24 = nullptr; v14 = strlen(v13); std::string::__init(&v22, v20, v14); if ( (v22 & 1) != 0 ) { if ( !v23 ) goto LABEL_12; LABEL_15: v25[0] = 0; v25[1] = 0; v26 = nullptr; v15 = strlen(v8); *(_QWORD *)v21 = *((_QWORD *)this + 42); std::string::__init(v25, v8, v15); v16 = (cocos2d::CCObject *)cocos2d::CCString::create(v25); v17 = (const char *)cocos2d::CCString::getCString(v12); v27 = 0; v28 = 0; v29 = nullptr; v19 = (char *)v17; v18 = strlen(v17); std::string::__init(&v27, v19, v18); cocos2d::CCDictionary::setObject(v21[0], v16); if ( (v27 & 1) != 0 ) operator delete(v29); if ( (v25[0] & 1) != 0 ) operator delete(v26); if ( (v22 & 1) != 0 ) { LABEL_12: operator delete(v24); goto LABEL_13; } ++v4; } else { if ( (int)(unsigned __int8)v22 >> 1 ) goto LABEL_15; LABEL_13: ++v4; } } } return _stack_chk_guard; }