//
// sub_100275350 from 0x100275350 to 0x100275407 (183 bytes)
//
// 21 xrefs:
// > ??> @ 0x1008b1f88
// > ??> @ 0x1008b3480
// > ??> @ 0x1008b66d8
// > ??> @ 0x1008e11e0
// > ??> @ 0x1008ef210
// > ??> @ 0x1008ef758
// > ??> @ 0x10090cd30
// > ??> @ 0x100914f10
// > ??> @ 0x10092b4b0
// > ??> @ 0x10092b980
// > ??> @ 0x10092be68
// > ??> @ 0x10092c368
// > ??> @ 0x10092c868
// > ??> @ 0x10092cd68
// > ??> @ 0x10092d250
// > ??> @ 0x1009658d0
// > ??> @ 0x100965d78
// > ??> @ 0x10097ed98
// > ??> @ 0x100981a10
// > ??> @ 0x100981e98
// > ??> @ 0x10098e610
//
// 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
//
__int64 __fastcall sub_100275350(_BYTE *a1, int a2)
{
__int64 result; // rax
const void **v3; // r12
unsigned __int64 v4; // r13
result = (unsigned int)(int)((double)(a2 * (unsigned __int8)a1[9]) / 255.0);
a1[8] = result;
if ( a1[17] == 1 )
{
result = *((_QWORD *)a1 - 14);
if ( result )
{
result = *(_QWORD *)(result + 56);
if ( *(_DWORD *)result )
{
v3 = *(const void ***)(result + 16);
v4 = (unsigned __int64)&v3[*(unsigned int *)result - 1];
do
{
if ( !*v3 )
break;
result = (__int64)__dynamic_cast(
*v3,
(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, _QWORD))(*(_QWORD *)result + 104LL))(
result,
(unsigned __int8)a1[8]);
++v3;
}
while ( (unsigned __int64)v3 <= v4 );
}
}
}
return result;
}