//
// sub_1002617A0 from 0x1002617a0 to 0x10026182f (143 bytes)
//
// 16 xrefs:
// > ??> @ 0x100ab6a30
// > ??> @ 0x100ab9d48
// > ??> @ 0x100af0028
// > ??> @ 0x100af56a0
// > ??> @ 0x100af5bf8
// > ??> @ 0x100b146f0
// > ??> @ 0x100b33c48
// > ??> @ 0x100b34128
// > ??> @ 0x100b34620
// > ??> @ 0x100b34b30
// > ??> @ 0x100b35040
// > ??> @ 0x100b35550
// > ??> @ 0x100b35a48
// > ??> @ 0x100b72e20
// > ??> @ 0x100b7fc50
// > ??> @ 0x100b95530
//
// 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:27:31 +0000
//
__int64 __fastcall sub_1002617A0(_BYTE *a1, char a2)
{
__int64 result; // rax
const void *v3; // rax
_BYTE *v4; // rdi
unsigned __int8 v5; // bl
void *v6; // rax
void *v7; // r14
a1[9] = a2;
a1[8] = a2;
if ( a1[17] == 1 )
{
v3 = *((const void **)a1 - 13);
v4 = a1 - 320;
v5 = -1;
if ( v3 )
{
v6 = __dynamic_cast(
v3,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCRGBAProtocol,
-2);
if ( v6 )
{
v7 = v6;
if ( (*(unsigned __int8 (__fastcall **)(void *))(*(_QWORD *)v6 + 88LL))(v6) )
v5 = (*(__int64 (__fastcall **)(void *))(*(_QWORD *)v7 + 24LL))(v7);
}
}
return (*(__int64 (__fastcall **)(_BYTE *, _QWORD))(*(_QWORD *)v4 + 920LL))(v4, v5);
}
return result;
}