// // SetupSpawnPopup::updateRemapButtons from 0x5ead34 to 0x5eb130 (1020 bytes) // // 1 xrefs: // > SetupSpawnPopup::init @ 0x5eb7b8 // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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 11:54:23 +0000 // void __fastcall SetupSpawnPopup::updateRemapButtons(SetupSpawnPopup *this, float a2) { unsigned int v3; // r7 bool v4; // cf cocos2d::CCArray *v5; // r0 unsigned int v6; // r1 cocos2d::CCObject *v7; // r5 cocos2d::CCObject *v8; // r1 int v9; // r2 int v10; // r3 cocos2d::CCArray *v11; // r0 cocos2d::CCArray *v12; // r7 float v13; // s17 int v14; // r11 float v15; // s16 float v16; // s18 _DWORD *v17; // r2 int *v18; // r5 int v19; // r3 int v20; // t1 const cocos2d::CCPoint *v21; // r5 int v22; // r9 int *v23; // r5 int v24; // r6 const char *v25; // r7 int v26; // r10 const char *v27; // r1 cocos2d::CCString *v28; // r0 ButtonSprite *CString; // r0 char *v30; // r3 ButtonSprite *v31; // r0 cocos2d::CCObject *v32; // r7 float v33; // r0 _DWORD *v34; // r3 int v35; // r1 int *v36; // r3 int *v37; // r3 unsigned __int8 *(__fastcall **v38)(unsigned __int8 *, cocos2d::CCObject *); // r6 unsigned __int8 *(__fastcall **v39)(unsigned __int8 *, cocos2d::CCObject *); // r9 unsigned __int8 *(__fastcall *v40)(unsigned __int8 *, cocos2d::CCObject *); // r2 unsigned __int8 *(__fastcall *v41)(unsigned __int8 *, cocos2d::CCObject *); // r1 _DWORD *v42; // r3 int v43; // r0 int v44; // r0 int *v45; // [sp+10h] [bp-84h] int *v46; // [sp+14h] [bp-80h] void (__fastcall *v47)(cocos2d::CCObject *, _DWORD *); // [sp+14h] [bp-80h] unsigned __int8 *(__fastcall **v48)(unsigned __int8 *, cocos2d::CCObject *); // [sp+3Ch] [bp-58h] BYREF unsigned __int8 *(__fastcall **v49)(unsigned __int8 *, cocos2d::CCObject *); // [sp+40h] [bp-54h] BYREF float v50[2]; // [sp+44h] [bp-50h] BYREF _BYTE v51[8]; // [sp+4Ch] [bp-48h] BYREF _DWORD (*v52)(SetupSpawnPopup *__hidden, float); // [sp+54h] [bp-40h] int v53; // [sp+58h] [bp-3Ch] unsigned __int8 *(__fastcall *v54)(unsigned __int8 *, cocos2d::CCObject *); // [sp+5Ch] [bp-38h] BYREF unsigned __int8 *(__fastcall *v55)(unsigned __int8 *, cocos2d::CCObject *); // [sp+60h] [bp-34h] _DWORD v56[2]; // [sp+64h] [bp-30h] BYREF _DWORD v57[2]; // [sp+6Ch] [bp-28h] BYREF int *v58; // [sp+74h] [bp-20h] BYREF _DWORD *v59; // [sp+78h] [bp-1Ch] BYREF unsigned int v60; // [sp+7Ch] [bp-18h] int v61[2]; // [sp+80h] [bp-14h] BYREF char *v62; // [sp+88h] [bp-Ch] v3 = 0; v53 = 0; v52 = SetupSpawnPopup::updateRemapButtons; cocos2d::CCNode::unschedule(this, SetupSpawnPopup::updateRemapButtons, 0); *((_BYTE *)this + 712) = 0; while ( 1 ) { v4 = v3 >= cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 179)); v5 = *((cocos2d::CCArray **)this + 179); if ( v4 ) break; v6 = v3++; v7 = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(v5, v6); SetupTriggerPopup::removeObjectFromPage(this, v7, 1); (*(void (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)v7 + 260))(v7); } cocos2d::CCArray::removeAllObjects(v5); v9 = *((_DWORD *)this + 180); while ( 1 ) { v10 = *((_DWORD *)this + 181); if ( v9 == v10 ) break; *((_DWORD *)this + 181) = v10 - 8; } v11 = *((cocos2d::CCArray **)this + 132); if ( v11 ) { v11 = (cocos2d::CCArray *)cocos2d::CCArray::createWithObject(v11, v8); v12 = v11; } else { v12 = *((cocos2d::CCArray **)this + 133); } v59 = nullptr; v60 = 0; v45 = (int *)&v59; v58 = (int *)&v59; if ( v12 ) { v17 = *((_DWORD **)v12 + 13); if ( *v17 ) { v18 = (int *)v17[3]; v46 = &v18[*v17 - 1]; LABEL_20: while ( 2 ) { if ( v18 <= v46 ) { v20 = *v18++; v19 = v20; if ( v20 ) { v38 = *(unsigned __int8 *(__fastcall ***)(unsigned __int8 *, cocos2d::CCObject *))(v19 + 1648); v39 = *(unsigned __int8 *(__fastcall ***)(unsigned __int8 *, cocos2d::CCObject *))(v19 + 1652); if ( v38 == v39 ) continue; while ( 1 ) { v40 = *v38; v41 = v38[2]; v42 = v59; v54 = *v38; v55 = v41; while ( v42 ) { v43 = v42[4]; if ( (int)v40 < v43 ) goto LABEL_54; if ( v43 < (int)v40 ) goto LABEL_55; v44 = v42[5]; if ( (int)v41 < v44 ) { LABEL_54: v42 = (_DWORD *)*v42; } else { if ( v44 >= (int)v41 ) { v49 = &v54; v11 = (cocos2d::CCArray *)std::__tree,int>,std::__map_value_compare,std::__value_type,int>,std::less>,true>,std::allocator,int>>>::__emplace_unique_key_args,std::piecewise_construct_t const&,std::tuple const&>,std::tuple<>>( (int)v57, &v58, (int *)&v54, (int)&unk_BEE530, &v49); ++*(_DWORD *)(v57[0] + 24); goto LABEL_52; } LABEL_55: v42 = (_DWORD *)v42[1]; } } v48 = &v54; v11 = (cocos2d::CCArray *)std::__tree,int>,std::__map_value_compare,std::__value_type,int>,std::less>,true>,std::allocator,int>>>::__emplace_unique_key_args,std::piecewise_construct_t const&,std::tuple const&>,std::tuple<>>( (int)v56, &v58, (int *)&v54, (int)&unk_BEE530, &v48); *(_DWORD *)(v56[0] + 24) = 1; LABEL_52: v38 += 4; if ( v38 == v39 ) goto LABEL_20; } } } break; } } } v13 = 35.0; if ( v60 <= 0xA ) v14 = 5; else v14 = 10; v15 = 4.5; v16 = 40.0; if ( v60 > 0xA ) { v16 = 15.0; } else { v13 = 66.0; v15 = 2.0; } cocos2d::CCDirector::sharedDirector(v11); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v50); v21 = *((const cocos2d::CCPoint **)this + 111); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v57, (float)(v50[0] * 0.5) - (float)(v15 * v13), (float)((float)(v50[1] * 0.5) + 45.0) - 25.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v51, v21); v22 = cocos2d::CCArray::count(v12); v23 = v58; v24 = 0; while ( v23 != v45 ) { v25 = (const char *)v23[4]; v26 = v23[5]; if ( v25 == *((const char **)this + 183) && v26 == *((_DWORD *)this + 184) ) { v27 = "GJ_button_03.png"; } else if ( v22 == v23[6] ) { v27 = "GJ_button_04.png"; } else { v27 = "GJ_button_05.png"; } v61[0] = 0; v61[1] = 0; v62 = nullptr; std::string::__init(v61, v27, 0x10u); v28 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i\n%i", v25, v26); CString = (ButtonSprite *)cocos2d::CCString::getCString(v28); if ( (v61[0] & 1) != 0 ) v30 = v62; else v30 = (char *)v61 + 1; v31 = ButtonSprite::create( CString, (const char *)(int)v16, 0, 0.35, 1, "bigFont.fnt", v30, (const char *)0x41F00000, *(float *)&v45); v55 = nullptr; v54 = SetupSpawnPopup::onSelectRemap; v32 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create( (int)v31, 0, (int)this, (int)SetupSpawnPopup::onSelectRemap, 0); (*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v32 + 36))(v32, v24); (*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**((_DWORD **)this + 111) + 228))( *((_DWORD *)this + 111), v32); SetupTriggerPopup::addObjectToPage(this, v32, 1); v47 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v32 + 92); v33 = floorf((float)(v24 / v14)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v56, v13 * (float)(v24 % v14), v33 * -38.0); cocos2d::CCPoint::operator+(v57, v51, v56); v47(v32, v57); cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 179), v32); v34 = *((_DWORD **)this + 181); if ( v34 == *((_DWORD **)this + 182) ) { std::vector>::__push_back_slow_path const&>((void **)this + 180, v23 + 4); } else { if ( v34 ) { v35 = v23[5]; *v34 = v23[4]; v34[1] = v35; } *((_DWORD *)this + 181) += 8; } if ( ++v24 == 20 ) { std::string::~string((int)v61); break; } std::string::~string((int)v61); v36 = (int *)v23[1]; if ( v36 ) { do { v23 = v36; v36 = (int *)*v36; } while ( v36 ); } else { do { v37 = v23; v23 = (int *)v23[2]; } while ( v37 != (int *)*v23 ); } } std::__tree,int>,std::__map_value_compare,std::__value_type,int>,std::less>,true>,std::allocator,int>>>::destroy( (int)&v58, v59); }
GD Web Decomp Icon

GD Web Decomp

Raw Source