//
// sub_1000AF350 from 0x1000af350 to 0x1000af5a8 (600 bytes)
//
// 2 xrefs:
// > sub_1000AEF50 @ 0x1000af014
// > sub_1000B03C4 @ 0x1000b03f0
//
// This function is hookable on this platform (idp: arm, 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 10:58:38 +0000
//
void __usercall sub_1000AF350(__int64 a1@, std::string *a2@)
{
std::string *p_p; // x1
std::string::size_type size; // x2
std::string *v6; // x0
__int64 v7; // x0
const std::string::value_type *v8; // x0
std::string *v9; // x0
__int128 v10; // q0
std::string *v11; // x0
__int128 v12; // q0
__int64 v13; // x0
const std::string::value_type *v14; // x0
std::string *v15; // x0
void *v16; // x0
__int64 v17; // x0
const std::string::value_type *CString; // x0
std::string *v19; // x0
std::string v20; // [xsp+8h] [xbp-78h] BYREF
std::string __p; // [xsp+20h] [xbp-60h] BYREF
std::string v22; // [xsp+40h] [xbp-40h] BYREF
if ( *(_DWORD *)(a1 + 1140) == 2 )
{
sub_100009900(&v22, "l");
sub_1000A65B0(a1, (__int64)&__p);
if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
p_p = &__p;
else
p_p = (std::string *)__p.__r_.__value_.__r.__words[0];
if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
size = HIBYTE(__p.__r_.__value_.__r.__words[2]);
else
size = __p.__r_.__value_.__l.__size_;
v6 = std::string::append(&v22, (const std::string::value_type *)p_p, size);
*a2 = *v6;
v6->__r_.__value_.__l.__size_ = 0;
v6->__r_.__value_.__r.__words[2] = 0;
v6->__r_.__value_.__r.__words[0] = 0;
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
LABEL_21:
if ( (SHIBYTE(v22.__r_.__value_.__r.__words[2]) & 0x80000000) == 0 )
return;
v16 = (void *)v22.__r_.__value_.__r.__words[0];
goto LABEL_23;
}
if ( *(_DWORD *)(a1 + 920) <= *(_DWORD *)(a1 + 924) )
{
if ( *(_BYTE *)(a1 + 649) == 1 )
sub_100009900(&v22, "g");
else
sub_100009900(&v22, "o");
v17 = sub_1003065B0("%i", *(_DWORD *)(a1 + 328) - *(_DWORD *)(a1 + 332));
CString = (const std::string::value_type *)cocos2d::CCString::getCString(v17);
v19 = std::string::append(&v22, CString);
*a2 = *v19;
v19->__r_.__value_.__l.__size_ = 0;
v19->__r_.__value_.__r.__words[2] = 0;
v19->__r_.__value_.__r.__words[0] = 0;
goto LABEL_21;
}
sub_100009900(&v20, "d");
v7 = sub_1003065B0("%i", *(_DWORD *)(a1 + 920) - *(_DWORD *)(a1 + 924));
v8 = (const std::string::value_type *)cocos2d::CCString::getCString(v7);
v9 = std::string::append(&v20, v8);
v10 = *(_OWORD *)&v9->__r_.__value_.__l.__data_;
__p.__r_.__value_.__r.__words[2] = v9->__r_.__value_.__r.__words[2];
*(_OWORD *)&__p.__r_.__value_.__l.__data_ = v10;
v9->__r_.__value_.__l.__size_ = 0;
v9->__r_.__value_.__r.__words[2] = 0;
v9->__r_.__value_.__r.__words[0] = 0;
v11 = std::string::append(&__p, "_");
v12 = *(_OWORD *)&v11->__r_.__value_.__l.__data_;
v22.__r_.__value_.__r.__words[2] = v11->__r_.__value_.__r.__words[2];
*(_OWORD *)&v22.__r_.__value_.__l.__data_ = v12;
v11->__r_.__value_.__l.__size_ = 0;
v11->__r_.__value_.__r.__words[2] = 0;
v11->__r_.__value_.__r.__words[0] = 0;
v13 = sub_1003065B0("%i", *(_DWORD *)(a1 + 328) - *(_DWORD *)(a1 + 332));
v14 = (const std::string::value_type *)cocos2d::CCString::getCString(v13);
v15 = std::string::append(&v22, v14);
*a2 = *v15;
v15->__r_.__value_.__l.__size_ = 0;
v15->__r_.__value_.__r.__words[2] = 0;
v15->__r_.__value_.__r.__words[0] = 0;
if ( SHIBYTE(v22.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v22.__r_.__value_.__l.__data_);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
if ( SHIBYTE(v20.__r_.__value_.__r.__words[2]) < 0 )
{
v16 = (void *)v20.__r_.__value_.__r.__words[0];
LABEL_23:
operator delete(v16);
}
}