// // cocos2d::CCTextureCache::addImageAsync from 0x1006bfd60 to 0x1006c01ae (1102 bytes) // // 9 xrefs: // > GJBigSprite::updateSpriteVisibility @ 0x100252b10 // > GJBigSprite::loadSpriteAsync @ 0x1002543ad // > GameManager::loadIconAsync @ 0x10036a721 // > GameManager::loadBackgroundAsync @ 0x10036c808 // > GameManager::loadMiddlegroundAsync @ 0x10036ca39 // > GameManager::loadMiddlegroundAsync @ 0x10036ca7b // > GameManager::loadGroundAsync @ 0x10036cd85 // > GameManager::loadGroundAsync @ 0x10036cdce // > cocos2d::CCTextureCache::prepareAsyncLoading @ 0x1006bfd4a // // 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 12:35:31 +0000 // void __fastcall cocos2d::CCTextureCache::addImageAsync( __int64 a1, const char *a2, __int64 a3, char *a4, __int64 a5, unsigned int a6, int a7) { const char *v10; // rdi size_t v11; // rax size_t v12; // r15 char *v13; // rbx __int64 v14; // r13 size_t v15; // r14 __int64 v16; // rax char *v17; // r15 char *v18; // rdx __int64 v19; // r12 size_t v20; // rax size_t v21; // r13 char *v22; // rbx size_t v23; // r14 __int64 v24; // r15 void (__fastcall *v25)(_QWORD *, __int64); // rbx _QWORD *v26; // r14 __int64 v27; // rax _OWORD *v28; // rax _OWORD *v29; // rax __int64 v30; // rax __int64 v31; // rax _OWORD *v32; // rax _OWORD *v33; // r13 char *v34; // rsi _QWORD *v35; // rbx __int64 v36; // rax __int64 v37; // rsi __int64 v38; // rcx unsigned __int64 v39; // rdx char *v40; // [rsp+8h] [rbp-88h] __int64 v41; // [rsp+10h] [rbp-80h] __int64 v43; // [rsp+20h] [rbp-70h] __int128 __dst; // [rsp+30h] [rbp-60h] BYREF void *__p; // [rsp+40h] [rbp-50h] std::string::value_type v47[16]; // [rsp+50h] [rbp-40h] BYREF char *__s; // [rsp+60h] [rbp-30h] v10 = a2; v11 = strlen(a2); if ( v11 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v12 = v11; v40 = a4; v43 = a5; if ( v11 >= 0x17 ) { v14 = a3; v15 = 26; if ( (v11 | 7) != 0x17 ) v15 = (v11 | 7) + 1; v13 = (char *)operator new(v15); __p = v13; *(_QWORD *)&__dst = v15 + 1; a3 = v14; *((_QWORD *)&__dst + 1) = v12; goto LABEL_8; } LOBYTE(__dst) = 2 * v11; v13 = (char *)&__dst + 1; if ( v11 ) { LABEL_8: v10 = v13; memcpy(v13, a2, v12); } v13[v12] = 0; v16 = cocos2d::CCFileUtils::sharedFileUtils(v10, a2); v17 = (char *)&__dst + 1; v18 = (char *)&__dst + 1; if ( (__dst & 1) != 0 ) v18 = (char *)__p; (*(void (__fastcall **)(std::string::value_type *, __int64, char *, _QWORD))(*(_QWORD *)v16 + 48LL))(v47, v16, v18, 0); if ( (__dst & 1) != 0 ) operator delete(__p); __p = __s; __dst = *(_OWORD *)v47; v19 = *(_QWORD *)(a1 + 56); if ( (v47[0] & 1) != 0 ) v17 = __s; v20 = strlen(v17); if ( v20 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v21 = v20; if ( v20 >= 0x17 ) { v41 = a3; v23 = 26; if ( (v20 | 7) != 0x17 ) v23 = (v20 | 7) + 1; v22 = (char *)operator new(v23); __s = v22; *(_QWORD *)v47 = v23 | 1; *(_QWORD *)&v47[8] = v21; a3 = v41; goto LABEL_22; } v47[0] = 2 * v20; v22 = &v47[1]; if ( v20 ) LABEL_22: memmove(v22, v17, v21); v22[v21] = 0; v24 = cocos2d::CCDictionary::objectForKey(v19, v47); v25 = (void (__fastcall *)(_QWORD *, __int64))v40; if ( (v47[0] & 1) != 0 ) operator delete(__s); if ( (__dst & 1) != 0 ) { sub_10001AD30(v47, __p, *((unsigned __int64 *)&__dst + 1)); } else { __s = (char *)__p; *(_OWORD *)v47 = __dst; } if ( v24 ) { (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v24 + 72LL))(v24, a6); if ( a3 != 0 && v40 != nullptr ) { v26 = (_QWORD *)(v43 + a3); if ( ((unsigned __int8)v40 & 1) != 0 ) v25 = *(void (__fastcall **)(_QWORD *, __int64))&v40[*v26 - 1]; v25(v26, v24); } goto LABEL_48; } if ( qword_100BE5FE8 ) { v27 = qword_100BE60C0; if ( qword_100BE60C0 ) goto LABEL_35; } else { v28 = operator new(0x30u); v28[2] = 0; v28[1] = 0; *v28 = 0; qword_100BE5FE8 = v28; v29 = operator new(0x30u); v29[2] = 0; v29[1] = 0; *v29 = 0; qword_100BE5FF0 = v29; pthread_mutex_init(&stru_100BE5FF8, nullptr); pthread_mutex_init(&stru_100BE6038, nullptr); pthread_mutex_init(&stru_100BE6078, nullptr); pthread_cond_init(&stru_100BE5FB8, nullptr); pthread_create(&qword_100BE60B8, nullptr, sub_1006C0210, nullptr); byte_100BE5FB0 = 0; v27 = qword_100BE60C0; if ( qword_100BE60C0 ) { LABEL_35: qword_100BE60C0 = v27 + 1; if ( !a3 ) goto LABEL_40; goto LABEL_39; } } v30 = cocos2d::CCDirector::sharedDirector(); v31 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v30 + 128LL))(v30); cocos2d::CCScheduler::scheduleSelector_1(v31, (__int64)cocos2d::CCTextureCache::addImageAsyncCallBack, 0, a1, 0, 0.0); ++qword_100BE60C0; if ( a3 ) LABEL_39: cocos2d::CCObject::retain(a3); LABEL_40: v32 = operator new(0x38u); v33 = v32; v32[2] = 0; v32[1] = 0; *v32 = 0; *((_QWORD *)v32 + 6) = 0; if ( (v47[0] & 1) != 0 ) v34 = __s; else v34 = &v47[1]; std::string::assign((std::string *)v32, v34); *((_QWORD *)v33 + 3) = a3; *((_QWORD *)v33 + 4) = v40; *((_QWORD *)v33 + 5) = v43; *((_DWORD *)v33 + 12) = a6; *((_DWORD *)v33 + 13) = a7; pthread_mutex_lock(&stru_100BE5FF8); v35 = qword_100BE5FE8; v36 = *((_QWORD *)qword_100BE5FE8 + 1); v37 = 0; if ( *((_QWORD *)qword_100BE5FE8 + 2) != v36 ) v37 = ((*((_QWORD *)qword_100BE5FE8 + 2) - v36) << 6) - 1; v38 = *((_QWORD *)qword_100BE5FE8 + 5); v39 = v38 + *((_QWORD *)qword_100BE5FE8 + 4); if ( v37 == v39 ) { sub_1006C25D0(qword_100BE5FE8); v36 = v35[1]; v38 = v35[5]; v39 = v38 + v35[4]; } *(_QWORD *)(*(_QWORD *)(v36 + 8 * (v39 >> 9)) + 8 * (v39 & 0x1FF)) = v33; v35[5] = v38 + 1; pthread_mutex_unlock(&stru_100BE5FF8); pthread_cond_signal(&stru_100BE5FB8); LABEL_48: if ( (v47[0] & 1) != 0 ) operator delete(__s); if ( (__dst & 1) != 0 ) operator delete(__p); }
GD Web Decomp Icon

GD Web Decomp

Raw Source