//
// cocos2d::CCLabelBMFont::setColor from 0x1006ab380 to 0x1006ab438 (184 bytes)
//
// 2 xrefs:
// > ??> @ 0x100b6ab10
// > ??> @ 0x100b87070
//
// This function is hookable on this platform (idp: pc, 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 12:35:21 +0000
//
__int64 __fastcall cocos2d::CCLabelBMFont::setColor(__int64 a1, unsigned __int16 *a2)
{
__int64 result; // rax
const void *v4; // rdi
void *v5; // rax
void *v6; // rbx
__int64 v7; // rax
__int16 v8; // [rsp-1Ch] [rbp-1Ch] BYREF
char v9; // [rsp-1Ah] [rbp-1Ah]
*(_BYTE *)(a1 + 487) = *((_BYTE *)a2 + 2);
*(_WORD *)(a1 + 485) = *a2;
result = *a2;
*(_BYTE *)(a1 + 484) = *((_BYTE *)a2 + 2);
*(_WORD *)(a1 + 482) = result;
if ( *(_BYTE *)(a1 + 488) == 1 )
{
v9 = -1;
v8 = -1;
v4 = *(const void **)(a1 + 216);
if ( v4 )
{
v5 = __dynamic_cast(
v4,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCRGBAProtocol,
-2);
if ( v5 )
{
v6 = v5;
if ( (*(unsigned __int8 (__fastcall **)(void *))(*(_QWORD *)v5 + 64LL))(v5) )
{
v7 = (*(__int64 (__fastcall **)(void *))(*(_QWORD *)v6 + 16LL))(v6);
v8 = *(_WORD *)v7;
v9 = *(_BYTE *)(v7 + 2);
}
}
}
return (*(__int64 (__fastcall **)(__int64, __int16 *))(*(_QWORD *)a1 + 1080LL))(a1, &v8);
}
return result;
}