// // cocos2d::CCBMFontConfiguration::parseCommonArguments from 0x1006a7bc0 to 0x1006a8286 (1734 bytes) // // 1 xrefs: // > cocos2d::CCBMFontConfiguration::parseConfigFile @ 0x1006a72fe // // 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:35:20 +0000 // void __fastcall cocos2d::CCBMFontConfiguration::parseCommonArguments(__int64 a1, const std::string *a2) { unsigned int v2; // edx std::string::pointer data; // rbx __int64 size; // rdx char *v5; // r14 std::string::pointer v6; // rax char *v7; // rax int v8; // ecx int v9; // ecx bool v10; // zf int v11; // eax std::string::size_type v12; // r12 int v13; // eax unsigned int v14; // r15d std::string::size_type v15; // r15 std::string::pointer v16; // r13 size_t v17; // rax size_t v18; // r15 char *v19; // r14 const char *v20; // rdi size_t v21; // rbx unsigned int v22; // edx std::string::pointer v23; // rbx __int64 v24; // rdx char *v25; // r14 std::string::pointer v26; // rax char *v27; // rax int v28; // ecx int v29; // ecx int v30; // eax std::string::size_type v31; // r15 int v32; // eax unsigned int v33; // r14d std::string::size_type v34; // r14 std::string::pointer v35; // r12 size_t v36; // rax size_t v37; // r14 char *v38; // r13 __int64 v39; // rax unsigned int v40; // edx std::string::pointer v41; // rbx __int64 v42; // rdx char *v43; // r14 size_t v44; // rbx std::string::pointer v45; // rax char *v46; // rax int v47; // ecx int v48; // ecx int v49; // eax std::string::size_type v50; // r15 int v51; // eax unsigned int v52; // r14d std::string::size_type v53; // r14 std::string::pointer v54; // r12 size_t v55; // rax size_t v56; // r14 char *v57; // r13 __int64 v58; // rax unsigned int v59; // edx std::string::pointer v60; // rbx __int64 v61; // rdx char *v62; // r14 size_t v63; // rbx std::string::pointer v64; // rax char *v65; // rax int v66; // ecx int v67; // ecx int v68; // eax std::string::size_type v69; // r15 int v70; // eax unsigned int v71; // r14d std::string::size_type v72; // r14 std::string::pointer v73; // r13 size_t v74; // rax size_t v75; // r14 char *v76; // r12 size_t v77; // rbx __int128 v79; // [rsp+18h] [rbp-58h] BYREF void *v80; // [rsp+28h] [rbp-48h] __int128 __dst; // [rsp+30h] [rbp-40h] BYREF void *__p; // [rsp+40h] [rbp-30h] v2 = (unsigned int)a2->__r_.__value_.__l.0; if ( (v2 & 1) != 0 ) { size = a2->__r_.__value_.__l.__size_; data = a2->__r_.__value_.__l.__data_; v5 = &data[size]; if ( size < 11 ) goto LABEL_9; } else { data = a2->__r_.__value_.__s.__data_; size = v2 >> 1; v5 = (char *)&a2->__r_.__value_.__l.0 + size + 1; if ( size < 11 ) goto LABEL_9; } v6 = data; do { v7 = (char *)memchr(v6, 108, size - 10); if ( !v7 ) break; if ( !(*(_QWORD *)v7 ^ 0x67696548656E696CLL | *(_QWORD *)(v7 + 3) ^ 0x3D74686769654865LL) ) { v8 = (int)v7; goto LABEL_10; } v6 = v7 + 1; size = v5 - v6; } while ( v5 - v6 > 10 ); LABEL_9: v8 = (int)v5; v7 = v5; LABEL_10: v9 = v8 - (_DWORD)data; v10 = v7 == v5; v11 = -1; if ( !v10 ) v11 = v9; v12 = v11; v13 = std::string::find(a2, 32, v11); v14 = (unsigned int)a2->__r_.__value_.__l.0; if ( (v14 & 1) == 0 ) { v15 = v14 >> 1; if ( v12 <= v15 ) { v16 = a2->__r_.__value_.__s.__data_; goto LABEL_17; } LABEL_120: sub_100056810(); } v15 = a2->__r_.__value_.__l.__size_; if ( v15 < v12 ) goto LABEL_120; v16 = a2->__r_.__value_.__l.__data_; LABEL_17: v17 = v13 - (int)v12; v18 = v15 - v12; if ( v18 >= v17 ) v18 = v17; if ( v18 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); if ( v18 >= 0x17 ) { v21 = 26; if ( (v18 | 7) != 0x17 ) v21 = (v18 | 7) + 1; v19 = (char *)operator new(v21); __p = v19; *(_QWORD *)&__dst = v21 + 1; *((_QWORD *)&__dst + 1) = v18; LABEL_27: memmove(v19, &v16[v12], v18); v19[v18] = 0; if ( (__dst & 1) != 0 ) goto LABEL_23; goto LABEL_28; } LOBYTE(__dst) = 2 * v18; v19 = (char *)&__dst + 1; if ( v18 ) goto LABEL_27; BYTE1(__dst) = 0; if ( (__dst & 1) != 0 ) { LABEL_23: v20 = (const char *)__p; goto LABEL_29; } LABEL_28: v20 = (char *)&__dst + 1; LABEL_29: sscanf(v20, "lineHeight=%d", a1 + 64); v22 = (unsigned int)a2->__r_.__value_.__l.0; if ( (v22 & 1) != 0 ) { v24 = a2->__r_.__value_.__l.__size_; v23 = a2->__r_.__value_.__l.__data_; v25 = &v23[v24]; if ( v24 < 7 ) goto LABEL_37; } else { v23 = a2->__r_.__value_.__s.__data_; v24 = v22 >> 1; v25 = (char *)&a2->__r_.__value_.__l.0 + v24 + 1; if ( v24 < 7 ) goto LABEL_37; } v26 = v23; do { v27 = (char *)memchr(v26, 115, v24 - 6); if ( !v27 ) break; if ( !(*(_DWORD *)v27 ^ 0x6C616373 | *(_DWORD *)(v27 + 3) ^ 0x3D57656C) ) { v28 = (int)v27; goto LABEL_38; } v26 = v27 + 1; v24 = v25 - v26; } while ( v25 - v26 > 6 ); LABEL_37: v28 = (int)v25; v27 = v25; LABEL_38: v29 = v28 - (_DWORD)v23 + 7; v10 = v27 == v25; v30 = 6; if ( !v10 ) v30 = v29; v31 = v30; v32 = std::string::find(a2, 32, v30); v33 = (unsigned int)a2->__r_.__value_.__l.0; if ( (v33 & 1) == 0 ) { v34 = v33 >> 1; if ( v34 >= v31 ) { v35 = a2->__r_.__value_.__s.__data_; goto LABEL_45; } LABEL_122: sub_100056810(); } v34 = a2->__r_.__value_.__l.__size_; if ( v34 < v31 ) goto LABEL_122; v35 = a2->__r_.__value_.__l.__data_; LABEL_45: v36 = v32 - (int)v31; v37 = v34 - v31; if ( v37 >= v36 ) v37 = v36; if ( v37 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); if ( v37 >= 0x17 ) { v44 = 26; if ( (v37 | 7) != 0x17 ) v44 = (v37 | 7) + 1; v38 = (char *)operator new(v44); v80 = v38; *(_QWORD *)&v79 = v44 | 1; *((_QWORD *)&v79 + 1) = v37; } else { LOBYTE(v79) = 2 * v37; v38 = (char *)&v79 + 1; if ( !v37 ) { BYTE1(v79) = 0; if ( (__dst & 1) == 0 ) goto LABEL_52; goto LABEL_51; } } memmove(v38, &v35[v31], v37); v38[v37] = 0; if ( (__dst & 1) != 0 ) LABEL_51: operator delete(__p); LABEL_52: __p = v80; __dst = v79; v39 = cocos2d::CCConfiguration::sharedConfiguration(); cocos2d::CCConfiguration::getMaxTextureSize(v39); v40 = (unsigned int)a2->__r_.__value_.__l.0; if ( (v40 & 1) != 0 ) { v42 = a2->__r_.__value_.__l.__size_; v41 = a2->__r_.__value_.__l.__data_; v43 = &v41[v42]; if ( v42 < 7 ) goto LABEL_65; } else { v41 = a2->__r_.__value_.__s.__data_; v42 = v40 >> 1; v43 = (char *)&a2->__r_.__value_.__l.0 + v42 + 1; if ( v42 < 7 ) goto LABEL_65; } v45 = v41; do { v46 = (char *)memchr(v45, 115, v42 - 6); if ( !v46 ) break; if ( !(*(_DWORD *)v46 ^ 0x6C616373 | *(_DWORD *)(v46 + 3) ^ 0x3D48656C) ) { v47 = (int)v46; goto LABEL_66; } v45 = v46 + 1; v42 = v43 - v45; } while ( v43 - v45 > 6 ); LABEL_65: v47 = (int)v43; v46 = v43; LABEL_66: v48 = v47 - (_DWORD)v41 + 7; v10 = v46 == v43; v49 = 6; if ( !v10 ) v49 = v48; v50 = v49; v51 = std::string::find(a2, 32, v49); v52 = (unsigned int)a2->__r_.__value_.__l.0; if ( (v52 & 1) == 0 ) { v53 = v52 >> 1; if ( v53 >= v50 ) { v54 = a2->__r_.__value_.__s.__data_; goto LABEL_73; } LABEL_124: sub_100056810(); } v53 = a2->__r_.__value_.__l.__size_; if ( v53 < v50 ) goto LABEL_124; v54 = a2->__r_.__value_.__l.__data_; LABEL_73: v55 = v51 - (int)v50; v56 = v53 - v50; if ( v56 >= v55 ) v56 = v55; if ( v56 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); if ( v56 >= 0x17 ) { v63 = 26; if ( (v56 | 7) != 0x17 ) v63 = (v56 | 7) + 1; v57 = (char *)operator new(v63); v80 = v57; *(_QWORD *)&v79 = v63 | 1; *((_QWORD *)&v79 + 1) = v56; } else { LOBYTE(v79) = 2 * v56; v57 = (char *)&v79 + 1; if ( !v56 ) { BYTE1(v79) = 0; if ( (__dst & 1) == 0 ) goto LABEL_80; goto LABEL_79; } } memmove(v57, &v54[v50], v56); v57[v56] = 0; if ( (__dst & 1) != 0 ) LABEL_79: operator delete(__p); LABEL_80: __p = v80; __dst = v79; v58 = cocos2d::CCConfiguration::sharedConfiguration(); cocos2d::CCConfiguration::getMaxTextureSize(v58); v59 = (unsigned int)a2->__r_.__value_.__l.0; if ( (v59 & 1) != 0 ) { v61 = a2->__r_.__value_.__l.__size_; v60 = a2->__r_.__value_.__l.__data_; v62 = &v60[v61]; if ( v61 < 6 ) goto LABEL_93; } else { v60 = a2->__r_.__value_.__s.__data_; v61 = v59 >> 1; v62 = (char *)&a2->__r_.__value_.__l.0 + v61 + 1; if ( v61 < 6 ) goto LABEL_93; } v64 = v60; do { v65 = (char *)memchr(v64, 112, v61 - 5); if ( !v65 ) break; if ( !(*(_DWORD *)v65 ^ 0x65676170 | *((unsigned __int16 *)v65 + 2) ^ 0x3D73) ) { v66 = (int)v65; goto LABEL_94; } v64 = v65 + 1; v61 = v62 - v64; } while ( v62 - v64 > 5 ); LABEL_93: v66 = (int)v62; v65 = v62; LABEL_94: v67 = v66 - (_DWORD)v60 + 6; v10 = v65 == v62; v68 = 5; if ( !v10 ) v68 = v67; v69 = v68; v70 = std::string::find(a2, 32, v68); v71 = (unsigned int)a2->__r_.__value_.__l.0; if ( (v71 & 1) == 0 ) { v72 = v71 >> 1; if ( v72 >= v69 ) { v73 = a2->__r_.__value_.__s.__data_; goto LABEL_101; } LABEL_126: sub_100056810(); } v72 = a2->__r_.__value_.__l.__size_; if ( v72 < v69 ) goto LABEL_126; v73 = a2->__r_.__value_.__l.__data_; LABEL_101: v74 = v70 - (int)v69; v75 = v72 - v69; if ( v75 >= v74 ) v75 = v74; if ( v75 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); if ( v75 >= 0x17 ) { v77 = 26; if ( (v75 | 7) != 0x17 ) v77 = (v75 | 7) + 1; v76 = (char *)operator new(v77); v80 = v76; *(_QWORD *)&v79 = v77 | 1; *((_QWORD *)&v79 + 1) = v75; } else { LOBYTE(v79) = 2 * v75; v76 = (char *)&v79 + 1; if ( !v75 ) { BYTE1(v79) = 0; if ( (__dst & 1) == 0 ) goto LABEL_108; goto LABEL_107; } } memmove(v76, &v73[v69], v75); v76[v75] = 0; if ( (__dst & 1) != 0 ) LABEL_107: operator delete(__p); LABEL_108: __p = v80; __dst = v79; if ( (v79 & 1) != 0 ) operator delete(__p); }
GD Web Decomp Icon

GD Web Decomp

Raw Source