//
// sub_1000ADD00 from 0x1000add00 to 0x1000addc0 (192 bytes)
//
// 16 xrefs:
// > sub_1001EEB58 @ 0x1001eebf4
// > AccountLayer::onSync @ 0x1001eed64
// > sub_10022ADF4 @ 0x10022ae24
// > sub_10022F330 @ 0x10022f350
// > sub_10024C320 @ 0x10024c344
// > sub_100264A48 @ 0x100264a68
// > sub_100272654 @ 0x100272674
// > sub_1002ED634 @ 0x1002ed668
// > sub_1003EFD70 @ 0x1003efe94
// > sub_1003F0FF0 @ 0x1003f1014
// > sub_1004F540C @ 0x1004f5430
// > sub_1004F95D0 @ 0x1004f95fc
// > sub_1004FAD8C @ 0x1004fadc4
// > sub_100505BBC @ 0x100505d18
// > sub_1005121E4 @ 0x1005123b0
// > sub_10053B608 @ 0x10053b628
//
// This function is hookable on this platform (idp: arm, 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 10:58:37 +0000
//
__int64 __fastcall sub_1000ADD00(__int64 a1, char *a2, float a3)
{
__int64 v4; // x19
__int64 v5; // x0
__int64 v6; // x19
double v7; // d9
unsigned __int64 v8; // d1
double v9; // d0
double v10; // d2
bool v11; // cc
double v12; // d0
timeb v14; // [xsp+8h] [xbp-38h] BYREF
char v15; // [xsp+1Fh] [xbp-21h]
v4 = *(_QWORD *)(a1 + 968);
sub_100009900(&v14, a2);
v5 = cocos2d::CCDictionary::objectForKey(v4, &v14);
v6 = v5;
if ( v15 < 0 )
{
operator delete((void *)v14.time);
if ( v6 )
goto LABEL_3;
return 0;
}
if ( !v5 )
return 0;
LABEL_3:
v7 = cocos2d::CCString::doubleValue(v6);
ftime(&v14);
LOWORD(v8) = v14.millitm;
v9 = (double)v8 / 1000.0 + (double)v14.time - v7;
v10 = a3 - v9;
v11 = v9 > a3;
v12 = 0.0;
if ( v11 )
v10 = 0.0;
if ( v10 <= a3 )
v12 = v10;
return (unsigned int)(int)v12;
}