//
// SelectListIconLayer::onSelect from 0x6d4c30 to 0x6d4cb8 (136 bytes)
//
// 1 xrefs:
// > SelectListIconLayer::init @ 0x6d54d0
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:57:05 +0000
//
unsigned int __fastcall SelectListIconLayer::onSelect(SelectListIconLayer *this, cocos2d::CCObject *a2, int a3)
{
unsigned int v4; // r4
unsigned int result; // r0
int v6; // r0
int v7; // r11
int v8; // r5
int v9; // r0
void (__fastcall *v10)(int, __int16 *); // r3
int v11; // r0
__int16 *v12; // r1
_DWORD v13[3]; // [sp+0h] [bp-Ch] BYREF
v13[0] = this;
v13[1] = a2;
v13[2] = a3;
if ( a2 )
*((_DWORD *)this + 131) = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2);
v4 = 0;
while ( 1 )
{
result = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 130));
if ( v4 >= result )
break;
v6 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 130), v4);
v7 = *((_DWORD *)this + 131);
++v4;
v8 = v6;
v9 = (*(int (__fastcall **)(int))(*(_DWORD *)v6 + 32))(v6);
v10 = *(void (__fastcall **)(int, __int16 *))(*(_DWORD *)v8 + 480);
if ( v7 == v9 )
{
v11 = v8;
v12 = &word_BEFF58;
}
else
{
memset(v13, 125, 3);
v11 = v8;
v12 = (__int16 *)v13;
}
v10(v11, v12);
}
return result;
}