//
// GameToolbox::getTimeString from 0x14006ff30 to 0x140070147 (535 bytes)
//
// 7 xrefs:
// > ChallengesPage::updateTimers @ 0x14009ecc7
// > DailyLevelPage::getDailyTimeString @ 0x14017200b
// > GameLevelManager::onUploadCommentCompleted @ 0x14023f26b
// > LevelInfoLayer::updateLabelValues @ 0x140424a2e
// > RewardsPage::updateTimers @ 0x14056335e
// > RewardsPage::updateTimers @ 0x1405633bf
// > ??> @ 0x1409117c8
//
// This function is hookable on this platform (idp: pc, 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:25:49 +0000
//
_QWORD *__fastcall GameToolbox::getTimeString(_QWORD *a1, int a2, char a3)
{
float v5; // xmm7_4
int v6; // edi
float v7; // xmm7_4
int v8; // esi
float v9; // xmm7_4
int v10; // ecx
int v11; // r8d
cocos2d::CCString *v12; // rax
const char *CString; // rax
size_t v14; // r8
cocos2d::CCString *v15; // rax
cocos2d::CCString *v16; // rax
cocos2d::CCString *v17; // rax
cocos2d::CCString *v18; // rax
v5 = (float)a2;
v6 = (int)floorf((float)a2 / 86400.0);
v7 = v5 - (float)((float)v6 * 86400.0);
v8 = (int)floorf(v7 / 3600.0);
v9 = v7 - (float)(3600 * v8);
v10 = (int)floorf(v9 / 60.0);
v11 = (int)(float)(v9 - (float)(60 * v10));
if ( v6 + v10 + v8 > 0 )
{
if ( v8 + v6 > 0 )
{
if ( v6 > 0 )
{
v18 = cocos2d::CCString::createWithFormat("%idays %ih", v6, v8);
CString = cocos2d::CCString::getCString(v18);
v14 = -1;
*(_OWORD *)a1 = 0;
a1[2] = 0;
a1[3] = 0;
do
++v14;
while ( CString[v14] );
}
else
{
v17 = cocos2d::CCString::createWithFormat("%ih %imin", v8, v10);
CString = cocos2d::CCString::getCString(v17);
v14 = -1;
*(_OWORD *)a1 = 0;
a1[2] = 0;
a1[3] = 0;
do
++v14;
while ( CString[v14] );
}
}
else if ( a3 )
{
v15 = cocos2d::CCString::createWithFormat("%imin", v10);
CString = cocos2d::CCString::getCString(v15);
v14 = -1;
*(_OWORD *)a1 = 0;
a1[2] = 0;
a1[3] = 0;
do
++v14;
while ( CString[v14] );
}
else
{
v16 = cocos2d::CCString::createWithFormat("%imin %02dsec", v10, v11);
CString = cocos2d::CCString::getCString(v16);
v14 = -1;
*(_OWORD *)a1 = 0;
a1[2] = 0;
a1[3] = 0;
do
++v14;
while ( CString[v14] );
}
}
else
{
v12 = cocos2d::CCString::createWithFormat("%isec", v11);
CString = cocos2d::CCString::getCString(v12);
v14 = -1;
*(_OWORD *)a1 = 0;
a1[2] = 0;
a1[3] = 0;
do
++v14;
while ( CString[v14] );
}
sub_14003D230(a1, CString, v14);
return a1;
}