//
// sub_10094F9E0 from 0x10094f9e0 to 0x10094fb46 (358 bytes)
//
// 1 xrefs:
// > sub_10094F400 @ 0x10094f8f7
//
// 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:38:38 +0000
//
void __fastcall sub_10094F9E0(__int64 a1, __int64 a2, std::string::size_type size, std::string::pointer data)
{
__int64 v4; // rsi
std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0 v5; // al
unsigned __int8 v6; // si
bool v7; // zf
std::string::value_type *v8; // rax
std::string::size_type v9; // rcx
__int64 v10; // rdx
__int64 v11; // rax
__int64 v12; // rbx
char *v13; // rax
__int128 v14; // [rsp+0h] [rbp-50h] BYREF
void *__p; // [rsp+10h] [rbp-40h]
__int128 v16; // [rsp+18h] [rbp-38h] BYREF
void *v17; // [rsp+28h] [rbp-28h]
std::string __str; // [rsp+30h] [rbp-20h] BYREF
v4 = *(_QWORD *)(a1 + 1040);
if ( v4 )
{
CCTextInputNode::getString(&__str, v4);
v5 = __str.__r_.__value_.__s.0;
data = __str.__r_.__value_.__l.__data_;
size = __str.__r_.__value_.__l.__size_;
}
else
{
*(_WORD *)&__str.__r_.__value_.__l.0 = 0;
v5 = 0;
}
v6 = *(unsigned __int8 *)&v5 >> 1;
v7 = (*(_BYTE *)&v5 & 1) == 0;
v8 = __str.__r_.__value_.__s.__data_;
if ( !v7 )
v8 = data;
v9 = v6;
if ( !v7 )
v9 = size;
if ( !v9 )
goto LABEL_16;
v10 = 0;
while ( v8[v10] == 32 )
{
if ( v9 == ++v10 )
goto LABEL_16;
}
if ( v10 == -1 )
{
LABEL_16:
v12 = *(_QWORD *)(cocos2d::CCDirector::sharedDirector() + 272);
LOBYTE(v16) = 24;
strcpy((char *)&v16 + 1, "Enter a name");
LOWORD(v14) = 0;
v13 = TextAlertPopup::create(&v16, 0x96u, &v14, 0.5, 0.60000002);
(*(void (__fastcall **)(__int64, char *, __int64))(*(_QWORD *)v12 + 464LL))(v12, v13, 1000);
if ( (v14 & 1) != 0 )
operator delete(__p);
if ( (v16 & 1) != 0 )
operator delete(v17);
}
else
{
v11 = GameLevelManager::sharedState();
if ( GameLevelManager::updateThread(v11, *(_DWORD *)(*(_QWORD *)(a1 + 1024) + 56LL), 2, &__str) )
{
*(_QWORD *)(GameLevelManager::sharedState() + 1264) = a1 + 1016;
std::string::operator=((std::string *)(a1 + 1048), &__str);
*(_BYTE *)(a1 + 1072) = 1;
}
}
if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__str.__r_.__value_.__l.__data_);
}