// // cocos2d::CCDictionary::setObjectUnSafe_1 from 0x10030e9a0 to 0x10030ef43 (1443 bytes) // // 1 xrefs: // > cocos2d::CCDictionary::setObject_1 @ 0x10030e919 // // 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 // __int64 __fastcall cocos2d::CCDictionary::setObjectUnSafe_1(__int64 a1, cocos2d::CCObject *a2, __int64 a3) { char *v5; // rax const char *v6; // r12 int v7; // eax const char *v8; // rsi char *v9; // r14 int v10; // eax char *v11; // rcx __int64 v12; // rax _QWORD *v13; // rbx __int64 v14; // rax _QWORD *v15; // rax void *v16; // rax char *v17; // r14 unsigned int v18; // r15d int v19; // r12d int v20; // ebx unsigned int v21; // r13d char *v22; // rdi unsigned int v23; // r13d unsigned int v24; // ebx int v25; // eax unsigned int v26; // ecx unsigned int v27; // edx int v28; // esi unsigned int v29; // eax unsigned int v30; // ecx unsigned int v31; // eax char *v32; // r8 unsigned int v33; // ecx unsigned int v34; // ecx unsigned int v35; // ecx int v36; // ecx unsigned int v37; // edx unsigned int v38; // esi int v39; // eax unsigned int v40; // ecx unsigned int v41; // edx int v42; // esi unsigned int v43; // eax __int64 v44; // rcx __int64 result; // rax __int64 v46; // rdx __int64 v47; // rbx char *v48; // rax char *v49; // r14 int v50; // r15d unsigned int v51; // r11d _QWORD *v52; // rdi int v53; // ecx __int64 i; // rsi __int64 v55; // r8 __int64 v56; // r9 char *v57; // r10 unsigned int v58; // eax __int64 v59; // rax unsigned int v60; // ecx __int64 *v61; // [rsp+0h] [rbp-50h] _QWORD *v62; // [rsp+8h] [rbp-48h] unsigned int v63; // [rsp+14h] [rbp-3Ch] char *v64; // [rsp+18h] [rbp-38h] char *__dst; // [rsp+20h] [rbp-30h] cocos2d::CCObject::retain(a2); v5 = (char *)operator new(0x148u); if ( (*(_BYTE *)a3 & 1) != 0 ) v6 = *(const char **)(a3 + 16); else v6 = (const char *)(a3 + 1); *((_QWORD *)v5 + 32) = 0; __dst = v5; v7 = strlen(v6); v8 = &v6[v7 - 1 - 255]; if ( v7 < 257 ) v8 = v6; strcpy(__dst, v8); *((_QWORD *)__dst + 33) = a2; v9 = __dst + 272; *((_OWORD *)__dst + 19) = 0; *((_OWORD *)__dst + 17) = 0; *((_OWORD *)__dst + 18) = 0; *((_QWORD *)__dst + 40) = 0; *((_QWORD *)__dst + 39) = __dst; v10 = strlen(__dst); v11 = __dst; *((_DWORD *)__dst + 80) = v10; v12 = *(_QWORD *)(a1 + 56); if ( v12 ) { v64 = *(char **)(a1 + 56); v13 = *(_QWORD **)(v12 + 272); v14 = v13[3]; *(_QWORD *)(v14 + 16) = __dst; *((_QWORD *)__dst + 35) = v14 - v13[4]; v13[3] = v9; } else { *(_QWORD *)(a1 + 56) = __dst; *((_QWORD *)__dst + 35) = 0; v15 = calloc(1u, 0x40u); *((_QWORD *)__dst + 34) = v15; if ( !v15 ) goto LABEL_57; v13 = v15; v15[3] = v9; v15[1] = 0x500000020LL; v15[4] = 272; v16 = calloc(1u, 0x200u); *v13 = v16; if ( !v16 ) goto LABEL_57; *((_DWORD *)v13 + 14) = -1609490463; v11 = __dst; v64 = __dst; } v61 = (__int64 *)(__dst + 272); v63 = *((_DWORD *)v13 + 4) + 1; *((_DWORD *)v13 + 4) = v63; v62 = v13; *((_QWORD *)v11 + 34) = v13; *((_DWORD *)v11 + 81) = -17973521; v17 = v11; v18 = strlen(v11); if ( v18 < 0xC ) { v21 = -1640531527; v20 = -17973521; v19 = -1640531527; } else { v19 = -1640531527; v20 = -17973521; v21 = -1640531527; v22 = v17; do { v23 = *((_DWORD *)v17 + 1) + v21; v24 = *((_DWORD *)v17 + 2) + v20; v25 = (*(_DWORD *)v17 + v19 - v23 - v24) ^ (v24 >> 13); v26 = (v23 - v24 - v25) ^ (v25 << 8); v27 = (v24 - v25 - v26) ^ (v26 >> 13); v28 = (v25 - v26 - v27) ^ (v27 >> 12); v29 = (v26 - v27 - v28) ^ (v28 << 16); v30 = (v27 - v28 - v29) ^ (v29 >> 5); v19 = (v28 - v29 - v30) ^ (v30 >> 3); v21 = (v29 - v30 - v19) ^ (v19 << 10); v20 = (v30 - v19 - v21) ^ (v21 >> 15); *((_DWORD *)v22 + 81) = v20; v17 += 12; v18 -= 12; } while ( v18 > 0xB ); } v31 = v20 + strlen(__dst); *((_DWORD *)__dst + 81) = v31; switch ( v18 ) { case 1u: v32 = v64; goto LABEL_35; case 2u: v32 = v64; goto LABEL_34; case 3u: v32 = v64; goto LABEL_33; case 4u: v32 = v64; goto LABEL_32; case 5u: v32 = v64; goto LABEL_31; case 6u: v32 = v64; goto LABEL_30; case 7u: v32 = v64; goto LABEL_29; case 8u: v32 = v64; goto LABEL_28; case 9u: goto LABEL_27; case 0xAu: goto LABEL_26; case 0xBu: v33 = v31 + ((unsigned __int8)v17[10] << 24); *((_DWORD *)__dst + 81) = v33; v31 = v33; LABEL_26: v34 = v31 + ((unsigned __int8)v17[9] << 16); *((_DWORD *)__dst + 81) = v34; v31 = v34; LABEL_27: v32 = v64; v35 = v31 + ((unsigned __int8)v17[8] << 8); *((_DWORD *)__dst + 81) = v35; v31 = v35; LABEL_28: v21 += (unsigned __int8)v17[7] << 24; LABEL_29: v21 += (unsigned __int8)v17[6] << 16; LABEL_30: v21 += (unsigned __int8)v17[5] << 8; LABEL_31: v21 += (unsigned __int8)v17[4]; LABEL_32: v19 += (unsigned __int8)v17[3] << 24; LABEL_33: v19 += (unsigned __int8)v17[2] << 16; LABEL_34: v19 += (unsigned __int8)v17[1] << 8; LABEL_35: v19 += (unsigned __int8)*v17; break; default: v32 = v64; break; } v36 = (v19 - v21 - v31) ^ (v31 >> 13); v37 = (v21 - v31 - v36) ^ (v36 << 8); v38 = (v31 - v36 - v37) ^ (v37 >> 13); v39 = (v36 - v37 - v38) ^ (v38 >> 12); v40 = (v37 - v38 - v39) ^ (v39 << 16); v41 = (v38 - v39 - v40) ^ (v40 >> 5); v42 = (v39 - v40 - v41) ^ (v41 >> 3); v43 = (v41 - (((v40 - v41 - v42) ^ (v42 << 10)) + v42)) ^ (((v40 - v41 - v42) ^ (v42 << 10)) >> 15); *((_DWORD *)__dst + 81) = v43; v44 = **((_QWORD **)v32 + 34) + 16LL * (v43 & (*(_DWORD *)(*((_QWORD *)v32 + 34) + 8LL) - 1)); result = (unsigned int)(*(_DWORD *)(v44 + 8) + 1); *(_DWORD *)(v44 + 8) = result; v46 = *(_QWORD *)v44; *((_QWORD *)__dst + 38) = *(_QWORD *)v44; *((_QWORD *)__dst + 37) = 0; if ( v46 ) *(_QWORD *)(v46 + 24) = v61; *(_QWORD *)v44 = v61; if ( (unsigned int)result >= 10 * *(_DWORD *)(v44 + 12) + 10 && *((_DWORD *)v62 + 13) != 1 ) { v47 = *((unsigned int *)v62 + 2); v48 = (char *)calloc(1u, 16LL * (unsigned int)(2 * v47)); if ( v48 ) { v49 = v48; v50 = 2 * v47 - 1; v51 = (v63 >> (*((_BYTE *)v62 + 12) + 1)) - (((v63 & v50) == 0) - 1); v62[5] = v51; v52 = (_QWORD *)*v62; if ( v47 ) { v53 = 0; for ( i = 0; i != v47; ++i ) { v55 = v52[2 * i]; if ( v55 ) { do { v56 = *(_QWORD *)(v55 + 32); v57 = &v49[16 * (v50 & *(_DWORD *)(v55 + 52))]; v58 = *((_DWORD *)v57 + 2) + 1; *((_DWORD *)v57 + 2) = v58; if ( v58 > v51 ) { *((_DWORD *)v62 + 11) = ++v53; *((_DWORD *)v57 + 3) = v58 / v51; } *(_QWORD *)(v55 + 24) = 0; v59 = *(_QWORD *)v57; *(_QWORD *)(v55 + 32) = *(_QWORD *)v57; if ( v59 ) *(_QWORD *)(v59 + 24) = v55; *(_QWORD *)v57 = v55; v55 = v56; } while ( v56 ); } } } free(v52); result = *v61; *(_DWORD *)(result + 8) *= 2; ++*(_DWORD *)(result + 12); *(_QWORD *)result = v49; if ( *(_DWORD *)(result + 44) <= *(_DWORD *)(result + 16) >> 1 ) { *(_DWORD *)(result + 48) = 0; } else { v60 = *(_DWORD *)(result + 48) + 1; *(_DWORD *)(result + 48) = v60; if ( v60 >= 2 ) *(_DWORD *)(result + 52) = 1; } return result; } LABEL_57: exit(-1); } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source