//
// GameToolbox::gen_random from 0x100045bf8 to 0x100045cbc (196 bytes)
//
// 1 xrefs:
// > GJMultiplayerManager::uploadComment @ 0x1001cf7d4
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __usercall GameToolbox::gen_random(int a1@, _QWORD *a2@)
{
int v4; // w0
std::string *v5; // x1
std::string v6; // [xsp+8h] [xbp-48h] BYREF
sub_100009900(&v6, "");
if ( a1 >= 1 )
{
do
{
v4 = rand();
std::string::push_back(&v6, a0123456789abcd[v4 % 0x3EuLL]);
--a1;
}
while ( a1 );
}
if ( (v6.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v5 = &v6;
else
v5 = (std::string *)v6.__r_.__value_.__r.__words[0];
sub_100009900(a2, (char *)v5);
if ( SHIBYTE(v6.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v6.__r_.__value_.__l.__data_);
}