//
// GameToolbox::createHashString from 0x1004f1460 to 0x1004f14f5 (149 bytes)
//
// 0 xrefs:
//
// 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
//
std::string *__fastcall GameToolbox::createHashString(std::string *a1, const std::string *a2, int a3)
{
int v3; // r15d
const char *data; // rdi
int v5; // eax
__int64 v6; // r13
__int64 v7; // rbx
std::string::pointer v8; // rax
*(_WORD *)&a1->__r_.__value_.__l.0 = 0;
if ( a3 > 0 )
{
v3 = a3;
data = a2->__r_.__value_.__s.__data_;
if ( (*(_BYTE *)&a2->__r_.__value_.__s.0 & 1) != 0 )
data = a2->__r_.__value_.__l.__data_;
v5 = strlen(data);
if ( v5 >= v3 )
{
v6 = (int)(float)((float)v5 / (float)v3);
v7 = 0;
do
{
v8 = a2->__r_.__value_.__s.__data_;
if ( (*(_BYTE *)&a2->__r_.__value_.__s.0 & 1) != 0 )
v8 = a2->__r_.__value_.__l.__data_;
std::string::push_back(a1, v8[v7]);
v7 += v6;
--v3;
}
while ( v3 );
}
else
{
std::string::operator=(a1, a2);
}
}
return a1;
}