//
// EditorUI::getSimpleButton from 0x10002ebf0 to 0x10002ecd0 (224 bytes)
//
// 0 xrefs:
//
// 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 EditorUI::getSimpleButton(
cocos2d::CCObject *a1,
__int64 a2,
unsigned __int64 a3,
unsigned __int64 a4,
_QWORD *a5)
{
const char *v7; // rsi
cocos2d::CCSprite *v8; // r13
__m128 v9; // xmm0
__int64 v10; // rax
CCMenuItemSpriteExtra *result; // rax
__int64 v12; // rcx
_QWORD *v13; // rdi
CCMenuItemSpriteExtra *v14; // rbx
__m128 v15; // [rsp+0h] [rbp-40h]
if ( (*(_BYTE *)a2 & 1) != 0 )
v7 = *(const char **)(a2 + 16);
else
v7 = (const char *)(a2 + 1);
v8 = cocos2d::CCSprite::createWithSpriteFrameName(v7);
v15 = (__m128)*(unsigned int *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v8->getContentSize)(v8);
v9 = _mm_div_ps(
(__m128)xmmword_100815460,
_mm_insert_ps(
v15,
(__m128)*(unsigned int *)(((__int64 (__fastcall *)(cocos2d::CCSprite *))v8->getContentSize)(v8) + 4),
16));
v10 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v8->getContentSize)(v8);
((void (__fastcall *)(cocos2d::CCSprite *, float))v8->setScale)(
v8,
18.0 / *(float *)(v10 + 4LL * (v9.f32[0] > _mm_movehdup_ps(v9).f32[0])));
result = CCMenuItemSpriteExtra::create(v8, nullptr, a1, (cocos2d::SEL_MenuHandler)__PAIR128__(a4, a3));
if ( a5 )
{
v12 = *a5;
v13 = a5;
v14 = result;
(*(void (__fastcall **)(_QWORD *, CCMenuItemSpriteExtra *))(v12 + 440))(v13, result);
return v14;
}
return result;
}