//
// LevelLeaderboard::getSpriteButton from 0x4e4be8 to 0x4e4cb0 (200 bytes)
//
// 3 xrefs:
// > LevelLeaderboard::init @ 0x4e5630
// > LevelLeaderboard::init @ 0x4e569e
// > LevelLeaderboard::init @ 0x4e57aa
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
CCMenuItemSpriteExtra *__fastcall LevelLeaderboard::getSpriteButton(
unsigned int a1,
const char **a2,
bool a3,
int a4,
int a5,
float a6,
const cocos2d::CCPoint *a7,
char *a8)
{
cocos2d::CCString *v10; // r0
char *CString; // r0
ButtonSprite *v12; // r0
ButtonSprite *v13; // r11
cocos2d::CCPoint v14; // r1
CCMenuItemSpriteExtra *v15; // r4
unsigned int v18; // [sp+10h] [bp-1Ch]
char *v19; // [sp+18h] [bp-14h] BYREF
cocos2d::CCPoint v20; // [sp+1Ch] [bp-10h] BYREF
v10 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"GJ_button_%02d.png", a8);
CString = (char *)cocos2d::CCString::getCString(v10);
sub_776584((int)&v19, CString);
v12 = (ButtonSprite *)cocos2d::CCSprite::createWithSpriteFrameName(*a2);
v13 = ButtonSprite::create(v12, (cocos2d::CCSprite *)&dword_20, 0, 32.0, 1.0, 1, v19, nullptr, a3);
cocos2d::CCPoint::CCPoint(&v20, a7);
LODWORD(v14.x) = &v20;
ButtonSprite::updateSpriteOffset(v13, v14);
v15 = CCMenuItemSpriteExtra::create(v13, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(v18, a1));
((void (__fastcall *)(CCMenuItemSpriteExtra *, _DWORD))v15->setScale)(v15, LODWORD(a6));
v15->m_baseScale = a6;
if ( a5 )
(*(void (__fastcall **)(int, CCMenuItemSpriteExtra *))(*(_DWORD *)a5 + 220))(a5, v15);
sub_774008(&v19);
return v15;
}