//
// GameToolbox::getTimeString from 0x3ced84 to 0x3cee9c (280 bytes)
//
// 6 xrefs:
// > LevelInfoLayer::updateLabelValues @ 0x49bce0
// > GameLevelManager::onUploadCommentCompleted @ 0x4c55b8
// > ChallengesPage::updateTimers @ 0x6008d0
// > DailyLevelPage::getDailyTimeString @ 0x6081b4
// > RewardsPage::updateTimers @ 0x616e44
// > RewardsPage::updateTimers @ 0x616e90
//
// 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:39 +0000
//
GameToolbox *__fastcall GameToolbox::getTimeString(GameToolbox *this, int a2, int a3)
{
float v5; // s17
float v6; // s17
const char *v7; // r5
float v8; // s16
float v9; // r0
const char *v10; // r3
cocos2d::CCString *v11; // r0
cocos2d::CCString *v12; // r0
const char *CString; // r0
const char *v14; // r5
size_t v15; // r0
char *v17; // [sp+4h] [bp-4h]
v5 = (float)a2;
v17 = (char *)(int)floorf((float)a2 / 86400.0);
v6 = v5 - (float)((float)(int)v17 * 86400.0);
v7 = (const char *)(int)floorf(v6 / 3600.0);
v8 = v6 - (float)(3600 * (int)v7);
v9 = floorf(v8 / 60.0);
v10 = (const char *)(int)v9;
if ( (int)&v7[(int)v17 + (int)v9] <= 0 )
{
v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%isec",
(const char *)(int)(float)(v8 - (float)(60 * (int)v9)));
LABEL_11:
CString = (const char *)cocos2d::CCString::getCString(v11);
*(_DWORD *)this = 0;
*((_DWORD *)this + 1) = 0;
*((_DWORD *)this + 2) = 0;
v14 = CString;
goto LABEL_12;
}
if ( (int)&v7[(int)v17] > 0 )
{
if ( (int)v17 > 0 )
v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%idays %ih", v17, v7);
else
v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%ih %imin", v7, v10);
goto LABEL_11;
}
if ( a3 )
{
v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%imin", v10);
goto LABEL_11;
}
v12 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%imin %02dsec",
v10,
(int)(float)(v8 - (float)(60 * (int)v9)));
CString = (const char *)cocos2d::CCString::getCString(v12);
*(_DWORD *)this = 0;
*((_DWORD *)this + 1) = 0;
*((_DWORD *)this + 2) = 0;
v14 = CString;
LABEL_12:
v15 = strlen(CString);
std::string::__init((int *)this, v14, v15);
return this;
}