// // cocos2d::CCRectFromString from 0x1001a6168 to 0x1001a6430 (712 bytes) // // 2 xrefs: // > cocos2d::CCSpriteFrameCache::addSpriteFramesWithDictionary @ 0x1003bc13c // > cocos2d::CCSpriteFrameCache::addSpriteFramesWithDictionary @ 0x1003bc4dc // // 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 __fastcall cocos2d::CCRectFromString(const char *a1) { _QWORD *v1; // x8 _QWORD *v3; // x19 double v4; // d0 const std::string *v8; // x0 int v9; // w20 int v10; // w0 char v11; // w21 int v12; // w0 std::string::size_type v13; // x21 std::string::size_type size; // x8 std::string *v15; // x0 std::string *p_a; // x0 __int64 v17; // x20 const char *v18; // x0 double v19; // d8 const char *v20; // x0 double v21; // d0 const char *v22; // x0 float v23; // s8 float v24; // s9 float v25; // s10 const char *v26; // x0 float v27; // s3 void **v28[2]; // [xsp+0h] [xbp-D0h] BYREF void **v29[3]; // [xsp+10h] [xbp-C0h] BYREF std::allocator v30[8]; // [xsp+28h] [xbp-A8h] BYREF __int64 v31; // [xsp+30h] [xbp-A0h] __int64 v32; // [xsp+38h] [xbp-98h] std::string __a; // [xsp+40h] [xbp-90h] BYREF std::string v34; // [xsp+58h] [xbp-78h] BYREF std::string __str; // [xsp+70h] [xbp-60h] BYREF cocos2d::CCRect result; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 v3 = v1; v4 = sub_100022B98(v1, (__int64)&unk_10086BFD0); if ( a1 ) { v8 = (const std::string *)sub_100009900(&__str, (char *)a1); v9 = std::string::find(v8, 123, 0); v10 = std::string::find(&__str, 125, 0); if ( v10 != -1 ) { v11 = 0; do { v10 = std::string::find(&__str, 125, v10 + 1); if ( (v11 & 1) != 0 ) break; v11 = 1; } while ( v10 != 0xFFFFFFFFLL ); if ( v9 != -1 && v10 != 0xFFFFFFFFLL ) { std::string::basic_string(&v34, &__str, v9 + 1, v10 + ~v9, (std::allocator *)&__a); if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__str.__r_.__value_.__l.__data_); __str = v34; v12 = std::string::find(&__str, 125, 0); if ( v12 != -1 ) { v13 = std::string::find(&__str, 44, v12); if ( (_DWORD)v13 != -1 ) { std::string::basic_string(&v34, &__str, 0, (int)v13, (std::allocator *)&__a); size = HIBYTE(__str.__r_.__value_.__r.__words[2]); if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL ) size = __str.__r_.__value_.__l.__size_; std::string::basic_string( &__a, &__str, (__int64)((__int64)&_mh_execute_header + (v13 << 32)) >> 32, size - (int)v13, v30); *(_QWORD *)&v30[0].std::__non_trivial_if = 0; v31 = 0; v32 = 0; if ( (v34.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v15 = &v34; else v15 = (std::string *)v34.__r_.__value_.__r.__words[0]; if ( (sub_1001A64AC((char *)v15) & 1) != 0 ) { memset(v29, 0, sizeof(v29)); if ( (__a.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) p_a = &__a; else p_a = (std::string *)__a.__r_.__value_.__r.__words[0]; if ( (sub_1001A64AC((char *)p_a) & 1) != 0 ) { v17 = *(_QWORD *)&v30[0].std::__non_trivial_if; v18 = *(const char **)&v30[0].std::__non_trivial_if; if ( *(char *)(*(_QWORD *)&v30[0].std::__non_trivial_if + 23LL) < 0 ) v18 = **(const char ***)&v30[0].std::__non_trivial_if; v19 = atof(v18); v20 = (const char *)(v17 + 24); if ( *(char *)(v17 + 47) < 0 ) v20 = *(const char **)v20; v21 = atof(v20); v22 = (const char *)v29[0]; if ( *((char *)v29[0] + 23) < 0 ) v22 = (const char *)*v29[0]; v23 = v19; v24 = v21; v25 = atof(v22); v26 = (const char *)(v29[0] + 3); if ( *((char *)v29[0] + 47) < 0 ) v26 = *(const char **)v26; v27 = atof(v26); sub_100022990((float *)v28, v23, v24, v25, v27); sub_100022BB0(v3, (__int64)v28); } v28[0] = (void **)v29; sub_1000177FC(v28); } v29[0] = (void **)v30; sub_1000177FC(v29); if ( SHIBYTE(__a.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__a.__r_.__value_.__l.__data_); if ( SHIBYTE(v34.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v34.__r_.__value_.__l.__data_); } } } } if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__str.__r_.__value_.__l.__data_); } result.origin.x = *(float *)&v4; return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source