// // GJGameLevel::scoreStringToVector from 0x10055c910 to 0x10055cb51 (577 bytes) // // 2 xrefs: // > LevelLeaderboard::getLocalScores @ 0x1003dbb61 // > GJGameLevel::storeNewLocalScore @ 0x10055c785 // // 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 // void __fastcall GJGameLevel::scoreStringToVector(GJGameLevel *a1, std::string *a2, std::vector *a3) { unsigned int sizex2; // eax _QWORD *v5; // rax const char *data; // rdi int v7; // eax std::__vector_base::pointer end; // r12 int *value; // rdx std::__vector_base::pointer begin; // r13 signed __int64 v11; // r12 __int64 v12; // r14 unsigned __int64 v13; // rcx __int64 v14; // rdx unsigned __int64 v15; // rbx _DWORD *v16; // r15 int *v17; // rbx _QWORD v18[3]; // [rsp+0h] [rbp-170h] BYREF void (__cdecl **v19)(std::streambuf *__hidden); // [rsp+18h] [rbp-158h] std::locale v20; // [rsp+20h] [rbp-150h] BYREF char v21; // [rsp+58h] [rbp-118h] void *__p; // [rsp+68h] [rbp-108h] __int64 (__fastcall **v23)(); // [rsp+80h] [rbp-F0h] BYREF std::vector *v24; // [rsp+118h] [rbp-58h] std::string v25; // [rsp+120h] [rbp-50h] BYREF int *v26; // [rsp+140h] [rbp-30h] sizex2 = a2->m_data.m_short.sizex2; if ( (sizex2 & 1) != 0 ) { if ( !a2->m_data.m_long.size ) return; } else if ( !(sizex2 >> 1) ) { return; } sub_1004D0A00((__int64)v18, (const std::string *)a2, 24); memset(&v25, 0, sizeof(v25)); v24 = a3; while ( 1 ) { v5 = sub_1004D0B70(v18, &v25, 44); if ( (*((_BYTE *)v5 + *(_QWORD *)(*v5 - 24LL) + 32) & 5) != 0 ) break; data = v25.__r_.__value_.__s.__data_; if ( (*(_BYTE *)&v25.__r_.__value_.__s.0 & 1) != 0 ) data = v25.__r_.__value_.__l.__data_; v7 = atoi(data); end = a3->__end_; value = a3->__end_cap_.__value_; if ( end < value ) { *end = v7; a3->__end_ = end + 1; } else { begin = a3->__begin_; v11 = (char *)end - (char *)a3->__begin_; v12 = v11 >> 2; v13 = (v11 >> 2) + 1; if ( v13 > 0x3FFFFFFFFFFFFFFFLL ) sub_1000C40D0(); v14 = (char *)value - (char *)begin; v15 = v14 >> 1; if ( v14 >> 1 <= v13 ) v15 = (v11 >> 2) + 1; if ( (unsigned __int64)v14 >= 0x7FFFFFFFFFFFFFFCLL ) v15 = 0x3FFFFFFFFFFFFFFFLL; if ( v15 ) { LODWORD(v26) = v7; if ( v15 > 0x3FFFFFFFFFFFFFFFLL ) sub_100054850(); v16 = operator new(4 * v15); v7 = (int)v26; } else { v16 = nullptr; } v26 = &v16[v15]; v16[v12] = v7; v17 = &v16[v12 + 1]; memcpy(v16, begin, v11); a3 = v24; v24->__begin_ = v16; a3->__end_ = v17; a3->__end_cap_.__value_ = v26; if ( begin ) operator delete(begin); a3->__end_ = v17; } } if ( (*(_BYTE *)&v25.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v25.__r_.__value_.__l.__data_); v18[0] = &off_1008C3D68; v23 = off_1008C3DB8; v18[2] = off_1008C3D90; v19 = (void (__cdecl **)(std::streambuf *__hidden))&off_1008C3F58; if ( (v21 & 1) != 0 ) operator delete(__p); v19 = &`vtable for'std::streambuf.~basic_streambuf; std::locale::~locale(&v20); std::iostream::~iostream(v18, off_1008C3DD0); std::ios::~ios(&v23); }
GD Web Decomp Icon

GD Web Decomp

Raw Source