//
// cocos2d::CCProfilingResetTimingBlock from 0x1004e7540 to 0x1004e768e (334 bytes)
//
// 0 xrefs:
//
// 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:31:20 +0000
//
int __fastcall cocos2d::CCProfilingResetTimingBlock(char *__s)
{
__int64 v1; // rax
_OWORD *v2; // r14
void *v3; // r15
__int64 v4; // r14
size_t v5; // rax
size_t v6; // r15
char *v7; // r12
size_t v8; // r13
__int64 v9; // rbx
_QWORD __dst[2]; // [rsp+0h] [rbp-40h] BYREF
void *__p; // [rsp+10h] [rbp-30h]
v1 = qword_100BE4490;
if ( !qword_100BE4490 )
{
v2 = operator new(0x40u);
*v2 = 0;
v2[1] = 0;
v2[2] = 0;
v2[3] = 0;
cocos2d::CCObject::CCObject((__int64)v2);
*(_QWORD *)v2 = off_100B630C8;
qword_100BE4490 = (__int64)v2;
v3 = operator new(0x48u);
cocos2d::CCDictionary::CCDictionary((__int64)v3);
*((_QWORD *)v2 + 7) = v3;
v1 = qword_100BE4490;
}
v4 = *(_QWORD *)(v1 + 56);
v5 = strlen(__s);
if ( v5 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v6 = v5;
if ( v5 >= 0x17 )
{
v8 = 26;
if ( (v5 | 7) != 0x17 )
v8 = (v5 | 7) + 1;
v7 = (char *)operator new(v8);
__p = v7;
__dst[0] = v8 + 1;
__dst[1] = v6;
goto LABEL_10;
}
LOBYTE(__dst[0]) = 2 * v5;
v7 = (char *)__dst + 1;
if ( v5 )
LABEL_10:
memcpy(v7, __s, v6);
v7[v6] = 0;
v9 = cocos2d::CCDictionary::objectForKey(v4, (char *)__dst);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
*(_QWORD *)(v9 + 80) = 0;
*(_DWORD *)(v9 + 88) = 0;
*(_QWORD *)(v9 + 96) = 0;
*(_QWORD *)(v9 + 104) = 100000000;
return gettimeofday((timeval *)(v9 + 112), nullptr);
}