//
// cocos2d::CCMenu::initWithArray from 0x7dcbcc to 0x7dccf6 (298 bytes)
//
// 2 xrefs:
// > cocos2d::CCMenu::createWithArray @ 0x7dcd54
// > cocos2d::CCMenu::init @ 0x7dcde8
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:00:45 +0000
//
int __fastcall cocos2d::CCMenu::initWithArray(cocos2d::CCMenu *this, cocos2d::CCArray *a2)
{
int v4; // r8
cocos2d::CCDirector *v5; // r0
int v6; // r0
void (__fastcall *v7)(cocos2d::CCMenu *, float *); // r10
void (__fastcall *v8)(cocos2d::CCMenu *, float *); // r9
_DWORD *v9; // r2
int *v10; // r7
int v11; // r9
int *v12; // r5
int v13; // r1
int v14; // t1
int v15; // r2
float v17[2]; // [sp+4h] [bp-14h] BYREF
float v18[2]; // [sp+Ch] [bp-Ch] BYREF
v4 = cocos2d::CCLayer::init(this);
if ( v4 )
{
(*(void (__fastcall **)(cocos2d::CCMenu *, int))(*(_DWORD *)this + 512))(this, -128);
(*(void (__fastcall **)(cocos2d::CCMenu *, int))(*(_DWORD *)this + 504))(this, 1);
v5 = (cocos2d::CCDirector *)(*(int (__fastcall **)(cocos2d::CCMenu *, int))(*(_DWORD *)this + 500))(this, 1);
*((_BYTE *)this + 330) = 1;
v6 = cocos2d::CCDirector::sharedDirector(v5);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v17, v6);
(*(void (__fastcall **)(cocos2d::CCMenu *, int))(*(_DWORD *)this + 220))(this, 1);
v7 = *(void (__fastcall **)(cocos2d::CCMenu *, float *))(*(_DWORD *)this + 148);
cocos2d::CCPoint::CCPoint(v18, 0.5, 0.5);
v7(this, v18);
(*(void (__fastcall **)(cocos2d::CCMenu *, float *))(*(_DWORD *)this + 160))(this, v17);
v8 = *(void (__fastcall **)(cocos2d::CCMenu *, float *))(*(_DWORD *)this + 92);
cocos2d::CCPoint::CCPoint(v18, v17[0] * 0.5, v17[1] * 0.5);
v8(this, v18);
if ( a2 )
{
v9 = *((_DWORD **)a2 + 13);
if ( *v9 )
{
v10 = (int *)v9[3];
v11 = 0;
v12 = &v10[*v9 - 1];
while ( v10 <= v12 )
{
v14 = *v10++;
v13 = v14;
if ( !v14 )
break;
v15 = v11++;
(*(void (__fastcall **)(cocos2d::CCMenu *, int, int))(*(_DWORD *)this + 232))(this, v13, v15);
}
}
}
*((_DWORD *)this + 84) = 0;
*((_DWORD *)this + 83) = 0;
(*(void (__fastcall **)(cocos2d::CCMenu *, int))(*(_DWORD *)this + 620))(this, 1);
(*(void (__fastcall **)(cocos2d::CCMenu *, int))(*(_DWORD *)this + 596))(this, 1);
}
return v4;
}