// // cocos2d::CCLabelBMFont::createFontChars from 0x7d345c to 0x7d3a86 (1578 bytes) // // 2 xrefs: // > cocos2d::CCLabelBMFont::setString @ 0x7d3ae4 // > cocos2d::CCLabelBMFont::setFntFile @ 0x7d5b78 // // 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 12:00:37 +0000 // int __fastcall cocos2d::CCLabelBMFont::createFontChars(cocos2d::CCLabelBMFont *this) { const unsigned __int16 *v2; // r1 cocos2d::CCDirector *v3; // r0 float *v4; // r4 float v5; // s17 int (__fastcall *v6)(cocos2d::CCLabelBMFont *, float *); // r6 cocos2d::CCDirector *v7; // r0 float v8; // r0 float v9; // s16 float v10; // s17 cocos2d::CCDirector *v11; // r0 float v12; // s15 float *v13; // r0 float v14; // r1 float v15; // r2 unsigned int v16; // r6 int CharacterSet; // r0 int v18; // r3 int v19; // r1 cocos2d::CCDirector *v20; // r7 int v21; // r11 int v22; // r9 int v23; // r2 int v24; // s17 unsigned int v25; // r0 int v26; // r3 int v27; // r4 cocos2d::CCDirector *v28; // r10 int v29; // r2 int v30; // r3 int v31; // r2 cocos2d::CCDirector *v32; // r8 _DWORD *v33; // r3 int v34; // r1 unsigned int v35; // r6 unsigned int v36; // r10 int v37; // r12 unsigned int v38; // r6 unsigned int v39; // r10 int v40; // r12 int v41; // r6 float *v42; // r0 float v43; // s21 cocos2d::CCDirector *v44; // r0 float v45; // r0 float v46; // s19 float v47; // s21 cocos2d::CCDirector *v48; // r0 float v49; // r0 float v50; // s16 float v51; // s19 cocos2d::CCDirector *v52; // r0 float v53; // r0 float v54; // s22 float v55; // s16 cocos2d::CCDirector *v56; // r0 float v57; // r0 int (__fastcall *v58)(cocos2d::CCLabelBMFont *, cocos2d::CCDirector *); // r3 float v59; // s14 int v60; // r0 float v61; // s22 int v62; // r6 void (*v63)(void); // r3 cocos2d::CCDirector *v64; // r0 float v65; // s19 float v66; // s16 float v67; // s21 cocos2d::CCDirector *v68; // r0 float v69; // r0 float *v70; // r0 float v71; // s19 int (__fastcall *v72)(int, float *); // r11 cocos2d::CCDirector *v73; // r0 float v74; // r0 float v75; // s16 float v76; // s19 cocos2d::CCDirector *v77; // r0 float v78; // r0 int v79; // r3 float v80; // s15 float v81; // s16 cocos2d::CCDirector *v82; // r0 float v83; // r0 float v84; // s17 float v85; // s16 cocos2d::CCDirector *v86; // r0 float v87; // s15 cocos2d::CCDirector *v89; // r0 int v90; // s16 cocos2d::CCDirector *v91; // r0 float v92; // r0 float v93; // s16 cocos2d::CCDirector *v94; // r0 float v95; // r0 int v96; // r3 void (__fastcall *v97)(int, int, float *); // r10 int v98; // r1 int v99; // [sp+8h] [bp-7Ch] int v100; // [sp+Ch] [bp-78h] cocos2d::CCDirector *v101; // [sp+10h] [bp-74h] int v102; // [sp+14h] [bp-70h] int v103; // [sp+18h] [bp-6Ch] _DWORD *v104; // [sp+24h] [bp-60h] int v105; // [sp+2Ch] [bp-58h] BYREF float v106; // [sp+30h] [bp-54h] BYREF float v107; // [sp+34h] [bp-50h] float v108[2]; // [sp+38h] [bp-4Ch] BYREF float v109; // [sp+40h] [bp-44h] BYREF float v110; // [sp+44h] [bp-40h] float v111; // [sp+48h] [bp-3Ch] BYREF float v112; // [sp+4Ch] [bp-38h] float v113[4]; // [sp+50h] [bp-34h] BYREF int v114; // [sp+60h] [bp-24h] BYREF float v115[2]; // [sp+64h] [bp-20h] BYREF float v116; // [sp+6Ch] [bp-18h] float v117; // [sp+70h] [bp-14h] __int16 v118; // [sp+74h] [bp-10h] __int16 v119; // [sp+76h] [bp-Eh] __int16 v120; // [sp+78h] [bp-Ch] cocos2d::CCSize::CCSize(&v106, (const cocos2d::CCSize *)&unk_D2F2C4); v3 = *((cocos2d::CCDirector **)this + 74); if ( !v3 || (v3 = (cocos2d::CCDirector *)cocos2d::cc_wcslen(v3, v2), (v101 = v3) == nullptr) ) { v4 = (float *)&v114; v5 = v106; v6 = *(int (__fastcall **)(cocos2d::CCLabelBMFont *, float *))(*(_DWORD *)this + 160); v7 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v3); v8 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v7)); v9 = v107; v10 = v5 / v8; v11 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v8)); v12 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v11)); v13 = (float *)&v114; v14 = v10; v15 = v9 / v12; goto LABEL_57; } v16 = 0; CharacterSet = cocos2d::CCBMFontConfiguration::getCharacterSet(*((cocos2d::CCBMFontConfiguration **)this + 84)); v18 = 1; v102 = CharacterSet; while ( v16 < (unsigned int)v101 - 1 ) { v19 = *(unsigned __int16 *)(*((_DWORD *)this + 74) + 2 * v16++); if ( v19 == 10 ) ++v18; } v20 = nullptr; v21 = 0xFFFF; v22 = 0; v23 = *(_DWORD *)(*((_DWORD *)this + 84) + 56); v24 = v18 * v23; v99 = v18 * v23 - v23; cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v109); v25 = (unsigned int)cocos2d::CCRect::CCRect((cocos2d::CCRect *)v115); v100 = 0; do { v26 = *((_DWORD *)this + 74); v27 = *(unsigned __int16 *)(v26 + 2 * (_DWORD)v20); if ( v27 == 10 ) { v22 = 0; v99 -= *(_DWORD *)(*((_DWORD *)this + 84) + 56); goto LABEL_53; } LODWORD(v113[0]) = *(unsigned __int16 *)(v26 + 2 * (_DWORD)v20); v25 = (unsigned int)std::__tree::find(v102, v113); v28 = (cocos2d::CCDirector *)v25; if ( v25 == v102 + 4 ) { switch ( v27 ) { case 'a': v27 = 65; goto LABEL_39; case 'b': v27 = 66; goto LABEL_39; case 'c': v27 = 67; goto LABEL_39; case 'd': v27 = 68; goto LABEL_39; case 'e': v27 = 69; goto LABEL_39; case 'f': v27 = 70; goto LABEL_39; case 'g': v27 = 71; goto LABEL_39; case 'h': v27 = 72; goto LABEL_39; case 'i': v27 = 73; goto LABEL_39; case 'j': v27 = 74; goto LABEL_39; case 'k': v27 = 75; goto LABEL_39; case 'l': v27 = 76; goto LABEL_39; case 'm': v27 = 77; goto LABEL_39; case 'n': v27 = 78; goto LABEL_39; case 'o': v27 = 79; goto LABEL_39; case 'p': v27 = 80; goto LABEL_39; case 'q': v27 = 81; goto LABEL_39; case 'r': v27 = 82; goto LABEL_39; case 's': v27 = 83; goto LABEL_39; case 't': v27 = 84; goto LABEL_39; case 'u': v27 = 85; goto LABEL_39; case 'v': v27 = 86; goto LABEL_39; case 'w': v27 = 87; goto LABEL_39; case 'x': v27 = 88; goto LABEL_39; case 'y': v27 = 89; goto LABEL_39; case 'z': v27 = 90; LABEL_39: LODWORD(v113[0]) = v27; v25 = (unsigned int)std::__tree::find(v102, v113); if ( v28 != (cocos2d::CCDirector *)v25 ) break; goto LABEL_53; default: goto LABEL_53; } } v25 = cocos2d::CCLabelBMFont::kerningAmountForFirst(this, v21, v27); v29 = *((_DWORD *)this + 84); v30 = *((_DWORD *)this + 94); v105 = v27; v31 = *(_DWORD *)(v29 + 52); v103 = v30; v32 = (cocos2d::CCDirector *)v25; if ( v31 ) { v33 = *(_DWORD **)(v31 + 32); v34 = ((unsigned __int8)v105 + 17973517 + (HIBYTE(v105) << 24) + (BYTE2(v105) << 16) + (BYTE1(v105) << 8)) ^ 0x7F76D; v35 = (-1622558010 - v34) ^ (v34 << 8); v25 = -17973517 - v34 - v35; v36 = v25 ^ (v35 >> 13); v37 = (v34 - v35 - v36) ^ (v36 >> 12); v38 = (v35 - v36 - v37) ^ (v37 << 16); v39 = (v36 - v37 - v38) ^ (v38 >> 5); v40 = (v37 - v38 - v39) ^ (v39 >> 3); v41 = *(_DWORD *)(*v33 + 12 * (((v39 - v40 - ((v38 - v39 - v40) ^ (v40 << 10))) ^ (((v38 - v39 - v40) ^ (v40 << 10)) >> 15)) & (v33[1] - 1))); if ( !v41 ) goto LABEL_43; do { v41 -= v33[5]; LABEL_43: if ( !v41 ) break; if ( *(_DWORD *)(v41 + 56) == 4 ) { v104 = v33; v25 = memcmp(*(const void **)(v41 + 52), &v105, 4u); v33 = v104; if ( !v25 ) { v114 = *(_DWORD *)(v41 + 4); cocos2d::CCRect::operator=(v115, (float *)(v41 + 8)); v118 = *(_WORD *)(v41 + 24); v119 = *(_WORD *)(v41 + 26); v120 = *(_WORD *)(v41 + 28); v42 = cocos2d::CCRect::operator=(&v109, v115); v43 = v109; v44 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)v42); v45 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v44)); v46 = v110; v47 = v43 / v45; v48 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v45)); v49 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v48)); v50 = v111; v51 = v46 / v49; v52 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v49)); v53 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v52)); v54 = v112; v55 = v50 / v53; v56 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v53)); v57 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v56)); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v113, v47, v51, v55, v54 / v57); cocos2d::CCRect::operator=(&v109, v113); v58 = *(int (__fastcall **)(cocos2d::CCLabelBMFont *, cocos2d::CCDirector *))(*(_DWORD *)this + 240); v59 = *((float *)this + 87); v109 = v109 + *((float *)this + 86); v110 = v110 + v59; v60 = v58(this, v20); v61 = (float)((int)v32 + v103); v62 = v60; if ( v60 ) { v63 = *(void (**)(void))(*(_DWORD *)v60 + 172); } else { v62 = operator new(0x22Cu); cocos2d::CCSprite::CCSprite((cocos2d::CCSprite *)v62); *(_BYTE *)(v62 + 516) = 0; *(_DWORD *)(v62 + 540) = 0; *(_DWORD *)(v62 + 508) = 0; *(_DWORD *)v62 = &off_D05C78; *(_DWORD *)(v62 + 264) = &off_D05EEC; *(_DWORD *)(v62 + 280) = &off_D05F2C; *(_DWORD *)(v62 + 512) = 0; *(_DWORD *)(v62 + 520) = 0; *(_DWORD *)(v62 + 524) = 0; *(_DWORD *)(v62 + 528) = 0; *(_DWORD *)(v62 + 532) = 0; *(_DWORD *)(v62 + 536) = 0; v89 = (cocos2d::CCDirector *)cocos2d::CCPoint::CCPoint((_DWORD *)(v62 + 544)); *(_DWORD *)(v62 + 552) = v20; v90 = v118; v91 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v89); v92 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v91)); *(float *)(v62 + 508) = (float)((float)v90 / v92) + v61; v93 = (float)*(int *)(*((_DWORD *)this + 84) + 56) - v117; v94 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v92)); v95 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v94)); v96 = *(_DWORD *)v62; *(float *)(v62 + 512) = (float)(v93 * 0.5) / v95; v97 = *(void (__fastcall **)(int, int, float *))(v96 + 508); if ( *((_BYTE *)this + 367) ) v98 = *((_DWORD *)this + 93); else v98 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 67) + 48))(*((_DWORD *)this + 67)); v97(v62, v98, &v109); if ( *((_BYTE *)this + 367) ) cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 92), (cocos2d::CCObject *)v62); else (*(void (__fastcall **)(cocos2d::CCLabelBMFont *, int, cocos2d::CCDirector *, cocos2d::CCDirector *))(*(_DWORD *)this + 236))( this, v62, v20, v20); cocos2d::CCObject::release((_DWORD *)v62); (*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v62 + 496))(v62, *((unsigned __int8 *)this + 366)); (*(void (__fastcall **)(int, char *))(*(_DWORD *)v62 + 484))(v62, (char *)this + 358); v63 = *(void (**)(void))(*(_DWORD *)v62 + 460); } v63(); v64 = (cocos2d::CCDirector *)(*(int (__fastcall **)(int, float *, _DWORD, float *))(*(_DWORD *)v62 + 572))( v62, &v109, 0, &v111); v65 = (float)((float)v22 + (float)v118) + (float)(v116 * 0.5); v66 = (float)v99 + (float)(*(_DWORD *)(*((_DWORD *)this + 84) + 56) - v119); v67 = v112 * 0.5; v68 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v64); v69 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v68)); v70 = cocos2d::CCPoint::CCPoint(v108, v65 + v61, v66 - (float)(v67 * v69)); v71 = v108[0]; v72 = *(int (__fastcall **)(int, float *))(*(_DWORD *)v62 + 92); v73 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)v70); v74 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v73)); v75 = v108[1]; v76 = v71 / v74; v77 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v74)); v78 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v77)); cocos2d::CCPoint::CCPoint(v113, v76, v75 / v78); v25 = v72(v62, v113); v21 = v27; v22 += (int)v32 + v103 + v120; v79 = v100; if ( v100 < v22 ) v79 = v22; v100 = v79; break; } } v41 = *(_DWORD *)(v41 + 48); } while ( v41 ); } LABEL_53: v20 = (cocos2d::CCDirector *)((char *)v20 + 1); } while ( v20 != v101 ); v4 = v113; v6 = *(int (__fastcall **)(cocos2d::CCLabelBMFont *, float *))(*(_DWORD *)this + 160); v80 = (float)v120; v107 = (float)(unsigned int)v24; v81 = (float)v100; if ( v80 < v116 ) v81 = (float)(v81 + v116) - v80; v106 = v81; v82 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)v25); v83 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v82)); v84 = v107; v85 = v81 / v83; v86 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v83)); v87 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v86)); v13 = v113; v14 = v85; v15 = v84 / v87; LABEL_57: cocos2d::CCSize::CCSize(v13, v14, v15); return v6(this, v4); }
GD Web Decomp Icon

GD Web Decomp

Raw Source