//
// CreateStartPosPopup::onCreate from 0x491c9c to 0x491e6c (464 bytes)
//
// 0 xrefs:
//
// 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:49:38 +0000
//
int __fastcall CreateStartPosPopup::onCreate(cocos2d::CCDictionary **this, cocos2d::CCObject *a2)
{
GameManager *v3; // r0
int v4; // r0
unsigned int v5; // r1
char *v6; // r2
char *v7; // r1
int v8; // r0
unsigned int v9; // r1
char *v10; // r2
int v11; // r0
unsigned int v12; // r1
char *v13; // r2
int v14; // r0
StartPosObject *LiveStartPosObject; // r8
int v16; // r9
GameManager *v17; // r0
int v18; // r0
char *v19; // r1
size_t v20; // r2
int v22; // [sp+4h] [bp-50h] BYREF
unsigned int v23; // [sp+8h] [bp-4Ch]
char *v24; // [sp+Ch] [bp-48h]
int v25; // [sp+10h] [bp-44h] BYREF
unsigned int v26; // [sp+14h] [bp-40h]
char *v27; // [sp+18h] [bp-3Ch]
int v28; // [sp+1Ch] [bp-38h] BYREF
int v29; // [sp+20h] [bp-34h]
int v30; // [sp+24h] [bp-30h]
int v31[3]; // [sp+28h] [bp-2Ch] BYREF
int v32; // [sp+34h] [bp-20h] BYREF
unsigned int v33; // [sp+38h] [bp-1Ch]
char *v34; // [sp+3Ch] [bp-18h]
int v35[3]; // [sp+40h] [bp-14h] BYREF
v22 = 0;
v23 = 0;
v24 = nullptr;
std::string::__init(&v22, &unk_B6B226, 0);
v3 = (GameManager *)cocos2d::CCDictionary::objectForKey(*(this + 144), -1);
if ( !v3 )
goto LABEL_18;
CCTextInputNode::getString((CCTextInputNode *)&v25, (int)v3);
if ( (v22 & 1) != 0 )
{
*v24 = 0;
v23 = 0;
}
else
{
LOWORD(v22) = 0;
}
std::string::reserve(&v22, 0);
v4 = v25;
v5 = v26;
v6 = v27;
v25 = 0;
v26 = 0;
v27 = nullptr;
v22 = v4;
v23 = v5;
v24 = v6;
std::string::~string((int)&v25);
if ( (v22 & 1) != 0 )
{
if ( v23 <= 0x14 )
goto LABEL_14;
v28 = 0;
v29 = 0;
v30 = 0;
v7 = v24;
LABEL_10:
std::string::__init(&v28, v7, 0x14u);
if ( (v22 & 1) != 0 )
{
*v24 = 0;
v23 = 0;
}
else
{
LOWORD(v22) = 0;
}
std::string::reserve(&v22, 0);
v8 = v28;
v9 = v29;
v10 = (char *)v30;
v28 = 0;
v29 = 0;
v30 = 0;
v22 = v8;
v23 = v9;
v24 = v10;
std::string::~string((int)&v28);
goto LABEL_14;
}
if ( (unsigned __int8)v22 > 0x29u )
{
v7 = (char *)&v22 + 1;
v28 = v22 & 1;
v29 = v28;
v30 = v28;
goto LABEL_10;
}
LABEL_14:
std::string::basic_string(v31, (int)&v22);
LevelTools::base64EncodeString(&v32, v31);
if ( (v22 & 1) != 0 )
{
*v24 = 0;
v23 = 0;
}
else
{
LOWORD(v22) = 0;
}
std::string::reserve(&v22, 0);
v11 = v32;
v12 = v33;
v13 = v34;
v32 = 0;
v33 = 0;
v34 = nullptr;
v22 = v11;
v23 = v12;
v24 = v13;
std::string::~string((int)&v32);
v3 = (GameManager *)std::string::~string((int)v31);
LABEL_18:
v14 = GameManager::sharedState(v3);
LiveStartPosObject = (StartPosObject *)GJBaseGameLayer::createLiveStartPosObject(*(GJBaseGameLayer **)(v14 + 404));
v16 = *((_DWORD *)LiveStartPosObject + 412);
std::string::basic_string(v35, (int)&v22);
if ( (int *)(v16 + 400) != v35 )
{
if ( (v35[0] & 1) != 0 )
{
v19 = (char *)v35[2];
v20 = v35[1];
}
else
{
v20 = (int)LOBYTE(v35[0]) >> 1;
v19 = (char *)v35 + 1;
}
std::string::assign((_DWORD *)(v16 + 400), v19, v20);
}
v17 = (GameManager *)std::string::~string((int)v35);
v18 = GameManager::sharedState(v17);
PlayLayer::addLiveStartPosObject(*(PlayLayer **)(v18 + 404), LiveStartPosObject);
(*((void (__fastcall **)(cocos2d::CCDictionary **, _DWORD))*this + 171))(this, 0);
return std::string::~string((int)&v22);
}