// // cocos2d::CCRectFromString from 0xad2214 to 0xad2918 (1796 bytes) // // 3 xrefs: // > cocos2d::CCSpriteFrameCache::addSpriteFramesWithDictionary @ 0xb19db8 // > cocos2d::CCSpriteFrameCache::addSpriteFramesWithDictionary @ 0xb1a010 // > @ 0x54f90 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // cocos2d::CCRect cocos2d::CCRectFromString(const char *a1) { cocos2d::CCRect *v1; // x8 cocos2d::CCRect *v3; // x22 long double v4; // q0 long double v8; // q0 int v9; // w21 long double v10; // q0 int v11; // w0 int v12; // w0 int v13; // w0 unsigned __int64 v14; // x2 unsigned __int64 v15; // x4 long double v16; // q0 char *v17; // x0 int v18; // w2 int v19; // w0 int v20; // w24 __int64 v21; // x25 double v22; // d10 double v23; // d9 double v24; // d8 float v25; // s3 float v26; // s0 float v27; // s1 float v28; // s2 __int64 *v29; // x19 __int64 *v30; // x25 __int64 v31; // x1 __int64 *v32; // x0 unsigned int *v33; // x1 int v34; // w2 __int64 *v35; // x24 char *v36; // x0 char *v37; // x0 unsigned int *v38; // x1 int v39; // w2 __int64 v40; // x19 void *v41; // x0 unsigned int *v42; // x19 int v43; // w1 __int64 *v44; // x24 __int64 *v45; // x19 __int64 v46; // x1 __int64 *v47; // x0 unsigned int *v48; // x1 int v49; // w2 unsigned int *v50; // x1 int v51; // w2 __int64 *v52; // x19 __int64 *v53; // x24 __int64 v54; // x1 __int64 *v55; // x0 unsigned int *v56; // x1 int v57; // w2 char *v58; // x0 char *v59; // x0 unsigned int *v60; // x19 __int64 *v61; // x19 __int64 v62; // x1 __int64 *v63; // x0 unsigned int *v64; // x1 int v65; // w2 unsigned int *v66; // x1 int v67; // w2 unsigned int *v68; // x1 int v69; // w2 unsigned int *v70; // x1 int v71; // w2 __int64 v72; // [xsp+70h] [xbp+70h] BYREF char *v73; // [xsp+78h] [xbp+78h] BYREF char *v74; // [xsp+80h] [xbp+80h] BYREF cocos2d::CCRect v75; // [xsp+88h] [xbp+88h] BYREF void *p; // [xsp+98h] [xbp+98h] BYREF void *v77; // [xsp+A0h] [xbp+A0h] __int64 v78; // [xsp+A8h] [xbp+A8h] void *v79; // [xsp+B0h] [xbp+B0h] BYREF void *v80; // [xsp+B8h] [xbp+B8h] __int64 v81; // [xsp+C0h] [xbp+C0h] cocos2d::CCRect result; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 v3 = v1; cocos2d::CCRect::CCRect(v1, &stru_1245078); if ( !a1 ) goto LABEL_115; sub_D153B8((int)&v72, (char *)a1); v9 = sub_D16674(&v72, 123, 0, v8); v11 = sub_D16674(&v72, 125, 0, v10); if ( v11 == -1 || (v12 = sub_D16674(&v72, 125, v11 + 1, v4), v12 == -1) || (v13 = sub_D16674(&v72, 125, v12 + 1, v4), v13 == -1) || v9 == -1 ) { v40 = v72; v41 = (void *)(v72 - 24); if ( (__int64 *)(v72 - 24) == &qword_124B6B0 ) goto LABEL_115; goto LABEL_33; } v14 = v9 + 1; v15 = *(_QWORD *)(v72 - 24); if ( v14 > v15 ) goto LABEL_114; sub_D14F84(&v79, &v72, v14, v13 - v9 - 1); sub_D163D4(&v72, &v79); v17 = (char *)v79 - 24; if ( (char *)v79 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v50 = (unsigned int *)((char *)v79 - 8); do v51 = __ldaxr(v50); while ( __stlxr(v51 - 1, v50) ); } else { v51 = *((_DWORD *)v79 - 2); *((_DWORD *)v79 - 2) = v51 - 1; } if ( v51 <= 0 ) operator delete(v17); } v18 = sub_D16674(&v72, 125, 0, v16); if ( v18 == -1 || (v19 = sub_D16674(&v72, 44, v18, v4), v20 = v19, v19 == -1) ) { LABEL_32: v40 = v72; v41 = (void *)(v72 - 24); if ( (__int64 *)(v72 - 24) == &qword_124B6B0 ) goto LABEL_115; LABEL_33: if ( &pthread_create ) { v42 = (unsigned int *)(v40 - 8); do v43 = __ldaxr(v42); while ( __stlxr(v43 - 1, v42) ); LABEL_36: if ( v43 <= 0 ) operator delete(v41); goto LABEL_115; } LABEL_54: v43 = *(_DWORD *)(v40 - 8); *(_DWORD *)(v40 - 8) = v43 - 1; goto LABEL_36; } v21 = v19; sub_D14F84(&v73, &v72, 0, v19); v14 = v20 + 1; v15 = *(_QWORD *)(v72 - 24); if ( v14 > v15 ) LABEL_114: sub_D13C5C("%s: __pos (which is %zu) > this->size() (which is %zu)", "basic_string::substr", v14, v15); sub_D14F84(&v74, &v72, v14, v15 - v21); p = nullptr; v77 = nullptr; v78 = 0; if ( !(unsigned __int8)sub_AD18EC(v73, (__int64 **)&p) ) { LABEL_44: v45 = (__int64 *)p; v35 = (__int64 *)v77; if ( p != v77 ) { do { v46 = *v45; v47 = (__int64 *)(*v45 - 24); if ( v47 != &qword_124B6B0 ) { if ( &pthread_create ) { v48 = (unsigned int *)(v46 - 8); do v49 = __ldaxr(v48); while ( __stlxr(v49 - 1, v48) ); } else { v49 = *(_DWORD *)(v46 - 8); *(_DWORD *)(v46 - 8) = v49 - 1; } if ( v49 <= 0 ) operator delete(v47); } ++v45; } while ( v35 != v45 ); v35 = (__int64 *)p; } if ( v35 ) operator delete(v35); v36 = v74 - 24; if ( v74 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v66 = (unsigned int *)(v74 - 8); do v67 = __ldaxr(v66); while ( __stlxr(v67 - 1, v66) ); } else { v67 = *((_DWORD *)v74 - 2); *((_DWORD *)v74 - 2) = v67 - 1; } if ( v67 <= 0 ) operator delete(v36); } v37 = v73 - 24; if ( v73 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v38 = (unsigned int *)(v73 - 8); do v39 = __ldaxr(v38); while ( __stlxr(v39 - 1, v38) ); } else { v39 = *((_DWORD *)v73 - 2); *((_DWORD *)v73 - 2) = v39 - 1; } if ( v39 <= 0 ) operator delete(v37); } goto LABEL_32; } v79 = nullptr; v80 = nullptr; v81 = 0; if ( !(unsigned __int8)sub_AD18EC(v74, (__int64 **)&v79) ) { v61 = (__int64 *)v79; v44 = (__int64 *)v80; if ( v79 != v80 ) { do { v62 = *v61; v63 = (__int64 *)(*v61 - 24); if ( v63 != &qword_124B6B0 ) { if ( &pthread_create ) { v64 = (unsigned int *)(v62 - 8); do v65 = __ldaxr(v64); while ( __stlxr(v65 - 1, v64) ); } else { v65 = *(_DWORD *)(v62 - 8); *(_DWORD *)(v62 - 8) = v65 - 1; } if ( v65 <= 0 ) operator delete(v63); } ++v61; } while ( v44 != v61 ); v44 = (__int64 *)v79; } if ( v44 ) operator delete(v44); goto LABEL_44; } v22 = atof(*(const char **)p); v23 = atof(*((const char **)p + 1)); v24 = atof(*(const char **)v79); v25 = atof(*(const char **)&byte_8[(_QWORD)v79]); v26 = v22; v27 = v23; v28 = v24; cocos2d::CCRect::CCRect(&v75, v26, v27, v28, v25); cocos2d::CCRect::operator=(v3, (float *)&v75.origin); v29 = (__int64 *)v79; v30 = (__int64 *)v80; if ( v79 != v80 ) { do { v31 = *v29; v32 = (__int64 *)(*v29 - 24); if ( v32 != &qword_124B6B0 ) { if ( &pthread_create ) { v33 = (unsigned int *)(v31 - 8); do v34 = __ldaxr(v33); while ( __stlxr(v34 - 1, v33) ); } else { v34 = *(_DWORD *)(v31 - 8); *(_DWORD *)(v31 - 8) = v34 - 1; } if ( v34 <= 0 ) operator delete(v32); } ++v29; } while ( v30 != v29 ); v30 = (__int64 *)v79; } if ( v30 ) operator delete(v30); v52 = (__int64 *)p; v53 = (__int64 *)v77; if ( p != v77 ) { do { v54 = *v52; v55 = (__int64 *)(*v52 - 24); if ( v55 != &qword_124B6B0 ) { if ( &pthread_create ) { v56 = (unsigned int *)(v54 - 8); do v57 = __ldaxr(v56); while ( __stlxr(v57 - 1, v56) ); } else { v57 = *(_DWORD *)(v54 - 8); *(_DWORD *)(v54 - 8) = v57 - 1; } if ( v57 <= 0 ) operator delete(v55); } ++v52; } while ( v53 != v52 ); v53 = (__int64 *)p; } if ( v53 ) operator delete(v53); v58 = v74 - 24; if ( v74 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v70 = (unsigned int *)(v74 - 8); do v71 = __ldaxr(v70); while ( __stlxr(v71 - 1, v70) ); } else { v71 = *((_DWORD *)v74 - 2); *((_DWORD *)v74 - 2) = v71 - 1; } if ( v71 <= 0 ) operator delete(v58); } v59 = v73 - 24; if ( v73 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v68 = (unsigned int *)(v73 - 8); do v69 = __ldaxr(v68); while ( __stlxr(v69 - 1, v68) ); } else { v69 = *((_DWORD *)v73 - 2); *((_DWORD *)v73 - 2) = v69 - 1; } if ( v69 <= 0 ) operator delete(v59); } v40 = v72; v41 = (void *)(v72 - 24); if ( (__int64 *)(v72 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v60 = (unsigned int *)(v72 - 8); do v43 = __ldaxr(v60); while ( __stlxr(v43 - 1, v60) ); goto LABEL_36; } goto LABEL_54; } LABEL_115: result.origin.x = *(float *)&v4; return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source