//
// SetupObjectOptionsPopup::onSinglePlayerTouch from 0x140597510 to 0x1405975b3 (163 bytes)
//
// 4 xrefs:
// > SetupObjectOptionsPopup::init @ 0x14059560e
// > ??> @ 0x1408dde98
// > ??> @ 0x1408ddea8
// > ??> @ 0x14092d170
//
// 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 11:34:34 +0000
//
int __fastcall SetupObjectOptionsPopup::onSinglePlayerTouch(__int64 a1)
{
bool v2; // cl
__int64 v3; // rax
unsigned int v4; // ebx
struct cocos2d::CCObject *v5; // rax
v2 = *(_BYTE *)(a1 + 705) == 0;
v3 = *(_QWORD *)(a1 + 664);
*(_BYTE *)(a1 + 705) = v2;
if ( v3 )
{
if ( *(_DWORD *)(v3 + 1256) == 1 )
*(_BYTE *)(v3 + 1756) = v2;
}
else
{
v4 = 0;
for ( LODWORD(v3) = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 672));
v4 < (unsigned int)v3;
LODWORD(v3) = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 672)) )
{
v5 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 672), v4);
if ( *((_DWORD *)v5 + 314) == 1 )
*((_BYTE *)v5 + 1756) = *(_BYTE *)(a1 + 705);
++v4;
}
}
return v3;
}