//
// sub_1002ED39C from 0x1002ed39c to 0x1002ed4d0 (308 bytes)
//
// 3 xrefs:
// > LevelLeaderboard::init @ 0x1002ec97c
// > LevelLeaderboard::init @ 0x1002eca10
// > LevelLeaderboard::init @ 0x1002ecb74
//
// 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 11:02:54 +0000
//
float *__fastcall sub_1002ED39C(
__int64 a1,
__int64 a2,
__int64 a3,
__int64 a4,
__int64 a5,
double *a6,
int a7,
float a8)
{
__int64 v15; // x0
char *CString; // x0
void *v17; // x0
void **v18; // x4
void *v19; // x24
float *v20; // x20
__int64 v22; // [xsp+10h] [xbp-60h] BYREF
void *__p[2]; // [xsp+18h] [xbp-58h] BYREF
char v24; // [xsp+2Fh] [xbp-41h]
v15 = sub_1003065B0("GJ_button_%02d.png", a7);
CString = (char *)cocos2d::CCString::getCString(v15);
sub_100009900(__p, CString);
if ( *(char *)(a2 + 23) < 0 )
a2 = *(_QWORD *)a2;
v17 = cocos2d::CCSprite::createWithSpriteFrameName(a2);
if ( v24 >= 0 )
v18 = __p;
else
v18 = (void **)__p[0];
v19 = ButtonSprite::create((__int64)v17, 32, 0, 1, (__int64)v18, 0, 32.0, 1.0, 0.0);
sub_1000262F4(&v22, a6);
sub_1000687DC((__int64)v19, (double *)&v22);
v20 = (float *)CCMenuItemSpriteExtra::create((__int64)v19, 0, a1, a3, a4);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v20 + 160LL))(v20, a8);
v20[101] = a8;
if ( a5 )
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)a5 + 456LL))(a5, v20);
if ( v24 < 0 )
operator delete(__p[0]);
return v20;
}