// // cocos2d::CCSpriteFrameCache::addSpriteFramesWithDictionary from 0x180093880 to 0x1800946f4 (3700 bytes) // // 5 xrefs: // > cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile @ 0x18009474f // > cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile @ 0x180094c62 // > cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile @ 0x180094e53 // > @ 0x18014cf68 // > @ 0x1801c05c4 // // This function is hookable on this platform (idp: pc, 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 11:22:09 +0000 // // Hidden C++ exception states: #wind=8 void __fastcall cocos2d::CCSpriteFrameCache::addSpriteFramesWithDictionary( cocos2d::CCSpriteFrameCache *this, struct cocos2d::CCDictionary *a2, struct cocos2d::CCTexture2D *a3) { __int64 v4; // rbx void *v5; // r8 __m128i v6; // xmm6 __m128i v7; // xmm13 __int64 v8; // r14 void *v9; // r8 cocos2d::CCString *v10; // rax void *v11; // r8 __int64 v12; // r14 __int64 v13; // r13 __m128i v14; // xmm15 __m128i v15; // xmm12 __m128i v16; // xmm14 __int64 v17; // r15 size_t v18; // rax size_t v19; // rsi unsigned __int64 v20; // rdi void *v21; // rbx cocos2d::CCSpriteFrame *v22; // rsi cocos2d::CCString *v23; // rax float v24; // xmm11_4 void *v25; // rcx cocos2d::CCString *v26; // rax float v27; // xmm10_4 void *v28; // rcx cocos2d::CCString *v29; // rax float v30; // xmm9_4 void *v31; // rcx cocos2d::CCString *v32; // rax float v33; // xmm8_4 void *v34; // rcx cocos2d::CCString *v35; // rax float v36; // xmm7_4 void *v37; // rcx cocos2d::CCString *v38; // rax float v39; // xmm6_4 void *v40; // rcx cocos2d::CCString *v41; // rax int v42; // esi void *v43; // rcx cocos2d::CCString *v44; // rax int v45; // ebx void *v46; // rcx int v47; // edi int v48; // r14d cocos2d::CCSpriteFrame *v49; // rax cocos2d::CCSpriteFrame *v50; // rbx float *v51; // rdi float *v52; // rbx cocos2d::CCRect *v53; // r8 cocos2d::CCString *v54; // rax const char *CString; // rax cocos2d::CCString *v56; // rax const char *v57; // rax cocos2d::CCString *v58; // rax const char *v59; // rax cocos2d::CCString *v60; // rax const char *v61; // rax cocos2d::CCString *v62; // rax char v63; // di __int64 v64; // rax cocos2d::CCObject *v65; // rax cocos2d::CCSpriteFrame *v66; // rax cocos2d::CCSpriteFrame *v67; // rbx cocos2d::CCRect *v68; // r8 const struct cocos2d::CCPoint *v69; // rax cocos2d::CCString *v70; // rax const char *v71; // rax void *v72; // rcx cocos2d::CCString *v73; // rax cocos2d::CCString *v74; // rax const char *v75; // rax void *v76; // rcx cocos2d::CCString *v77; // rax const char *v78; // rax cocos2d::CCSpriteFrame *v79; // rax cocos2d::CCSpriteFrame *v80; // rbx void *v81; // rcx struct cocos2d::CCSize *v82; // [rsp+30h] [rbp-D8h] int v83; // [rsp+38h] [rbp-D0h] float v85[2]; // [rsp+48h] [rbp-C0h] BYREF cocos2d::CCSpriteFrameCache *v86; // [rsp+50h] [rbp-B8h] int v87; // [rsp+58h] [rbp-B0h] BYREF int v88; // [rsp+60h] [rbp-A8h] BYREF int v89; // [rsp+68h] [rbp-A0h] BYREF int v90; // [rsp+70h] [rbp-98h] BYREF float v91[4]; // [rsp+78h] [rbp-90h] BYREF cocos2d::CCSpriteFrame *v92; // [rsp+88h] [rbp-80h] float v93; // [rsp+90h] [rbp-78h] BYREF float v94; // [rsp+98h] [rbp-70h] BYREF __int64 v95; // [rsp+A0h] [rbp-68h] cocos2d::CCSpriteFrame *v96; // [rsp+A8h] [rbp-60h] cocos2d::CCSpriteFrame *v97; // [rsp+B0h] [rbp-58h] _BYTE v98[16]; // [rsp+B8h] [rbp-50h] BYREF _BYTE v99[16]; // [rsp+C8h] [rbp-40h] BYREF void *Block[2]; // [rsp+D8h] [rbp-30h] BYREF __m128i si128; // [rsp+E8h] [rbp-20h] void *v102[2]; // [rsp+F8h] [rbp-10h] BYREF __m128i v103; // [rsp+108h] [rbp+0h] void *v104[2]; // [rsp+118h] [rbp+10h] BYREF __m128i v105; // [rsp+128h] [rbp+20h] v86 = this; Block[1] = nullptr; si128 = _mm_load_si128((const __m128i *)&xmmword_180106020); Block[0] = (void *)0x617461646174656DLL; v4 = cocos2d::CCDictionary::objectForKey((__int64)a2, (__int64)Block); if ( si128.m128i_i64[1] > 0xFuLL ) { v5 = Block[0]; if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 ) { v5 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v5 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free_0(v5); } v6 = _mm_load_si128((const __m128i *)&xmmword_1800EC500); si128 = v6; LOBYTE(Block[0]) = 0; *(_OWORD *)v102 = 0; v7 = _mm_load_si128((const __m128i *)&xmmword_180109E30); v103 = v7; strcpy((char *)v102, "frames"); v8 = cocos2d::CCDictionary::objectForKey((__int64)a2, (__int64)v102); if ( v103.m128i_i64[1] > 0xFuLL ) { v9 = v102[0]; if ( (unsigned __int64)(v103.m128i_i64[1] + 1) >= 0x1000 ) { v9 = *((void **)v102[0] - 1); if ( (unsigned __int64)((char *)v102[0] - (char *)v9 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free_0(v9); v6 = _mm_load_si128((const __m128i *)&xmmword_1800EC500); } v103 = v6; LOBYTE(v102[0]) = 0; v83 = 0; if ( v4 ) { *(_OWORD *)v104 = 0; v105 = v7; strcpy((char *)v104, "format"); v10 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v4, (__int64)v104); v83 = cocos2d::CCString::uintValue(v10); if ( v105.m128i_i64[1] > 0xFuLL ) { v11 = v104[0]; if ( (unsigned __int64)(v105.m128i_i64[1] + 1) >= 0x1000 ) { v11 = *((void **)v104[0] - 1); if ( (unsigned __int64)((char *)v104[0] - (char *)v11 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free_0(v11); } } if ( v8 ) { v12 = *(_QWORD *)(v8 + 56); v13 = v12 ? *(_QWORD *)(v12 + 288) : 0LL; if ( v12 ) { v14 = _mm_load_si128((const __m128i *)&xmmword_1800F1940); v15 = _mm_load_si128((const __m128i *)&xmmword_1800F1920); v16 = _mm_load_si128((const __m128i *)&xmmword_1800ED1C0); while ( 1 ) { v17 = *(_QWORD *)(v12 + 264); *(_OWORD *)v102 = 0; v103 = 0; v18 = strlen((const char *)v12); v19 = v18; if ( v18 > 0x7FFFFFFFFFFFFFFFLL ) std::vector::_Xlen(); if ( v18 > 0xF ) { v20 = v18 | 0xF; if ( (v18 | 0xF) <= 0x7FFFFFFFFFFFFFFFLL ) { if ( v20 < 0x16 ) v20 = 22; } else { v20 = 0x7FFFFFFFFFFFFFFFLL; } v21 = (void *)sub_18000CE80(v20 + 1); v102[0] = v21; v103.m128i_i64[0] = v19; v103.m128i_i64[1] = v20; memcpy(v21, (const void *)v12, v19); *((_BYTE *)v21 + v19) = 0; } else { v103.m128i_i64[0] = v18; v103.m128i_i64[1] = 15; memcpy(v102, (const void *)v12, v18); *((_BYTE *)v102 + v19) = 0; } v22 = (cocos2d::CCSpriteFrame *)cocos2d::CCDictionary::objectForKey(*((_QWORD *)v86 + 7), (__int64)v102); if ( v22 ) goto LABEL_109; if ( !v83 ) { *(_OWORD *)Block = 0; si128 = v16; LOWORD(Block[0]) = 120; v23 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v17, (__int64)Block); v24 = cocos2d::CCString::floatValue(v23); if ( si128.m128i_i64[1] > 0xFuLL ) { v25 = Block[0]; if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 ) { v25 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v25 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free_0(v25); } *(_OWORD *)Block = 0; si128 = v16; LOWORD(Block[0]) = 121; v26 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v17, (__int64)Block); v27 = cocos2d::CCString::floatValue(v26); if ( si128.m128i_i64[1] > 0xFuLL ) { v28 = Block[0]; if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 ) { v28 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v28 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free_0(v28); } *(_OWORD *)Block = 0; si128 = _mm_load_si128((const __m128i *)&xmmword_180106010); strcpy((char *)Block, "width"); v29 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v17, (__int64)Block); v30 = cocos2d::CCString::floatValue(v29); if ( si128.m128i_i64[1] > 0xFuLL ) { v31 = Block[0]; if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 ) { v31 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v31 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free_0(v31); } *(_OWORD *)Block = 0; si128 = v7; strcpy((char *)Block, "height"); v32 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v17, (__int64)Block); v33 = cocos2d::CCString::floatValue(v32); if ( si128.m128i_i64[1] > 0xFuLL ) { v34 = Block[0]; if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 ) { v34 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v34 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free_0(v34); } Block[1] = nullptr; si128 = v15; Block[0] = (void *)0x5874657366666FLL; v35 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v17, (__int64)Block); v36 = cocos2d::CCString::floatValue(v35); if ( si128.m128i_i64[1] > 0xFuLL ) { v37 = Block[0]; if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 ) { v37 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v37 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free_0(v37); } Block[1] = nullptr; si128 = v15; Block[0] = (void *)0x5974657366666FLL; v38 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v17, (__int64)Block); v39 = cocos2d::CCString::floatValue(v38); if ( si128.m128i_i64[1] > 0xFuLL ) { v40 = Block[0]; if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 ) { v40 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v40 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free_0(v40); } si128 = _mm_load_si128((const __m128i *)&xmmword_180106050); strcpy((char *)Block, "originalWidth"); HIWORD(Block[1]) = 0; v41 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v17, (__int64)Block); v42 = cocos2d::CCString::uintValue(v41); if ( si128.m128i_i64[1] > 0xFuLL ) { v43 = Block[0]; if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 ) { v43 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v43 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free_0(v43); } si128 = _mm_load_si128((const __m128i *)&xmmword_180106060); strcpy((char *)Block, "originalHeight"); HIBYTE(Block[1]) = 0; v44 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v17, (__int64)Block); v45 = cocos2d::CCString::uintValue(v44); if ( si128.m128i_i64[1] > 0xFuLL ) { v46 = Block[0]; if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 ) { v46 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v46 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free_0(v46); } v47 = -v42; if ( v42 > 0 ) v47 = v42; v48 = -v45; if ( v45 > 0 ) v48 = v45; v49 = (cocos2d::CCSpriteFrame *)sub_1800E4AC0(0xC8u); v50 = v49; v92 = v49; if ( v49 ) { memset(v49, 0, 0xC8u); v22 = cocos2d::CCSpriteFrame::CCSpriteFrame(v50); } else { v22 = nullptr; } v51 = kmVec2Fill(&v93, (float)v47, (float)v48); v52 = kmVec2Fill(&v94, v36, v39); v53 = cocos2d::CCRect::CCRect((cocos2d::CCRect *)v99, v24, v27, v30, v33); cocos2d::CCSpriteFrame::initWithTexture( v22, a3, v53, 0, (const struct cocos2d::CCPoint *)v52, (const struct cocos2d::CCSize *)v51); goto LABEL_108; } if ( (unsigned int)(v83 - 1) <= 1 ) break; if ( v83 == 3 ) { Block[1] = (void *)25978; si128 = v14; Block[0] = (void *)0x6953657469727073LL; v54 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v17, (__int64)Block); CString = cocos2d::CCString::getCString(v54); cocos2d::CCSizeFromString(v85, (__int64)CString); if ( si128.m128i_i64[1] > 0xFuLL ) sub_180048F30((__int64)Block, Block[0], si128.m128i_i64[1]); sub_180005A10(Block, "spriteOffset"); v56 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v17, (__int64)Block); v57 = cocos2d::CCString::getCString(v56); cocos2d::CCPointFromString(&v88, (__int64)v57); sub_180005C70((__int64)Block); sub_180005A10(Block, "spriteSourceSize"); v58 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v17, (__int64)Block); v59 = cocos2d::CCString::getCString(v58); cocos2d::CCSizeFromString(&v87, (__int64)v59); sub_180005C70((__int64)Block); sub_180005A10(Block, "textureRect"); v60 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v17, (__int64)Block); v61 = cocos2d::CCString::getCString(v60); cocos2d::CCRectFromString((cocos2d::CCRect *)v91, v61); if ( si128.m128i_i64[1] > 0xFuLL ) sub_180048F30((__int64)Block, Block[0], si128.m128i_i64[1]); si128 = _mm_load_si128((const __m128i *)&xmmword_180106060); strcpy((char *)Block, "textureRotated"); HIBYTE(Block[1]) = 0; v62 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v17, (__int64)Block); v63 = cocos2d::CCString::boolValue(v62); if ( si128.m128i_i64[1] > 0xFuLL ) sub_180048F30((__int64)Block, Block[0], si128.m128i_i64[1]); Block[1] = nullptr; si128 = v15; Block[0] = (void *)0x73657361696C61LL; cocos2d::CCDictionary::objectForKey(v17, (__int64)Block); if ( si128.m128i_i64[1] > 0xFuLL ) sub_180048F30((__int64)Block, Block[0], si128.m128i_i64[1]); v64 = sub_1800E4AC0(0x58u); v95 = v64; if ( v64 ) v65 = (cocos2d::CCObject *)cocos2d::CCString::CCString(v64, (__int64)v102); else v65 = nullptr; cocos2d::CCObject::release(v65); v66 = (cocos2d::CCSpriteFrame *)sub_1800E4AC0(0xC8u); v67 = v66; v96 = v66; if ( v66 ) { memset(v66, 0, 0xC8u); v22 = cocos2d::CCSpriteFrame::CCSpriteFrame(v67); } else { v22 = nullptr; } v68 = cocos2d::CCRect::CCRect((cocos2d::CCRect *)v104, v91[0], v91[1], v85[0], v85[1]); v82 = (struct cocos2d::CCSize *)&v87; v69 = (const struct cocos2d::CCPoint *)&v88; LABEL_107: cocos2d::CCSpriteFrame::initWithTexture(v22, a3, v68, v63, v69, v82); } LABEL_108: cocos2d::CCDictionary::setObject(*((_QWORD *)v86 + 7), v22, (__int64)v102); cocos2d::CCObject::release(v22); LABEL_109: if ( v103.m128i_i64[1] > 0xFuLL ) { v81 = v102[0]; if ( (unsigned __int64)(v103.m128i_i64[1] + 1) >= 0x1000 ) { v81 = *((void **)v102[0] - 1); if ( (unsigned __int64)((char *)v102[0] - (char *)v81 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free_0(v81); } v12 = v13; if ( v13 ) v13 = *(_QWORD *)(v13 + 288); else v13 = 0; if ( !v12 ) return; } *(_OWORD *)Block = 0; si128 = _mm_load_si128((const __m128i *)&xmmword_180106010); strcpy((char *)Block, "frame"); v70 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v17, (__int64)Block); v71 = cocos2d::CCString::getCString(v70); cocos2d::CCRectFromString((cocos2d::CCRect *)v98, v71); if ( si128.m128i_i64[1] > 0xFuLL ) { v72 = Block[0]; if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 ) { v72 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v72 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free_0(v72); } v63 = 0; if ( v83 == 2 ) { Block[1] = nullptr; si128 = v15; Block[0] = (void *)0x64657461746F72LL; v73 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v17, (__int64)Block); v63 = cocos2d::CCString::boolValue(v73); if ( si128.m128i_i64[1] > 0xFuLL ) sub_180048F30((__int64)Block, Block[0], si128.m128i_i64[1]); } *(_OWORD *)Block = 0; si128 = v7; strcpy((char *)Block, "offset"); v74 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v17, (__int64)Block); v75 = cocos2d::CCString::getCString(v74); cocos2d::CCPointFromString(&v90, (__int64)v75); if ( si128.m128i_i64[1] > 0xFuLL ) { v76 = Block[0]; if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 ) { v76 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v76 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free_0(v76); } Block[1] = (void *)25978; si128 = v14; Block[0] = (void *)0x6953656372756F73LL; v77 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v17, (__int64)Block); v78 = cocos2d::CCString::getCString(v77); cocos2d::CCSizeFromString(&v89, (__int64)v78); if ( si128.m128i_i64[1] > 0xFuLL ) sub_180048F30((__int64)Block, Block[0], si128.m128i_i64[1]); v79 = (cocos2d::CCSpriteFrame *)sub_1800E4AC0(0xC8u); v80 = v79; v97 = v79; if ( v79 ) { memset(v79, 0, 0xC8u); v22 = cocos2d::CCSpriteFrame::CCSpriteFrame(v80); } else { v22 = nullptr; } v82 = (struct cocos2d::CCSize *)&v89; v69 = (const struct cocos2d::CCPoint *)&v90; v68 = (cocos2d::CCRect *)v98; goto LABEL_107; } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source