// // ButtonSprite::init from 0x68c088 to 0x68c3a0 (792 bytes) // // 2 xrefs: // > ButtonSprite::create @ 0x68c484 // > @ 0xd98d0 // // 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:50:33 +0000 // __int64 __fastcall ButtonSprite::init( ButtonSprite *this, const char *a2, int a3, int a4, float a5, char a6, char *a7, const char *a8, float a9) { unsigned __int8 v16; // w0 unsigned int v17; // w21 size_t v19; // x0 int v20; // w6 const char *v21; // x4 int v22; // w5 const char *v23; // x3 char *v24; // x0 char *v25; // x1 const char *v26; // x2 int v27; // w0 int v28; // w24 __int64 v29; // x0 __int64 v30; // x23 void (__fastcall *v31)(__int64, _BYTE *); // x24 const char *v32; // [xsp+70h] [xbp+70h] int v33; // [xsp+78h] [xbp+78h] int v35; // [xsp+80h] [xbp+80h] const char *v37; // [xsp+88h] [xbp+88h] char v38[4]; // [xsp+90h] [xbp+90h] BYREF float v39; // [xsp+94h] [xbp+94h] _BYTE v40[16]; // [xsp+98h] [xbp+98h] BYREF __int64 v41; // [xsp+A8h] [xbp+A8h] BYREF const char *v42; // [xsp+B0h] [xbp+B0h] void *v43; // [xsp+B8h] [xbp+B8h] __int64 v44; // [xsp+C0h] [xbp+C0h] BYREF const char *v45; // [xsp+C8h] [xbp+C8h] void *v46; // [xsp+D0h] [xbp+D0h] v16 = cocos2d::CCSprite::init(this); v17 = v16; if ( v16 ) { *((_DWORD *)this + 149) = 1; *((_BYTE *)this + 620) = a6; *((float *)this + 150) = (float)a3; *((float *)this + 151) = (float)a4; *((float *)this + 152) = a5; *((float *)this + 153) = a9; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v40, 0.0, 2.0); cocos2d::CCPoint::operator=((char *)this + 656, v40); v41 = 0; v42 = nullptr; v43 = nullptr; v19 = strlen(a7); std::string::__init(&v41, a7, v19); v44 = 0; v45 = nullptr; v46 = nullptr; std::string::__init(&v44, "bigFont.fnt", 0xBu); v20 = v41 & 1; if ( v20 ) { v21 = v42; v22 = v44 & 1; if ( (v44 & 1) != 0 ) { v23 = v45; v24 = (char *)v43; LABEL_18: v25 = (char *)v46; if ( v23 > v21 ) v26 = v21; else v26 = v23; v22 = 1; if ( !v26 ) goto LABEL_22; goto LABEL_12; } v24 = (char *)v43; v23 = (const char *)((unsigned __int8)v44 >> 1); v25 = (char *)&v44 + 1; } else { v21 = (const char *)((unsigned __int8)v41 >> 1); v22 = v44 & 1; if ( (v44 & 1) != 0 ) { v23 = v45; v24 = (char *)&v41 + 1; goto LABEL_18; } v23 = (const char *)((unsigned __int8)v44 >> 1); v24 = (char *)&v41 + 1; v25 = (char *)&v44 + 1; } if ( v23 > v21 ) v26 = v21; else v26 = v23; if ( !v26 ) goto LABEL_22; LABEL_12: v32 = v23; v33 = v22; v35 = v41 & 1; v37 = v21; v27 = memcmp(v24, v25, (size_t)v26); v21 = v37; v28 = v27; v20 = v35; v22 = v33; v23 = v32; if ( v27 ) { if ( v33 ) goto LABEL_28; goto LABEL_14; } LABEL_22: v28 = v21 > v23; if ( v21 < v23 ) v28 = -1; if ( v22 ) { LABEL_28: operator delete(v46); if ( (v41 & 1) != 0 ) { LABEL_26: operator delete(v43); if ( !v28 ) goto LABEL_27; goto LABEL_16; } LABEL_15: if ( !v28 ) { LABEL_27: cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, 0.0, 2.0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v40, -1.0, v39); cocos2d::CCPoint::operator=((char *)this + 656, v40); } LABEL_16: v29 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)&byte_11B8890, a7, v26); *((_QWORD *)this + 78) = v29; (*(void (__fastcall **)(ButtonSprite *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v29, 1); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v40, 0.0, 0.0, 40.0, 40.0); v30 = cocos2d::extension::CCScale9Sprite::create(a8, v40); *((_QWORD *)this + 81) = v30; v31 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v30 + 320LL); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v40, 16.0, 16.0); v31(v30, v40); (*(void (__fastcall **)(ButtonSprite *, _QWORD, _QWORD))(*(_QWORD *)this + 464LL))( this, *((_QWORD *)this + 81), 0); ButtonSprite::setString(this, a2); return v17; } LABEL_14: if ( v20 ) goto LABEL_26; goto LABEL_15; } return v17; }