//
// GameToolbox::gameVersionToString from 0x3d3938 to 0x3d3a36 (254 bytes)
//
// 1 xrefs:
// > LevelStatsInfoPopup::buildInfoText @ 0x79c02a
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:46:42 +0000
//
GameToolbox *__fastcall GameToolbox::gameVersionToString(GameToolbox *this, int a2)
{
size_t v3; // r2
const char *v4; // r1
int v5; // r9
_DWORD *v6; // r0
int v7; // r1
int v8; // r2
char *v9; // r1
size_t v10; // r2
_DWORD *v11; // r0
int v12; // r1
int v13; // r2
_DWORD v15[3]; // [sp+0h] [bp-2Ch] BYREF
_DWORD v16[3]; // [sp+Ch] [bp-20h] BYREF
unsigned __int8 v17; // [sp+18h] [bp-14h] BYREF
char v18; // [sp+19h] [bp-13h] BYREF
size_t v19; // [sp+1Ch] [bp-10h]
char *v20; // [sp+20h] [bp-Ch]
if ( a2 <= 0 )
{
v3 = 2;
*(_DWORD *)this = 0;
*((_DWORD *)this + 1) = 0;
v4 = "NA";
*((_DWORD *)this + 2) = 0;
LABEL_5:
std::string::__init((int *)this, v4, v3);
return this;
}
if ( a2 == 10 )
{
v3 = 3;
*(_DWORD *)this = 0;
v4 = "1.7";
*((_DWORD *)this + 1) = 0;
*((_DWORD *)this + 2) = 0;
goto LABEL_5;
}
if ( a2 <= 17 )
{
GameToolbox::intToString(this, a2);
}
else
{
v5 = a2 - 10;
GameToolbox::intToString((GameToolbox *)v15, (a2 - 10) / 10 + 1);
v6 = std::string::append(v15, ".");
v7 = v6[1];
v8 = v6[2];
v16[0] = *v6;
v16[1] = v7;
v16[2] = v8;
*v6 = 0;
v6[1] = 0;
v6[2] = 0;
GameToolbox::intToString((GameToolbox *)&v17, v5 % 10);
if ( (v17 & 1) != 0 )
{
v9 = v20;
v10 = v19;
}
else
{
v10 = (int)v17 >> 1;
v9 = &v18;
}
v11 = std::string::append(v16, v9, v10);
v12 = v11[1];
v13 = v11[2];
*(_DWORD *)this = *v11;
*((_DWORD *)this + 1) = v12;
*((_DWORD *)this + 2) = v13;
*v11 = 0;
v11[1] = 0;
v11[2] = 0;
std::string::~string((int)&v17);
std::string::~string((int)v16);
std::string::~string((int)v15);
}
return this;
}