// // LevelStatsInfoPopup::buildInfoText from 0x1004f2d90 to 0x1004f349c (1804 bytes) // // 1 xrefs: // > LevelStatsInfoPopup::init @ 0x1004f2760 // // This function is hookable on this platform (idp: arm, 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 11:06:46 +0000 // void __usercall LevelStatsInfoPopup::buildInfoText(__int64 a1@, std::string *a2@) { __int64 v4; // x8 int v5; // w21 int v6; // w22 __int64 v7; // x8 __int64 v8; // x21 void *v9; // x8 std::string::size_type size; // x8 int v11; // w9 std::string *p_str; // x10 int v13; // t1 std::string::size_type v14; // x0 char v15; // w22 char v16; // w23 __int64 v17; // x0 std::string *v18; // x8 void *v19; // x0 const std::string::value_type *CString; // x0 __int64 v21; // x8 __int64 v22; // x0 __int64 v23; // x8 __int64 v24; // x0 int v25; // w26 std::string::size_type v26; // x25 std::string *p_a; // x8 const char *v28; // x9 std::string *v29; // x10 std::string *v30; // x11 void *v31; // x0 const std::string::value_type *v32; // x0 std::string *v33; // x8 void *v34; // x0 const std::string::value_type *v35; // x0 __int64 v36; // x0 std::string *v37; // x8 void *v38; // x0 const std::string::value_type *v39; // x0 void *isPlatformer; // x0 __int64 v41; // x8 std::string::size_type v42; // x9 char v43; // w8 std::string *v44; // x1 std::string::size_type v45; // x2 std::string::size_type v46; // x24 __int64 v47; // x8 std::string::size_type v48; // x24 __int64 v49; // x8 std::string *v50; // x0 std::string::size_type v51; // x24 char v52; // w25 std::string *v53; // x0 std::string::size_type v54; // x24 char v55; // w25 std::string v56; // [xsp+20h] [xbp-E0h] BYREF std::string __str; // [xsp+40h] [xbp-C0h] BYREF void *__dst[2]; // [xsp+60h] [xbp-A0h] BYREF __int64 v59; // [xsp+70h] [xbp-90h] _BYTE __p[15]; // [xsp+78h] [xbp-88h] BYREF char v61; // [xsp+8Fh] [xbp-71h] std::string __a; // [xsp+90h] [xbp-70h] BYREF v4 = *(_QWORD *)(a1 + 664); v5 = *(_DWORD *)(v4 + 620); v6 = *(_DWORD *)(v4 + 624); if ( *(char *)(v4 + 415) < 0 ) { sub_1000097D0(__dst, *(void **)(v4 + 392), *(_QWORD *)(v4 + 400)); } else { v7 = v4 + 392; *(_OWORD *)__dst = *(_OWORD *)v7; v59 = *(_QWORD *)(v7 + 16); } v8 = (unsigned int)(v5 - v6); v9 = (void *)HIBYTE(v59); if ( v59 < 0 ) v9 = __dst[1]; if ( !v9 ) { v15 = 1; v16 = 1; goto LABEL_33; } cocos2d::ZipUtils::decompressString(__dst, 0, 11, &__str); size = HIBYTE(__str.__r_.__value_.__r.__words[2]); if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL ) size = __str.__r_.__value_.__l.__size_; if ( !size ) { v15 = 1; v16 = 1; if ( (*((_BYTE *)&__str.__r_.__value_.__s + 23) & 0x80) == 0 ) goto LABEL_33; goto LABEL_32; } v11 = 0; p_str = &__str; if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL ) p_str = (std::string *)__str.__r_.__value_.__r.__words[0]; do { v13 = (unsigned __int8)p_str->__r_.__value_.__s.__data_[0]; p_str = (std::string *)((char *)p_str + 1); if ( v13 == 59 ) ++v11; --size; } while ( size ); if ( v11 ) v8 = (unsigned int)(v11 - 1); else v8 = (unsigned int)v8; v14 = std::string::find(&__str, 59, 0); if ( v14 == -1 ) { if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 ) sub_1000097D0(&v56, __str.__r_.__value_.__l.__data_, __str.__r_.__value_.__l.__size_); else v56 = __str; } else { std::string::basic_string(&v56, &__str, 0, v14, (std::allocator *)&__a); } v17 = LevelSettingsObject::objectFromString((char *)&v56); if ( v17 ) { v16 = *(_BYTE *)(v17 + 457) ^ 1; v15 = *(_BYTE *)(v17 + 458) ^ 1; } else { v15 = 1; v16 = 1; } if ( SHIBYTE(v56.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v56.__r_.__value_.__l.__data_); if ( (*((_BYTE *)&__str.__r_.__value_.__s + 23) & 0x80) != 0 ) LABEL_32: operator delete(__str.__r_.__value_.__l.__data_); LABEL_33: a2->__r_.__value_.__r.__words[0] = 0; a2->__r_.__value_.__l.__size_ = 0; a2->__r_.__value_.__r.__words[2] = 0; if ( *(_DWORD *)(*(_QWORD *)(a1 + 664) + 1140LL) == 2 ) { GameToolbox::pointsToString(v8, (__int64)&__str); if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v18 = &__str; else v18 = (std::string *)__str.__r_.__value_.__r.__words[0]; v19 = sub_1003065B0("Objects: %s", (const char *)v18); CString = (const std::string::value_type *)cocos2d::CCString::getCString((__int64)v19); std::string::assign(a2, CString); goto LABEL_61; } sub_100009900(&__str, "NA"); v21 = *(_QWORD *)(a1 + 664); v22 = *(unsigned int *)(v21 + 512); if ( (int)v22 < 1 ) { if ( *(char *)(v21 + 487) < 0 ) sub_1000097D0(&v56, *(void **)(v21 + 464), *(_QWORD *)(v21 + 472)); else v56 = *(std::string *)(v21 + 464); if ( SHIBYTE(v56.__r_.__value_.__r.__words[2]) < 0 ) { v46 = v56.__r_.__value_.__l.__size_; operator delete(v56.__r_.__value_.__l.__data_); if ( !v46 ) goto LABEL_42; } else if ( !*((_BYTE *)&v56.__r_.__value_.__s + 23) ) { goto LABEL_42; } v47 = *(_QWORD *)(a1 + 664); if ( *(char *)(v47 + 487) < 0 ) sub_1000097D0(&v56, *(void **)(v47 + 464), *(_QWORD *)(v47 + 472)); else v56 = *(std::string *)(v47 + 464); v50 = std::string::append(&v56, " ago"); v51 = v50->__r_.__value_.__r.__words[0]; __a.__r_.__value_.__r.__words[0] = v50->__r_.__value_.__l.__size_; *(std::string::size_type *)((char *)__a.__r_.__value_.__r.__words + 7) = *(std::string::size_type *)((char *)&v50->__r_.__value_.__r.__words[1] + 7); v52 = HIBYTE(v50->__r_.__value_.__r.__words[2]); v50->__r_.__value_.__l.__size_ = 0; v50->__r_.__value_.__r.__words[2] = 0; v50->__r_.__value_.__r.__words[0] = 0; if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__str.__r_.__value_.__l.__data_); __str.__r_.__value_.__r.__words[0] = v51; __str.__r_.__value_.__l.__size_ = __a.__r_.__value_.__r.__words[0]; *(std::string::size_type *)((char *)&__str.__r_.__value_.__r.__words[1] + 7) = *(std::string::size_type *)((char *)__a.__r_.__value_.__r.__words + 7); *((_BYTE *)&__str.__r_.__value_.__s + 23) = v52; if ( SHIBYTE(v56.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v56.__r_.__value_.__l.__data_); } else { sub_10004F000(v22, &v56); if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__str.__r_.__value_.__l.__data_); __str = v56; } LABEL_42: sub_100009900(&v56, "NA"); v23 = *(_QWORD *)(a1 + 664); v24 = *(unsigned int *)(v23 + 516); if ( (int)v24 >= 1 ) { sub_10004F000(v24, &__a); if ( SHIBYTE(v56.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v56.__r_.__value_.__l.__data_); v56 = __a; goto LABEL_46; } if ( *(char *)(v23 + 511) < 0 ) sub_1000097D0(&__a, *(void **)(v23 + 488), *(_QWORD *)(v23 + 496)); else __a = *(std::string *)(v23 + 488); if ( (SHIBYTE(__a.__r_.__value_.__r.__words[2]) & 0x80000000) == 0 ) { if ( !*((_BYTE *)&__a.__r_.__value_.__s + 23) ) goto LABEL_46; LABEL_117: v49 = *(_QWORD *)(a1 + 664); if ( *(char *)(v49 + 511) < 0 ) sub_1000097D0(&__a, *(void **)(v49 + 488), *(_QWORD *)(v49 + 496)); else __a = *(std::string *)(v49 + 488); v53 = std::string::append(&__a, " ago"); v54 = v53->__r_.__value_.__r.__words[0]; *(_QWORD *)__p = v53->__r_.__value_.__l.__size_; *(_QWORD *)&__p[7] = *(std::string::size_type *)((char *)&v53->__r_.__value_.__r.__words[1] + 7); v55 = HIBYTE(v53->__r_.__value_.__r.__words[2]); v53->__r_.__value_.__l.__size_ = 0; v53->__r_.__value_.__r.__words[2] = 0; v53->__r_.__value_.__r.__words[0] = 0; if ( SHIBYTE(v56.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v56.__r_.__value_.__l.__data_); v56.__r_.__value_.__r.__words[0] = v54; v56.__r_.__value_.__l.__size_ = *(_QWORD *)__p; *(std::string::size_type *)((char *)&v56.__r_.__value_.__r.__words[1] + 7) = *(_QWORD *)&__p[7]; *((_BYTE *)&v56.__r_.__value_.__s + 23) = v55; if ( SHIBYTE(__a.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__a.__r_.__value_.__l.__data_); goto LABEL_46; } v48 = __a.__r_.__value_.__l.__size_; operator delete(__a.__r_.__value_.__l.__data_); if ( v48 ) goto LABEL_117; LABEL_46: sub_10004F198(*(unsigned int *)(*(_QWORD *)(a1 + 664) + 792LL), &__a); v25 = SHIBYTE(__a.__r_.__value_.__r.__words[2]); v26 = __a.__r_.__value_.__r.__words[0]; GameToolbox::pointsToString(v8, (__int64)__p); p_a = &__a; if ( v25 < 0 ) p_a = (std::string *)v26; if ( v61 >= 0 ) v28 = __p; else v28 = *(const char **)__p; v29 = &__str; if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL ) v29 = (std::string *)__str.__r_.__value_.__r.__words[0]; v30 = &v56; if ( (v56.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL ) v30 = (std::string *)v56.__r_.__value_.__r.__words[0]; v31 = sub_1003065B0( "Game Version: %s\nObjects: %s\nUploaded: %s\nUpdated: %s", (const char *)p_a, v28, (const char *)v29, (const char *)v30); v32 = (const std::string::value_type *)cocos2d::CCString::getCString((__int64)v31); std::string::assign(a2, v32); if ( v61 < 0 ) operator delete(*(void **)__p); if ( SHIBYTE(__a.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__a.__r_.__value_.__l.__data_); if ( SHIBYTE(v56.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v56.__r_.__value_.__l.__data_); LABEL_61: if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__str.__r_.__value_.__l.__data_); sub_1004F38C0(&__str, *(unsigned int *)(*(_QWORD *)(a1 + 664) + 652LL)); if ( (v16 & 1) == 0 ) { if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 ) { v33 = (std::string *)__str.__r_.__value_.__r.__words[0]; if ( __str.__r_.__value_.__l.__size_ != 2 || *(_WORD *)__str.__r_.__value_.__l.__data_ != 16718 ) goto LABEL_74; } else if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) != 2 || LOWORD(__str.__r_.__value_.__l.__data_) != 16718 ) { v33 = &__str; LABEL_74: v34 = sub_1003065B0("\nIn Editor: %s", (const char *)v33); v35 = (const std::string::value_type *)cocos2d::CCString::getCString((__int64)v34); std::string::append(a2, v35); } } v36 = *(_QWORD *)(a1 + 664); if ( !((*(_DWORD *)(v36 + 656) < 1) | v15 & 1) ) { sub_1004F38C0(&v56, *(unsigned int *)(v36 + 656)); if ( (v56.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v37 = &v56; else v37 = (std::string *)v56.__r_.__value_.__r.__words[0]; v38 = sub_1003065B0("\nEditor (C): %s", (const char *)v37); v39 = (const std::string::value_type *)cocos2d::CCString::getCString((__int64)v38); std::string::append(a2, v39); if ( SHIBYTE(v56.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v56.__r_.__value_.__l.__data_); v36 = *(_QWORD *)(a1 + 664); } isPlatformer = (void *)GJGameLevel::isPlatformer(v36); if ( ((unsigned __int8)isPlatformer & 1) == 0 ) { v41 = *(_QWORD *)(a1 + 664); if ( *(char *)(v41 + 1231) < 0 ) isPlatformer = sub_1000097D0(&__a, *(void **)(v41 + 1208), *(_QWORD *)(v41 + 1216)); else __a = *(std::string *)(v41 + 1208); sub_1004F3980(&v56, isPlatformer, &__a); if ( SHIBYTE(__a.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__a.__r_.__value_.__l.__data_); v42 = HIBYTE(v56.__r_.__value_.__r.__words[2]); v43 = HIBYTE(v56.__r_.__value_.__r.__words[2]); if ( (v56.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL ) v42 = v56.__r_.__value_.__l.__size_; if ( v42 ) { std::string::append(a2, "\nProgress: "); if ( (v56.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v44 = &v56; else v44 = (std::string *)v56.__r_.__value_.__r.__words[0]; if ( (v56.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v45 = HIBYTE(v56.__r_.__value_.__r.__words[2]); else v45 = v56.__r_.__value_.__l.__size_; std::string::append(a2, (const std::string::value_type *)v44, v45); v43 = HIBYTE(v56.__r_.__value_.__r.__words[2]); } if ( v43 < 0 ) operator delete(v56.__r_.__value_.__l.__data_); } if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__str.__r_.__value_.__l.__data_); if ( SHIBYTE(v59) < 0 ) operator delete(__dst[0]); }
GD Web Decomp Icon

GD Web Decomp

Raw Source