//
// SearchButton::init from 0x495320 to 0x4954d8 (440 bytes)
//
// 1 xrefs:
// > SearchButton::create @ 0x495540
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:49:41 +0000
//
int __fastcall SearchButton::init(
SearchButton *this,
const char *a2,
cocos2d::CCLabelBMFont *a3,
float a4,
cocos2d::CCSprite *a5,
float a6)
{
int v9; // r8
const cocos2d::CCSize *v10; // r0
const char *v11; // r2
int v12; // r0
int v13; // r3
int v14; // r10
void (__fastcall *v15)(int, _BYTE *); // r11
const char *v16; // r1
int v17; // r0
int v18; // r3
float *v19; // r0
float v20; // s18
float v21; // s17
float v22; // s18
float v23; // r0
int v24; // r7
void (__fastcall *v25)(int, _BYTE *); // r9
float v26; // s15
float v27; // s18
float v28; // s17
int v29; // r4
void (__fastcall *v30)(int, _BYTE *); // r7
float v32; // [sp+4h] [bp-20h] BYREF
float v33; // [sp+8h] [bp-1Ch]
float v34; // [sp+Ch] [bp-18h] BYREF
float v35; // [sp+10h] [bp-14h]
_BYTE v36[8]; // [sp+14h] [bp-10h] BYREF
v9 = cocos2d::CCSprite::initWithSpriteFrameName(this, a2);
if ( v9 )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v32, -1.0, 1.0);
v10 = (const cocos2d::CCSize *)(*(int (__fastcall **)(SearchButton *))(*(_DWORD *)this + 164))(this);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v34, v10);
v12 = cocos2d::CCLabelBMFont::create(a3, "bigFont.fnt", v11);
v13 = *(_DWORD *)this;
*((_DWORD *)this + 127) = v12;
(*(void (__fastcall **)(SearchButton *, int, int))(v13 + 232))(this, v12, 1);
v14 = *((_DWORD *)this + 127);
v15 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v14 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v36, v32 + (float)(v34 * 0.5), v33 + (float)(v35 * 0.5));
v15(v14, v36);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 127) + 80))(*((_DWORD *)this + 127), LODWORD(a4));
if ( a5 )
{
if ( *(_BYTE *)a5 )
{
v17 = cocos2d::CCSprite::createWithSpriteFrameName(a5, v16);
v18 = *(_DWORD *)this;
*((_DWORD *)this + 128) = v17;
(*(void (__fastcall **)(SearchButton *, int, int))(v18 + 232))(this, v17, 1);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 128) + 80))(*((_DWORD *)this + 128), LODWORD(a6));
v19 = *((float **)this + 128);
v20 = v19[86];
v21 = v20 * COERCE_FLOAT((*(int (__fastcall **)(float *))(*(_DWORD *)v19 + 84))(v19));
v22 = *(float *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 127) + 164))(*((_DWORD *)this + 127));
v23 = (*(float (__fastcall **)(_DWORD))(**((_DWORD **)this + 127) + 84))(*((_DWORD *)this + 127));
v24 = *((_DWORD *)this + 127);
v25 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v24 + 92);
v26 = (float)(v22 * v23) + 5.0;
v27 = v21 * 0.5;
v28 = (float)((float)((float)(v21 * 0.5) + v26) + 10.0) * 0.5;
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v36,
(float)((float)((float)(v34 * 0.5) - v28) + (float)(v26 * 0.5)) + v32,
v33 + (float)(v35 * 0.5));
v25(v24, v36);
v29 = *((_DWORD *)this + 128);
v30 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v29 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v36, (float)(v28 + (float)(v34 * 0.5)) - v27, v35 * 0.5);
v30(v29, v36);
}
}
}
return v9;
}