// // cocos2d::CCScheduler::priorityIn from 0x5aea84 to 0x5aed12 (654 bytes) // // 1 xrefs: // > cocos2d::CCScheduler::scheduleUpdateForTarget @ 0x5af074 // // 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 cocos2d::CCScheduler::priorityIn( cocos2d::CCScheduler *a1, cocos2d::_listEntry **a2, cocos2d::CCObject *a3, int a4, bool a5) { _DWORD *v9; // r5 cocos2d::_listEntry *v10; // r0 cocos2d::_listEntry *v11; // r1 int v12; // r3 char *v13; // r4 cocos2d::_hashUpdateEntry *m_pHashForUpdates; // r8 char *v15; // r6 _DWORD *v16; // r0 _DWORD *v17; // r5 void *v18; // r0 int v19; // r2 int v20; // r3 int v21; // r1 cocos2d::_hashUpdateEntry *v22; // r1 int v23; // r5 int v24; // r2 int v25; // r0 unsigned int v26; // r2 unsigned int v27; // r3 int v28; // r0 unsigned int v29; // r2 unsigned int v30; // r3 int v31; // r0 unsigned int v32; // r2 unsigned int v33; // r3 unsigned int v34; // r2 int *v35; // r0 int v36; // r2 int v37; // r1 int v38; // r0 int v39; // r2 int v40; // r7 unsigned int v41; // r1 size_t v42; // r6 char *v43; // r0 char *v44; // r10 int v45; // r2 unsigned int v46; // r7 int v47; // r11 int v48; // r3 unsigned int v49; // r7 int v50; // r6 _DWORD *i; // r8 int v52; // r9 unsigned int v53; // r0 int v54; // r3 _DWORD *v55; // r3 int v56; // r2 unsigned int v57; // r1 unsigned int v58; // r2 bool v59; // cc unsigned int v60; // r2 _DWORD *v61; // [sp+0h] [bp-14h] v9 = malloc(0x14u); v9[2] = a3; v9[3] = a4; *((_BYTE *)v9 + 16) = a5; *v9 = 0; v9[1] = 0; *((_BYTE *)v9 + 17) = 0; v10 = *a2; if ( *a2 ) { v11 = *a2; while ( a4 >= *((_DWORD *)v11 + 3) ) { v11 = *((cocos2d::_listEntry **)v11 + 1); if ( !v11 ) { *v9 = *(_DWORD *)v10; *(_DWORD *)(*(_DWORD *)v10 + 4) = v9; *(_DWORD *)*a2 = v9; v9[1] = 0; goto LABEL_13; } } v12 = *(_DWORD *)v11; v9[1] = v11; *v9 = v12; if ( v11 == v10 ) { *(_DWORD *)v11 = v9; *a2 = (cocos2d::_listEntry *)v9; } else { v12 = *(_DWORD *)v11; } if ( v11 != v10 ) { *(_DWORD *)(v12 + 4) = v9; *(_DWORD *)v11 = v9; } } else { *a2 = (cocos2d::_listEntry *)v9; *v9 = v9; } LABEL_13: v13 = (char *)calloc(0x2Cu, 1u); *((_DWORD *)v13 + 2) = a3; cocos2d::CCObject::retain(a3); m_pHashForUpdates = a1->m_pHashForUpdates; *(_DWORD *)v13 = a2; *((_DWORD *)v13 + 5) = 0; v15 = v13 + 12; *((_DWORD *)v13 + 1) = v9; *((_DWORD *)v13 + 8) = v13 + 8; *((_DWORD *)v13 + 9) = 4; if ( m_pHashForUpdates ) { v19 = *((_DWORD *)m_pHashForUpdates + 3); v20 = *(_DWORD *)(v19 + 16); v21 = *(_DWORD *)(v19 + 20); *(_DWORD *)(v20 + 8) = v13; *((_DWORD *)v13 + 4) = v20 - v21; *(_DWORD *)(v19 + 16) = v15; } else { a1->m_pHashForUpdates = (cocos2d::_hashUpdateEntry *)v13; *((_DWORD *)v13 + 4) = 0; v16 = malloc(0x2Cu); v17 = v16; *((_DWORD *)v13 + 3) = v16; if ( !v16 ) goto LABEL_15; memset(v16, 0, 0x2Cu); v17[4] = v15; v17[1] = 32; v17[2] = 5; v17[5] = 12; v18 = malloc(0x180u); *v17 = v18; if ( !v18 ) goto LABEL_15; memset(v18, 0, 0x180u); v17[10] = -1609490463; } v22 = a1->m_pHashForUpdates; v23 = *((_DWORD *)v22 + 3); ++*(_DWORD *)(v23 + 12); v24 = (unsigned __int8)v13[8]; *((_DWORD *)v13 + 3) = v23; v25 = (v24 + 17973517 + ((unsigned __int8)v13[11] << 24) + ((unsigned __int8)v13[10] << 16) + ((unsigned __int8)v13[9] << 8)) ^ 0x7F76D; v26 = (-1622558010 - v25) ^ (v25 << 8); v27 = (-17973517 - v25 - v26) ^ (v26 >> 13); v28 = (v25 - v26 - v27) ^ (v27 >> 12); v29 = (v26 - v27 - v28) ^ (v28 << 16); v30 = (v27 - v28 - v29) ^ (v29 >> 5); v31 = (v28 - v29 - v30) ^ (v30 >> 3); v32 = v29 - v30 - v31; v33 = v30 - v31; v34 = v32 ^ (v31 << 10); v35 = *((int **)v22 + 3); v36 = (v33 - v34) ^ (v34 >> 15); *((_DWORD *)v13 + 10) = v36; v37 = v35[1]; v38 = *v35; v39 = 12 * (v36 & (v37 - 1)); v40 = *(_DWORD *)(v38 + v39); v41 = *(_DWORD *)(v38 + v39 + 4) + 1; *(_DWORD *)(v38 + v39 + 4) = v41; *((_DWORD *)v13 + 7) = v40; *((_DWORD *)v13 + 6) = 0; if ( v40 ) *(_DWORD *)(v40 + 12) = v15; *(_DWORD *)(v38 + v39) = v15; if ( v41 >= 10 * *(_DWORD *)(v38 + v39 + 8) + 10 && *(_DWORD *)(v23 + 36) != 1 ) { v42 = 24 * *(_DWORD *)(v23 + 4); v43 = (char *)malloc(v42); v44 = v43; if ( v43 ) { memset(v43, 0, v42); v45 = *(_DWORD *)(v23 + 4); v46 = *(_DWORD *)(v23 + 12); v47 = 2 * v45 - 1; v48 = v47 & v46; v49 = v46 >> (*(_BYTE *)(v23 + 8) + 1); if ( v48 ) ++v49; v50 = 0; *(_DWORD *)(v23 + 24) = v49; *(_DWORD *)(v23 + 28) = 0; while ( v50 != v45 ) { for ( i = *(_DWORD **)(*(_DWORD *)v23 + 12 * v50); i; i = v61 ) { v61 = (_DWORD *)i[4]; v52 = 12 * (v47 & i[7]); v53 = *(_DWORD *)&v44[v52 + 4] + 1; *(_DWORD *)&v44[v52 + 4] = v53; if ( v53 > v49 ) { ++*(_DWORD *)(v23 + 28); *(_DWORD *)&v44[v52 + 8] = v53 / v49; } i[3] = 0; v54 = *(_DWORD *)&v44[v52]; i[4] = v54; if ( v54 ) *(_DWORD *)(v54 + 12) = i; *(_DWORD *)&v44[v52] = i; } ++v50; } free(*(void **)v23); v55 = *((_DWORD **)v13 + 3); v56 = v55[1]; v57 = v55[3]; *v55 = v44; v55[1] = 2 * v56; ++v55[2]; v58 = v55[7]; v59 = v58 > v57 >> 1; if ( v58 <= v57 >> 1 ) v60 = 0; else v60 = v55[8]; if ( v59 ) ++v60; v55[8] = v60; if ( v60 > 1 ) v55[9] = 1; return; } LABEL_15: exit(-1); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source