//
// sub_1000B38A4 from 0x1000b38a4 to 0x1000b3a30 (396 bytes)
//
// 1 xrefs:
// > sub_1000B9B2C @ 0x1000ba644
//
// 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:40 +0000
//
__int64 __fastcall sub_1000B38A4(__int64 a1, __int64 a2, const std::string *a3)
{
__int64 v5; // x24
char *v6; // x21
unsigned __int64 size; // x22
const std::string *v8; // x23
signed __int64 v9; // x2
char *v10; // x25
std::string *v11; // x0
char *v12; // x0
std::string::size_type v13; // x23
int v14; // w24
std::string::size_type v15; // x21
void *v16; // x22
void **v17; // x20
std::string v19; // [xsp+0h] [xbp-60h] BYREF
std::allocator __a; // [xsp+1Fh] [xbp-41h] BYREF
v5 = SHIBYTE(a3->__r_.__value_.__r.__words[2]);
v6 = (char *)a3->__r_.__value_.__r.__words[0];
size = a3->__r_.__value_.__l.__size_;
if ( v5 >= 0 )
v8 = a3;
else
v8 = (const std::string *)a3->__r_.__value_.__r.__words[0];
if ( (int)v5 >= 0 )
v9 = SHIBYTE(a3->__r_.__value_.__r.__words[2]);
else
v9 = a3->__r_.__value_.__l.__size_;
if ( v9 >= 1 )
{
v10 = (char *)v8 + v9;
v11 = (std::string *)v8;
do
{
v12 = (char *)memchr(v11, 59, v9);
if ( !v12 )
break;
if ( *v12 == 59 )
{
if ( v12 != v10 )
{
v13 = v12 - (char *)v8;
if ( v13 != -1 )
{
std::string::basic_string(&v19, a3, 0, v13, &__a);
v14 = 0;
v15 = v13 + 1;
goto LABEL_20;
}
}
break;
}
v11 = (std::string *)(v12 + 1);
v9 = v10 - (char *)v11;
}
while ( v10 - (char *)v11 >= 1 );
}
if ( (v5 & 0x80000000) != 0 )
{
sub_1000097D0(&v19, v6, size);
v15 = 0;
}
else
{
v15 = 0;
v19 = *a3;
}
v14 = 1;
LABEL_20:
if ( SHIBYTE(v19.__r_.__value_.__r.__words[2]) < 0 )
{
v16 = (void *)v19.__r_.__value_.__r.__words[0];
*(_DWORD *)(a2 + 1808) = atoi(v19.__r_.__value_.__l.__data_);
operator delete(v16);
if ( v14 )
goto LABEL_22;
}
else
{
*(_DWORD *)(a2 + 1808) = atoi((const char *)&v19);
if ( v14 )
{
LABEL_22:
sub_100009900(&v19, "");
goto LABEL_25;
}
}
std::string::basic_string(&v19, a3, v15, 0xFFFFFFFFFFFFFFFFLL, &__a);
LABEL_25:
v17 = (void **)(a2 + 1784);
if ( *(char *)(a2 + 1807) < 0 )
operator delete(*v17);
*(_OWORD *)v17 = *(_OWORD *)&v19.__r_.__value_.__l.__data_;
*(_QWORD *)(a2 + 1800) = *((_QWORD *)&v19.__r_.__value_.__l + 2);
return sub_1000B3A30(a2);
}