//
// cocos2d::extension::CCScale9Sprite::updatePositions from 0x1003f4ee0 to 0x1003f53c2 (1250 bytes)
//
// 1 xrefs:
// > cocos2d::extension::CCScale9Sprite::visit @ 0x1003f6216
//
// 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)
{
float *v2; // rax
float *v3; // rax
__int64 v4; // rax
__int64 v5; // rax
float *v6; // rax
__int64 v7; // rax
float *v8; // rax
__int64 v9; // rax
cocos2d::CCSprite *bottomLeft; // rbx
cocos2d::CCSprite *bottomRight; // rbx
cocos2d::CCSprite *topLeft; // rbx
cocos2d::CCSprite *topRight; // rbx
cocos2d::CCSprite *left; // rbx
cocos2d::CCSprite *right; // rbx
cocos2d::CCSprite *top; // rbx
cocos2d::CCSprite *bottom; // rbx
cocos2d::CCSprite *centre; // rbx
cocos2d::CCSprite *v19; // rbx
cocos2d::CCSprite *v20; // rbx
cocos2d::CCSprite *v21; // rbx
cocos2d::CCSprite *v22; // rbx
cocos2d::CCSprite *v23; // rbx
cocos2d::CCSprite *v24; // rbx
cocos2d::CCSprite *v25; // rbx
cocos2d::CCSprite *v26; // rbx
cocos2d::CCSprite *v27; // rbx
__int64 v28; // [rsp-48h] [rbp-48h] BYREF
float v29; // [rsp-40h] [rbp-40h]
float v30; // [rsp-3Ch] [rbp-3Ch]
float v31; // [rsp-38h] [rbp-38h]
float v32; // [rsp-34h] [rbp-34h]
float v33; // [rsp-30h] [rbp-30h] BYREF
float v34; // [rsp-28h] [rbp-28h]
float v35; // [rsp-24h] [rbp-24h]
if ( a1->_topLeft && a1->_topRight && a1->_bottomRight && a1->_bottomLeft )
{
if ( a1->_centre )
{
sub_10028CFC0(&v28, &a1->m_obContentSize);
v34 = *(float *)&v28;
v2 = (float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->_topLeft->getContentSize)(a1->_topLeft);
v34 = v34 - *v2;
v3 = (float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->_topRight->getContentSize)(a1->_topRight);
v34 = v34 - *v3;
v35 = *((float *)&v28 + 1);
v4 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->_topLeft->getContentSize)(a1->_topLeft);
v35 = v35 - *(float *)(v4 + 4);
v5 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->_bottomRight->getContentSize)(a1->_bottomRight);
v35 = v35 - *(float *)(v5 + 4);
v6 = (float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->_centre->getContentSize)(a1->_centre);
v34 = v34 / *v6;
v7 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->_centre->getContentSize)(a1->_centre);
v35 = v35 / *(float *)(v7 + 4);
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->_centre->setScaleX)(a1->_centre, v34);
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->_centre->setScaleY)(a1->_centre, v35);
v8 = (float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->_centre->getContentSize)(a1->_centre);
v32 = *v8 * v34;
v9 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->_centre->getContentSize)(a1->_centre);
v31 = *(float *)(v9 + 4) * v35;
v29 = *(float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->_bottomLeft->getContentSize)(a1->_bottomLeft);
v30 = *(float *)(((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->_bottomLeft->getContentSize)(a1->_bottomLeft)
+ 4);
bottomLeft = a1->_bottomLeft;
sub_10028CBE0(&v33, 0.0, 0.0);
((void (__fastcall *)(cocos2d::CCSprite *, float *))bottomLeft->setAnchorPoint)(bottomLeft, &v33);
bottomRight = a1->_bottomRight;
sub_10028CBE0(&v33, 0.0, 0.0);
((void (__fastcall *)(cocos2d::CCSprite *, float *))bottomRight->setAnchorPoint)(bottomRight, &v33);
topLeft = a1->_topLeft;
sub_10028CBE0(&v33, 0.0, 0.0);
((void (__fastcall *)(cocos2d::CCSprite *, float *))topLeft->setAnchorPoint)(topLeft, &v33);
topRight = a1->_topRight;
sub_10028CBE0(&v33, 0.0, 0.0);
((void (__fastcall *)(cocos2d::CCSprite *, float *))topRight->setAnchorPoint)(topRight, &v33);
left = a1->_left;
sub_10028CBE0(&v33, 0.0, 0.0);
((void (__fastcall *)(cocos2d::CCSprite *, float *))left->setAnchorPoint)(left, &v33);
right = a1->_right;
sub_10028CBE0(&v33, 0.0, 0.0);
((void (__fastcall *)(cocos2d::CCSprite *, float *))right->setAnchorPoint)(right, &v33);
top = a1->_top;
sub_10028CBE0(&v33, 0.0, 0.0);
((void (__fastcall *)(cocos2d::CCSprite *, float *))top->setAnchorPoint)(top, &v33);
bottom = a1->_bottom;
sub_10028CBE0(&v33, 0.0, 0.0);
((void (__fastcall *)(cocos2d::CCSprite *, float *))bottom->setAnchorPoint)(bottom, &v33);
centre = a1->_centre;
sub_10028CBE0(&v33, 0.0, 0.0);
((void (__fastcall *)(cocos2d::CCSprite *, float *))centre->setAnchorPoint)(centre, &v33);
v19 = a1->_bottomLeft;
sub_10028CBE0(&v33, 0.0, 0.0);
((void (__fastcall *)(cocos2d::CCSprite *, float *))v19->setPosition)(v19, &v33);
v20 = a1->_bottomRight;
v32 = v32 + v29;
sub_10028CBE0(&v33, v32, 0.0);
((void (__fastcall *)(cocos2d::CCSprite *, float *))v20->setPosition)(v20, &v33);
v21 = a1->_topLeft;
v31 = v31 + v30;
sub_10028CBE0(&v33, 0.0, v31);
((void (__fastcall *)(cocos2d::CCSprite *, float *))v21->setPosition)(v21, &v33);
v22 = a1->_topRight;
sub_10028CBE0(&v33, v32, v31);
((void (__fastcall *)(cocos2d::CCSprite *, float *))v22->setPosition)(v22, &v33);
v23 = a1->_left;
sub_10028CBE0(&v33, 0.0, v30);
((void (__fastcall *)(cocos2d::CCSprite *, float *))v23->setPosition)(v23, &v33);
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->_left->setScaleY)(a1->_left, v35);
v24 = a1->_right;
sub_10028CBE0(&v33, v32, v30);
((void (__fastcall *)(cocos2d::CCSprite *, float *))v24->setPosition)(v24, &v33);
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->_right->setScaleY)(a1->_right, v35);
v25 = a1->_bottom;
sub_10028CBE0(&v33, v29, 0.0);
((void (__fastcall *)(cocos2d::CCSprite *, float *))v25->setPosition)(v25, &v33);
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->_bottom->setScaleX)(a1->_bottom, v34);
v26 = a1->_top;
sub_10028CBE0(&v33, v29, v31);
((void (__fastcall *)(cocos2d::CCSprite *, float *))v26->setPosition)(v26, &v33);
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->_top->setScaleX)(a1->_top, v34);
v27 = a1->_centre;
sub_10028CBE0(&v33, v29, v30);
((void (__fastcall *)(cocos2d::CCSprite *, float *))v27->setPosition)(v27, &v33);
}
}
}