// // cocos2d::CCDictionary::getFirstKey from 0xd4192c to 0xd41af0 (452 bytes) // // 6 xrefs: // > GameLevelManager::markLevelAsDownloaded @ 0x8020fc // > GameLevelManager::markLevelAsRatedStars @ 0x8023e4 // > GameLevelManager::markLevelAsRatedDemon @ 0x802670 // > GameLevelManager::markLevelAsReported @ 0x80434c // > GameLevelManager::markItemAsLiked @ 0x8149f8 // > @ 0xba868 // // 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 13:07:31 +0000 // __int64 *__usercall cocos2d::CCDictionary::getFirstKey@(__int64 *__return_ptr a1@, const char **this@) { const void *v5; // x23 size_t v6; // x0 size_t v7; // x21 size_t v8; // x20 unsigned __int64 v9; // x22 char *v10; // x22 char *v11; // x0 __int64 v12; // x20 unsigned __int64 v13; // x24 char *v14; // x25 unsigned __int64 v15; // x0 __int64 v16; // x0 __int64 v17; // x27 _BYTE *v18; // x26 _BYTE *v19; // x0 *a1 = 0; a1[1] = 0; a1[2] = 0; if ( !(unsigned int)cocos2d::CCDictionary::count((cocos2d::CCDictionary *)this) ) return a1; if ( *((_DWORD *)this + 16) != 1 ) return a1; v5 = *(this + 7); if ( !v5 ) return a1; v6 = strlen(*(this + 7)); v7 = v6; if ( (*(_BYTE *)a1 & 1) != 0 ) { v8 = a1[1]; v9 = (*a1 & 0xFFFFFFFFFFFFFFFELL) - 1; if ( v6 <= v9 - v8 ) { if ( !v6 ) return a1; v10 = (char *)a1[2]; goto LABEL_9; } v13 = v6 + v8; v14 = (char *)a1[2]; if ( v9 > 0x7FFFFFFFFFFFFFE6LL ) { v19 = (_BYTE *)operator new(0xFFFFFFFFFFFFFFEFLL); v18 = v19; if ( !v8 ) { v17 = -17; memcpy(v19, v5, v7); goto LABEL_28; } v17 = -17; goto LABEL_22; } LABEL_17: v15 = 2 * v9; if ( 2 * v9 < v13 ) v15 = v13; if ( v15 <= 0x16 ) { v17 = 23; v16 = 23; } else { v16 = (v15 + 16) & 0xFFFFFFFFFFFFFFF0LL; v17 = v16 | 1; } v18 = (_BYTE *)operator new(v16); if ( !v8 ) { LABEL_23: memcpy(&v18[v8], v5, v7); if ( v9 == 22 ) { LABEL_24: a1[2] = (__int64)v18; *a1 = v17; a1[1] = v13; v18[v13] = 0; return a1; } LABEL_28: operator delete(v14); goto LABEL_24; } LABEL_22: memcpy(v18, v14, v8); goto LABEL_23; } v8 = *(_BYTE *)a1 >> 1; v9 = 22; if ( v6 > 22 - v8 ) { v13 = v6 + v8; v14 = (char *)a1 + 1; goto LABEL_17; } v10 = (char *)a1 + 1; if ( !v6 ) return a1; LABEL_9: v11 = &v10[v8]; v12 = v8 + v7; memcpy(v11, v5, v7); if ( (*(_BYTE *)a1 & 1) != 0 ) a1[1] = v12; else *(_BYTE *)a1 = 2 * v12; v10[v12] = 0; return a1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source