//
// SetFolderPopup::init from 0x1403a67b0 to 0x1403a6a3c (652 bytes)
//
// 2 xrefs:
// > SetFolderPopup::create @ 0x1403a6765
// > ??> @ 0x1409237f8
//
// 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:31:19 +0000
//
// Hidden C++ exception states: #wind=2
char __fastcall SetFolderPopup::init(__int64 a1, int a2, char a3, __int64 a4)
{
_QWORD *v8; // rax
__int64 v9; // rcx
__int64 v11; // rax
struct cocos2d::CCLabelBMFont *v12; // rax
__int64 *v13; // rdi
__int64 v14; // rbx
__int64 v15; // rax
struct cocos2d::CCSprite *v16; // rax
cocos2d::CCObject *v17; // rsi
__int64 v18; // rdi
__int64 v19; // rbx
__int64 v20; // rax
__int64 v21; // rax
float v22; // [rsp+60h] [rbp-B8h] BYREF
float v23; // [rsp+64h] [rbp-B4h]
__int128 *v24; // [rsp+68h] [rbp-B0h] BYREF
__int128 v25; // [rsp+70h] [rbp-A8h] BYREF
__int64 v26; // [rsp+80h] [rbp-98h]
__int64 v27; // [rsp+88h] [rbp-90h]
_BYTE v28[8]; // [rsp+90h] [rbp-88h] BYREF
_QWORD v29[5]; // [rsp+98h] [rbp-80h] BYREF
v29[4] = a4;
v24 = &v25;
v25 = 0;
v26 = 2;
v27 = 15;
strcpy((char *)&v25, "OK");
v8 = (_QWORD *)sub_14003F4F0((__int64)v29, a4);
if ( SetIDPopup::init(a1, a2, 0, 999, v8, &v25, 1, 0, 60.0, 0, 0) )
{
v11 = cocos2d::CCDirector::sharedDirector(v9);
cocos2d::CCDirector::getWinSize(v11, &v22);
*(_BYTE *)(a1 + 712) = a3;
v12 = cocos2d::CCLabelBMFont::create(" ", (const char *)&qword_140704F78);
*(_QWORD *)(a1 + 720) = v12;
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v12 + 160LL))(v12);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
*(_QWORD *)(a1 + 720),
1);
v13 = *(__int64 **)(a1 + 720);
v14 = *v13;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v24, v22 * 0.5, (float)((float)(v23 * 0.5) + 35.0) + 60.0);
(*(void (__fastcall **)(__int64 *, __int64))(v14 + 184))(v13, v15);
v16 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_optionsBtn_001.png");
LODWORD(v14) = (_DWORD)v16;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v16 + 160LL))(v16);
v17 = CCMenuItemSpriteExtra::create(v14, 0, a1, (__int64)SetFolderPopup::onSetFolderName);
*((_DWORD *)v17 + 93) = 1066192077;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v17);
v18 = *(_QWORD *)v17;
v19 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v24,
(float)(v22 * 0.5) + 90.0,
(float)((float)(v23 * 0.5) + 20.0) + 60.0);
cocos2d::CCNode::convertToNodeSpace(v19, v28, v20);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v18 + 184))(v17, v21);
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 1080LL))(a1);
sub_14003D310(a4);
return 1;
}
else
{
sub_14003D310(a4);
return 0;
}
}