//
// RenameThreadPopup::init from 0x74dbe4 to 0x74dfc4 (992 bytes)
//
// 1 xrefs:
// > RenameThreadPopup::create @ 0x74e060
//
// 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:58:48 +0000
//
GameManager *__fastcall RenameThreadPopup::init(RenameThreadPopup *this, GJMessageThread *a2, ThreadViewPopup *a3)
{
GameManager *v5; // r10
float v6; // s16
cocos2d::CCDirector *v7; // r0
float v8; // s16
float v9; // s17
const char *v10; // r1
int v11; // r6
int v12; // r7
void (__fastcall *v13)(int, _DWORD *); // r11
const char *v14; // r2
int v15; // r7
void (__fastcall *v16)(int, _DWORD *); // r11
int v17; // r7
void (__fastcall *v18)(int, _DWORD *); // r11
void (__fastcall *v19)(int, _DWORD *); // r3
void (__fastcall *v20)(int, _DWORD *); // r11
int InputNode; // r0
int v22; // r6
void (__fastcall *v23)(int, int); // r11
int v24; // r0
int v25; // r6
int v26; // r6
int v27; // r7
const char *v28; // r6
size_t v29; // r0
ButtonSprite *v30; // r0
int v31; // r5
const cocos2d::CCPoint *v32; // r7
void (__fastcall *v33)(int, _BYTE *); // r6
int v35; // [sp+0h] [bp-5Ch]
float v36; // [sp+10h] [bp-4Ch]
cocos2d::CCPoint *v37; // [sp+14h] [bp-48h]
float v38[2]; // [sp+18h] [bp-44h] BYREF
_BYTE v39[8]; // [sp+20h] [bp-3Ch] BYREF
_BYTE v40[8]; // [sp+28h] [bp-34h] BYREF
int v41; // [sp+30h] [bp-2Ch]
int v42; // [sp+34h] [bp-28h]
int v43; // [sp+38h] [bp-24h] BYREF
int v44; // [sp+3Ch] [bp-20h]
int v45; // [sp+40h] [bp-1Ch]
_DWORD v46[4]; // [sp+44h] [bp-18h] BYREF
if ( !a2 )
return nullptr;
*((_DWORD *)this + 180) = a3;
v6 = FLAlertLayer::keyboardRaise((FLAlertLayer *)0x430C0000, 60.0, *(float *)&a3);
v5 = SetupTriggerPopup::init(this, nullptr, nullptr, 300.0, 140.0, (_BYTE *)&dword_0 + 1, v6);
if ( !v5 )
return nullptr;
*((_DWORD *)this + 179) = a2;
v7 = (cocos2d::CCDirector *)cocos2d::CCObject::retain(a2);
cocos2d::CCDirector::sharedDirector(v7);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v38);
v43 = 0;
v44 = 0;
v45 = 0;
v8 = v6 + (float)(v38[1] * 0.5);
v9 = v38[0] * 0.5;
std::string::__init(&v43, "Rename Group Chat", 0x11u);
SetupTriggerPopup::addTitle((int)this, (unsigned __int8 *)&v43);
std::string::~string((int)&v43);
v11 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v10);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v11 + 80))(v11, 1061997773);
v41 = 684;
v42 = 1;
v12 = CCMenuItemSpriteExtra::create(v11, 0, (int)this, 684, 1);
CCMenuItemSpriteExtra::setSizeMult(v12, 1.5);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v12);
v13 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v12 + 92);
v37 = *((cocos2d::CCPoint **)this + 111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v40, (float)(v9 - 150.0) + 8.0, (float)(v8 + 70.0) - 12.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v46, v37);
v13(v12, v46);
v15 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Everyone sees this name", "chatFont.fnt", v14);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v15 + 484))(v15, 1);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v15 + 80))(v15, 1056964608);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v15 + 512))(v15, 160);
v16 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v15 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, v9, (float)(v8 + 70.0) - 38.0);
v16(v15, v46);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v15, 1);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v46, 0.0, 0.0, 40.0, 40.0);
v17 = cocos2d::extension::CCScale9Sprite::create("square02b_small.png", v46);
v18 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v17 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v46, 250.0, 26.0);
v18(v17, v46);
v19 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v17 + 480);
LOWORD(v46[0]) = 13405;
BYTE2(v46[0]) = 31;
v19(v17, v46);
v20 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v17 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, v9, v8 + 2.0);
v20(v17, v46);
(*(void (__fastcall **)(_DWORD, int, _DWORD))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v17, 0);
InputNode = GameToolbox::createInputNode(
(GameToolbox *)0x436E0000,
26.0,
COERCE_FLOAT("Group name"),
(const char *)&dword_14,
v35);
*((_DWORD *)this + 181) = InputNode;
v22 = InputNode;
v23 = *(void (__fastcall **)(int, int))(*(_DWORD *)InputNode + 92);
v24 = (*(int (__fastcall **)(int))(*(_DWORD *)v17 + 96))(v17);
v23(v22, v24);
v25 = *((_DWORD *)this + 181);
v43 = 0;
v44 = 0;
v45 = 0;
std::string::__init(
&v43,
" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,-!?:;)(/\\\"'`*=+-_%[]<>|@&^#{}%$~",
0x61u);
CCTextInputNode::setAllowedChars(v25, (unsigned __int8 *)&v43);
std::string::~string((int)&v43);
v26 = *((_DWORD *)this + 179);
v27 = *((_DWORD *)this + 181);
if ( (*(_BYTE *)(v26 + 72) & 1) != 0 )
v28 = *(const char **)(v26 + 80);
else
v28 = (const char *)(v26 + 73);
v43 = 0;
v44 = 0;
v45 = 0;
v29 = strlen(v28);
std::string::__init(&v43, v28, v29);
CCTextInputNode::setString(v27, (int)&v43);
std::string::~string((int)&v43);
*(_DWORD *)(*((_DWORD *)this + 181) + 420) = (char *)this + 440;
(*(void (__fastcall **)(_DWORD, _DWORD, int))(**((_DWORD **)this + 115) + 232))(
*((_DWORD *)this + 115),
*((_DWORD *)this + 181),
5);
v30 = ButtonSprite::create(
(ButtonSprite *)"Save",
(const char *)&dword_44 + 2,
0,
0.6,
1,
"bigFont.fnt",
"GJ_button_01.png",
(const char *)0x41E00000,
v36);
v46[0] = RenameThreadPopup::onSave;
v46[1] = 0;
v31 = CCMenuItemSpriteExtra::create((int)v30, 0, (int)this, (int)RenameThreadPopup::onSave, 0);
CCMenuItemSpriteExtra::setSizeMult(v31, 1.1);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v31);
v32 = *((const cocos2d::CCPoint **)this + 111);
v33 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v31 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v39, v9, (float)(v8 - 70.0) + 22.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v40, v32);
v33(v31, v40);
return v5;
}