//
// PlayLayer::updateTimeLabel from 0x1000870d0 to 0x100087256 (390 bytes)
//
// 1 xrefs:
// > ??> @ 0x100abb108
//
// 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 12:20:05 +0000
//
void __fastcall PlayLayer::updateTimeLabel(__int64 a1, unsigned int a2, __int64 a3, char a4)
{
__int64 v6; // rax
const std::string::value_type *CString; // rax
const std::string::value_type *v8; // rsi
__int64 v9; // rdi
std::string::pointer data; // rsi
__int64 v11; // rsi
__int64 v12; // rbx
unsigned int v13; // r15d
std::string::size_type size; // r14
__int64 v15; // rax
unsigned __int64 v16; // rcx
float v17; // xmm1_4
char v18; // [rsp+0h] [rbp-70h]
_BYTE v19[8]; // [rsp+8h] [rbp-68h] BYREF
std::string::value_type __s[4]; // [rsp+10h] [rbp-60h] BYREF
void *__p; // [rsp+20h] [rbp-50h]
float v22; // [rsp+2Ch] [rbp-44h]
std::string v23; // [rsp+30h] [rbp-40h] BYREF
if ( (*(unsigned __int8 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 14336) + 352LL))(*(_QWORD *)(a1 + 14336))
&& *(_BYTE *)(a1 + 12238) == 1 )
{
memset(&v23, 0, sizeof(v23));
if ( a4 )
{
v6 = sub_10088E820("%i.%02d", v18);
CString = (const std::string::value_type *)cocos2d::CCString::getCString(v6);
std::string::assign(&v23, CString);
}
else
{
GameToolbox::intToString(__s, a2);
if ( (__s[0] & 1) != 0 )
v8 = (const std::string::value_type *)__p;
else
v8 = &__s[1];
std::string::assign(&v23, v8);
if ( (__s[0] & 1) != 0 )
operator delete(__p);
}
v9 = *(_QWORD *)(a1 + 14336);
if ( (*(_BYTE *)&v23.__r_.__value_.__s.0 & 1) != 0 )
data = v23.__r_.__value_.__l.__data_;
else
data = v23.__r_.__value_.__s.__data_;
(*(void (__fastcall **)(__int64, std::string::pointer))(*(_QWORD *)v9 + 928LL))(v9, data);
v11 = cocos2d::CCDirector::sharedDirector(v9, data);
cocos2d::CCDirector::getWinSize(__s, v11);
v12 = *(_QWORD *)(a1 + 14336);
v22 = *(float *)__s;
v13 = (unsigned int)v23.__r_.__value_.__l.0;
size = v23.__r_.__value_.__l.__size_;
v15 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v12 + 192LL))(v12);
if ( (v13 & 1) == 0 )
size = v13 >> 1;
v16 = 5 * size;
if ( ((5 * size) & 0x8000000000000000LL) != 0LL )
v17 = (float)(int)((v16 >> 1) | v16 & 1) + (float)(int)((v16 >> 1) | v16 & 1);
else
v17 = (float)(int)v16;
sub_100278250(v19, (float)(v22 * 0.5) - v17, *(float *)(v15 + 4));
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v12 + 184LL))(v12, v19);
if ( (*(_BYTE *)&v23.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v23.__r_.__value_.__l.__data_);
}
}