// // AchievementCell::loadFromDict from 0x100126398 to 0x10012714c (3508 bytes) // // 1 xrefs: // > CustomListView::loadCell @ 0x10012611c // // 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 10:59:18 +0000 // void __fastcall AchievementCell::loadFromDict(__int64 a1, __int64 a2) { __int64 v4; // x0 char *CString; // x20 _BOOL4 isAchievementEarned; // w21 __int64 v7; // x23 float v8; // s8 __int64 v9; // x0 char *v10; // x23 _QWORD *v11; // x0 __int64 v12; // x23 std::string *p_str; // x8 std::string::size_type size; // x25 std::string *v15; // x9 std::string::size_type v16; // x11 std::string *v17; // x10 __int64 v18; // x8 __int64 v19; // x26 float *v20; // x23 __int64 v21; // x24 std::string::size_type v22; // x24 std::string *p_p; // x1 __int64 v24; // x0 __int64 v25; // x28 bool v26; // zf std::string::size_type v27; // x11 std::string *v28; // x8 _BYTE *v29; // x9 _BYTE *v30; // x10 std::string::size_type v31; // x11 __int64 v32; // x8 __int64 v33; // x0 char *v34; // x24 __int64 v35; // x0 __int64 v36; // x23 bool v37; // w25 __int64 v38; // x0 bool v39; // w25 bool v40; // w25 bool v41; // w25 bool v42; // w25 bool v43; // w25 bool v44; // w25 bool v45; // w25 bool v46; // w25 bool v47; // w25 bool v48; // w25 bool v49; // w25 _BOOL4 v50; // w24 __int64 v51; // x0 __int64 v52; // x25 float *v53; // x0 __int64 v54; // x24 __int64 v55; // x0 __int64 v56; // x24 float v57; // s8 __n128 v58; // q0 float *v59; // x0 __int64 v60; // x0 const std::string::value_type *v61; // x0 _DWORD *v62; // x22 std::string *v63; // x1 float v64; // s11 float v65; // s8 float v66; // s9 __int64 v67; // x0 int v68; // w0 __int64 v69; // x20 __int64 v70; // x0 __int64 v71; // x0 __int64 v72; // x20 float32x2_t *v73; // x19 double v74; // d0 void *v75[2]; // [xsp+10h] [xbp-F0h] BYREF char v76; // [xsp+27h] [xbp-D9h] void *v77[2]; // [xsp+28h] [xbp-D8h] BYREF char v78; // [xsp+3Fh] [xbp-C1h] std::string __str; // [xsp+40h] [xbp-C0h] BYREF std::allocator __a[8]; // [xsp+58h] [xbp-A8h] BYREF char v81; // [xsp+6Fh] [xbp-91h] std::string __p; // [xsp+70h] [xbp-90h] BYREF (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 528) + 1168LL))(*(_QWORD *)(a1 + 528), 255); (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 536) + 584LL))(*(_QWORD *)(a1 + 536), 1); sub_100009900(&__p, "identifier"); v4 = cocos2d::CCDictionary::objectForKey(a2, &__p); CString = (char *)cocos2d::CCString::getCString(v4); if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__p.__r_.__value_.__l.__data_); AchievementManager::sharedState(); isAchievementEarned = AchievementManager::isAchievementEarned(); if ( !isAchievementEarned ) { v20 = (float *)cocos2d::CCSprite::createWithSpriteFrameName("playerSquare_001.png"); v21 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_lock_001.png"); (*(void (__fastcall **)(float *, __int64))(*(_QWORD *)v20 + 456LL))(v20, v21); sub_1000262BC((float *)&__p, v20[108] * 0.5, v20[109] * 0.5); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v21 + 184LL))(v21, &__p); __p.__r_.__value_.__s.__data_[2] = -81; LOWORD(__p.__r_.__value_.__l.__data_) = -20561; (*(void (__fastcall **)(float *, std::string *))(*(_QWORD *)v20 + 960LL))(v20, &__p); v8 = 0.0; goto LABEL_139; } sub_100009900(&__p, "icon"); v7 = cocos2d::CCDictionary::objectForKey(a2, &__p); if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__p.__r_.__value_.__l.__data_); v8 = 0.0; if ( !v7 ) { LABEL_138: v20 = (float *)cocos2d::CCSprite::createWithSpriteFrameName("GJ_achImage_001.png"); goto LABEL_139; } sub_100009900(&__p, "icon"); v9 = cocos2d::CCDictionary::objectForKey(a2, &__p); v10 = (char *)cocos2d::CCString::getCString(v9); if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__p.__r_.__value_.__l.__data_); v11 = sub_100009900(&__str, v10); v12 = sub_1002E736C(v11); if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) p_str = &__str; else p_str = (std::string *)__str.__r_.__value_.__r.__words[0]; if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) size = HIBYTE(__str.__r_.__value_.__r.__words[2]); else size = __str.__r_.__value_.__l.__size_; if ( size ) { v15 = (std::string *)((char *)p_str + size); v16 = size; v17 = p_str; while ( v17->__r_.__value_.__s.__data_[0] != 95 ) { v17 = (std::string *)((char *)v17 + 1); if ( !--v16 ) { v17 = (std::string *)((char *)p_str + size); break; } } v18 = (char *)v17 - (char *)p_str; if ( v17 == v15 ) v19 = -1; else v19 = v18; } else { v19 = -1; } v22 = 0; do { std::string::basic_string(&__p, &__str, v22, v19 - v22, __a); if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) { if ( v22 == size && !__p.__r_.__value_.__l.__size_ ) goto LABEL_35; p_p = (std::string *)__p.__r_.__value_.__r.__words[0]; } else { if ( v22 == size && !*((_BYTE *)&__p.__r_.__value_.__s + 23) ) goto LABEL_35; p_p = &__p; } sub_100009900(__a, (char *)p_p); v24 = sub_1003064AC(__a); sub_1002E74E0(v12, v24); if ( v81 < 0 ) operator delete(*(void **)&__a[0].std::__non_trivial_if); LABEL_35: if ( v19 == -1 ) goto LABEL_36; v22 = v19 + 1; v27 = __str.__r_.__value_.__l.__size_; if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v28 = &__str; else v28 = (std::string *)__str.__r_.__value_.__r.__words[0]; if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v27 = HIBYTE(__str.__r_.__value_.__r.__words[2]); if ( v27 <= v22 ) { LABEL_36: v25 = -1; } else { v29 = (char *)v28 + v27; v30 = (char *)v28 + v22; v31 = ~v19 + v27; while ( *v30 != 95 ) { ++v30; if ( !--v31 ) { v30 = v29; break; } } v32 = v30 - (_BYTE *)v28; if ( v30 == v29 ) v25 = -1; else v25 = v32; } if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__p.__r_.__value_.__l.__data_); v26 = v19 == -1; v19 = v25; } while ( !v26 ); if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__str.__r_.__value_.__l.__data_); if ( (unsigned int)sub_1002E757C(v12) < 2 ) goto LABEL_138; v33 = sub_1002E75A0(v12, 0); v34 = (char *)cocos2d::CCString::getCString(v33); v35 = sub_1002E75A0(v12, 1); v36 = cocos2d::CCString::intValue(v35); sub_100009900(&__p, v34); sub_100009900(__a, "ship"); v37 = sub_1000045BC(&__p, __a); if ( v81 < 0 ) operator delete(*(void **)&__a[0].std::__non_trivial_if); if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__p.__r_.__value_.__l.__data_); v8 = 0.0; if ( v37 ) { v38 = 4; } else { sub_100009900(&__p, v34); sub_100009900(__a, "ball"); v39 = sub_1000045BC(&__p, __a); if ( v81 < 0 ) operator delete(*(void **)&__a[0].std::__non_trivial_if); if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__p.__r_.__value_.__l.__data_); if ( v39 ) { v38 = 5; } else { sub_100009900(&__p, v34); sub_100009900(__a, "bird"); v40 = sub_1000045BC(&__p, __a); if ( v81 < 0 ) operator delete(*(void **)&__a[0].std::__non_trivial_if); if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__p.__r_.__value_.__l.__data_); if ( v40 ) { v8 = -5.0; v38 = 6; } else { sub_100009900(&__p, v34); sub_100009900(__a, "dart"); v41 = sub_1000045BC(&__p, __a); if ( v81 < 0 ) operator delete(*(void **)&__a[0].std::__non_trivial_if); if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__p.__r_.__value_.__l.__data_); if ( v41 ) { v38 = 7; } else { sub_100009900(&__p, v34); sub_100009900(__a, "robot"); v42 = sub_1000045BC(&__p, __a); if ( v81 < 0 ) operator delete(*(void **)&__a[0].std::__non_trivial_if); if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__p.__r_.__value_.__l.__data_); if ( v42 ) { v38 = 8; } else { sub_100009900(&__p, v34); sub_100009900(__a, "spider"); v43 = sub_1000045BC(&__p, __a); if ( v81 < 0 ) operator delete(*(void **)&__a[0].std::__non_trivial_if); if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__p.__r_.__value_.__l.__data_); if ( v43 ) { v38 = 9; } else { sub_100009900(&__p, v34); sub_100009900(__a, "death"); v44 = sub_1000045BC(&__p, __a); if ( v81 < 0 ) operator delete(*(void **)&__a[0].std::__non_trivial_if); if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__p.__r_.__value_.__l.__data_); if ( v44 ) { v38 = 11; } else { sub_100009900(&__p, v34); sub_100009900(__a, "special"); v45 = sub_1000045BC(&__p, __a); if ( v81 < 0 ) operator delete(*(void **)&__a[0].std::__non_trivial_if); if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__p.__r_.__value_.__l.__data_); if ( v45 ) { v38 = 10; } else { sub_100009900(&__p, v34); sub_100009900(__a, "swing"); v46 = sub_1000045BC(&__p, __a); if ( v81 < 0 ) operator delete(*(void **)&__a[0].std::__non_trivial_if); if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__p.__r_.__value_.__l.__data_); if ( v46 ) { v38 = 13; } else { sub_100009900(&__p, v34); sub_100009900(__a, "jetpack"); v47 = sub_1000045BC(&__p, __a); if ( v81 < 0 ) operator delete(*(void **)&__a[0].std::__non_trivial_if); if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__p.__r_.__value_.__l.__data_); if ( v47 ) { v38 = 14; } else { sub_100009900(&__p, v34); sub_100009900(__a, "shipstreak"); v48 = sub_1000045BC(&__p, __a); if ( v81 < 0 ) operator delete(*(void **)&__a[0].std::__non_trivial_if); if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__p.__r_.__value_.__l.__data_); if ( v48 ) { v38 = 15; } else { sub_100009900(&__p, v34); sub_100009900(__a, "color"); v49 = sub_1000045BC(&__p, __a); if ( v81 < 0 ) operator delete(*(void **)&__a[0].std::__non_trivial_if); if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__p.__r_.__value_.__l.__data_); if ( v49 ) { v38 = 2; } else { sub_100009900(&__p, v34); sub_100009900(__a, "color2"); v50 = sub_1000045BC(&__p, __a); if ( v81 < 0 ) operator delete(*(void **)&__a[0].std::__non_trivial_if); if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__p.__r_.__value_.__l.__data_); v38 = v50 ? 3LL : 1LL; } } } } } } } } } } } } v20 = (float *)GJItemIcon::create(v38, v36, 11513775, 0xFFFFFF, 0, 0, 0, 0xFFFFFF); if ( !v20 ) goto LABEL_138; LABEL_139: sub_1000262BC((float *)&__p, 35.0, v8 + (float)(*(float *)(a1 + 524) * 0.5)); (*(void (__fastcall **)(float *, std::string *))(*(_QWORD *)v20 + 184LL))(v20, &__p); (*(void (__fastcall **)(_QWORD, float *))(**(_QWORD **)(a1 + 536) + 456LL))(*(_QWORD *)(a1 + 536), v20); v51 = (*(__int64 (__fastcall **)(float *, float))(*(_QWORD *)v20 + 160LL))(v20, 1.0); v52 = cocos2d::CCNode::create(v51); (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 536) + 456LL))(*(_QWORD *)(a1 + 536), v52); v53 = (float *)(*(__int64 (__fastcall **)(float *))(*(_QWORD *)v20 + 192LL))(v20); sub_1000262BC((float *)&__p, *v53 + 32.0, *(float *)(a1 + 524) * 0.5); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v52 + 184LL))(v52, &__p); sub_100009900(&__p, "title"); v54 = cocos2d::CCDictionary::objectForKey(a2, &__p); if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__p.__r_.__value_.__l.__data_); v55 = cocos2d::CCString::getCString(v54); v56 = cocos2d::CCLabelBMFont::create_1(v55, "goldFont.fnt"); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v52 + 456LL))(v52, v56); sub_1000262BC((float *)&__p, 0.0, 0.5); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v56 + 296LL))(v56, &__p); v57 = 0.7; (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v56 + 160LL))(v56, 0.7); v58.n128_u32[0] = *(_DWORD *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v56 + 328LL))(v56); if ( v58.n128_f32[0] > 200.0 ) { v59 = (float *)(*(__int64 (__fastcall **)(__int64, float))(*(_QWORD *)v56 + 328LL))(v56, v58.n128_f32[0]); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v56 + 160LL))(v56, 200.0 / *v59); } if ( (*(float (__fastcall **)(__int64, __n128))(*(_QWORD *)v56 + 168LL))(v56, v58) < 0.7 ) v57 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v56 + 168LL))(v56); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v56 + 160LL))(v56, v57); memset(&__p, 0, sizeof(__p)); if ( isAchievementEarned ) sub_100009900(__a, "achievedDescription"); else sub_100009900(__a, "unachievedDescription"); v60 = cocos2d::CCDictionary::valueForKey(a2, __a); v61 = (const std::string::value_type *)cocos2d::CCString::getCString(v60); std::string::assign(&__p, v61); if ( v81 < 0 ) operator delete(*(void **)&__a[0].std::__non_trivial_if); sub_100009900(v77, " "); sub_1000262BC((float *)__a, 0.0, 1.0); v62 = TextArea::create((__int64)v77, (__int64)"chatFont.fnt", (double *)__a, 0, 0, 1.0, 209.0, 20.0); if ( v78 < 0 ) operator delete(v77[0]); (*(void (__fastcall **)(__int64, _DWORD *))(*(_QWORD *)v52 + 456LL))(v52, v62); sub_1000262BC((float *)__a, 0.0, 0.5); (*(void (__fastcall **)(_DWORD *, std::allocator *))(*(_QWORD *)v62 + 296LL))(v62, __a); sub_1000262BC((float *)__a, 0.0, 5.0); (*(void (__fastcall **)(_DWORD *, std::allocator *))(*(_QWORD *)v62 + 184LL))(v62, __a); v62[162] = 1098907648; if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v63 = &__p; else v63 = (std::string *)__p.__r_.__value_.__r.__words[0]; sub_100009900(v75, (char *)v63); TextArea::setString((__int64)v62, (const void **)v75); if ( v76 < 0 ) operator delete(v75[0]); v64 = *(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v56 + 328LL))(v56) + 4); v65 = *(float *)((*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)v62 + 328LL))(v62) + 4) + 17.0; v66 = (float)(v64 + v65) * 0.5; sub_1000262BC((float *)__a, 0.0, (float)((float)(v66 - (float)(v64 * 0.5)) + 3.0) + 2.0); (*(void (__fastcall **)(__int64, std::allocator *))(*(_QWORD *)v56 + 184LL))(v56, __a); sub_1000262BC((float *)__a, 0.0, (float)((float)((float)(v65 * 0.5) - v66) + 16.0) + -2.0); (*(void (__fastcall **)(_DWORD *, std::allocator *))(*(_QWORD *)v62 + 184LL))(v62, __a); v67 = AchievementManager::sharedState(); v68 = AchievementManager::percentForAchievement(v67, CString); if ( v68 && v68 != 100 ) { if ( !isAchievementEarned ) { v70 = sub_1003065B0("%i%%", v68); v71 = cocos2d::CCString::getCString(v70); v72 = cocos2d::CCLabelBMFont::create_1(v71, "goldFont.fnt"); (*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 536) + 464LL))( *(_QWORD *)(a1 + 536), v72, 10); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v72 + 160LL))(v72, 0.6); v73 = (float32x2_t *)(*(__int64 (__fastcall **)(float *))(*(_QWORD *)v20 + 192LL))(v20); sub_1000262BC((float *)&__str, 0.0, -25.0); *(float32x2_t *)&v74 = sub_100026318(v73, (float32x2_t *)&__str, (float32x2_t *)__a); (*(void (__fastcall **)(__int64, std::allocator *, double))(*(_QWORD *)v72 + 184LL))(v72, __a, v74); goto LABEL_164; } LABEL_162: v69 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_completesIcon_001.png"); sub_1000262BC((float *)__a, 0.0, 0.5); (*(void (__fastcall **)(__int64, std::allocator *))(*(_QWORD *)v69 + 296LL))(v69, __a); (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 536) + 456LL))(*(_QWORD *)(a1 + 536), v69); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v69 + 160LL))(v69, 0.8); sub_1000262BC((float *)__a, *(float *)(a1 + 520) + -40.0, *(float *)(a1 + 524) * 0.5); (*(void (__fastcall **)(__int64, std::allocator *))(*(_QWORD *)v69 + 184LL))(v69, __a); goto LABEL_164; } if ( isAchievementEarned ) goto LABEL_162; LABEL_164: if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__p.__r_.__value_.__l.__data_); }