//
// SearchButton::init from 0x7deb6c to 0x7deddc (624 bytes)
//
// 2 xrefs:
// > SearchButton::create @ 0x7dee64
// > ??> @ 0x74c38
//
// 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 12:54:25 +0000
//
__int64 __fastcall SearchButton::init(
SearchButton *this,
const char *a2,
cocos2d::CCLabelBMFont *a3,
float a4,
cocos2d::CCSprite *a5,
float a6)
{
unsigned __int8 v11; // w0
unsigned int v12; // w21
const cocos2d::CCSize *v14; // x0
const char *v15; // x2
__int64 v16; // x0
__int64 v17; // x24
void (__fastcall *v18)(__int64, _BYTE *); // x27
const char *v19; // x1
__int64 v20; // x0
float *v21; // x0
float v22; // s10
float v23; // s10
float v24; // s9
float v25; // s0
__int64 v26; // x22
float v27; // s2
void (__fastcall *v28)(__int64, _BYTE *); // x24
float v29; // s9
__int64 v30; // x20
void (__fastcall *v31)(__int64, _BYTE *); // x22
float v32; // [xsp+70h] [xbp+70h] BYREF
float v33; // [xsp+74h] [xbp+74h]
float v34; // [xsp+78h] [xbp+78h] BYREF
float v35; // [xsp+7Ch] [xbp+7Ch]
_BYTE v36[8]; // [xsp+80h] [xbp+80h] BYREF
v11 = cocos2d::CCSprite::initWithSpriteFrameName(this, a2);
v12 = v11;
if ( v11 )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v32, -1.0, 1.0);
v14 = (const cocos2d::CCSize *)(*(__int64 (__fastcall **)(SearchButton *))(*(_QWORD *)this + 328LL))(this);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v34, v14);
v16 = cocos2d::CCLabelBMFont::create(a3, "bigFont.fnt", v15);
*((_QWORD *)this + 75) = v16;
(*(void (__fastcall **)(SearchButton *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v16, 1);
v17 = *((_QWORD *)this + 75);
v18 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v17 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v36, v32 + (float)(v34 * 0.5), v33 + (float)(v35 * 0.5));
v18(v17, v36);
(*(void (__fastcall **)(_QWORD, float))(**((_QWORD **)this + 75) + 160LL))(*((_QWORD *)this + 75), a4);
if ( a5 )
{
if ( *(_BYTE *)a5 )
{
v20 = cocos2d::CCSprite::createWithSpriteFrameName(a5, v19);
*((_QWORD *)this + 76) = v20;
(*(void (__fastcall **)(SearchButton *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v20, 1);
(*(void (__fastcall **)(_QWORD, float))(**((_QWORD **)this + 76) + 160LL))(*((_QWORD *)this + 76), a6);
v21 = *((float **)this + 76);
v22 = v21[108];
v23 = v22 * (*(float (__fastcall **)(float *))(*(_QWORD *)v21 + 168LL))(v21);
v24 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 75) + 328LL))(*((_QWORD *)this + 75));
v25 = (*(float (__fastcall **)(_QWORD))(**((_QWORD **)this + 75) + 168LL))(*((_QWORD *)this + 75));
v26 = *((_QWORD *)this + 75);
v27 = (float)(v24 * v25) + 5.0;
v28 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v26 + 184LL);
v29 = (float)((float)(v27 + (float)(v23 * 0.5)) + 10.0) * 0.5;
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v36,
(float)((float)(v27 * 0.5) - (float)(v29 - (float)(v34 * 0.5))) + v32,
v33 + (float)(v35 * 0.5));
v28(v26, v36);
v30 = *((_QWORD *)this + 76);
v31 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v30 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v36,
(float)(v29 + (float)(v34 * 0.5)) - (float)(v23 * 0.5),
v35 * 0.5);
v31(v30, v36);
}
}
}
return v12;
}