//
// cocos2d::extension::CCControl::getHandleOfControlEvent from 0x10033d2f0 to 0x10033d336 (70 bytes)
//
// 0 xrefs:
//
// 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:42 +0000
//
__int64 __fastcall cocos2d::extension::CCControl::getHandleOfControlEvent(__int64 a1, int a2)
{
__int64 v2; // rdx
__int64 result; // rax
__int64 v4; // rdi
__int64 v5; // rcx
v2 = *(_QWORD *)(a1 + 456);
result = 0xFFFFFFFFLL;
if ( v2 )
{
v4 = a1 + 456;
v5 = v4;
do
{
if ( *(_DWORD *)(v2 + 28) >= a2 )
v5 = v2;
v2 = *(_QWORD *)(v2 + 8LL * (*(_DWORD *)(v2 + 28) < a2));
}
while ( v2 );
if ( v5 != v4 && *(_DWORD *)(v5 + 28) <= a2 )
return *(unsigned int *)(v5 + 32);
}
return result;
}