//
// sub_564E44 from 0x564e44 to 0x565438 (1524 bytes)
//
// 1 xrefs:
// > LevelFeatureLayer::init @ 0x565472
//
// 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 11:52:27 +0000
//
int __fastcall sub_564E44(int a1, int a2)
{
int v3; // r7
void (__fastcall *v4)(int, _DWORD *); // r8
void (__fastcall *v5)(int, _DWORD *); // r8
const char *v6; // r2
int v7; // r7
void (__fastcall *v8)(int, _DWORD *); // r8
cocos2d::CCMenu *v9; // r0
int v10; // r0
cocos2d::CCArray *v11; // r0
cocos2d::CCArray *v12; // r11
const char *v13; // r1
ButtonSprite *v14; // r0
cocos2d::CCObject *v15; // r7
const char *v16; // r1
ButtonSprite *v17; // r0
cocos2d::CCObject *v18; // r7
const char *v19; // r1
ButtonSprite *v20; // r11
int v21; // r9
int v22; // r11
const char *v23; // r2
int v24; // r0
const char *v25; // r1
int v26; // r0
int v27; // r9
void (__fastcall *v28)(int, _DWORD *); // r11
const char *v29; // r1
int v30; // r0
int v31; // r8
const cocos2d::CCPoint *v32; // r9
void (__fastcall *v33)(int, _DWORD *); // r11
const char *v34; // r1
int v35; // r0
int v36; // r9
void (__fastcall *v37)(int, _DWORD *); // r11
const char *v38; // r1
int v39; // r0
int v40; // r7
const cocos2d::CCPoint *v41; // r9
void (__fastcall *v42)(int, _DWORD *); // r11
const char *v43; // r1
int v44; // r0
int v45; // r8
const cocos2d::CCPoint *v46; // r9
void (__fastcall *v47)(int, _DWORD *); // r11
const char *v48; // r1
int v49; // r0
int v50; // r6
const cocos2d::CCPoint *v51; // r11
void (__fastcall *v52)(int, _BYTE *); // r10
int v53; // r0
void (__fastcall *v54)(int, _BYTE *); // r2
cocos2d::CCPoint *v56; // [sp+Ch] [bp-80h]
cocos2d::CCPoint *v57; // [sp+Ch] [bp-80h]
cocos2d::CCPoint *v58; // [sp+Ch] [bp-80h]
cocos2d::CCPoint *v59; // [sp+Ch] [bp-80h]
float v60; // [sp+14h] [bp-78h] BYREF
float v61; // [sp+18h] [bp-74h]
float v62; // [sp+1Ch] [bp-70h] BYREF
float v63; // [sp+20h] [bp-6Ch]
_BYTE v64[8]; // [sp+24h] [bp-68h] BYREF
_BYTE v65[8]; // [sp+2Ch] [bp-60h] BYREF
_DWORD v66[2]; // [sp+34h] [bp-58h] BYREF
_DWORD v67[2]; // [sp+3Ch] [bp-50h] BYREF
_DWORD v68[2]; // [sp+44h] [bp-48h] BYREF
_DWORD v69[2]; // [sp+4Ch] [bp-40h] BYREF
_DWORD v70[2]; // [sp+54h] [bp-38h] BYREF
_DWORD v71[2]; // [sp+5Ch] [bp-30h] BYREF
_DWORD v72[4]; // [sp+64h] [bp-28h] BYREF
_DWORD v73[4]; // [sp+74h] [bp-18h] BYREF
*(_DWORD *)(a1 + 524) = a2;
*(_DWORD *)(a1 + 528) = 25103;
cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)a1);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v60);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v73, 0.0, 0.0, 80.0, 80.0);
v3 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v73);
v4 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v3 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v73, 360.0, 180.0);
v4(v3, v73);
(*(void (__fastcall **)(_DWORD, int, int))(**(_DWORD **)(a1 + 460) + 232))(*(_DWORD *)(a1 + 460), v3, -1);
v5 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v3 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v73, v60 * 0.5, v61 * 0.5);
v5(v3, v73);
v7 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Set Featured", "bigFont.fnt", v6);
v8 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v7 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v73, v60 * 0.5, (float)((float)(v61 * 0.5) + 90.0) - 20.0);
v8(v7, v73);
v9 = (cocos2d::CCMenu *)(*(int (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 460) + 228))(
*(_DWORD *)(a1 + 460),
v7);
v10 = cocos2d::CCMenu::create(v9);
*(_DWORD *)(a1 + 444) = v10;
v11 = (cocos2d::CCArray *)(*(int (__fastcall **)(_DWORD, int, int))(**(_DWORD **)(a1 + 460) + 232))(
*(_DWORD *)(a1 + 460),
v10,
10);
v12 = (cocos2d::CCArray *)cocos2d::CCArray::create(v11);
v14 = ButtonSprite::create((ButtonSprite *)"Cancel", v13);
v73[1] = 0;
v73[0] = LevelFeatureLayer::onClose;
v15 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create((int)v14, 0, a1, (int)LevelFeatureLayer::onClose, 0);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**(_DWORD **)(a1 + 444) + 228))(*(_DWORD *)(a1 + 444), v15);
cocos2d::CCArray::addObject(v12, v15);
v17 = ButtonSprite::create((ButtonSprite *)"Submit", v16);
v72[3] = 0;
v72[2] = LevelFeatureLayer::onSetFeatured;
v18 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create((int)v17, 0, a1, (int)LevelFeatureLayer::onSetFeatured, 0);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**(_DWORD **)(a1 + 444) + 228))(*(_DWORD *)(a1 + 444), v18);
cocos2d::CCArray::addObject(v12, v18);
v56 = *(cocos2d::CCPoint **)(a1 + 444);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v71, v60 * 0.5, (float)((float)(v61 * 0.5) - 90.0) + 25.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v72, v56);
GameToolbox::alignItemsHorisontally(*(float *)&v12, 15.0, (int)v72, 0);
v20 = ButtonSprite::create((ButtonSprite *)"Epic\nOnly", v19);
(*(void (__fastcall **)(ButtonSprite *, int))(*(_DWORD *)v20 + 80))(v20, 1053609165);
v72[1] = 0;
v72[0] = LevelFeatureLayer::onSetEpicOnly;
v21 = CCMenuItemSpriteExtra::create((int)v20, 0, a1, (int)LevelFeatureLayer::onSetEpicOnly, 0);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 444) + 228))(*(_DWORD *)(a1 + 444), v21);
v57 = *(cocos2d::CCPoint **)(*(_DWORD *)v21 + 92);
v22 = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)v18 + 96))(v18);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v70, 90.0, 0.0);
cocos2d::CCPoint::operator+(v71, v22, v70);
((void (__fastcall *)(int, _DWORD *))v57)(v21, v71);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v62, v60 * 0.5, v61 * 0.5);
v24 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"0", "bigFont.fnt", v23);
*(_DWORD *)(a1 + 520) = v24;
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 460) + 228))(*(_DWORD *)(a1 + 460), v24);
(*(void (__fastcall **)(_DWORD, float *))(**(_DWORD **)(a1 + 520) + 92))(*(_DWORD *)(a1 + 520), &v62);
v26 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_02_001.png", v25);
v71[1] = 0;
v71[0] = LevelFeatureLayer::onDown;
v27 = CCMenuItemSpriteExtra::create(v26, 0, a1, (int)LevelFeatureLayer::onDown, 0);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 444) + 228))(*(_DWORD *)(a1 + 444), v27);
v28 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v27 + 92);
v58 = *(cocos2d::CCPoint **)(a1 + 444);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v69, v62 - 100.0, v63);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v70, v58);
v28(v27, v70);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v27 + 180))(v27, -1028390912);
CCMenuItemSpriteExtra::setSizeMult(v27, 1.5);
v30 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_02_001.png", v29);
v70[1] = 0;
v70[0] = LevelFeatureLayer::onUp;
v31 = CCMenuItemSpriteExtra::create(v30, 0, a1, (int)LevelFeatureLayer::onUp, 0);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 444) + 228))(*(_DWORD *)(a1 + 444), v31);
v32 = *(const cocos2d::CCPoint **)(a1 + 444);
v33 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v31 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v68, v62 + 100.0, v63);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v69, v32);
v33(v31, v69);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v31 + 180))(v31, 1119092736);
CCMenuItemSpriteExtra::setSizeMult(v31, 1.5);
v35 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_01_001.png", v34);
v69[1] = 0;
v69[0] = LevelFeatureLayer::onDown2;
v36 = CCMenuItemSpriteExtra::create(v35, 0, a1, (int)LevelFeatureLayer::onDown2, 0);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 444) + 228))(*(_DWORD *)(a1 + 444), v36);
v37 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v36 + 92);
v59 = *(cocos2d::CCPoint **)(a1 + 444);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v67, v62 - 150.0, v63);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v68, v59);
v37(v36, v68);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v36 + 180))(v36, -1028390912);
CCMenuItemSpriteExtra::setSizeMult(v36, 1.5);
v39 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_01_001.png", v38);
v68[1] = 0;
v68[0] = LevelFeatureLayer::onUp2;
v40 = CCMenuItemSpriteExtra::create(v39, 0, a1, (int)LevelFeatureLayer::onUp2, 0);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 444) + 228))(*(_DWORD *)(a1 + 444), v40);
v41 = *(const cocos2d::CCPoint **)(a1 + 444);
v42 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v40 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v66, v62 + 150.0, v63);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v67, v41);
v42(v40, v67);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v40 + 180))(v40, 1119092736);
CCMenuItemSpriteExtra::setSizeMult(v40, 1.5);
LevelFeatureLayer::updateStars((LevelFeatureLayer *)a1);
v44 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_deleteBtn_001.png", v43);
v67[1] = 0;
v67[0] = LevelFeatureLayer::onRemoveValues;
v45 = CCMenuItemSpriteExtra::create(v44, 0, a1, (int)LevelFeatureLayer::onRemoveValues, 0);
CCMenuItemSpriteExtra::setSizeMult(v45, 1.6);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 444) + 228))(*(_DWORD *)(a1 + 444), v45);
v46 = *(const cocos2d::CCPoint **)(a1 + 444);
v47 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v45 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v65, (float)(v60 * 0.5) + 180.0, (float)(v61 * 0.5) + 90.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v66, v46);
v47(v45, v66);
v49 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_epicCoin_001.png", v48);
*(_DWORD *)(a1 + 536) = v49;
v66[1] = 0;
v66[0] = LevelFeatureLayer::onToggleEpic;
v50 = CCMenuItemSpriteExtra::create(v49, 0, a1, (int)LevelFeatureLayer::onToggleEpic, 0);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 444) + 228))(*(_DWORD *)(a1 + 444), v50);
v51 = *(const cocos2d::CCPoint **)(a1 + 444);
v52 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v50 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v64, (float)(v60 * 0.5) - 180.0, (float)(v61 * 0.5) + 90.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v65, v51);
v52(v50, v65);
v53 = *(_DWORD *)(a1 + 536);
*(_BYTE *)(a1 + 532) = 0;
v54 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v53 + 480);
memset(v65, 50, 3);
v54(v53, v65);
return 1;
}