// // ListButtonBar::init from 0x1003efdf0 to 0x1003f0228 (1080 bytes) // // 1 xrefs: // > ListButtonBar::create @ 0x1003efdbe // // 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 // // local variable allocation has failed, the output may be wrong! bool __fastcall ListButtonBar::init( ListButtonBar *a1, cocos2d::CCArray *a2, cocos2d::CCPoint a3, int a4, int a5, float a6, float a7, float a8, float a9, int a10) { unsigned int v10; // r9d cocos2d::CCDirector *v13; // rsi cocos2d::CCArray *v14; // rax cocos2d::CCArray *v15; // rdi __int64 v16; // rbx __int64 v17; // rax unsigned int v18; // r12d __int64 v19; // rdi __int64 v20; // rsi __int64 v21; // r13 __int64 v22; // r15 __int64 v23; // rsi __int64 v24; // rbx int v25; // r14d unsigned int v26; // eax __int64 v27; // rax __int64 v28; // rbx int v29; // eax ListButtonBar *v30; // r12 int v31; // r13d int v32; // r15d __int64 v33; // r14 unsigned int v34; // ebx __int64 v35; // rax int v36; // r14d int v37; // r13d ListButtonBar *v38; // r15 cocos2d::CCArray *v39; // r12 cocos2d::CCArray *v40; // rdi ListButtonPage *v41; // rax cocos2d::CCArray *m_pages; // rbx unsigned int v43; // eax BoomScrollLayer *v44; // rax BoomScrollLayer *m_scrollLayer; // rbx cocos2d::CCDirector *v46; // rax double v47; // xmm0_8 float v48; // xmm1_4 cocos2d::CCPoint v49; // xmm0_8 cocos2d::CCMenu *v50; // r15 __int64 v51; // rsi cocos2d::CCString *v52; // rax const char *CString; // rbx cocos2d::CCSprite *v54; // r14 CCMenuItemSpriteExtra *v55; // r14 cocos2d::CCSprite *v56; // rbx CCMenuItemSpriteExtra *v57; // rbx float v59; // [rsp+0h] [rbp-A0h] float v60; // [rsp+10h] [rbp-90h] BYREF double v61; // [rsp+18h] [rbp-88h] BYREF unsigned __int64 v62; // [rsp+20h] [rbp-80h] BYREF cocos2d::CCArray *v63; // [rsp+28h] [rbp-78h] __int64 v64; // [rsp+30h] [rbp-70h] ListButtonBar *v65; // [rsp+38h] [rbp-68h] float v66; // [rsp+44h] [rbp-5Ch] float v67; // [rsp+48h] [rbp-58h] float x; // [rsp+4Ch] [rbp-54h] unsigned int v69; // [rsp+50h] [rbp-50h] unsigned int v70; // [rsp+54h] [rbp-4Ch] double *v71; // [rsp+58h] [rbp-48h] __int64 v72; // [rsp+64h] [rbp-3Ch] BYREF int v73; // [rsp+6Ch] [rbp-34h] int v74; // [rsp+70h] [rbp-30h] float v75; // [rsp+74h] [rbp-2Ch] cocos2d::CCSize WinSize; // 0:xmm0_8.8 double v77; // 0:xmm0_8.8 double v78; // 0:xmm0_8.8 v70 = v10; v66 = a7; v67 = a6; x = a3.x; v74 = a5; v71 = *(double **)&a4; v13 = cocos2d::CCDirector::sharedDirector(); WinSize = cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v60); v14 = (cocos2d::CCArray *)sub_10071F9E0(&v60, v13); v65 = a1; a1->m_pages = v14; v15 = v14; cocos2d::CCObject::retain(v14); v16 = sub_10071F9E0(v15, v13); v17 = sub_10071F9E0(v15, v13); sub_10071FCD0(v16, v17); if ( (unsigned int)sub_100720070(a2) ) { v69 = v74 * a10; v75 = 0.0; v18 = 0; v73 = a10; v63 = a2; do { v21 = sub_1007200C0(a2, v18); v22 = v16; v23 = LODWORD(v75); v24 = sub_1007200C0(v16, LODWORD(v75)); v25 = (*(__int64 (__fastcall **)(__int64, double))(*(_QWORD *)v21 + 64LL))(v21, *(double *)&WinSize); v26 = sub_100720070(v24); if ( v26 >= v69 || v25 == -1 ) { v27 = sub_10071F9E0(v24, v23); v28 = v27; if ( v25 != -1 ) sub_10071FCD0(v27, v21); ++LODWORD(v75); v19 = v22; v20 = v28; } else { v19 = v24; v20 = v21; } sub_10071FCD0(v19, v20); a10 = v73; ++v18; a2 = v63; v16 = v22; } while ( v18 < (unsigned int)sub_100720070(v63) ); } v29 = sub_100720070(v16); v30 = v65; v31 = v74; if ( v29 ) { v32 = a10; v33 = v16; v34 = 0; v64 = v33; do { v35 = sub_1007200C0(v33, v34); v36 = v31; v37 = v32; v38 = v30; v39 = (cocos2d::CCArray *)v35; sub_10028CC60(&v72, v71); v40 = v39; v30 = v38; v32 = v37; v31 = v36; v33 = v64; WinSize = (cocos2d::CCSize)LODWORD(x); v41 = ListButtonPage::create(v40, (cocos2d::CCPoint)LODWORD(x), (int)&v72, v31, v67, v66, a8); sub_10071FCD0(v30->m_pages, v41); ++v34; } while ( v34 < (unsigned int)sub_100720070(v33) ); } m_pages = v30->m_pages; v43 = sub_100720070(m_pages); v44 = BoomScrollLayer::create_1(m_pages, 0, v43 >= 2); v30->m_scrollLayer = v44; ((void (__fastcall *)(ListButtonBar *, BoomScrollLayer *, double))v30->addChild)(v30, v44, *(double *)&WinSize); m_scrollLayer = v30->m_scrollLayer; v75 = v60 * 0.5; v46 = cocos2d::CCDirector::sharedDirector(); v47 = sub_100484D80(v46); v48 = *(float *)&v47 + 6.0; v49 = (cocos2d::CCPoint)LODWORD(v75); sub_10028CBE0((float *)&v72, v75, v48); BoomScrollLayer::setPagesIndicatorPosition(m_scrollLayer, v49); ((void (__fastcall *)(BoomScrollLayer *, _QWORD))v30->m_scrollLayer->setTouchEnabled)(v30->m_scrollLayer, 0); if ( (unsigned int)sub_100720070(v30->m_pages) <= 1 ) { v30->m_scrollLayer->m_dotsVisible = 0; } else { v50 = cocos2d::CCMenu::create(); ((void (__fastcall *)(ListButtonBar *, cocos2d::CCMenu *))v30->addChild)(v30, v50); v51 = v70; v52 = (cocos2d::CCString *)sub_1007AB580("GJ_arrow_%02d_001.png", SLOBYTE(a8)); CString = cocos2d::CCString::getCString(v52); v54 = cocos2d::CCSprite::createWithSpriteFrameName(CString); ((void (__fastcall *)(cocos2d::CCSprite *, __int64, float))v54->setScale)(v54, v51, 0.80000001); v55 = CCMenuItemSpriteExtra::create( v54, nullptr, v30, (cocos2d::SEL_MenuHandler)(unsigned __int64)ListButtonBar::onLeft); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v50->addChild)(v50, v55); CCMenuItemSpriteExtra::setSizeMult(v55, 1.5); sub_10028CBE0((float *)&v62, -v59, 0.0); sub_10028CCE0(&v61, (unsigned __int64 *)v71, &v62); *(cocos2d::CCPoint *)&v77 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)&v72, (const cocos2d::CCPoint *)v50); ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64 *, double))v55->setPosition)(v55, &v72, v77); v56 = cocos2d::CCSprite::createWithSpriteFrameName(CString); ((void (__fastcall *)(cocos2d::CCSprite *, float))v56->setScale)(v56, 0.80000001); cocos2d::CCSprite::setFlipX(v56, 1); v57 = CCMenuItemSpriteExtra::create( v56, nullptr, v65, (cocos2d::SEL_MenuHandler)(unsigned __int64)ListButtonBar::onRight); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v50->addChild)(v50, v57); sub_10028CBE0((float *)&v62, v59, 0.0); sub_10028CCE0(&v61, (unsigned __int64 *)v71, &v62); *(cocos2d::CCPoint *)&v78 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)&v72, (const cocos2d::CCPoint *)v50); ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64 *, double))v57->setPosition)(v57, &v72, v78); CCMenuItemSpriteExtra::setSizeMult(v57, 1.5); } return 1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source