//
// sub_10029B620 from 0x10029b620 to 0x10029b78b (363 bytes)
//
// 4 xrefs:
// > SetTextPopup::onCancel @ 0x10029b8bc
// > SetTextPopup::keyBackClicked @ 0x10029c12c
// > sub_10029C140 @ 0x10029c153
// > sub_10029AA90 @ 0x10029ad74
//
// 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:27:52 +0000
//
__int64 __fastcall sub_10029B620(__int64 a1)
{
__int64 v2; // rsi
__int64 v3; // rax
__int64 v5; // rdi
_QWORD *v6; // rdi
void (__fastcall ***v7)(_QWORD, __int64, __int128 *); // r14
_WORD v8[12]; // [rsp+0h] [rbp-60h] BYREF
char v9; // [rsp+18h] [rbp-48h] BYREF
char v10[23]; // [rsp+19h] [rbp-47h] BYREF
__int128 v11; // [rsp+30h] [rbp-30h] BYREF
void *__p; // [rsp+40h] [rbp-20h]
if ( *(_BYTE *)(a1 + 681)
|| (v2 = *(unsigned int *)(a1 + 724), (int)v2 <= 0)
|| (int)EmoteSprite::effectiveLength(a1 + 696, v2) <= *(_DWORD *)(a1 + 720) )
{
v5 = *(_QWORD *)(a1 + 736);
if ( v5 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v5 + 1368LL))(v5, 0);
v6 = *(_QWORD **)(a1 + 672);
v6[73] = 0;
(*(void (__fastcall **)(_QWORD *, _QWORD))(*v6 + 1160LL))(v6, 0);
v7 = *(void (__fastcall ****)(_QWORD, __int64, __int128 *))(a1 + 744);
if ( v7 && !*(_BYTE *)(a1 + 681) )
{
if ( (*(_BYTE *)(a1 + 696) & 1) != 0 )
{
sub_10001AD30(&v11, *(const void **)(a1 + 712), *(_QWORD *)(a1 + 704));
}
else
{
__p = *(void **)(a1 + 712);
v11 = *(_OWORD *)(a1 + 696);
}
(**v7)(v7, a1, &v11);
if ( (v11 & 1) != 0 )
operator delete(__p);
}
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1072LL))(a1, 0);
return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 528LL))(a1, 1);
}
else
{
v9 = 26;
strcpy(v10, "Text too long");
v8[0] = 0;
v3 = TextAlertPopup::create(&v9, 150, v8, 0.5, 0.60000002);
return (*(__int64 (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v3, 100);
}
}