//
// StartPosLayer::onClose from 0xb68d18 to 0xb69030 (792 bytes)
//
// 2 xrefs:
// > ??> @ 0x88a08
// > ??> @ 0x14c64d8
//
// This function is hookable on this platform (idp: arm, 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 13:02:16 +0000
//
__int64 __fastcall StartPosLayer::onClose(cocos2d::CCDictionary **this, cocos2d::CCObject *a2)
{
CCTextInputNode *v4; // x0
__int64 v5; // x1
__int64 v6; // x20
char *v7; // x1
size_t v8; // x2
size_t v10; // x2
char *v11; // x1
char *v12; // x25
int v13; // w24
char *v14; // x0
unsigned __int64 v15; // x2
size_t v16; // x2
unsigned __int64 v17; // x0
unsigned __int64 v18; // x0
__int64 v19; // [xsp+50h] [xbp+50h] BYREF
unsigned __int64 v20; // [xsp+58h] [xbp+58h]
void *v21; // [xsp+60h] [xbp+60h]
__int64 v22; // [xsp+68h] [xbp+68h] BYREF
unsigned __int64 v23; // [xsp+70h] [xbp+70h]
void *v24; // [xsp+78h] [xbp+78h]
__int64 v25; // [xsp+80h] [xbp+80h] BYREF
size_t v26; // [xsp+88h] [xbp+88h]
void *v27; // [xsp+90h] [xbp+90h]
__int64 v28; // [xsp+98h] [xbp+98h] BYREF
unsigned __int64 v29; // [xsp+A0h] [xbp+A0h]
void *v30; // [xsp+A8h] [xbp+A8h]
__int64 v31; // [xsp+B0h] [xbp+B0h] BYREF
size_t v32; // [xsp+B8h] [xbp+B8h]
void *v33; // [xsp+C0h] [xbp+C0h]
v4 = (CCTextInputNode *)cocos2d::CCDictionary::objectForKey(*(this + 95), -16);
if ( !v4 )
goto LABEL_19;
CCTextInputNode::getString(v4, &v19);
if ( (v19 & 1) != 0 )
{
v10 = v20;
if ( v20 <= 0x14 )
{
v28 = 0;
v29 = 0;
v30 = nullptr;
goto LABEL_22;
}
v22 = 0;
v23 = 0;
v24 = nullptr;
v11 = (char *)v21;
LABEL_26:
std::string::__init(&v22, v11, 0x14u);
if ( (v19 & 1) == 0 )
goto LABEL_34;
*(_BYTE *)v21 = 0;
v20 = 0;
if ( (v19 & 1) != 0 )
{
v12 = (char *)v21;
v13 = 1;
v14 = (char *)&v19 + 1;
}
else
{
v17 = (unsigned __int8)v19 >> 1;
if ( v17 <= 0x16 )
goto LABEL_34;
v18 = (v17 + 16) & 0xFFFFFFFFFFFFFFF0LL;
if ( v18 == 23 )
goto LABEL_34;
v14 = (char *)operator new(v18);
v13 = v19 & 1;
if ( (v19 & 1) == 0 )
{
v12 = (char *)&v19 + 1;
v15 = (unsigned __int8)v19 >> 1;
goto LABEL_30;
}
v12 = (char *)v21;
}
v15 = v20;
LABEL_30:
v16 = v15 + 1;
if ( v16 )
memcpy(v14, v12, v16);
if ( v13 )
operator delete(v12);
LABEL_34:
v20 = v23;
v19 = v22;
v21 = v24;
v28 = 0;
v29 = 0;
v30 = nullptr;
v10 = v23;
if ( (v22 & 1) == 0 )
goto LABEL_4;
LABEL_22:
std::string::__init(&v28, v21, v10);
goto LABEL_5;
}
if ( (unsigned __int8)v19 > 0x29u )
{
v22 = 0;
v11 = (char *)&v19 + 1;
v23 = 0;
v24 = nullptr;
goto LABEL_26;
}
LABEL_4:
v28 = v19;
v29 = v20;
v30 = v21;
LABEL_5:
LevelTools::base64EncodeString((__int64)&v28, &v25);
if ( (v28 & 1) != 0 )
operator delete(v30);
v5 = (__int64)*(this + 127);
v31 = 0;
v32 = 0;
v33 = nullptr;
v6 = *(_QWORD *)(v5 + 1840);
if ( (v25 & 1) != 0 )
{
std::string::__init(&v31, v27, v26);
}
else
{
v31 = v25;
v32 = v26;
v33 = v27;
}
if ( (__int64 *)(v6 + 480) != &v31 )
{
if ( (v31 & 1) != 0 )
{
v7 = (char *)v33;
v8 = v32;
}
else
{
v8 = (unsigned __int8)v31 >> 1;
v7 = (char *)&v31 + 1;
}
std::string::assign((__int64 *)(v6 + 480), v7, v8);
}
if ( (v31 & 1) != 0 )
operator delete(v33);
if ( (v25 & 1) != 0 )
operator delete(v27);
if ( (v19 & 1) != 0 )
operator delete(v21);
LABEL_19:
SetupTriggerPopup::onClose(this, a2);
return _stack_chk_guard;
}