//
// sub_1003001F0 from 0x1003001f0 to 0x100300305 (277 bytes)
//
// 2 xrefs:
// > SetGroupIDLayer::init @ 0x1002fe4f3
// > SetGroupIDLayer::onArrow @ 0x1003017b0
//
// 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 12:28:32 +0000
//
void __fastcall sub_1003001F0(__int64 a1)
{
_QWORD *v1; // r13
__int64 v2; // rax
const char *CString; // r12
size_t v4; // rax
size_t v5; // r15
char *v6; // r13
void **v7; // r14
size_t v8; // r14
_WORD v9[8]; // [rsp+0h] [rbp-60h] BYREF
char v10; // [rsp+10h] [rbp-50h] BYREF
_QWORD *v11; // [rsp+18h] [rbp-48h]
_QWORD __dst[2]; // [rsp+20h] [rbp-40h] BYREF
char *v13; // [rsp+30h] [rbp-30h] BYREF
*(_BYTE *)(a1 + 797) = 1;
v1 = *(_QWORD **)(a1 + 736);
if ( !*(_DWORD *)(a1 + 792) )
{
v7 = (void **)&v10;
v9[0] = 0;
CCTextInputNode::setString(v1, (__int64)v9);
if ( (v9[0] & 1) == 0 )
goto LABEL_14;
goto LABEL_13;
}
v2 = sub_10088E820("%i", v9[0]);
CString = (const char *)cocos2d::CCString::getCString(v2);
v4 = strlen(CString);
if ( v4 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v5 = v4;
v11 = v1;
if ( v4 >= 0x17 )
{
v8 = 26;
if ( (v4 | 7) != 0x17 )
v8 = (v4 | 7) + 1;
v6 = (char *)operator new(v8);
v13 = v6;
__dst[0] = v8 + 1;
__dst[1] = v5;
goto LABEL_11;
}
LOBYTE(__dst[0]) = 2 * v4;
v6 = (char *)__dst + 1;
if ( v4 )
LABEL_11:
memmove(v6, CString, v5);
v7 = (void **)&v13;
v6[v5] = 0;
CCTextInputNode::setString(v11, (__int64)__dst);
if ( (__dst[0] & 1) != 0 )
LABEL_13:
operator delete(*v7);
LABEL_14:
*(_BYTE *)(a1 + 797) = 0;
}