//
// cocos2d::extension::CCScale9Sprite::updatePositions from 0x100215620 to 0x100215ad0 (1200 bytes)
//
// 1 xrefs:
// > cocos2d::extension::CCScale9Sprite::visit @ 0x10021630c
//
// 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 cocos2d::extension::CCScale9Sprite::updatePositions(cocos2d::extension::CCScale9Sprite *a1)
{
double v2; // d0
float v3; // s8
float v4; // s8
float v5; // s8
float v6; // s9
float v7; // s9
float v8; // s9
float v9; // s8
float v10; // s11
float v11; // s13
float v12; // s12
unsigned __int32 v13; // s9
unsigned __int32 v14; // s10
cocos2d::CCSprite *bottomLeft; // x20
__n128 v16; // q0
__n128 v17; // q1
__n128 v18; // q0
cocos2d::CCSprite *bottomRight; // x20
__n128 v20; // q1
__n128 v21; // q0
cocos2d::CCSprite *topLeft; // x20
__n128 v23; // q1
__n128 v24; // q0
cocos2d::CCSprite *topRight; // x20
__n128 v26; // q1
__n128 v27; // q0
cocos2d::CCSprite *left; // x20
__n128 v29; // q1
__n128 v30; // q0
cocos2d::CCSprite *right; // x20
__n128 v32; // q1
__n128 v33; // q0
cocos2d::CCSprite *top; // x20
__n128 v35; // q1
__n128 v36; // q0
cocos2d::CCSprite *bottom; // x20
__n128 v38; // q1
__n128 v39; // q0
cocos2d::CCSprite *centre; // x20
__n128 v41; // q1
__n128 v42; // q0
cocos2d::CCSprite *v43; // x20
__n128 v44; // q1
__n128 v45; // q0
cocos2d::CCSprite *v46; // x20
float v47; // s13
__n128 v48; // q1
__n128 v49; // q0
cocos2d::CCSprite *v50; // x20
float v51; // s12
__n128 v52; // q1
__n128 v53; // q0
cocos2d::CCSprite *v54; // x20
__n128 v55; // q1
__n128 v56; // q0
cocos2d::CCSprite *v57; // x20
__n128 v58; // q1
__n128 v59; // q0
cocos2d::CCSprite *v60; // x20
__n128 v61; // q1
__n128 v62; // q0
cocos2d::CCSprite *v63; // x20
__n128 v64; // q1
__n128 v65; // q0
cocos2d::CCSprite *v66; // x20
__n128 v67; // q1
__n128 v68; // q0
cocos2d::CCSprite *v69; // x19
__n128 v70; // q1
int v71; // [xsp+0h] [xbp-50h] BYREF
__int64 v72; // [xsp+8h] [xbp-48h] BYREF
if ( a1->_topLeft && a1->_topRight && a1->_bottomRight && a1->_bottomLeft )
{
if ( a1->_centre )
{
v2 = sub_100022AFC(&v72, (double *)&a1->m_obContentSize);
v3 = *(float *)&v72;
v4 = v3
- *(float *)((__int64 (__fastcall *)(cocos2d::CCSprite *, double))a1->_topLeft->getContentSize)(
a1->_topLeft,
v2);
v5 = v4 - *(float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->_topRight->getContentSize)(a1->_topRight);
v6 = *((float *)&v72 + 1);
v7 = v6
- *(float *)(((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->_topLeft->getContentSize)(a1->_topLeft) + 4);
v8 = v7
- *(float *)(((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->_bottomRight->getContentSize)(a1->_bottomRight)
+ 4);
v9 = v5 / *(float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->_centre->getContentSize)(a1->_centre);
v10 = v8 / *(float *)(((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->_centre->getContentSize)(a1->_centre) + 4);
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->_centre->setScaleX)(a1->_centre, v9);
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->_centre->setScaleY)(a1->_centre, v10);
v11 = v9 * *(float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->_centre->getContentSize)(a1->_centre);
v12 = v10
* *(float *)(((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->_centre->getContentSize)(a1->_centre) + 4);
v13 = *(unsigned __int32 *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->_bottomLeft->getContentSize)(a1->_bottomLeft);
v14 = *(unsigned __int32 *)(((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->_bottomLeft->getContentSize)(a1->_bottomLeft)
+ 4);
bottomLeft = a1->_bottomLeft;
v16.n128_u32[0] = 0;
v17.n128_u32[0] = 0;
sub_100022980(v16, v17, &v71);
v18 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, int *))bottomLeft->setAnchorPoint)(bottomLeft, &v71);
bottomRight = a1->_bottomRight;
v18.n128_u32[0] = 0;
v20.n128_u32[0] = 0;
sub_100022980(v18, v20, &v71);
v21 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, int *))bottomRight->setAnchorPoint)(bottomRight, &v71);
topLeft = a1->_topLeft;
v21.n128_u32[0] = 0;
v23.n128_u32[0] = 0;
sub_100022980(v21, v23, &v71);
v24 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, int *))topLeft->setAnchorPoint)(topLeft, &v71);
topRight = a1->_topRight;
v24.n128_u32[0] = 0;
v26.n128_u32[0] = 0;
sub_100022980(v24, v26, &v71);
v27 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, int *))topRight->setAnchorPoint)(topRight, &v71);
left = a1->_left;
v27.n128_u32[0] = 0;
v29.n128_u32[0] = 0;
sub_100022980(v27, v29, &v71);
v30 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, int *))left->setAnchorPoint)(left, &v71);
right = a1->_right;
v30.n128_u32[0] = 0;
v32.n128_u32[0] = 0;
sub_100022980(v30, v32, &v71);
v33 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, int *))right->setAnchorPoint)(right, &v71);
top = a1->_top;
v33.n128_u32[0] = 0;
v35.n128_u32[0] = 0;
sub_100022980(v33, v35, &v71);
v36 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, int *))top->setAnchorPoint)(top, &v71);
bottom = a1->_bottom;
v36.n128_u32[0] = 0;
v38.n128_u32[0] = 0;
sub_100022980(v36, v38, &v71);
v39 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, int *))bottom->setAnchorPoint)(bottom, &v71);
centre = a1->_centre;
v39.n128_u32[0] = 0;
v41.n128_u32[0] = 0;
sub_100022980(v39, v41, &v71);
v42 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, int *))centre->setAnchorPoint)(centre, &v71);
v43 = a1->_bottomLeft;
v42.n128_u32[0] = 0;
v44.n128_u32[0] = 0;
sub_100022980(v42, v44, &v71);
v45 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, int *))v43->setPosition)(v43, &v71);
v46 = a1->_bottomRight;
v47 = v11 + *(float *)&v13;
v48.n128_u32[0] = 0;
v45.n128_f32[0] = v47;
sub_100022980(v45, v48, &v71);
v49 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, int *))v46->setPosition)(v46, &v71);
v50 = a1->_topLeft;
v51 = v12 + *(float *)&v14;
v49.n128_u32[0] = 0;
v52.n128_f32[0] = v51;
sub_100022980(v49, v52, &v71);
v53 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, int *))v50->setPosition)(v50, &v71);
v54 = a1->_topRight;
v53.n128_f32[0] = v47;
v55.n128_f32[0] = v51;
sub_100022980(v53, v55, &v71);
v56 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, int *))v54->setPosition)(v54, &v71);
v57 = a1->_left;
v56.n128_u32[0] = 0;
v58.n128_u32[0] = v14;
sub_100022980(v56, v58, &v71);
((void (__fastcall *)(cocos2d::CCSprite *, int *))v57->setPosition)(v57, &v71);
v59 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, float))a1->_left->setScaleY)(a1->_left, v10);
v60 = a1->_right;
v59.n128_f32[0] = v47;
v61.n128_u32[0] = v14;
sub_100022980(v59, v61, &v71);
((void (__fastcall *)(cocos2d::CCSprite *, int *))v60->setPosition)(v60, &v71);
v62 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, float))a1->_right->setScaleY)(a1->_right, v10);
v63 = a1->_bottom;
v64.n128_u32[0] = 0;
v62.n128_u32[0] = v13;
sub_100022980(v62, v64, &v71);
((void (__fastcall *)(cocos2d::CCSprite *, int *))v63->setPosition)(v63, &v71);
v65 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, float))a1->_bottom->setScaleX)(a1->_bottom, v9);
v66 = a1->_top;
v65.n128_u32[0] = v13;
v67.n128_f32[0] = v51;
sub_100022980(v65, v67, &v71);
((void (__fastcall *)(cocos2d::CCSprite *, int *))v66->setPosition)(v66, &v71);
v68 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, float))a1->_top->setScaleX)(a1->_top, v9);
v69 = a1->_centre;
v68.n128_u32[0] = v13;
v70.n128_u32[0] = v14;
sub_100022980(v68, v70, &v71);
((void (__fastcall *)(cocos2d::CCSprite *, int *))v69->setPosition)(v69, &v71);
}
}
}