//
// sub_1006B98F0 from 0x1006b98f0 to 0x1006b9a1a (298 bytes)
//
// 1 xrefs:
// > SetupRandTriggerPopup::init @ 0x1006b923b
//
// 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:35:29 +0000
//
void __fastcall sub_1006B98F0(__int64 a1)
{
__int64 v1; // rax
const char *CString; // r15
size_t v3; // rax
size_t v4; // r14
char *v5; // r12
size_t v6; // r13
_QWORD *v7; // r14
char v8; // r12
__int128 v9; // [rsp+0h] [rbp-60h] BYREF
void *__p; // [rsp+10h] [rbp-50h]
__int128 __dst; // [rsp+20h] [rbp-40h] BYREF
void *v12; // [rsp+30h] [rbp-30h]
*(_BYTE *)(a1 + 744) = 1;
v1 = sub_10088E820("%i", v9);
CString = (const char *)cocos2d::CCString::getCString(v1);
v3 = strlen(CString);
if ( v3 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v4 = v3;
if ( v3 >= 0x17 )
{
v6 = 26;
if ( (v3 | 7) != 0x17 )
v6 = (v3 | 7) + 1;
v5 = (char *)operator new(v6);
v12 = v5;
*(_QWORD *)&__dst = v6 + 1;
*((_QWORD *)&__dst + 1) = v4;
goto LABEL_8;
}
LOBYTE(__dst) = 2 * v3;
v5 = (char *)&__dst + 1;
if ( v3 )
LABEL_8:
memmove(v5, CString, v4);
v5[v4] = 0;
v7 = *(_QWORD **)(a1 + 1048);
v8 = __dst;
if ( (__dst & 1) != 0 )
{
sub_10001AD30(&v9, v12, *((unsigned __int64 *)&__dst + 1));
}
else
{
__p = v12;
v9 = __dst;
}
CCTextInputNode::setString(v7, (__int64)&v9);
if ( (v9 & 1) != 0 )
operator delete(__p);
*(_BYTE *)(a1 + 744) = 0;
if ( (v8 & 1) != 0 )
operator delete(v12);
}