//
// StartPosBrowser::cellPerformedAction from 0x1003c4300 to 0x1003c440b (267 bytes)
//
// 2 xrefs:
// > sub_1003C4410 @ 0x1003c441c
// > ??> @ 0x100b392d8
//
// 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:29:34 +0000
//
__int64 __fastcall StartPosBrowser::cellPerformedAction(__int64 a1, __int64 a2, int a3, int a4)
{
unsigned int v4; // r14d
int v5; // ecx
int v7; // eax
__int64 v8; // rdx
__int64 v9; // rdi
int v10; // r15d
__int64 v11; // rcx
void (__fastcall ***v12)(_QWORD, __int64, _QWORD, __int64); // rdi
__int64 v13; // rax
__int64 v14; // rax
v5 = a3 ^ 0x18 | a4 ^ 1;
LOBYTE(v4) = v5 == 0;
if ( v5 )
return v4;
v7 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a2 + 552) + 64LL))(*(_QWORD *)(a2 + 552));
*(_DWORD *)(a1 + 696) = v7;
if ( v7 > 0 )
{
v9 = *(_QWORD *)(a1 + 680);
if ( v9 )
{
v10 = v7;
if ( v7 <= (unsigned int)sub_1007FEF90(v9) )
{
a2 = (unsigned int)(v10 - 1);
v11 = sub_1007FEFE0(*(_QWORD *)(a1 + 680), a2);
v12 = *(void (__fastcall ****)(_QWORD, __int64, _QWORD, __int64))(a1 + 712);
if ( !v12 )
goto LABEL_7;
goto LABEL_6;
}
}
}
v11 = 0;
v12 = *(void (__fastcall ****)(_QWORD, __int64, _QWORD, __int64))(a1 + 712);
if ( v12 )
{
LABEL_6:
a2 = a1;
(**v12)(v12, a1, *(unsigned int *)(a1 + 696), v11);
}
LABEL_7:
if ( *(_QWORD *)(a1 + 688) )
{
v13 = cocos2d::CCDirector::sharedDirector(v12, a2);
v14 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v13 + 160LL))(v13);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v14, *(_QWORD *)(a1 + 688));
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 688) + 536LL))(*(_QWORD *)(a1 + 688));
*(_QWORD *)(a1 + 688) = 0;
}
(*(void (__fastcall **)(__int64, _QWORD, __int64, __int64))(*(_QWORD *)a1 + 1072LL))(a1, 0, v8, v11);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 528LL))(a1, 1);
return v4;
}