// // FontObject::parseConfigFile from 0x3bfb14 to 0x3bff0c (1016 bytes) // // 1 xrefs: // > FontObject::initWithConfigFile @ 0x3bff2a // // 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:46:30 +0000 // int __fastcall FontObject::parseConfigFile(FontObject *this, cocos2d::CCString *a2, float a3) { const char *v5; // r1 cocos2d::CCString *v6; // r0 cocos2d::CCArray *CString; // r6 cocos2d::CCArray *v8; // r4 char *v9; // r6 char *v10; // r0 size_t v11; // r0 cocos2d::CCObject *v12; // r0 unsigned int v13; // r9 cocos2d::CCString *v14; // r0 cocos2d::CCString *v15; // r7 const char *v16; // r8 size_t v17; // r0 size_t v18; // r3 int v19; // r6 size_t v20; // r2 int v21; // r3 char *v22; // r0 unsigned __int8 *v23; // r1 char *v24; // r0 unsigned __int8 *v25; // r2 int v26; // r0 _BOOL4 v27; // r6 int v28; // t1 size_t v29; // r3 int v30; // r10 size_t v31; // r2 int v32; // r3 char *v33; // r0 unsigned __int8 *v34; // r1 char *v35; // r0 unsigned __int8 *v36; // r2 int v37; // r0 int v38; // t1 cocos2d::CCArray *v39; // r0 cocos2d::CCArray *v40; // r6 char *v41; // r0 char *v42; // r8 char *v43; // r0 size_t v44; // r0 cocos2d::CCObject *v45; // r0 cocos2d::CCString *v46; // r0 const char *v47; // r7 size_t v48; // r0 int v49; // r3 unsigned __int8 *v50; // r2 unsigned __int8 *v51; // r1 unsigned __int8 *v52; // r0 unsigned __int8 *v53; // r3 int v54; // r12 int v55; // r3 size_t v56; // r2 char *v57; // r0 int v58; // r11 cocos2d::CCString *v59; // r0 int v60; // r10 cocos2d::CCString *v61; // r0 int v62; // r6 char *v64; // [sp+Ch] [bp-70h] char *v65; // [sp+10h] [bp-6Ch] int v66; // [sp+28h] [bp-54h] BYREF int v67; // [sp+2Ch] [bp-50h] BYREF size_t v68; // [sp+30h] [bp-4Ch] unsigned __int8 *v69; // [sp+34h] [bp-48h] int v70; // [sp+38h] [bp-44h] BYREF size_t v71; // [sp+3Ch] [bp-40h] unsigned __int8 *v72; // [sp+40h] [bp-3Ch] int v73[3]; // [sp+44h] [bp-38h] BYREF int v74[3]; // [sp+50h] [bp-2Ch] BYREF int v75; // [sp+5Ch] [bp-20h] BYREF size_t v76; // [sp+60h] [bp-1Ch] void *v77; // [sp+64h] [bp-18h] int v78; // [sp+68h] [bp-14h] BYREF int v79; // [sp+6Ch] [bp-10h] char *v80; // [sp+70h] [bp-Ch] v65 = (char *)this + 52; std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::clear((_DWORD *)this + 13); v64 = (char *)this + 72; std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::clear((_DWORD *)this + 18); v6 = (cocos2d::CCString *)cocos2d::CCString::createWithContentsOfFile(a2, v5); CString = (cocos2d::CCArray *)cocos2d::CCString::getCString(v6); v8 = (cocos2d::CCArray *)cocos2d::CCArray::create(CString); v9 = strtok((char *)CString, "\n"); while ( v9 ) { v10 = strtok(nullptr, "\n"); v9 = v10; if ( !v10 ) break; v78 = 0; v79 = 0; v80 = nullptr; v11 = strlen(v10); std::string::__init(&v78, v9, v11); v12 = (cocos2d::CCObject *)cocos2d::CCString::create(&v78); cocos2d::CCArray::addObject(v8, v12); std::string::~string((int)&v78); } v13 = 0; while ( v13 < cocos2d::CCArray::count(v8) ) { v14 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v8, v13); v67 = 0; v68 = 0; v69 = nullptr; v15 = v14; std::string::__init(&v67, "chars", 5u); v70 = 0; v71 = 0; v72 = nullptr; std::string::__init(&v70, "char", 4u); v16 = (const char *)cocos2d::CCString::getCString(v15); memset(v73, 0, sizeof(v73)); v17 = strlen(v16); std::string::__init(v73, v16, v17); if ( (v67 & 1) != 0 ) v18 = v68; else v18 = (int)(unsigned __int8)v67 >> 1; std::string::basic_string(v74, (unsigned __int8 *)v73, 0, v18); v19 = v74[0] & 1; if ( v19 ) v20 = v74[1]; else v20 = (int)LOBYTE(v74[0]) >> 1; if ( (v67 & 1) != 0 ) v21 = v68; else v21 = (int)(unsigned __int8)v67 >> 1; if ( v20 != v21 ) { LABEL_30: v27 = 0; goto LABEL_31; } if ( v19 ) { v22 = (char *)v74[2]; if ( (v67 & 1) == 0 ) { v23 = (unsigned __int8 *)&v67 + 1; LABEL_22: if ( v20 ) v26 = memcmp(v22, v23, v20); else v26 = 0; v27 = v26 == 0; goto LABEL_31; } } else { v22 = (char *)v74 + 1; if ( (v67 & 1) == 0 ) { v23 = (unsigned __int8 *)&v67 + 1; goto LABEL_20; } } v23 = v69; if ( v19 ) goto LABEL_22; LABEL_20: v24 = v22 - 1; v25 = &v23[v20]; while ( v23 != v25 ) { v28 = (unsigned __int8)*++v24; if ( v28 != *v23 ) goto LABEL_30; ++v23; } v27 = 1; LABEL_31: std::string::~string((int)v74); if ( v27 ) goto LABEL_84; if ( (v70 & 1) != 0 ) v29 = v71; else v29 = (int)(unsigned __int8)v70 >> 1; std::string::basic_string(&v75, (unsigned __int8 *)v73, 0, v29); v30 = v75 & 1; if ( v30 ) v31 = v76; else v31 = (int)(unsigned __int8)v75 >> 1; if ( (v70 & 1) != 0 ) v32 = v71; else v32 = (int)(unsigned __int8)v70 >> 1; if ( v31 == v32 ) { if ( v30 ) { v33 = (char *)v77; if ( (v70 & 1) == 0 ) { v34 = (unsigned __int8 *)&v70 + 1; LABEL_47: if ( v31 ) v37 = memcmp(v33, v34, v31); else v37 = 0; v27 = v37 == 0; goto LABEL_55; } LABEL_44: v34 = v72; if ( v30 ) goto LABEL_47; } else { v33 = (char *)&v75 + 1; if ( (v70 & 1) != 0 ) goto LABEL_44; v34 = (unsigned __int8 *)&v70 + 1; } v35 = v33 - 1; v36 = &v34[v31]; while ( v34 != v36 ) { v38 = (unsigned __int8)*++v35; if ( v38 != *v34 ) goto LABEL_55; ++v34; } v27 = 1; } LABEL_55: v39 = (cocos2d::CCArray *)std::string::~string((int)&v75); if ( !v27 ) goto LABEL_84; v40 = (cocos2d::CCArray *)cocos2d::CCArray::create(v39); v41 = (char *)cocos2d::CCString::getCString(v15); v42 = strtok(v41, "="); while ( v42 ) { v43 = strtok(nullptr, "="); v42 = v43; if ( !v43 ) break; v78 = 0; v79 = 0; v80 = nullptr; v44 = strlen(v43); std::string::__init(&v78, v42, v44); v45 = (cocos2d::CCObject *)cocos2d::CCString::create(&v78); cocos2d::CCArray::addObject(v40, v45); std::string::~string((int)&v78); } v46 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v40, 0); v47 = (const char *)cocos2d::CCString::getCString(v46); v75 = 0; v76 = 0; v77 = nullptr; v48 = strlen(v47); std::string::__init(&v75, v47, v48); if ( (v75 & 1) != 0 ) { v49 = v76; v50 = (unsigned __int8 *)v77; if ( !v76 ) { v55 = -1; goto LABEL_74; } } else { v49 = (int)(unsigned __int8)v75 >> 1; if ( !v49 ) { v55 = -1; LABEL_77: v56 = (int)(unsigned __int8)v75 >> 1; goto LABEL_78; } v50 = (unsigned __int8 *)&v75 + 1; } v51 = &v50[v49]; if ( v49 > 0 ) { v52 = v50; while ( 1 ) { v53 = v52; if ( v52 == v51 ) break; v54 = *v52++; if ( v54 == 32 ) goto LABEL_68; } } v53 = v51; LABEL_68: if ( v53 == v51 ) v55 = -1; else v55 = v53 - v50; if ( (v75 & 1) == 0 ) goto LABEL_77; LABEL_74: v56 = v76; LABEL_78: std::string::basic_string(&v78, (unsigned __int8 *)&v75, 0, v56 + 1 - v55); if ( (v78 & 1) != 0 ) v57 = v80; else v57 = (char *)&v78 + 1; v58 = atoi(v57); if ( v58 >= 0 ) { v59 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v40, 3u); v60 = cocos2d::CCString::intValue(v59); v61 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v40, 7u); v62 = cocos2d::CCString::intValue(v61); v66 = v58; *std::unordered_map::operator[]((int)v65, (unsigned int *)&v66) = v60 + v62; v66 = v58; *std::unordered_map::operator[]((int)v64, (unsigned int *)&v66) = v62; } std::string::~string((int)&v78); std::string::~string((int)&v75); LABEL_84: ++v13; std::string::~string((int)v73); std::string::~string((int)&v70); std::string::~string((int)&v67); } return cocos2d::CCObject::release(v8); }
GD Web Decomp Icon

GD Web Decomp

Raw Source