// // SetupSpawnPopup::updateRemapButtons from 0x1000f8610 to 0x1000f8a80 (1136 bytes) // // 3 xrefs: // > SetupSpawnPopup::init @ 0x1000f8364 // > SetupSpawnPopup::updateRemapButtons @ 0x1000f8638 // > SetupSpawnPopup::queueUpdateButtons @ 0x1000f8b8c // // 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 // void __fastcall SetupSpawnPopup::updateRemapButtons(SetupSpawnPopup *a1, float a2) { __int64 v3; // x20 cocos2d::CCObject *v4; // x21 __int64 v5; // x1 EffectGameObject *m_gameObject; // x0 cocos2d::CCArray *m_gameObjects; // x20 cocos2d::ccArray *data; // x9 __int64 num; // x8 cocos2d::CCObject **arr; // x22 unsigned __int64 v11; // x23 cocos2d::CCObject *v12; // x8 unsigned int *v13; // x26 unsigned int *v14; // x27 __int64 v15; // x8 __int64 v16; // x9 _QWORD *v17; // x10 int v18; // w11 int v19; // w11 char *v20; // x0 _BOOL4 v21; // w22 unsigned int v22; // w23 float v23; // s9 cocos2d::CCDirector *v24; // x0 __n128 v25; // q1 cocos2d::CCMenu *m_buttonMenu; // x21 __n128 v27; // q0 int v28; // w0 __int64 *v29; // x26 int v30; // w20 __int64 v31; // x21 int v32; // w22 int v33; // w25 int v34; // w27 int v35; // w8 const char *v36; // x8 bool v37; // zf const char *v38; // x9 char *v39; // x1 cocos2d::CCString *v40; // x0 const char *CString; // x0 void **v42; // x5 ButtonSprite *v43; // x0 CCMenuItemSpriteExtra *v44; // x27 __n128 v45; // q0 __n128 v46; // q1 double v47; // d0 __int64 *v48; // x9 __int64 *v49; // x8 float32x2_t v50; // [xsp+10h] [xbp-B0h] BYREF float32x2_t v51; // [xsp+18h] [xbp-A8h] BYREF void *__p[2]; // [xsp+20h] [xbp-A0h] BYREF char v53; // [xsp+37h] [xbp-89h] float32x2_t v54; // [xsp+38h] [xbp-88h] BYREF __int64 v55; // [xsp+40h] [xbp-80h] BYREF __int64 *v56; // [xsp+48h] [xbp-78h] BYREF _QWORD *v57; // [xsp+50h] [xbp-70h] BYREF unsigned __int64 v58; // [xsp+58h] [xbp-68h] cocos2d::SEL_SCHEDULE v59; // 0:x1.16 cocos2d::SEL_MenuHandler v60; // 0:x3.16 v59.ptr = (void (__cdecl *)(float))SetupSpawnPopup::updateRemapButtons; v59.adj = 0; cocos2d::CCNode::unschedule(a1, v59); a1->m_isBusy = 0; if ( (unsigned int)sub_10024A36C(a1->m_remapButtons) ) { v3 = 0; do { v4 = (cocos2d::CCObject *)sub_10024A388(a1->m_remapButtons, v3); SetupTriggerPopup::removeObjectFromPage(a1, v4, 1); ((void (__fastcall *)(cocos2d::CCObject *))v4->__vftable[6].isEqual)(v4); v3 = (unsigned int)(v3 + 1); } while ( (unsigned int)v3 < (unsigned int)sub_10024A36C(a1->m_remapButtons) ); } sub_10024A45C(a1->m_remapButtons); a1->m_remapGroups.__end_ = a1->m_remapGroups.__begin_; m_gameObject = a1->m_gameObject; if ( m_gameObject ) m_gameObjects = (cocos2d::CCArray *)sub_10024A1B8(m_gameObject, v5); else m_gameObjects = a1->m_gameObjects; v57 = nullptr; v58 = 0; v56 = (__int64 *)&v57; if ( !m_gameObjects || (data = m_gameObjects->data, num = data->num, !(_DWORD)num) ) { v21 = 0; v22 = 5; v23 = 66.0; goto LABEL_31; } arr = data->arr; v11 = (unsigned __int64)&arr[num - 1]; do { v12 = *arr; if ( !*arr ) break; v13 = *(unsigned int **)&v12[32].m_uOrderOfArrival; v14 = (unsigned int *)v12[33].__vftable; while ( 2 ) { if ( v13 != v14 ) { v15 = *v13; v16 = v13[2]; v55 = v15 | (v16 << 32); v17 = v57; if ( !v57 ) { LABEL_20: __p[0] = &v55; *((_DWORD *)sub_10006E558(&v56, (int *)&v55, (__int64)&unk_100636B92, (_QWORD **)__p) + 9) = 1; goto LABEL_21; } while ( 1 ) { v18 = *((_DWORD *)v17 + 7); if ( (int)v15 >= v18 ) { if ( v18 < (int)v15 ) goto LABEL_18; v19 = *((_DWORD *)v17 + 8); if ( (int)v16 >= v19 ) break; } LABEL_19: v17 = (_QWORD *)*v17; if ( !v17 ) goto LABEL_20; } if ( v19 >= (int)v16 ) { __p[0] = &v55; v20 = sub_10006E558(&v56, (int *)&v55, (__int64)&unk_100636B92, (_QWORD **)__p); ++*((_DWORD *)v20 + 9); LABEL_21: v13 += 4; continue; } LABEL_18: ++v17; goto LABEL_19; } break; } ++arr; } while ( (unsigned __int64)arr <= v11 ); v21 = v58 > 0xA; if ( v58 <= 0xA ) v22 = 5; else v22 = 10; if ( v58 <= 0xA ) v23 = 66.0; else v23 = 35.0; LABEL_31: v24 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v24); m_buttonMenu = a1->m_buttonMenu; v27.n128_u32[0] = -2.0; if ( v21 ) v27.n128_f32[0] = -4.5; v27.n128_f32[0] = (float)(*(float *)&v55 * 0.5) + (float)(v27.n128_f32[0] * v23); v25.n128_f32[0] = (float)((float)(*((float *)&v55 + 1) * 0.5) + 45.0) + -25.0; sub_100022980(v27, v25, __p); cocos2d::CCNode::convertToNodeSpace(m_buttonMenu, (const cocos2d::CCPoint *)__p); v28 = sub_10024A36C(m_gameObjects); v29 = v56; if ( v56 != (__int64 *)&v57 ) { v30 = v28; v31 = 0; if ( v21 ) v32 = 15; else v32 = 40; do { v34 = *((_DWORD *)v29 + 7); v33 = *((_DWORD *)v29 + 8); v35 = *((_DWORD *)v29 + 9); if ( v34 == a1->m_remapOriginalID ) { v37 = v30 == v35; v36 = "GJ_button_05.png"; if ( v37 ) v36 = "GJ_button_04.png"; v37 = v33 == a1->m_remapNewID; v38 = "GJ_button_03.png"; } else { v37 = v30 == v35; v36 = "GJ_button_05.png"; v38 = "GJ_button_04.png"; } if ( v37 ) v39 = (char *)v38; else v39 = (char *)v36; sub_100009900(__p, v39); v40 = (cocos2d::CCString *)sub_100268F4C("%i\n%i", v34, v33); CString = cocos2d::CCString::getCString(v40); if ( v53 >= 0 ) v42 = __p; else v42 = (void **)__p[0]; v43 = ButtonSprite::create_1(CString, v32, 0, 0.35, 1, "bigFont.fnt", (const char *)v42, 30.0); v60.ptr = (void (__cdecl *)(cocos2d::CCObject *))SetupSpawnPopup::onSelectRemap; v60.adj = 0; v44 = CCMenuItemSpriteExtra::create(v43, nullptr, a1, v60); ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v44->setTag)(v44, v31); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)( a1->m_buttonMenu, v44); SetupTriggerPopup::addObjectToPage(a1, v44, 1); v45.n128_f32[0] = v23 * (float)((unsigned int)v31 % v22); v46.n128_f32[0] = (float)((unsigned int)v31 / v22) * -38.0; sub_100022980(v45, v46, &v50); *(float32x2_t *)&v47 = sub_1000229DC(&v54, &v50, &v51); ((void (__fastcall *)(CCMenuItemSpriteExtra *, float32x2_t *, double))v44->setPosition)(v44, &v51, v47); sub_10024A2D0(a1->m_remapButtons, v44); sub_1000115B8((__int64)&a1->m_remapGroups, (__int64 *)((char *)v29 + 28)); if ( v53 < 0 ) operator delete(__p[0]); if ( (_DWORD)v31 == 19 ) break; v48 = (__int64 *)v29[1]; if ( v48 ) { do { v49 = v48; v48 = (__int64 *)*v48; } while ( v48 ); } else { do { v49 = (__int64 *)v29[2]; v37 = *v49 == (_QWORD)v29; v29 = v49; } while ( !v37 ); } v31 = (unsigned int)(v31 + 1); v29 = v49; } while ( v49 != (__int64 *)&v57 ); } sub_100017D70((__int64)&v56, v57); }
GD Web Decomp Icon

GD Web Decomp

Raw Source