//
// sub_100512FA0 from 0x100512fa0 to 0x100513078 (216 bytes)
//
// 4 xrefs:
// > LeaderboardsLayer::dLeaderboardsLayer @ 0x100513085
// > sub_100513090 @ 0x10051309c
// > sub_1005130B0 @ 0x1005130b9
// > sub_1005130D0 @ 0x1005130e3
//
// 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:37 +0000
//
__int64 __fastcall sub_100512FA0(_QWORD *a1, double a2)
{
_DWORD *v3; // rdi
_DWORD *v4; // rdi
*a1 = off_100B6B360;
a1[40] = off_100B6B818;
a1[41] = &off_100B6B888;
a1[42] = off_100B6B8A0;
a1[43] = off_100B6B8C0;
a1[44] = off_100B6B8E8;
a1[51] = off_100B6B918;
a1[52] = &off_100B6B948;
if ( *(_QWORD **)(GameLevelManager::sharedState(a2) + 1296) == a1 + 51 )
{
*(_QWORD *)(GameLevelManager::sharedState(a2) + 1296) = 0;
v3 = (_DWORD *)a1[62];
if ( !v3 )
goto LABEL_6;
goto LABEL_5;
}
v3 = (_DWORD *)a1[62];
if ( v3 )
LABEL_5:
cocos2d::CCObject::release(v3);
LABEL_6:
v4 = (_DWORD *)a1[63];
if ( v4 )
cocos2d::CCObject::release(v4);
return sub_1004A9420(a1);
}