//
// PlayLayer::updateTimeLabel from 0x140510fe0 to 0x1405111f4 (532 bytes)
//
// 2 xrefs:
// > ??> @ 0x1407d5f30
// > ??> @ 0x14092ab78
//
// 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:33:31 +0000
//
// Hidden C++ exception states: #wind=2
void __fastcall PlayLayer::updateTimeLabel(__int64 a1, unsigned int a2, int a3, char a4)
{
cocos2d::CCString *v8; // rax
char *CString; // rax
size_t v10; // r8
_QWORD *v11; // rax
size_t v12; // r8
void **v13; // rdx
__int64 v14; // rcx
__int64 v15; // rax
__int64 v16; // rbx
__int64 *v17; // rdi
__int64 v18; // rsi
__int64 v19; // rax
unsigned __int64 v20; // rcx
float v21; // xmm0_4
__int64 v22; // rax
void *v23; // rcx
float v24; // [rsp+30h] [rbp-78h] BYREF
_BYTE v25[8]; // [rsp+38h] [rbp-70h] BYREF
void *Block[2]; // [rsp+40h] [rbp-68h] BYREF
__int64 v27; // [rsp+50h] [rbp-58h]
unsigned __int64 v28; // [rsp+58h] [rbp-50h]
_QWORD v29[4]; // [rsp+60h] [rbp-48h] BYREF
if ( (*(unsigned __int8 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 14992) + 344LL))(*(_QWORD *)(a1 + 14992))
&& *(_BYTE *)(a1 + 12670) )
{
*(_OWORD *)Block = 0;
v27 = 0;
v28 = 15;
LOBYTE(Block[0]) = 0;
if ( a4 )
{
v8 = cocos2d::CCString::createWithFormat("%i.%02d", a2, a3);
CString = (char *)cocos2d::CCString::getCString(v8);
v10 = -1;
do
++v10;
while ( CString[v10] );
sub_1400405A0(Block, CString, v10);
}
else
{
v11 = GameToolbox::intToString(v29, a2);
if ( v11[3] > 0xFu )
v11 = (_QWORD *)*v11;
v12 = -1;
do
++v12;
while ( *((_BYTE *)v11 + v12) );
sub_1400405A0(Block, v11, v12);
sub_14003D310((__int64)v29);
}
v13 = Block;
if ( v28 > 0xF )
v13 = (void **)Block[0];
(**(void (__fastcall ***)(__int64, void **))(*(_QWORD *)(a1 + 14992) + 360LL))(*(_QWORD *)(a1 + 14992) + 360LL, v13);
v15 = cocos2d::CCDirector::sharedDirector(v14);
cocos2d::CCDirector::getWinSize(v15, &v24);
v16 = v27;
v17 = *(__int64 **)(a1 + 14992);
v18 = *v17;
v19 = (*(__int64 (__fastcall **)(__int64 *))(*v17 + 200))(v17);
v20 = 5 * v16;
if ( 5 * v16 < 0 )
v21 = (float)(int)(v20 & 1 | (v20 >> 1)) + (float)(int)(v20 & 1 | (v20 >> 1));
else
v21 = (float)(int)v20;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, (float)(v24 * 0.5) - v21, *(float *)(v19 + 4));
(*(void (__fastcall **)(__int64 *, __int64))(v18 + 184))(v17, v22);
if ( v28 > 0xF )
{
v23 = Block[0];
if ( v28 + 1 >= 0x1000 )
{
v23 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v23 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v23);
}
}
}