//
// sub_10059E250 from 0x10059e250 to 0x10059e322 (210 bytes)
//
// 1 xrefs:
// > cocos2d::CCEGLViewProtocol::handleRightClick @ 0x10051183b
//
// 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:32:32 +0000
//
char __fastcall sub_10059E250(__int64 a1, float a2, float a3)
{
__int64 v3; // rax
unsigned int v4; // r12d
int v5; // r13d
char v6; // r14
__int64 v7; // r15
int v8; // eax
__int64 v9; // rax
__int64 Delegate; // rax
v3 = cocos2d::CCDirector::sharedDirector();
sub_1004794C0(v3);
*(_BYTE *)(a1 + 64) = 1;
if ( (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 56)) && (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 56)) )
{
v4 = 0;
v5 = -1;
v6 = 0;
do
{
v7 = *(_QWORD *)(a1 + 56);
v8 = sub_1007FEF90(v7);
v9 = sub_1007FEFE0(v7, (unsigned int)(v8 + v5));
if ( !v9 )
break;
if ( (v6 & 1) != 0 )
break;
Delegate = cocos2d::CCMouseHandler::getDelegate(v9);
v6 = (*(__int64 (__fastcall **)(__int64, float, float))(*(_QWORD *)Delegate + 24LL))(Delegate, a2, a3);
++v4;
--v5;
}
while ( v4 < (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 56)) );
}
*(_BYTE *)(a1 + 64) = 0;
sub_10059E0F0(a1);
return 1;
}