// // cocos2d::extension::CCControlStepper::initWithMinusSpriteAndPlusSprite from 0xaa4418 to 0xaa48b8 (1184 bytes) // // 2 xrefs: // > cocos2d::extension::CCControlStepper::create @ 0xaa48fc // > @ 0x5a6c0 // // 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 // bool cocos2d::extension::CCControlStepper::initWithMinusSpriteAndPlusSprite( cocos2d::extension::CCControlStepper *a1, cocos2d::CCSprite *a2, cocos2d::CCSprite *a3) { bool v6; // w24 cocos2d::extension::CCControlStepper_vtbl *v8; // x0 void (__fastcall *ignoreAnchorPointForPosition)(cocos2d::CCNode *__hidden, bool); // x2 cocos2d::CCSprite *v10; // x25 cocos2d::CCSprite *v11; // x26 void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x28 const cocos2d::CCSize *v13; // x0 const char *v14; // x2 cocos2d::CCObject *v15; // x0 cocos2d::CCObject *v16; // x25 cocos2d::CCObject *v17; // x1 cocos2d::CCObject *v18; // x28 int (__fastcall *getTag)(const cocos2d::CCObject *__hidden); // x3 __int64 v20; // x25 void (__fastcall *v21)(__int64, cocos2d::CCRect *); // x28 __int64 v22; // x0 __int64 v23; // x0 cocos2d::CCSprite *v24; // x25 cocos2d::CCSprite *v25; // x0 void (__fastcall *v26)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x28 float width; // s10 const cocos2d::CCSize *v28; // x0 const char *v29; // x2 cocos2d::CCObject *v30; // x0 cocos2d::CCObject *v31; // x22 cocos2d::CCObject *v32; // x1 cocos2d::CCObject *v33; // x23 int (__fastcall *v34)(const cocos2d::CCObject *__hidden); // x3 __int64 v35; // x23 void (__fastcall *v36)(__int64, cocos2d::CCRect *); // x25 __int64 v37; // x0 void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // x22 float v39; // s8 __int64 v40; // x0 float v41; // [xsp+80h] [xbp+80h] float v42; // [xsp+80h] [xbp+80h] float v43; // [xsp+80h] [xbp+80h] float v44; // [xsp+80h] [xbp+80h] float v45; // [xsp+A4h] [xbp+A4h] cocos2d::CCRect v46; // [xsp+A8h] [xbp+A8h] BYREF cocos2d::CCRect v47; // [xsp+B8h] [xbp+B8h] BYREF cocos2d::CCRect v48; // 0:kr20_16.16 v6 = cocos2d::extension::CCControl::init(a1); if ( v6 ) { a1->setTouchEnabled(a1, 1); v8 = a1->cocos2d::extension::CCControl::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; BYTE1(a1[1].m_unknown2) = 1; ignoreAnchorPointForPosition = v8->ignoreAnchorPointForPosition; LOBYTE(a1[1].m_unknown2) = 1; *(_QWORD *)&a1[1].m_uOrderOfArrival = 0; BYTE2(a1[1].m_unknown2) = 0; *(_QWORD *)&a1[1].m_uIndexInArray = 0; *(_QWORD *)&a1[1].m_fRotationX = 0x4059000000000000LL; *(double *)&a1[1].m_fScaleX = 1.0; ignoreAnchorPointForPosition(a1, 0); v10 = (cocos2d::CCSprite *)a1[1].cocos2d::extension::CCControl::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v11 = v10; if ( v10 != a2 ) { v11 = nullptr; if ( a2 ) { v11 = a2; cocos2d::CCObject::retain(a2); v10 = (cocos2d::CCSprite *)a1[1].cocos2d::extension::CCControl::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; } if ( v10 ) cocos2d::CCObject::release(v10); a1[1].cocos2d::extension::CCControl::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (cocos2d::extension::CCControlStepper_vtbl *)a2; v10 = a2; } setPosition = v10->setPosition; v41 = a2->getContentSize(v11)->width * 0.5; v13 = a2->getContentSize(v11); cocos2d::CCPoint::CCPoint(&v47.origin, v41, v13->height * 0.5); setPosition(v10, &v47.origin); a1->addChild( a1, (cocos2d::CCNode *)a1[1].cocos2d::extension::CCControl::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable); v15 = (cocos2d::CCObject *)cocos2d::CCLabelTTF::create( (cocos2d::CCLabelTTF *)&byte_F10E40, "CourierNewPSMT", v14, 40.0); v16 = v15; v17 = *(cocos2d::CCObject **)&a1[1].m_nTag; if ( v15 != v17 ) { v18 = nullptr; if ( v15 ) { cocos2d::CCObject::retain(v15); v18 = v16; v17 = *(cocos2d::CCObject **)&a1[1].m_nTag; } if ( v17 ) cocos2d::CCObject::release(v17); *(_QWORD *)&a1[1].m_nTag = v16; v15 = v18; } getTag = v16->__vftable[11].getTag; LOWORD(v47.origin.x) = -27757; BYTE2(v47.origin.x) = -109; ((void (__fastcall *)(cocos2d::CCObject *, cocos2d::CCRect *))getTag)(v15, &v47); v20 = *(_QWORD *)&a1[1].m_nTag; v21 = *(void (__fastcall **)(__int64, cocos2d::CCRect *))(*(_QWORD *)v20 + 184LL); v42 = *(float *)(*((__int64 (__fastcall **)(cocos2d::extension::CCControlStepper_vtbl *))a1[1].copyWithZone + 39))(a1[1].cocos2d::extension::CCControl::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable) * 0.5; v22 = (*((__int64 (__fastcall **)(cocos2d::extension::CCControlStepper_vtbl *))a1[1].copyWithZone + 39))(a1[1].cocos2d::extension::CCControl::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable); cocos2d::CCPoint::CCPoint(&v47.origin, v42, *(float *)(v22 + 4) * 0.5); v23 = v20; v24 = a3; v21(v23, &v47); (*((void (__fastcall **)(cocos2d::extension::CCControlStepper_vtbl *, _QWORD))a1[1].copyWithZone + 55))( a1[1].cocos2d::extension::CCControl::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable, *(_QWORD *)&a1[1].m_nTag); v25 = *(cocos2d::CCSprite **)&a1[1].m_uID; if ( a3 != v25 ) { v24 = nullptr; if ( a3 ) { v24 = a3; cocos2d::CCObject::retain(a3); v25 = *(cocos2d::CCSprite **)&a1[1].m_uID; } if ( v25 ) cocos2d::CCObject::release(v25); *(_QWORD *)&a1[1].m_uID = a3; } v26 = a3->setPosition; width = a2->getContentSize(v11)->width; v43 = width + (float)(a3->getContentSize(v24)->width * 0.5); v28 = a2->getContentSize(v11); cocos2d::CCPoint::CCPoint(&v47.origin, v43, v28->height * 0.5); v26(a3, &v47.origin); a1->addChild(a1, *(cocos2d::CCNode **)&a1[1].m_uID); v30 = (cocos2d::CCObject *)cocos2d::CCLabelTTF::create((cocos2d::CCLabelTTF *)"+", "CourierNewPSMT", v29, 40.0); v31 = v30; v32 = *(cocos2d::CCObject **)&a1[1].m_uAutoReleaseCount; if ( v30 != v32 ) { v33 = nullptr; if ( v30 ) { cocos2d::CCObject::retain(v30); v33 = v31; v32 = *(cocos2d::CCObject **)&a1[1].m_uAutoReleaseCount; } if ( v32 ) cocos2d::CCObject::release(v32); *(_QWORD *)&a1[1].m_uAutoReleaseCount = v31; v30 = v33; } v34 = v31->__vftable[11].getTag; memset(&v47, 55, 3); ((void (__fastcall *)(cocos2d::CCObject *, cocos2d::CCRect *))v34)(v30, &v47); v35 = *(_QWORD *)&a1[1].m_uAutoReleaseCount; v36 = *(void (__fastcall **)(__int64, cocos2d::CCRect *))(*(_QWORD *)v35 + 184LL); v44 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)&a1[1].m_uID + 312LL))(*(_QWORD *)&a1[1].m_uID) * 0.5; v37 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)&a1[1].m_uID + 312LL))(*(_QWORD *)&a1[1].m_uID); cocos2d::CCPoint::CCPoint(&v47.origin, v44, *(float *)(v37 + 4) * 0.5); v36(v35, &v47); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)&a1[1].m_uID + 440LL))( *(_QWORD *)&a1[1].m_uID, *(_QWORD *)&a1[1].m_uAutoReleaseCount); cocos2d::CCNode::boundingBox((cocos2d::CCNode *)a1[1].cocos2d::extension::CCControl::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable); cocos2d::CCNode::boundingBox(*(cocos2d::CCNode **)&a1[1].m_uID); v48 = cocos2d::extension::CCControlUtils::CCRectUnion(&v46, &v47); setContentSize = a1->setContentSize; v39 = *(float *)(*((__int64 (__fastcall **)(cocos2d::extension::CCControlStepper_vtbl *, float, float, float, float))a1[1].copyWithZone + 39))( a1[1].cocos2d::extension::CCControl::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable, v48.origin.x, v48.origin.y, v48.size.width, v48.size.height); v40 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)&a1[1].m_uID + 312LL))(*(_QWORD *)&a1[1].m_uID); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v47, v39 + *(float *)(v40 + 4), v45); setContentSize(a1, (const cocos2d::CCSize *)&v47); } return v6; }
GD Web Decomp Icon

GD Web Decomp

Raw Source