//
// SetupCameraEdgePopup::onCameraEdge from 0x1405aaf40 to 0x1405ab069 (297 bytes)
//
// 5 xrefs:
// > SetupCameraEdgePopup::init @ 0x1405aa98c
// > SetupCameraEdgePopup::init @ 0x1405aaa85
// > SetupCameraEdgePopup::init @ 0x1405aab76
// > SetupCameraEdgePopup::init @ 0x1405aac6c
// > ??> @ 0x14092d710
//
// 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:40 +0000
//
unsigned int __fastcall SetupCameraEdgePopup::onCameraEdge(__int64 a1, __int64 a2)
{
int v3; // eax
cocos2d::CCArray *v4; // rcx
bool v5; // bl
struct cocos2d::CCObject *v6; // rax
bool v7; // bl
struct cocos2d::CCObject *v8; // rax
bool v9; // bl
struct cocos2d::CCObject *v10; // rax
bool v11; // bl
struct cocos2d::CCObject *v12; // rax
unsigned int result; // eax
__int64 v14; // rcx
cocos2d::CCArray *v15; // rcx
unsigned int v16; // ebx
struct cocos2d::CCObject *v17; // rax
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);
v4 = *(cocos2d::CCArray **)(a1 + 1016);
*(_DWORD *)(a1 + 1012) = v3;
v5 = v3 == 1;
v6 = cocos2d::CCArray::objectAtIndex(v4, 0);
CCMenuItemToggler::toggle((__int64)v6, v5);
v7 = *(_DWORD *)(a1 + 1012) == 2;
v8 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 1016), 1u);
CCMenuItemToggler::toggle((__int64)v8, v7);
v9 = *(_DWORD *)(a1 + 1012) == 3;
v10 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 1016), 2u);
CCMenuItemToggler::toggle((__int64)v10, v9);
v11 = *(_DWORD *)(a1 + 1012) == 4;
v12 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 1016), 3u);
result = CCMenuItemToggler::toggle((__int64)v12, v11);
v14 = *(_QWORD *)(a1 + 680);
if ( v14 )
{
result = *(_DWORD *)(a1 + 1012);
*(_DWORD *)(v14 + 1864) = result;
}
else
{
v15 = *(cocos2d::CCArray **)(a1 + 688);
if ( v15 )
{
v16 = 0;
result = cocos2d::CCArray::count(v15);
if ( result )
{
do
{
v17 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 688), v16++);
*((_DWORD *)v17 + 466) = *(_DWORD *)(a1 + 1012);
result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 688));
}
while ( v16 < result );
}
}
}
return result;
}