//
// SetupObjectOptionsPopup::onReverse from 0x140597460 to 0x140597503 (163 bytes)
//
// 4 xrefs:
// > SetupObjectOptionsPopup::init @ 0x140596461
// > ??> @ 0x1408dde74
// > ??> @ 0x1408dde84
// > ??> @ 0x14092d14c
//
// 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::onReverse(__int64 a1)
{
bool v1; // zf
__int64 v3; // rax
unsigned int v4; // edi
struct cocos2d::CCObject *v5; // rax
v1 = *(_BYTE *)(a1 + 700) == 0;
*(_BYTE *)(a1 + 703) = 1;
v3 = *(_QWORD *)(a1 + 664);
*(_BYTE *)(a1 + 700) = v1;
if ( v3 )
{
if ( *(_DWORD *)(v3 + 1256) == 1 )
*(_BYTE *)(v3 + 1796) = v1;
}
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 + 1796) = *(_BYTE *)(a1 + 700);
++v4;
}
}
return v3;
}