//
// BrowseSmartTemplateLayer::baseSetup from 0x6728d8 to 0x672b52 (634 bytes)
//
// 2 xrefs:
// > BrowseSmartKeyLayer::init @ 0x674c14
// > BrowseSmartTemplateLayer::init @ 0x675404
//
// 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:55:53 +0000
//
int __fastcall BrowseSmartTemplateLayer::baseSetup(const cocos2d::CCPoint **this)
{
cocos2d::CCObject *v2; // r0
cocos2d::CCDirector *v3; // r0
int v4; // r6
void (__fastcall *v5)(int, _DWORD *); // r7
int (__fastcall *v6)(int, _DWORD *); // r7
cocos2d::CCMenu *v7; // r0
const cocos2d::CCPoint *v8; // r0
const char *v9; // r1
int v10; // r6
int v11; // r7
const cocos2d::CCPoint *v12; // r11
void (__fastcall *v13)(int, _DWORD *); // r9
float v14; // s16
const char *v15; // r1
int v16; // r0
int v17; // r0
const char *v18; // r1
cocos2d::CCSprite *v19; // r5
int v20; // r0
int v21; // r5
const cocos2d::CCPoint *v22; // r10
void (__fastcall *v23)(int, _BYTE *); // r7
void (__fastcall *v25)(int, _DWORD *); // [sp+Ch] [bp-50h]
cocos2d::CCPoint *v26; // [sp+10h] [bp-4Ch]
int v27; // [sp+14h] [bp-48h]
float v28; // [sp+1Ch] [bp-40h] BYREF
float v29; // [sp+20h] [bp-3Ch]
char v30[8]; // [sp+24h] [bp-38h] BYREF
_BYTE v31[8]; // [sp+2Ch] [bp-30h] BYREF
int v32; // [sp+34h] [bp-28h]
int v33; // [sp+38h] [bp-24h]
_DWORD v34[2]; // [sp+3Ch] [bp-20h] BYREF
_DWORD v35[4]; // [sp+44h] [bp-18h] BYREF
v2 = (cocos2d::CCObject *)cocos2d::CCArray::create((cocos2d::CCArray *)this);
*(this + 131) = v2;
v3 = (cocos2d::CCDirector *)cocos2d::CCObject::retain(v2);
*((_BYTE *)this + 468) = 1;
cocos2d::CCDirector::sharedDirector(v3);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v28);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v35, 0.0, 0.0, 80.0, 80.0);
v4 = cocos2d::extension::CCScale9Sprite::create("GJ_square02.png", v35);
v5 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v4 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v35, 450.0, 280.0);
v5(v4, v35);
(*(void (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 115) + 232))(*(this + 115), v4, -2);
v6 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v4 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v35, v28 * 0.5, v29 * 0.5);
v7 = (cocos2d::CCMenu *)v6(v4, v35);
v8 = (const cocos2d::CCPoint *)cocos2d::CCMenu::create(v7);
*(this + 111) = v8;
(*(void (__fastcall **)(_DWORD, const cocos2d::CCPoint *, int))(*(_DWORD *)*(this + 115) + 232))(
*(this + 115),
v8,
10);
v10 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v9);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v10 + 80))(v10, 1060320051);
v32 = 672;
v33 = 1;
v11 = CCMenuItemSpriteExtra::create(v10, 0, (int)this, 672, 1);
CCMenuItemSpriteExtra::setSizeMult(v11, 1.6);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v11);
v12 = *(this + 111);
v13 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v11 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v34,
(float)((float)(v28 * 0.5) - 225.0) + 6.0,
(float)((float)(v29 * 0.5) + 140.0) - 6.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v35, v12);
v13(v11, v35);
v14 = v29 * 0.5;
v16 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_03_001.png", v15);
v34[0] = BrowseSmartTemplateLayer::onClick;
v34[1] = 0;
v17 = CCMenuItemSpriteExtra::create(v16, 0, (int)this, (int)BrowseSmartTemplateLayer::onClick, 0);
*(this + 134) = (const cocos2d::CCPoint *)v17;
CCMenuItemSpriteExtra::setSizeMult(v17, 2.0);
(*(void (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), *(this + 134));
v27 = (int)*(this + 134);
v25 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v27 + 92);
v26 = *(this + 111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v31, 25.0, v14);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v35, v26);
v25(v27, v35);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 134) + 36))(*(this + 134), 1);
v19 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_arrow_03_001.png",
v18);
cocos2d::CCSprite::setFlipX(v19, 1);
v35[0] = BrowseSmartTemplateLayer::onClick;
v35[1] = 0;
v20 = CCMenuItemSpriteExtra::create((int)v19, 0, (int)this, (int)BrowseSmartTemplateLayer::onClick, 0);
*(this + 133) = (const cocos2d::CCPoint *)v20;
CCMenuItemSpriteExtra::setSizeMult(v20, 2.0);
(*(void (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), *(this + 133));
v21 = (int)*(this + 133);
v22 = *(this + 111);
v23 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v21 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v30, v28 - 25.0, v14);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v31, v22);
v23(v21, v31);
return (*(int (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 133) + 36))(*(this + 133), 2);
}