//
// sub_100446C5C from 0x100446c5c to 0x100446d58 (252 bytes)
//
// 3 xrefs:
// > GJAccountManager::registerAccount @ 0x100446a38
// > GJAccountManager::registerAccount @ 0x100446a58
// > GJAccountManager::registerAccount @ 0x100446a78
//
// 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 11:05:15 +0000
//
void __usercall sub_100446C5C(unsigned __int8 *a1@, std::string *a2@)
{
unsigned __int8 *v2; // x20
__int64 v4; // x8
__int64 v5; // x11
__int64 v6; // x21
std::string::value_type v7; // w8
unsigned __int64 v9; // x23
v2 = a1;
a2->__r_.__value_.__r.__words[0] = 0;
a2->__r_.__value_.__l.__size_ = 0;
a2->__r_.__value_.__r.__words[2] = 0;
v4 = a1[23];
if ( (v4 & 0x80u) != 0LL )
v4 = *((_QWORD *)a1 + 1);
std::string::reserve(a2, 3 * v4);
v5 = *((_QWORD *)v2 + 1);
if ( (v2[23] & 0x80u) == 0 )
{
v6 = v2[23];
}
else
{
v2 = *(unsigned __int8 **)v2;
v6 = v5;
}
for ( ; v6; --v6 )
{
v7 = *v2;
if ( (unsigned __int8)(*v2 - 48) >= 0xAu && (unsigned __int8)((*v2 & 0xDF) - 65) >= 0x1Au )
{
v9 = *v2;
if ( (unsigned int)(v9 - 45) >= 2 && (_DWORD)v9 != 95 && (_DWORD)v9 != 126 )
{
std::string::push_back(a2, 37);
std::string::push_back(a2, a0123456789abcd_1[v9 >> 4]);
v7 = a0123456789abcd_1[v9 & 0xF];
}
}
std::string::push_back(a2, v7);
++v2;
}
}