//
// cocos2d::extension::CCControl::addHandleOfControlEvent from 0x180004630 to 0x180004725 (245 bytes)
//
// 2 xrefs:
// > ??> @ 0x180032408
// > ??> @ 0x18004b414
//
// 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:15:35 +0000
//
// Hidden C++ exception states: #wind=1
void __fastcall cocos2d::extension::CCControl::addHandleOfControlEvent(
cocos2d::extension::CCControl *this,
int a2,
int a3)
{
char *v5; // rdi
__int64 v6; // rsi
__int64 v7; // rax
__int64 i; // rcx
__int64 v9; // rax
__int128 v10; // [rsp+20h] [rbp-38h] BYREF
__int128 v11; // [rsp+30h] [rbp-28h]
v5 = (char *)this + 456;
v6 = *((_QWORD *)this + 57);
v7 = *(_QWORD *)(v6 + 8);
*(_QWORD *)&v11 = v7;
DWORD2(v11) = 0;
for ( i = v6; !*(_BYTE *)(v7 + 25); v7 = *(_QWORD *)v7 )
{
*(_QWORD *)&v11 = v7;
if ( *(_DWORD *)(v7 + 28) >= a3 )
{
DWORD2(v11) = 1;
i = v7;
}
else
{
DWORD2(v11) = 0;
v7 += 16;
}
}
if ( *(_BYTE *)(i + 25) || a3 < *(_DWORD *)(i + 28) )
{
if ( *((_QWORD *)v5 + 1) == 0x666666666666666LL )
sub_180004F70();
v9 = sub_18001F040(0x28u);
*(_DWORD *)(v9 + 28) = a3;
*(_DWORD *)(v9 + 32) = 0;
*(_QWORD *)v9 = v6;
*(_QWORD *)(v9 + 8) = v6;
*(_QWORD *)(v9 + 16) = v6;
*(_WORD *)(v9 + 24) = 0;
v10 = v11;
i = sub_1800047F0(v5, &v10, v9);
}
*(_DWORD *)(i + 32) = a2;
}