//
// cocos2d::CCSprite::draw from 0xd86bdc to 0xd86cf8 (284 bytes)
//
// 78 xrefs:
// > cocos2d::CCTextFieldTTF::draw @ 0xda22b0
// > cocos2d::CCTextFieldTTF::draw @ 0xda22fc
// > ??> @ 0x5c8d8
// > ??> @ 0x14138c8
// > ??> @ 0x1413e88
// > ??> @ 0x1414c38
// > ??> @ 0x14174a8
// > ??> @ 0x1417a48
// > ??> @ 0x141b368
// > ??> @ 0x141b998
// > ??> @ 0x1421a48
// > ??> @ 0x1421ff8
// > ??> @ 0x1424538
// > ??> @ 0x1433588
// > ??> @ 0x1433d88
// > ??> @ 0x1434378
// > ??> @ 0x1434b58
// > ??> @ 0x1435368
// > ??> @ 0x143a2f8
// > ??> @ 0x14436c8
// > ??> @ 0x1443ed8
// > ??> @ 0x14446e8
// > ??> @ 0x1444ef8
// > ??> @ 0x1445708
// > ??> @ 0x1445f18
// > ??> @ 0x1446728
// > ??> @ 0x1446f38
// > ??> @ 0x1447718
// > ??> @ 0x1447f28
// > ??> @ 0x1448738
// > ??> @ 0x1448f48
// > ??> @ 0x1449758
// > ??> @ 0x1449fa8
// > ??> @ 0x144a7b8
// > ??> @ 0x144afc8
// > ??> @ 0x144b7d8
// > ??> @ 0x144bfe8
// > ??> @ 0x144c808
// > ??> @ 0x144d018
// > ??> @ 0x144d828
// > ??> @ 0x144e038
// > ??> @ 0x144e848
// > ??> @ 0x144f058
// > ??> @ 0x144f868
// > ??> @ 0x1450078
// > ??> @ 0x1450888
// > ??> @ 0x1451098
// > ??> @ 0x14518a8
// > ??> @ 0x14520b8
// > ??> @ 0x14528c8
// > ??> @ 0x14530d8
// > ??> @ 0x14538e8
// > ??> @ 0x14540f8
// > ??> @ 0x1454908
// > ??> @ 0x1455118
// > ??> @ 0x1455928
// > ??> @ 0x1456138
// > ??> @ 0x1456948
// > ??> @ 0x1457158
// > ??> @ 0x1457968
// > ??> @ 0x1458178
// > ??> @ 0x1458988
// > ??> @ 0x14591b8
// > ??> @ 0x145b0a8
// > ??> @ 0x145b648
// > ??> @ 0x1477738
// > ??> @ 0x14797e8
// > ??> @ 0x1486c48
// > ??> @ 0x14871f8
// > ??> @ 0x1491b28
// > ??> @ 0x1496f68
// > ??> @ 0x14994b8
// > ??> @ 0x14c1de8
// > ??> @ 0x14d97e8
// > ??> @ 0x1517ac8
// > ??> @ 0x1518068
// > ??> @ 0x1518be8
// > ??> @ 0x152e648
//
// 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
//
int *__fastcall cocos2d::CCSprite::draw(int *this)
{
__int64 v1; // x19
cocos2d::CCGLProgram *v2; // x0
unsigned int v3; // w1
cocos2d::CCGLProgram *v4; // x0
cocos2d *v5; // x0
if ( !*((_BYTE *)this + 559) )
{
if ( *((_BYTE *)this + 329) )
{
v1 = (__int64)this;
cocos2d::ccGLEnable();
(*(void (__fastcall **)(__int64))(*(_QWORD *)v1 + 656LL))(v1);
v2 = (cocos2d::CCGLProgram *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v1 + 656LL))(v1);
cocos2d::CCGLProgram::use(v2, v3);
v4 = (cocos2d::CCGLProgram *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v1 + 656LL))(v1);
cocos2d::CCGLProgram::setUniformsForBuiltins(v4);
cocos2d::ccGLBlendFunc(*(unsigned int *)(v1 + 404), *(_DWORD *)(v1 + 408));
v5 = (cocos2d *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v1 + 416) + 104LL))(*(_QWORD *)(v1 + 416));
cocos2d::ccGLBindTexture2D(v5);
cocos2d::ccGLEnableVertexAttribs((cocos2d *)&byte_7);
glVertexAttribPointer();
glVertexAttribPointer();
glVertexAttribPointer();
glDrawArrays();
++g_uNumberOfDraws;
return &g_uNumberOfDraws;
}
}
return this;
}