// // GJGarageLayer::setupIconSelect from 0x14037da80 to 0x14037e73d (3261 bytes) // // 2 xrefs: // > GJGarageLayer::init @ 0x14037c3e3 // > @ 0x140922838 // // This function is hookable on this platform (idp: pc, 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 11:31:04 +0000 // // Hidden C++ exception states: #wind=2 __int64 __fastcall GJGarageLayer::setupIconSelect(__int64 a1) { __int64 v2; // rax float v3; // xmm6_4 __int64 v4; // rax _QWORD *v5; // r12 __int64 v6; // rdx void (__fastcall *v7)(_QWORD *, __int64); // r8 __int64 v8; // rbx __int64 v9; // rax struct cocos2d::CCSprite *v10; // rdi __int64 v11; // rbx __int64 v12; // rax __int64 v13; // rax __int64 v14; // rbx __int64 v15; // rax __int64 v16; // rcx cocos2d::CCObject *v17; // rax __int64 v18; // rcx cocos2d::CCMenu *v19; // r14 int v20; // eax struct cocos2d::CCObject *v21; // rbx int v22; // eax struct cocos2d::CCObject *v23; // rbx int v24; // eax struct cocos2d::CCObject *v25; // rbx int v26; // eax struct cocos2d::CCObject *v27; // rbx int v28; // eax struct cocos2d::CCObject *v29; // rbx int v30; // eax struct cocos2d::CCObject *v31; // rbx int v32; // eax struct cocos2d::CCObject *v33; // rbx int v34; // eax struct cocos2d::CCObject *v35; // rbx int v36; // eax struct cocos2d::CCObject *v37; // rbx int v38; // eax struct cocos2d::CCObject *v39; // rbx int v40; // eax struct cocos2d::CCObject *v41; // rbx unsigned int i; // edi struct cocos2d::CCObject *v43; // rbx __int64 v44; // rax __int64 v45; // rax __int64 v46; // rbx __int64 v47; // rax struct cocos2d::CCSprite *v48; // rax struct cocos2d::CCSprite *v49; // rax cocos2d::CCString *v50; // rax const char *CString; // r15 __int64 *v52; // rdi __int64 *v53; // rax cocos2d::CCObject *v54; // rbx __int64 v55; // rax __int64 v56; // rbx __int64 v57; // rax __int64 v58; // rdi __int64 v59; // rbx __int64 v60; // rax cocos2d::CCSprite *v61; // rdi __int64 *v62; // rax cocos2d::CCObject *v63; // rbx __int64 v64; // rax __int64 v65; // rbx __int64 v66; // rax __int64 v67; // rdi __int64 v68; // rbx __int64 v69; // rax __int64 v70; // rcx cocos2d::CCObject *v71; // rax __int64 v72; // rcx __int64 v73; // rax __int64 v74; // rdi __int64 v75; // rbx __int64 v76; // rax _BYTE v78[8]; // [rsp+30h] [rbp-48h] BYREF _BYTE v79[24]; // [rsp+38h] [rbp-40h] BYREF void *v80; // [rsp+C0h] [rbp+48h] BYREF float v81; // [rsp+C8h] [rbp+50h] BYREF float v82; // [rsp+CCh] [rbp+54h] char v83; // [rsp+D0h] [rbp+58h] BYREF float v84; // [rsp+D4h] [rbp+5Ch] char v85; // [rsp+D8h] [rbp+60h] BYREF v2 = cocos2d::CCDirector::sharedDirector(a1); cocos2d::CCDirector::getWinSize(v2, &v81); v3 = (float)(v82 * 0.5) - 5.0; cocos2d::CCRect::CCRect((cocos2d::CCRect *)v79, 0.0, 0.0, 80.0, 80.0); v5 = (_QWORD *)cocos2d::extension::CCScale9Sprite::create("square02_001.png", v4); v6 = v5[40]; v7 = *(void (__fastcall **)(_QWORD *, __int64))(v6 + 40); LOBYTE(v6) = 75; v7(v5 + 40, v6); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v83, 385.0, 100.0); (*(void (__fastcall **)(_QWORD *, char *))(*v5 + 312LL))(v5, &v83); (*(void (__fastcall **)(__int64, _QWORD *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v5, 0xFFFFFFFFLL); v8 = *v5; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v80, v81 * 0.5, v3 - 60.0); (*(void (__fastcall **)(_QWORD *, __int64))(v8 + 184))(v5, v9); v10 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_unlockTxt_001.png"); (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *))(*(_QWORD *)a1 + 464LL))(a1, v10); v11 = *(_QWORD *)v10; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v80, 0.5, 0.5); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v11 + 288))(v10, v12); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v85, 0.0, (float)(v84 * 0.5) + 12.0); v14 = v13; v15 = (*(__int64 (__fastcall **)(_QWORD *))(*v5 + 200LL))(v5); cocos2d::CCPoint::operator+(v15, &v80, v14); (*(void (__fastcall **)(struct cocos2d::CCSprite *, void **))(*(_QWORD *)v10 + 184LL))(v10, &v80); v17 = (cocos2d::CCObject *)cocos2d::CCArray::create(v16); *(_QWORD *)(a1 + 480) = v17; cocos2d::CCObject::retain(v17); v19 = (cocos2d::CCMenu *)cocos2d::CCMenu::create(v18); (*(void (__fastcall **)(__int64, cocos2d::CCMenu *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v19, 100); LODWORD(v14) = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("gj_iconBtn_on_001.png"); v20 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("gj_iconBtn_off_001.png"); v21 = CCMenuItemToggler::create(v20, v14, a1, (__int64)GJGarageLayer::onSelectTab); *(_DWORD *)(*((_QWORD *)v21 + 47) + 372LL) = 1067030938; *(_DWORD *)(*((_QWORD *)v21 + 48) + 372LL) = 1067030938; CCMenuItemToggler::toggle((__int64)v21, *((unsigned __int8 *)v21 + 392)); (*(void (__fastcall **)(cocos2d::CCMenu *, struct cocos2d::CCObject *))(*(_QWORD *)v19 + 464LL))(v19, v21); (*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)v21 + 64LL))(v21, 0); cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 480), v21); LODWORD(v21) = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("gj_shipBtn_on_001.png"); v22 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("gj_shipBtn_off_001.png"); v23 = CCMenuItemToggler::create(v22, (int)v21, a1, (__int64)GJGarageLayer::onSelectTab); *(_DWORD *)(*((_QWORD *)v23 + 47) + 372LL) = 1067030938; *(_DWORD *)(*((_QWORD *)v23 + 48) + 372LL) = 1067030938; CCMenuItemToggler::toggle((__int64)v23, *((unsigned __int8 *)v23 + 392)); (*(void (__fastcall **)(cocos2d::CCMenu *, struct cocos2d::CCObject *))(*(_QWORD *)v19 + 464LL))(v19, v23); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v23 + 64LL))(v23, 1); cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 480), v23); LODWORD(v23) = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("gj_ballBtn_on_001.png"); v24 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("gj_ballBtn_off_001.png"); v25 = CCMenuItemToggler::create(v24, (int)v23, a1, (__int64)GJGarageLayer::onSelectTab); *(_DWORD *)(*((_QWORD *)v25 + 47) + 372LL) = 1067030938; *(_DWORD *)(*((_QWORD *)v25 + 48) + 372LL) = 1067030938; CCMenuItemToggler::toggle((__int64)v25, *((unsigned __int8 *)v25 + 392)); (*(void (__fastcall **)(cocos2d::CCMenu *, struct cocos2d::CCObject *))(*(_QWORD *)v19 + 464LL))(v19, v25); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v25 + 64LL))(v25, 2); cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 480), v25); LODWORD(v25) = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("gj_birdBtn_on_001.png"); v26 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("gj_birdBtn_off_001.png"); v27 = CCMenuItemToggler::create(v26, (int)v25, a1, (__int64)GJGarageLayer::onSelectTab); *(_DWORD *)(*((_QWORD *)v27 + 47) + 372LL) = 1067030938; *(_DWORD *)(*((_QWORD *)v27 + 48) + 372LL) = 1067030938; CCMenuItemToggler::toggle((__int64)v27, *((unsigned __int8 *)v27 + 392)); (*(void (__fastcall **)(cocos2d::CCMenu *, struct cocos2d::CCObject *))(*(_QWORD *)v19 + 464LL))(v19, v27); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v27 + 64LL))(v27, 3); cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 480), v27); LODWORD(v27) = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("gj_dartBtn_on_001.png"); v28 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("gj_dartBtn_off_001.png"); v29 = CCMenuItemToggler::create(v28, (int)v27, a1, (__int64)GJGarageLayer::onSelectTab); *(_DWORD *)(*((_QWORD *)v29 + 47) + 372LL) = 1067030938; *(_DWORD *)(*((_QWORD *)v29 + 48) + 372LL) = 1067030938; CCMenuItemToggler::toggle((__int64)v29, *((unsigned __int8 *)v29 + 392)); (*(void (__fastcall **)(cocos2d::CCMenu *, struct cocos2d::CCObject *))(*(_QWORD *)v19 + 464LL))(v19, v29); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v29 + 64LL))(v29, 4); cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 480), v29); LODWORD(v29) = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("gj_robotBtn_on_001.png"); v30 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("gj_robotBtn_off_001.png"); v31 = CCMenuItemToggler::create(v30, (int)v29, a1, (__int64)GJGarageLayer::onSelectTab); *(_DWORD *)(*((_QWORD *)v31 + 47) + 372LL) = 1067030938; *(_DWORD *)(*((_QWORD *)v31 + 48) + 372LL) = 1067030938; CCMenuItemToggler::toggle((__int64)v31, *((unsigned __int8 *)v31 + 392)); (*(void (__fastcall **)(cocos2d::CCMenu *, struct cocos2d::CCObject *))(*(_QWORD *)v19 + 464LL))(v19, v31); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v31 + 64LL))(v31, 5); cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 480), v31); LODWORD(v31) = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("gj_spiderBtn_on_001.png"); v32 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("gj_spiderBtn_off_001.png"); v33 = CCMenuItemToggler::create(v32, (int)v31, a1, (__int64)GJGarageLayer::onSelectTab); *(_DWORD *)(*((_QWORD *)v33 + 47) + 372LL) = 1067030938; *(_DWORD *)(*((_QWORD *)v33 + 48) + 372LL) = 1067030938; CCMenuItemToggler::toggle((__int64)v33, *((unsigned __int8 *)v33 + 392)); (*(void (__fastcall **)(cocos2d::CCMenu *, struct cocos2d::CCObject *))(*(_QWORD *)v19 + 464LL))(v19, v33); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v33 + 64LL))(v33, 6); cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 480), v33); LODWORD(v33) = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("gj_swingBtn_on_001.png"); v34 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("gj_swingBtn_off_001.png"); v35 = CCMenuItemToggler::create(v34, (int)v33, a1, (__int64)GJGarageLayer::onSelectTab); *(_DWORD *)(*((_QWORD *)v35 + 47) + 372LL) = 1067030938; *(_DWORD *)(*((_QWORD *)v35 + 48) + 372LL) = 1067030938; CCMenuItemToggler::toggle((__int64)v35, *((unsigned __int8 *)v35 + 392)); (*(void (__fastcall **)(cocos2d::CCMenu *, struct cocos2d::CCObject *))(*(_QWORD *)v19 + 464LL))(v19, v35); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v35 + 64LL))(v35, 7); cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 480), v35); LODWORD(v35) = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("gj_jetpackBtn_on_001.png"); v36 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("gj_jetpackBtn_off_001.png"); v37 = CCMenuItemToggler::create(v36, (int)v35, a1, (__int64)GJGarageLayer::onSelectTab); *(_DWORD *)(*((_QWORD *)v37 + 47) + 372LL) = 1067030938; *(_DWORD *)(*((_QWORD *)v37 + 48) + 372LL) = 1067030938; CCMenuItemToggler::toggle((__int64)v37, *((unsigned __int8 *)v37 + 392)); (*(void (__fastcall **)(cocos2d::CCMenu *, struct cocos2d::CCObject *))(*(_QWORD *)v19 + 464LL))(v19, v37); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v37 + 64LL))(v37, 8); cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 480), v37); LODWORD(v37) = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("gj_streakBtn_on_001.png"); v38 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("gj_streakBtn_off_001.png"); v39 = CCMenuItemToggler::create(v38, (int)v37, a1, (__int64)GJGarageLayer::onSelectTab); *(_DWORD *)(*((_QWORD *)v39 + 47) + 372LL) = 1067030938; *(_DWORD *)(*((_QWORD *)v39 + 48) + 372LL) = 1067030938; CCMenuItemToggler::toggle((__int64)v39, *((unsigned __int8 *)v39 + 392)); (*(void (__fastcall **)(cocos2d::CCMenu *, struct cocos2d::CCObject *))(*(_QWORD *)v19 + 464LL))(v19, v39); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v39 + 64LL))(v39, 99); cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 480), v39); LODWORD(v39) = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("gj_explosionBtn_on_001.png"); v40 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("gj_explosionBtn_off_001.png"); v41 = CCMenuItemToggler::create(v40, (int)v39, a1, (__int64)GJGarageLayer::onSelectTab); *(_DWORD *)(*((_QWORD *)v41 + 47) + 372LL) = 1067030938; *(_DWORD *)(*((_QWORD *)v41 + 48) + 372LL) = 1067030938; CCMenuItemToggler::toggle((__int64)v41, *((unsigned __int8 *)v41 + 392)); (*(void (__fastcall **)(cocos2d::CCMenu *, struct cocos2d::CCObject *))(*(_QWORD *)v19 + 464LL))(v19, v41); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v41 + 64LL))(v41, 98); cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 480), v41); for ( i = 0; i < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 480)); ++i ) { v43 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 480), i); LODWORD(v80) = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v43 + 56LL))(v43); v44 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)v43 + 47) + 952LL))(*((_QWORD *)v43 + 47)); (*(void (__fastcall **)(__int64))(*(_QWORD *)v44 + 160LL))(v44); v45 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)v43 + 48) + 952LL))(*((_QWORD *)v43 + 48)); (*(void (__fastcall **)(__int64))(*(_QWORD *)v45 + 160LL))(v45); *(_DWORD *)sub_14010ECC0((__int64 *)(a1 + 520), (int *)&v80) = -1; } cocos2d::CCMenu::alignItemsHorizontallyWithPadding(v19, 2.0); v46 = *(_QWORD *)v19; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v80, v81 * 0.5, (float)(v82 * 0.5) + 30.0); (*(void (__fastcall **)(cocos2d::CCMenu *, __int64))(v46 + 184))(v19, v47); v48 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_select_001.png"); *(_QWORD *)(a1 + 536) = v48; (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v48 + 160LL))(v48); (*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a1 + 456LL))(a1, *(_QWORD *)(a1 + 536), 1); v49 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_select_001.png"); *(_QWORD *)(a1 + 544) = v49; (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v49 + 160LL))(v49); (*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a1 + 456LL))(a1, *(_QWORD *)(a1 + 544), 1); v50 = cocos2d::CCString::createWithFormat("GJ_arrow_%02d_001.png", 1); CString = cocos2d::CCString::getCString(v50); v52 = (__int64 *)cocos2d::CCSprite::createWithSpriteFrameName(CString); (*(void (__fastcall **)(__int64 *))(*v52 + 160))(v52); v80 = operator new(0x208u); v53 = (__int64 *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v80); v54 = (cocos2d::CCObject *)v53; if ( v53 ) { if ( CCMenuItemSpriteExtra::init(v53, v52, 0, a1, (__int64)GJGarageLayer::onArrow) ) { cocos2d::CCObject::autorelease(v54); goto LABEL_8; } (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v54 + 8LL))(v54, 1); } v54 = nullptr; LABEL_8: *(_QWORD *)(a1 + 568) = v54; (*(void (__fastcall **)(cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v19 + 464LL))(v19, v54); *(_DWORD *)(*(_QWORD *)(a1 + 568) + 372LL) = 1069547520; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v85, -220.0, 0.0); v56 = v55; v57 = (*(__int64 (__fastcall **)(_QWORD *))(*v5 + 200LL))(v5); cocos2d::CCPoint::operator+(v57, &v80, v56); v58 = **(_QWORD **)(a1 + 568); v59 = *(_QWORD *)(a1 + 568); cocos2d::CCNode::convertToNodeSpace(v19, v78, &v80); (*(void (__fastcall **)(__int64, __int64))(v58 + 184))(v59, v60); v61 = cocos2d::CCSprite::createWithSpriteFrameName(CString); (*(void (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v61 + 160LL))(v61); cocos2d::CCSprite::setFlipX(v61, 1); v80 = operator new(0x208u); v62 = (__int64 *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v80); v63 = (cocos2d::CCObject *)v62; if ( !v62 ) { LABEL_12: v63 = nullptr; goto LABEL_13; } if ( !CCMenuItemSpriteExtra::init(v62, (__int64 *)v61, 0, a1, (__int64)GJGarageLayer::onArrow) ) { (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v63 + 8LL))(v63, 1); goto LABEL_12; } cocos2d::CCObject::autorelease(v63); LABEL_13: *(_QWORD *)(a1 + 576) = v63; (*(void (__fastcall **)(cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v19 + 464LL))(v19, v63); (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 576) + 64LL))(*(_QWORD *)(a1 + 576), 1); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v85, 220.0, 0.0); v65 = v64; v66 = (*(__int64 (__fastcall **)(_QWORD *))(*v5 + 200LL))(v5); cocos2d::CCPoint::operator+(v66, &v80, v65); v67 = **(_QWORD **)(a1 + 576); v68 = *(_QWORD *)(a1 + 576); cocos2d::CCNode::convertToNodeSpace(v19, v78, &v80); (*(void (__fastcall **)(__int64, __int64))(v67 + 184))(v68, v69); *(_DWORD *)(*(_QWORD *)(a1 + 576) + 372LL) = 1069547520; v71 = (cocos2d::CCObject *)cocos2d::CCArray::create(v70); *(_QWORD *)(a1 + 488) = v71; cocos2d::CCObject::retain(v71); v73 = cocos2d::CCMenu::create(v72); *(_QWORD *)(a1 + 584) = v73; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v73); v74 = **(_QWORD **)(a1 + 584); v75 = *(_QWORD *)(a1 + 584); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v80, v81 * 0.5, 25.0); (*(void (__fastcall **)(__int64, __int64))(v74 + 184))(v75, v76); return GJGarageLayer::selectTab(a1, 0); }
GD Web Decomp Icon

GD Web Decomp

Raw Source