// // sub_1000A5024 from 0x1000a5024 to 0x1000a57e4 (1984 bytes) // // 1 xrefs: // > GameLevelManager::handleIt @ 0x1000925ac // // 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 10:58:33 +0000 // __int64 __fastcall sub_1000A5024(__int64 a1, char *a2, const std::string *a3) { const std::string *v6; // x1 std::string *v7; // x0 __int64 v8; // x19 void *v9; // x22 _BOOL4 v10; // w0 _BOOL4 v11; // w22 int v12; // w22 const char *v13; // x0 __int64 result; // x0 __int64 (__fastcall ***v15)(_QWORD, __int64, __int64, _QWORD, __int64); // x20 __int64 v16; // x1 _QWORD *v17; // x0 __int64 v18; // x21 __int64 (*v19)(void); // x8 __int64 v20; // x0 char *CString; // x0 _QWORD *v22; // x0 __int64 v23; // x22 __int64 v24; // x0 __int64 v25; // x0 __int64 v26; // x0 __int64 v27; // x23 __int64 v28; // x0 char *v29; // x0 _QWORD *v30; // x0 __int64 v31; // x24 __int64 v32; // x0 __int64 v33; // x25 __int64 v34; // x0 char *v35; // x0 __int64 v36; // x27 __int64 v37; // x22 __int64 v38; // x0 int v39; // w0 __int64 v40; // x0 __int64 v41; // x0 const std::string::value_type *v42; // x0 __int64 v43; // x0 char *v44; // x0 __int64 v45; // x0 char *v46; // x0 __int64 v47; // x0 const std::string::value_type *v48; // x0 __int64 v49; // x0 __int64 v50; // x0 __int64 v51; // x0 __int64 v52; // x0 const std::string::value_type *v53; // x0 _QWORD *v54; // x28 __int64 v55; // x0 __int64 v56; // x0 __int64 v57; // x0 __int64 v58; // x0 __int64 v59; // x0 __int64 v60; // x0 const std::string::value_type *v61; // x0 __int64 v62; // x0 __int64 v63; // x27 __int64 v64; // x0 __int64 v65; // x0 __int64 v66; // x8 __int64 v67; // x0 __int64 v68; // x0 __int64 v69; // x0 unsigned int v70; // [xsp+10h] [xbp-D0h] unsigned int v71; // [xsp+14h] [xbp-CCh] void *v72[2]; // [xsp+18h] [xbp-C8h] BYREF char v73; // [xsp+2Fh] [xbp-B1h] std::allocator __a[8]; // [xsp+30h] [xbp-B0h] BYREF char v75; // [xsp+47h] [xbp-99h] void *v76[2]; // [xsp+48h] [xbp-98h] BYREF char v77; // [xsp+5Fh] [xbp-81h] void *__p[2]; // [xsp+60h] [xbp-80h] BYREF char v79; // [xsp+77h] [xbp-69h] std::string v80; // [xsp+78h] [xbp-68h] BYREF v6 = a3; if ( SHIBYTE(a3->__r_.__value_.__r.__words[2]) < 0 ) v6 = (const std::string *)a3->__r_.__value_.__r.__words[0]; sub_1000ADC9C(a1, v6); v7 = std::string::basic_string(&v80, a3, 0xEu, 0xFFFFFFFFFFFFFFFFLL, __a); if ( SHIBYTE(v80.__r_.__value_.__r.__words[2]) < 0 ) { v9 = (void *)v80.__r_.__value_.__r.__words[0]; v8 = atoi(v80.__r_.__value_.__l.__data_); operator delete(v9); } else { v8 = atoi((const char *)v7); } sub_100009900(&v80, "-1"); v10 = sub_1000045BC(a2, &v80); v11 = v10; if ( SHIBYTE(v80.__r_.__value_.__r.__words[2]) < 0 ) { operator delete(v80.__r_.__value_.__l.__data_); if ( v11 ) { LABEL_21: result = *(_QWORD *)(a1 + 456); if ( !result ) return result; v19 = *(__int64 (**)(void))(*(_QWORD *)result + 8LL); return v19(); } } else if ( v10 ) { goto LABEL_21; } v12 = a2[23]; v13 = a2; if ( v12 < 0 ) v13 = *(const char **)a2; result = atoi(v13); if ( (_DWORD)result == -2 ) { v15 = *(__int64 (__fastcall ****)(_QWORD, __int64, __int64, _QWORD, __int64))(a1 + 456); if ( v15 ) { v16 = sub_1002E736C(result); return (**v15)(v15, v16, v8, 0, 10); } } else if ( (result & 0x80000000) != 0 ) { result = *(_QWORD *)(a1 + 456); if ( result ) { v19 = *(__int64 (**)(void))(*(_QWORD *)result + 8LL); return v19(); } } else { if ( v12 < 0 ) a2 = *(char **)a2; v17 = sub_100009900(&v80, a2); v18 = sub_1000A72B8(v17, "#"); if ( SHIBYTE(v80.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v80.__r_.__value_.__l.__data_); if ( (unsigned int)sub_1002E757C(v18) <= 1 ) goto LABEL_21; v20 = cocos2d::CCArray::stringAtIndex(v18, 1); CString = (char *)cocos2d::CCString::getCString(v20); v22 = sub_100009900(&v80, CString); v23 = sub_1000A72B8(v22, ":"); if ( SHIBYTE(v80.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v80.__r_.__value_.__l.__data_); if ( (unsigned int)sub_1002E757C(v23) ) { v24 = cocos2d::CCArray::stringAtIndex(v23, 0); v71 = cocos2d::CCString::intValue(v24); } else { v71 = 0; } v25 = sub_1002E757C(v23); if ( (unsigned int)v25 < 3 ) { v70 = 10; } else { v26 = cocos2d::CCArray::stringAtIndex(v23, 2); v25 = cocos2d::CCString::intValue(v26); v70 = v25; } v27 = sub_1002E736C(v25); v28 = cocos2d::CCArray::stringAtIndex(v18, 0); v29 = (char *)cocos2d::CCString::getCString(v28); v30 = sub_100009900(&v80, v29); v31 = sub_1000A72B8(v30, "|"); if ( SHIBYTE(v80.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v80.__r_.__value_.__l.__data_); v32 = sub_1002E757C(v31); if ( (_DWORD)v32 ) { v33 = 0; do { v34 = cocos2d::CCArray::stringAtIndex(v31, v33); v35 = (char *)cocos2d::CCString::getCString(v34); sub_100009900(__p, v35); v36 = sub_1000A8FB4(__p, 0); if ( v79 < 0 ) operator delete(__p[0]); v37 = sub_1000C758C(); sub_100009900(&v80, "1"); v38 = cocos2d::CCDictionary::valueForKey(v36, &v80); v39 = cocos2d::CCString::intValue(v38); *(_DWORD *)(v37 + 56) = v39; if ( SHIBYTE(v80.__r_.__value_.__r.__words[2]) < 0 ) { operator delete(v80.__r_.__value_.__l.__data_); v39 = *(_DWORD *)(v37 + 56); } if ( v39 >= 1 ) { sub_100009900(&v80, "2"); v40 = cocos2d::CCDictionary::valueForKey(v36, &v80); *(_DWORD *)(v37 + 60) = cocos2d::CCString::intValue(v40); if ( SHIBYTE(v80.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v80.__r_.__value_.__l.__data_); sub_100009900(&v80, "3"); v41 = cocos2d::CCDictionary::valueForKey(v36, &v80); v42 = (const std::string::value_type *)cocos2d::CCString::getCString(v41); std::string::assign((std::string *)(v37 + 64), v42); if ( SHIBYTE(v80.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v80.__r_.__value_.__l.__data_); sub_100009900(__a, "4"); v43 = cocos2d::CCDictionary::valueForKey(v36, __a); v44 = (char *)cocos2d::CCString::getCString(v43); sub_100009900(v76, v44); LevelTools::base64DecodeString(&v80, v76); if ( *(char *)(v37 + 111) < 0 ) operator delete(*(void **)(v37 + 88)); *(std::string *)(v37 + 88) = v80; *((_BYTE *)&v80.__r_.__value_.__s + 23) = 0; v80.__r_.__value_.__s.__data_[0] = 0; if ( v77 < 0 ) operator delete(v76[0]); if ( v75 < 0 ) operator delete(*(void **)&__a[0].std::__non_trivial_if); sub_100009900(__a, "5"); v45 = cocos2d::CCDictionary::valueForKey(v36, __a); v46 = (char *)cocos2d::CCString::getCString(v45); sub_100009900(v72, v46); LevelTools::base64DecodeString(&v80, v72); if ( *(char *)(v37 + 135) < 0 ) operator delete(*(void **)(v37 + 112)); *(std::string *)(v37 + 112) = v80; *((_BYTE *)&v80.__r_.__value_.__s + 23) = 0; v80.__r_.__value_.__s.__data_[0] = 0; if ( v73 < 0 ) operator delete(v72[0]); if ( v75 < 0 ) operator delete(*(void **)&__a[0].std::__non_trivial_if); sub_100009900(&v80, "6"); v47 = cocos2d::CCDictionary::valueForKey(v36, &v80); v48 = (const std::string::value_type *)cocos2d::CCString::getCString(v47); std::string::assign((std::string *)(v37 + 136), v48); if ( SHIBYTE(v80.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v80.__r_.__value_.__l.__data_); sub_100009900(&v80, "7"); v49 = cocos2d::CCDictionary::valueForKey(v36, &v80); *(_BYTE *)(v37 + 160) = cocos2d::CCString::boolValue(v49); if ( SHIBYTE(v80.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v80.__r_.__value_.__l.__data_); sub_100009900(&v80, "8"); v50 = cocos2d::CCDictionary::valueForKey(v36, &v80); *(_DWORD *)(v37 + 164) = cocos2d::CCString::intValue(v50); if ( SHIBYTE(v80.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v80.__r_.__value_.__l.__data_); sub_100009900(&v80, "9"); v51 = cocos2d::CCDictionary::valueForKey(v36, &v80); *(_DWORD *)(v37 + 168) = cocos2d::CCString::intValue(v51); if ( SHIBYTE(v80.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v80.__r_.__value_.__l.__data_); sub_100009900(&v80, "10"); v52 = cocos2d::CCDictionary::valueForKey(v36, &v80); v53 = (const std::string::value_type *)cocos2d::CCString::getCString(v52); v54 = (_QWORD *)(v37 + 176); std::string::assign((std::string *)(v37 + 176), v53); if ( SHIBYTE(v80.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v80.__r_.__value_.__l.__data_); sub_100009900(&v80, "11"); v55 = cocos2d::CCDictionary::valueForKey(v36, &v80); *(_DWORD *)(v37 + 200) = cocos2d::CCString::intValue(v55); if ( SHIBYTE(v80.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v80.__r_.__value_.__l.__data_); sub_100009900(&v80, "12"); v56 = cocos2d::CCDictionary::valueForKey(v36, &v80); *(_DWORD *)(v37 + 204) = cocos2d::CCString::intValue(v56); if ( SHIBYTE(v80.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v80.__r_.__value_.__l.__data_); sub_100009900(&v80, "13"); v57 = cocos2d::CCDictionary::valueForKey(v36, &v80); *(_DWORD *)(v37 + 208) = cocos2d::CCString::intValue(v57); if ( SHIBYTE(v80.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v80.__r_.__value_.__l.__data_); sub_100009900(&v80, "14"); v58 = cocos2d::CCDictionary::valueForKey(v36, &v80); *(_DWORD *)(v37 + 212) = cocos2d::CCString::intValue(v58); if ( SHIBYTE(v80.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v80.__r_.__value_.__l.__data_); sub_100009900(&v80, "15"); v59 = cocos2d::CCDictionary::valueForKey(v36, &v80); *(_DWORD *)(v37 + 216) = cocos2d::CCString::intValue(v59); if ( SHIBYTE(v80.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v80.__r_.__value_.__l.__data_); sub_100009900(&v80, "16"); v60 = cocos2d::CCDictionary::valueForKey(v36, &v80); v61 = (const std::string::value_type *)cocos2d::CCString::getCString(v60); std::string::assign((std::string *)(v37 + 224), v61); if ( SHIBYTE(v80.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v80.__r_.__value_.__l.__data_); sub_1002E74E0(v27, v37); if ( *(int *)(v37 + 200) >= 1 ) { v63 = GameStatsManager::sharedState(v62); v64 = sub_1003065B0("%i", *(_DWORD *)(v37 + 200)); v65 = cocos2d::CCString::getCString(v64); v62 = sub_1003CE448(v63, v65, *(unsigned int *)(v37 + 204)); } v66 = *(char *)(v37 + 199); if ( v66 < 0 ) v66 = *(_QWORD *)(v37 + 184); if ( v66 ) { v67 = GameManager::sharedState(v62); if ( *(char *)(v37 + 199) < 0 ) v54 = (_QWORD *)*v54; GameManager::reportAchievementWithID(v67, v54, 100, 0); } } v33 = (unsigned int)(v33 + 1); v32 = sub_1002E757C(v31); } while ( (unsigned int)v33 < (unsigned int)v32 ); } if ( !(_DWORD)v8 ) { v68 = GJAccountManager::sharedState(v32); v69 = cocos2d::CCDictionary::objectForKey_1( *(_QWORD *)(a1 + 1120), *(int *)(v68 + 352) - (__int64)*(int *)(v68 + 356)); if ( v69 ) *(_QWORD *)(v69 + 704) = 0; } result = *(_QWORD *)(a1 + 456); if ( result ) return (**(__int64 (__fastcall ***)(__int64, __int64, __int64, _QWORD, _QWORD))result)(result, v27, v8, v71, v70); } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source