//
// SelectListIconLayer::onSelect from 0x10034d310 to 0x10034d3c4 (180 bytes)
//
// 1 xrefs:
// > SelectListIconLayer::init @ 0x10034d0cf
//
// 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:28:48 +0000
//
__int64 __fastcall SelectListIconLayer::onSelect(__int64 a1, __int64 a2)
{
__int64 v2; // rax
__int64 result; // rax
unsigned int v5; // r14d
__int64 v6; // rax
__int64 v7; // rdi
_DWORD *v8; // rsi
__int64 v9; // r13
int v10; // r15d
_DWORD v11[11]; // [rsp+0h] [rbp-2Ch] BYREF
v11[0] = HIDWORD(v2);
if ( a2 )
*(_DWORD *)(a1 + 672) = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
result = sub_1007FEF90(*(_QWORD *)(a1 + 664));
if ( (_DWORD)result )
{
v5 = 0;
do
{
v9 = sub_1007FEFE0(*(_QWORD *)(a1 + 664), v5);
v10 = *(_DWORD *)(a1 + 672);
if ( v10 == (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v9 + 64LL))(v9) )
{
v6 = *(_QWORD *)v9;
v7 = v9;
v8 = &unk_100A08258;
}
else
{
memset(v11, 125, 3);
v6 = *(_QWORD *)v9;
v7 = v9;
v8 = v11;
}
(*(void (__fastcall **)(__int64, _DWORD *))(v6 + 960))(v7, v8);
++v5;
result = sub_1007FEF90(*(_QWORD *)(a1 + 664));
}
while ( v5 < (unsigned int)result );
}
return result;
}