//
// sub_10093F530 from 0x10093f530 to 0x10093f753 (547 bytes)
//
// 3 xrefs:
// > sub_10093EE20 @ 0x10093ef74
// > sub_10093F1B0 @ 0x10093f35e
// > LevelPickerPopup::textChanged @ 0x1009403fa
//
// 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:30 +0000
//
void __fastcall sub_10093F530(__int64 a1)
{
unsigned int v2; // eax
const char *data; // r14
std::string::size_type size; // rax
std::string::pointer v5; // rcx
std::string::size_type v6; // rdx
std::string::size_type v7; // rsi
std::string::pointer v8; // rcx
std::string::size_type v9; // rax
std::string::size_type v10; // rax
std::string::size_type v11; // rsi
std::string::size_type v13; // rdx
std::string::pointer v14; // rsi
__int64 v15; // rdi
char v16; // cl
const char *v17; // r15
bool v18; // r15
__int64 v19; // rdi
__int64 v20; // rbx
char *v21; // rax
const std::string::value_type *CString; // rax
std::string v23; // [rsp+0h] [rbp-30h] BYREF
if ( (*(_BYTE *)(a1 + 872) & 1) == 0 )
{
v23 = *(std::string *)(a1 + 872);
v2 = (unsigned int)v23.__r_.__value_.__l.0;
data = v23.__r_.__value_.__s.__data_;
if ( (*(_BYTE *)&v23.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_3;
LABEL_6:
v5 = v23.__r_.__value_.__l.__data_;
size = v23.__r_.__value_.__l.__size_;
v6 = -1;
if ( !v23.__r_.__value_.__l.__size_ )
goto LABEL_12;
goto LABEL_7;
}
sub_10001AD30(&v23, *(const void **)(a1 + 888), *(_QWORD *)(a1 + 880));
v2 = (unsigned int)v23.__r_.__value_.__l.0;
data = v23.__r_.__value_.__s.__data_;
if ( (*(_BYTE *)&v23.__r_.__value_.__s.0 & 1) != 0 )
goto LABEL_6;
LABEL_3:
size = v2 >> 1;
v5 = v23.__r_.__value_.__s.__data_;
v6 = -1;
if ( !size )
goto LABEL_12;
LABEL_7:
v7 = 0;
while ( v5[v7] == 32 )
{
if ( size == ++v7 )
goto LABEL_12;
}
v6 = v7;
LABEL_12:
std::string::erase(&v23, 0, v6);
if ( (*(_BYTE *)&v23.__r_.__value_.__s.0 & 1) != 0 )
{
v8 = v23.__r_.__value_.__l.__data_;
v9 = v23.__r_.__value_.__l.__size_;
}
else
{
v9 = *(_BYTE *)&v23.__r_.__value_.__l.0 >> 1;
v8 = v23.__r_.__value_.__s.__data_;
}
v10 = v9 + 1;
while ( v10 != 1 )
{
v11 = v10 - 1;
if ( v8[v10-- - 2] != 32 )
goto LABEL_20;
}
v11 = 0;
LABEL_20:
std::string::erase(&v23, v11, 0xFFFFFFFFFFFFFFFFLL);
if ( (*(_BYTE *)&v23.__r_.__value_.__s.0 & 1) != 0 )
{
v13 = v23.__r_.__value_.__l.__size_;
if ( v23.__r_.__value_.__l.__size_ - 1 > 9 )
goto LABEL_36;
v14 = v23.__r_.__value_.__l.__data_;
}
else
{
if ( (unsigned __int8)(*(_BYTE *)&v23.__r_.__value_.__s.0 - 1) >= 0x15u )
goto LABEL_36;
v13 = *(_BYTE *)&v23.__r_.__value_.__l.0 >> 1;
v14 = v23.__r_.__value_.__s.__data_;
}
v15 = 0;
while ( 1 )
{
v16 = v14[v15];
if ( (unsigned __int8)v16 > 0x3Fu || ((1LL << v16) & 0x3FF000000000000LL) == 0 )
break;
if ( v13 == ++v15 )
goto LABEL_31;
}
if ( v15 != -1 )
goto LABEL_36;
LABEL_31:
if ( (*(_BYTE *)&v23.__r_.__value_.__s.0 & 1) != 0 )
{
v17 = v23.__r_.__value_.__l.__data_;
if ( atoll(v23.__r_.__value_.__l.__data_) > 0 )
{
LABEL_33:
v18 = atoll(v17) < 0x80000000LL;
v19 = *(_QWORD *)(a1 + 928);
if ( !v19 )
goto LABEL_38;
goto LABEL_37;
}
}
else
{
v17 = v23.__r_.__value_.__s.__data_;
if ( atoll(v23.__r_.__value_.__s.__data_) > 0 )
goto LABEL_33;
}
LABEL_36:
v18 = 0;
v19 = *(_QWORD *)(a1 + 928);
if ( v19 )
LABEL_37:
(*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v19 + 344LL))(v19, v18);
LABEL_38:
if ( v18 )
{
v20 = *(_QWORD *)(a1 + 936);
if ( v20 )
{
if ( (*(_BYTE *)&v23.__r_.__value_.__s.0 & 1) != 0 )
data = v23.__r_.__value_.__l.__data_;
v21 = sub_10088E820("Use ID %s", data);
CString = (const std::string::value_type *)cocos2d::CCString::getCString((__int64)v21);
ButtonSprite::setString(v20, CString);
}
}
if ( (*(_BYTE *)&v23.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v23.__r_.__value_.__l.__data_);
}