//
// cocos2d::CCSprite::initWithTexture from 0xd874e4 to 0xd876ac (456 bytes)
//
// 81 xrefs:
// > CCSpriteWithHue::initWithTexture @ 0x6de548
// > ??> @ 0x79f78
// > ??> @ 0x14139e0
// > ??> @ 0x1413fa0
// > ??> @ 0x1414d50
// > ??> @ 0x14175c0
// > ??> @ 0x1417b60
// > ??> @ 0x141b480
// > ??> @ 0x141bab0
// > ??> @ 0x141cf30
// > ??> @ 0x1421b60
// > ??> @ 0x1422110
// > ??> @ 0x1424650
// > ??> @ 0x1429030
// > ??> @ 0x14336a0
// > ??> @ 0x1433ea0
// > ??> @ 0x1434490
// > ??> @ 0x1434c70
// > ??> @ 0x1435480
// > ??> @ 0x143a410
// > ??> @ 0x14437e0
// > ??> @ 0x1443ff0
// > ??> @ 0x1444800
// > ??> @ 0x1445010
// > ??> @ 0x1445820
// > ??> @ 0x1446030
// > ??> @ 0x1446840
// > ??> @ 0x1447050
// > ??> @ 0x1447830
// > ??> @ 0x1448040
// > ??> @ 0x1448850
// > ??> @ 0x1449060
// > ??> @ 0x1449870
// > ??> @ 0x144a0c0
// > ??> @ 0x144a8d0
// > ??> @ 0x144b0e0
// > ??> @ 0x144b8f0
// > ??> @ 0x144c100
// > ??> @ 0x144c920
// > ??> @ 0x144d130
// > ??> @ 0x144d940
// > ??> @ 0x144e150
// > ??> @ 0x144e960
// > ??> @ 0x144f170
// > ??> @ 0x144f980
// > ??> @ 0x1450190
// > ??> @ 0x14509a0
// > ??> @ 0x14511b0
// > ??> @ 0x14519c0
// > ??> @ 0x14521d0
// > ??> @ 0x14529e0
// > ??> @ 0x14531f0
// > ??> @ 0x1453a00
// > ??> @ 0x1454210
// > ??> @ 0x1454a20
// > ??> @ 0x1455230
// > ??> @ 0x1455a40
// > ??> @ 0x1456250
// > ??> @ 0x1456a60
// > ??> @ 0x1457270
// > ??> @ 0x1457a80
// > ??> @ 0x1458290
// > ??> @ 0x1458aa0
// > ??> @ 0x14592d0
// > ??> @ 0x145b1c0
// > ??> @ 0x145b760
// > ??> @ 0x1477850
// > ??> @ 0x1479900
// > ??> @ 0x1486d60
// > ??> @ 0x1487310
// > ??> @ 0x1491c40
// > ??> @ 0x1497080
// > ??> @ 0x14995d0
// > ??> @ 0x14c1f00
// > ??> @ 0x14d9900
// > ??> @ 0x150cd20
// > ??> @ 0x1517be0
// > ??> @ 0x1518180
// > ??> @ 0x1518d00
// > ??> @ 0x152e760
// > ??> @ 0x152ff60
//
// This function is hookable on this platform (idp: arm, 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 13:08:13 +0000
//
__int64 __fastcall cocos2d::CCSprite::initWithTexture(
cocos2d::CCSprite *this,
cocos2d::CCTexture2D *a2,
const cocos2d::CCRect *a3,
unsigned __int8 a4)
{
unsigned int v7; // w22
unsigned __int8 v8; // w0
unsigned int v9; // w21
__int64 v10; // x2
__int64 v11; // x2
void (__fastcall *v12)(cocos2d::CCSprite *, float *); // x25
__int64 v13; // x1
void (__fastcall *v14)(cocos2d::CCSprite *, __int64); // x25
cocos2d::CCShaderCache *v15; // x0
__int64 v16; // x0
float v18; // [xsp+60h] [xbp+60h] BYREF
v7 = a4;
v8 = cocos2d::CCNodeRGBA::init(this);
v9 = v8;
if ( v8 )
{
v10 = *(_QWORD *)this;
*((_QWORD *)this + 46) = 0;
*((_BYTE *)this + 377) = 0;
(*(void (__fastcall **)(cocos2d::CCSprite *, _QWORD))(v10 + 1200))(this, 0);
*((_BYTE *)this + 558) = 0;
v11 = *(_QWORD *)this;
*((_BYTE *)this + 556) = 1;
*((_DWORD *)this + 102) = 771;
*((_DWORD *)this + 101) = 1;
*((_BYTE *)this + 557) = 0;
v12 = *(void (__fastcall **)(cocos2d::CCSprite *, float *))(v11 + 296);
cocos2d::CCPoint::CCPoint(&v18, 0.5, 0.5);
v12(this, &v18);
cocos2d::CCPoint::operator=((float *)this + 111, flt_1560AB8);
*((_BYTE *)this + 378) = 0;
*(_QWORD *)((char *)this + 460) = 0;
*(_QWORD *)((char *)this + 468) = 0;
*(_QWORD *)((char *)this + 476) = 0;
*(_QWORD *)((char *)this + 484) = 0;
*(_QWORD *)((char *)this + 492) = 0;
*(_QWORD *)((char *)this + 500) = 0;
*(_QWORD *)((char *)this + 508) = 0;
*(_QWORD *)((char *)this + 516) = 0;
*(_QWORD *)((char *)this + 524) = 0;
*(_QWORD *)((char *)this + 532) = 0;
*(_QWORD *)((char *)this + 540) = 0;
*(_QWORD *)((char *)this + 548) = 0;
*((_BYTE *)this + 496) = -1;
v13 = *(_QWORD *)this;
*((_BYTE *)this + 497) = -1;
*((_BYTE *)this + 498) = -1;
*((_BYTE *)this + 499) = -1;
*((_BYTE *)this + 544) = -1;
*((_BYTE *)this + 545) = -1;
*((_BYTE *)this + 546) = -1;
*((_BYTE *)this + 547) = -1;
*((_BYTE *)this + 472) = -1;
*((_BYTE *)this + 473) = -1;
*((_BYTE *)this + 474) = -1;
*((_BYTE *)this + 475) = -1;
*((_BYTE *)this + 520) = -1;
*((_BYTE *)this + 521) = -1;
*((_BYTE *)this + 522) = -1;
*((_BYTE *)this + 523) = -1;
v14 = *(void (__fastcall **)(cocos2d::CCSprite *, __int64))(v13 + 664);
v15 = (cocos2d::CCShaderCache *)cocos2d::CCShaderCache::sharedShaderCache((cocos2d::CCShaderCache *)0xFFFFFFFFLL);
v16 = cocos2d::CCShaderCache::programForKey(v15, "ShaderPositionTextureColor");
v14(this, v16);
(*(void (__fastcall **)(cocos2d::CCSprite *, cocos2d::CCTexture2D *))(*(_QWORD *)this + 1064LL))(this, a2);
(*(void (__fastcall **)(cocos2d::CCSprite *, const cocos2d::CCRect *, _QWORD, char *))(*(_QWORD *)this + 1144LL))(
this,
a3,
v7,
(char *)a3 + 8);
(*(void (__fastcall **)(cocos2d::CCSprite *, _QWORD))(*(_QWORD *)this + 1120LL))(this, 0);
*((_BYTE *)this + 559) = 0;
}
return v9;
}