//
// cocos2d::extension::CCScale9Sprite::setColor from 0xd13ce4 to 0xd13db0 (204 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'cocos2d::extension::CCScale9Sprite::setColor @ 0xd13db4
// > ??> @ 0x7b220
// > ??> @ 0x150da30
//
// 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:07:04 +0000
//
__int64 __fastcall cocos2d::extension::CCScale9Sprite::setColor(__int64 result, __int64 a2)
{
__int64 v2; // x2
__int64 v4; // x1
__int64 v5; // x0
unsigned int *v6; // x1
__int64 *v7; // x19
char *v8; // x20
v2 = *(_QWORD *)(result + 432);
if ( v2 )
{
v4 = result;
v5 = *(_QWORD *)(result + 432);
*(_WORD *)(v4 + 514) = *(_WORD *)a2;
*(_BYTE *)(v4 + 516) = *(_BYTE *)(a2 + 2);
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 488LL))(v5);
if ( result )
{
v6 = *(unsigned int **)(result + 56);
result = *v6;
if ( (_DWORD)result )
{
v7 = *((__int64 **)v6 + 2);
result = 8LL * (unsigned int)result - 8;
v8 = (char *)v7 + result;
if ( v7 <= (__int64 *)((char *)v7 + result) )
{
for ( result = *v7; *v7; result = *v7 )
{
result = (__int64)_dynamic_cast(
(const void *)result,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCRGBAProtocol,
-2);
if ( result )
result = (**(__int64 (__fastcall ***)(__int64, __int64))result)(result, a2);
if ( v8 < (char *)++v7 )
break;
}
}
}
}
}
return result;
}