//
// SelectListIconLayer::onSelect from 0x140431b50 to 0x140431c09 (185 bytes)
//
// 4 xrefs:
// > SelectListIconLayer::init @ 0x1404316f3
// > ??> @ 0x1408ca4c4
// > ??> @ 0x1408ca4d4
// > ??> @ 0x140926ccc
//
// 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 11:32:15 +0000
//
unsigned int __fastcall SelectListIconLayer::onSelect(__int64 a1, __int64 a2)
{
unsigned int v3; // ebx
unsigned int result; // eax
struct cocos2d::CCObject *v5; // rdi
int v6; // eax
void (__fastcall *v7)(char *, __int16 *); // r8
__int16 *v8; // rdx
_BYTE v9[3]; // [rsp+30h] [rbp+8h] BYREF
if ( a2 )
*(_DWORD *)(a1 + 672) = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);
v3 = 0;
result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 664));
if ( result )
{
do
{
v5 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 664), v3);
v6 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v5 + 56LL))(v5);
v7 = **((void (__fastcall ***)(char *, __int16 *))v5 + 40);
if ( *(_DWORD *)(a1 + 672) == v6 )
{
v8 = &word_140703BB8;
}
else
{
memset(v9, 125, sizeof(v9));
v8 = (__int16 *)v9;
}
v7((char *)v5 + 320, v8);
++v3;
result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 664));
}
while ( v3 < result );
}
return result;
}