// // ButtonSprite::init_1 from 0x100059fe0 to 0x10005a27f (671 bytes) // // 1 xrefs: // > ButtonSprite::create_1 @ 0x100059f6e // // This function is hookable on this platform (idp: pc, 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:19:39 +0000 // __int64 __fastcall ButtonSprite::init_1( __int64 a1, __int64 a2, int a3, int a4, char a5, const char *a6, float a7, float a8, __int64 a9) { __int64 result; // rax size_t v15; // rax size_t v16; // r13 char *v17; // rbx size_t v18; // r12 char v19; // bl void *v20; // r13 size_t v21; // rax char *v22; // rdi size_t v23; // rdx char v24; // r12 __int64 v25; // rax __int64 v26; // rbx double v27; // xmm0_8 char v28; // [rsp+8h] [rbp-78h] BYREF _QWORD __s2[2]; // [rsp+9h] [rbp-77h] BYREF __int64 v30; // [rsp+20h] [rbp-60h] __int64 v31; // [rsp+28h] [rbp-58h] size_t __dst; // [rsp+30h] [rbp-50h] BYREF size_t __n; // [rsp+38h] [rbp-48h] void *__p; // [rsp+40h] [rbp-40h] const char *v35; // [rsp+48h] [rbp-38h] unsigned __int8 v36; // [rsp+57h] [rbp-29h] *(float *)&v35 = a8; *(float *)&v31 = a7; v30 = a2; result = cocos2d::CCSprite::init(); if ( !(_BYTE)result ) return result; v36 = result; *(_DWORD *)(a1 + 596) = 1; *(float *)(a1 + 600) = (float)a3; *(float *)(a1 + 604) = (float)a4; *(_DWORD *)(a1 + 608) = v31; *(_BYTE *)(a1 + 620) = a5; *(_DWORD *)(a1 + 612) = (_DWORD)v35; sub_100278250(&__dst, 0.0, 2.0); sub_100278300(a1 + 656, &__dst); v15 = strlen(a6); if ( v15 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v16 = v15; v35 = a6; v31 = a1 + 656; if ( v15 >= 0x17 ) { v18 = 26; if ( (v15 | 7) != 0x17 ) v18 = (v15 | 7) + 1; v17 = (char *)operator new(v18); __p = v17; __dst = v18 + 1; a6 = v35; __n = v16; } else { LOBYTE(__dst) = 2 * v15; v17 = (char *)&__dst + 1; if ( !v15 ) goto LABEL_10; } memcpy(v17, a6, v16); LABEL_10: v17[v16] = 0; strcpy((char *)__s2, "bigFont.fnt"); v19 = __dst; v20 = __p; if ( (__dst & 1) != 0 ) { v21 = __n; v22 = (char *)__p; } else { v22 = (char *)&__dst + 1; v21 = (unsigned __int8)__dst >> 1; } v23 = 11; if ( v21 < 0xB ) v23 = v21; v24 = (v21 == 11) & (memcmp(v22, __s2, v23) == 0); if ( (v19 & 1) != 0 ) operator delete(v20); if ( v24 ) { sub_100278250(&v28, 0.0, 2.0); sub_100278250(&__dst, -1.0, *(float *)((char *)__s2 + 3)); sub_100278300(v31, &__dst); } v25 = cocos2d::CCLabelBMFont::create_3("", v35); *(_QWORD *)(a1 + 624) = v25; (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v25, 1); sub_100278270(&__dst, 0.0, 0.0, COERCE_DOUBLE(1109393408), COERCE_DOUBLE(1109393408)); v26 = cocos2d::extension::CCScale9Sprite::create_2(a9, &__dst); *(_QWORD *)(a1 + 648) = v26; sub_100278260(&__dst, COERCE_DOUBLE(1098907648), COERCE_DOUBLE(1098907648)); (*(void (__fastcall **)(__int64, size_t *))(*(_QWORD *)v26 + 320LL))(v26, &__dst); v27 = (*(double (__fastcall **)(__int64, _QWORD, _QWORD))(*(_QWORD *)a1 + 464LL))(a1, *(_QWORD *)(a1 + 648), 0); ButtonSprite::setString(a1, v30, v27); return v36; }