//
// SetupPulsePopup::updateTextInputLabel from 0xa461b4 to 0xa463a4 (496 bytes)
//
// 3 xrefs:
// > SetupPulsePopup::onSelectTargetMode @ 0xa46548
// > SetupPulsePopup::init @ 0xa49024
// > ??> @ 0xdf210
//
// 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 12:59:59 +0000
//
__int64 __fastcall SetupPulsePopup::updateTextInputLabel(SetupPulsePopup *this)
{
cocos2d::CCString *v2; // x0
char *CString; // x24
size_t v4; // x21
_QWORD *v5; // x25
char *v6; // x3
size_t v7; // x0
unsigned __int64 v8; // x0
GJSpecialColorSelect *v9; // x0
__int64 v10; // x21
char *v11; // x0
size_t v12; // x0
char *v14; // [xsp+58h] [xbp+58h]
unsigned __int64 v15; // [xsp+60h] [xbp+60h] BYREF
size_t v16; // [xsp+68h] [xbp+68h]
void *v17; // [xsp+70h] [xbp+70h]
*((_BYTE *)this + 744) = 1;
v2 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)*((unsigned int *)this + 317));
CString = (char *)cocos2d::CCString::getCString(v2);
if ( *((int *)this + 317) > 999 && *((_DWORD *)this + 324) != 1 )
{
v15 = 0;
v4 = 1;
v5 = *((_QWORD **)this + 150);
CString = "0";
v16 = 0;
v17 = nullptr;
v6 = (char *)&v15 + 1;
LOBYTE(v15) = 2;
LABEL_7:
v6 = (char *)memcpy(v6, CString, v4);
goto LABEL_8;
}
v15 = 0;
v16 = 0;
v17 = nullptr;
v7 = strlen(CString);
v4 = v7;
v5 = *((_QWORD **)this + 150);
if ( v7 > 0xFFFFFFFFFFFFFFEFLL )
sub_62DB7C();
if ( v7 > 0x16 )
{
v8 = (v7 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v15 = v8 | 1;
v6 = (char *)operator new(v8);
v17 = v6;
v16 = v4;
goto LABEL_7;
}
LOBYTE(v15) = 2 * v7;
v6 = (char *)&v15 + 1;
if ( v7 )
goto LABEL_7;
LABEL_8:
v6[v4] = 0;
CCTextInputNode::setString(v5, (char *)&v15);
if ( (v15 & 1) != 0 )
operator delete(v17);
v9 = (GJSpecialColorSelect *)*((unsigned int *)this + 317);
if ( (int)v9 > 999 && *((_DWORD *)this + 324) != 1 )
{
v10 = *((_QWORD *)this + 150);
v11 = GJSpecialColorSelect::textForColorIdx(v9);
v15 = 0;
v14 = v11;
v16 = 0;
v17 = nullptr;
v12 = strlen(v11);
std::string::__init((__int64 *)&v15, v14, v12);
CCTextInputNode::updateLabel(v10, (__int64)&v15);
if ( (v15 & 1) != 0 )
operator delete(v17);
}
*((_BYTE *)this + 744) = 0;
return _stack_chk_guard;
}