// // SpriteAnimationManager::createAnimations from 0x1008001e0 to 0x100800ff9 (3609 bytes) // // 2 xrefs: // > SpriteAnimationManager::initWithOwner @ 0x100800133 // > ObjectManager::setup @ 0x100876ce0 // // 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:36:37 +0000 // __int64 __fastcall SpriteAnimationManager::createAnimations(__int64 a1, double a2) { __int64 v2; // rax __int64 result; // rax __int64 v4; // rax __int64 v5; // rsi __int64 v6; // rax __int64 v7; // rsi __int64 Definition; // rax __int64 v9; // r12 unsigned int v10; // r15d __int64 v11; // rax const char *CString; // r14 size_t v13; // rax size_t v14; // rbx char *v15; // r15 size_t v16; // r12 __int64 v17; // rbx __int64 v18; // r14 __int64 v19; // r14 __int64 v20; // r14 const std::string::value_type *v21; // rax __int64 v22; // rax __int64 v23; // r14 __int64 v24; // rax const char *v25; // rbx size_t v26; // rax size_t v27; // r14 char *v28; // r15 const char *v29; // rbx size_t v30; // rax size_t v31; // r14 char *v32; // r15 __int64 v33; // rax __int64 v34; // r14 __int64 v35; // rax const char *v36; // rbx size_t v37; // rax size_t v38; // r14 char *v39; // r15 char *v40; // rbx size_t v41; // rax size_t v42; // r12 __int64 v43; // rax const char *v44; // rsi __int64 v45; // rbx int v46; // eax __int64 v47; // rax int v48; // ebx int v49; // ebx int v50; // r14d __int64 v51; // rax int v52; // eax size_t v53; // r12 __int64 v54; // rax const char *v55; // rax size_t v56; // r13 size_t v57; // r14 char *v58; // r15 size_t v59; // r13 char *v60; // rax unsigned __int64 v61; // rdi unsigned __int64 v62; // rsi char *v63; // rdx __int64 v64; // rbx unsigned __int64 v65; // r13 bool v66; // zf unsigned __int64 v67; // r14 char *v68; // r15 size_t v69; // r14 char *v70; // r13 char v71; // al const char *v72; // r14 size_t v73; // r12 size_t v74; // rax size_t v75; // r15 char *v76; // r13 size_t v77; // r12 __int64 v78; // rax __int64 v79; // r14 char *v80; // rax unsigned __int64 v81; // rsi char *v82; // rdx unsigned __int64 v83; // rdi unsigned int i; // r14d __int64 v85; // rax __int64 v86; // rax int v87; // ecx __int64 v88; // r13 __int64 v89; // rax const char *v90; // rax int v91; // ebx int v92; // r14d __int64 v93; // r15 __int64 v94; // rax const char *v95; // rax __int64 v96; // rax int v97; // eax _QWORD *v98; // rbx __int64 v99; // rax const char *v100; // rax unsigned __int64 v101; // [rsp+0h] [rbp-120h] __int64 v102; // [rsp+8h] [rbp-118h] __int64 v103; // [rsp+10h] [rbp-110h] unsigned int v104; // [rsp+1Ch] [rbp-104h] char v105[8]; // [rsp+20h] [rbp-100h] BYREF size_t v106; // [rsp+28h] [rbp-F8h] char *v107; // [rsp+30h] [rbp-F0h] void *v108; // [rsp+38h] [rbp-E8h] __int64 v109; // [rsp+40h] [rbp-E0h] unsigned __int64 v110; // [rsp+48h] [rbp-D8h] void *v111; // [rsp+50h] [rbp-D0h] float v112; // [rsp+5Ch] [rbp-C4h] std::string v113; // [rsp+60h] [rbp-C0h] BYREF _QWORD __dst[2]; // [rsp+80h] [rbp-A0h] BYREF void *v115; // [rsp+90h] [rbp-90h] __int64 v116; // [rsp+98h] [rbp-88h] BYREF unsigned __int64 v117; // [rsp+A0h] [rbp-80h] void *v118; // [rsp+A8h] [rbp-78h] __int64 v119; // [rsp+B0h] [rbp-70h] __int64 v120; // [rsp+B8h] [rbp-68h] _QWORD v121[2]; // [rsp+C0h] [rbp-60h] BYREF void *v122; // [rsp+D0h] [rbp-50h] int v123; // [rsp+DCh] [rbp-44h] __int128 __s; // [rsp+E0h] [rbp-40h] BYREF void *__p; // [rsp+F0h] [rbp-30h] v2 = ObjectManager::instance(); if ( (*(_BYTE *)a1 & 1) != 0 ) { result = ObjectManager::animLoaded(v2, *(_QWORD *)(a1 + 16)); if ( (_BYTE)result ) return result; } else { result = ObjectManager::animLoaded(v2, a1 + 1); if ( (_BYTE)result ) return result; } v4 = ObjectManager::instance(); if ( (*(_BYTE *)a1 & 1) != 0 ) v5 = *(_QWORD *)(a1 + 16); else v5 = a1 + 1; sub_100877C80(v4, v5); v103 = cocos2d::CCAnimationCache::sharedAnimationCache(); v6 = ObjectManager::instance(); if ( (*(_BYTE *)a1 & 1) != 0 ) v7 = *(_QWORD *)(a1 + 16); else v7 = a1 + 1; Definition = ObjectManager::getDefinition(v6, v7); LOBYTE(__s) = 20; strcpy((char *)&__s + 1, "animations"); v102 = cocos2d::CCDictionary::objectForKey(Definition, (char *)&__s); if ( (__s & 1) != 0 ) operator delete(__p); v9 = cocos2d::CCDictionary::allKeys(v102); result = sub_1007FEF90(v9); if ( (_DWORD)result ) { v109 = a1 + 1; v10 = 0; v119 = v9; v120 = a1; while ( 1 ) { v11 = sub_1007FEFE0(v9, v10); CString = (const char *)cocos2d::CCString::getCString(v11); v13 = strlen(CString); if ( v13 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v14 = v13; v104 = v10; if ( v13 >= 0x17 ) break; LOBYTE(__dst[0]) = 2 * v13; v15 = (char *)__dst + 1; if ( v13 ) goto LABEL_23; LABEL_24: v15[v14] = 0; v17 = cocos2d::CCDictionary::objectForKey(v102, (char *)__dst); strcpy((char *)&__s, "\ndelay"); v18 = cocos2d::CCDictionary::objectForKey(v17, (char *)&__s); if ( (__s & 1) != 0 ) operator delete(__p); if ( v18 ) v112 = cocos2d::CCString::floatValue(v18, a2); else v112 = 0.0; v111 = sub_1007FE900(); LOBYTE(__s) = 18; strcpy((char *)&__s + 1, "usesParts"); v19 = cocos2d::CCDictionary::objectForKey(v17, (char *)&__s); if ( (__s & 1) != 0 ) operator delete(__p); if ( v19 ) v123 = cocos2d::CCString::boolValue(v19); else v123 = 0; LOBYTE(__s) = 26; strcpy((char *)&__s + 1, "animFrameName"); v20 = cocos2d::CCDictionary::objectForKey(v17, (char *)&__s); if ( (__s & 1) != 0 ) operator delete(__p); a2 = 0.0; memset(&v113, 0, sizeof(v113)); if ( v20 ) { v21 = (const std::string::value_type *)cocos2d::CCString::getCString(v20); } else { v22 = sub_10088E820("%s_%s", v101); v21 = (const std::string::value_type *)cocos2d::CCString::getCString(v22); } std::string::assign(&v113, v21); LOBYTE(__s) = 22; strcpy((char *)&__s + 1, "singleFrame"); v23 = cocos2d::CCDictionary::objectForKey(v17, (char *)&__s); if ( (__s & 1) != 0 ) operator delete(__p); if ( v23 ) { LOBYTE(v121[0]) = 22; strcpy((char *)v121 + 1, "singleFrame"); v24 = cocos2d::CCDictionary::objectForKey(v17, (char *)v121); v25 = (const char *)cocos2d::CCString::getCString(v24); v26 = strlen(v25); if ( v26 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v27 = v26; if ( v26 >= 0x17 ) { v42 = (v26 | 7) + 1; if ( (v26 | 7) == 0x17 ) v42 = 26; v28 = (char *)operator new(v42); __p = v28; *(_QWORD *)&__s = v42 | 1; *((_QWORD *)&__s + 1) = v27; v9 = v119; } else { LOBYTE(__s) = 2 * v26; v28 = (char *)&__s + 1; v9 = v119; if ( !v26 ) { BYTE1(__s) = 0; if ( (v121[0] & 1) != 0 ) goto LABEL_46; goto LABEL_47; } } memmove(v28, v25, v27); v28[v27] = 0; if ( (v121[0] & 1) != 0 ) LABEL_46: operator delete(v122); LABEL_47: if ( (_BYTE)v123 ) { v29 = (char *)&__s + 1; if ( (__s & 1) != 0 ) v29 = (const char *)__p; v30 = strlen(v29); if ( v30 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v31 = v30; if ( v30 >= 0x17 ) { v53 = (v30 | 7) + 1; if ( (v30 | 7) == 0x17 ) v53 = 26; v32 = (char *)operator new(v53); v122 = v32; v121[0] = v53 | 1; v121[1] = v31; v9 = v119; } else { LOBYTE(v121[0]) = 2 * v30; v32 = (char *)v121 + 1; if ( !v30 ) { LABEL_83: v32[v31] = 0; v45 = sub_10088E600(v121); if ( (v121[0] & 1) != 0 ) operator delete(v122); v46 = 1; LABEL_86: *(_DWORD *)(v45 + 28) = v46; v54 = sub_10088E820("%s_%s", v101); v55 = (const char *)cocos2d::CCString::getCString(v54); cocos2d::CCAnimationCache::addAnimation(v103, v45, v55); if ( (__s & 1) != 0 ) operator delete(__p); goto LABEL_172; } } memmove(v32, v29, v31); goto LABEL_83; } v43 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v44 = (char *)&__s + 1; if ( (__s & 1) != 0 ) v44 = (const char *)__p; v45 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v43, v44); v46 = 2; goto LABEL_86; } strcpy((char *)&__s, "\nother"); v33 = cocos2d::CCDictionary::objectForKey(v17, (char *)&__s); v34 = (unsigned __int8)cocos2d::CCString::boolValue(v33); v9 = v119; if ( (__s & 1) != 0 ) operator delete(__p); if ( (_BYTE)v34 ) { LOBYTE(__s) = 12; strcpy((char *)&__s + 1, "frames"); v35 = cocos2d::CCDictionary::objectForKey(v17, (char *)&__s); v36 = (const char *)cocos2d::CCString::getCString(v35); v37 = strlen(v36); if ( v37 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v38 = v37; if ( v37 >= 0x17 ) { v56 = (v37 | 7) + 1; if ( (v37 | 7) == 0x17 ) v56 = 26; v39 = (char *)operator new(v56); v107 = v39; *(_QWORD *)v105 = v56 | 1; v106 = v38; } else { v105[0] = 2 * v37; v39 = &v105[1]; if ( !v37 ) { v105[1] = 0; if ( (__s & 1) == 0 ) goto LABEL_61; LABEL_92: operator delete(__p); v40 = &v105[1]; if ( (v105[0] & 1) == 0 ) goto LABEL_93; LABEL_62: v40 = v107; v41 = strlen(v107); if ( v41 >= 0xFFFFFFFFFFFFFFF8LL ) goto LABEL_183; goto LABEL_94; } } memmove(v39, v36, v38); v39[v38] = 0; if ( (__s & 1) != 0 ) goto LABEL_92; LABEL_61: v40 = &v105[1]; if ( (v105[0] & 1) != 0 ) goto LABEL_62; LABEL_93: v41 = strlen(&v105[1]); if ( v41 >= 0xFFFFFFFFFFFFFFF8LL ) LABEL_183: sub_100003630(); LABEL_94: v57 = v41; if ( v41 >= 0x17 ) { v59 = (v41 | 7) + 1; if ( (v41 | 7) == 0x17 ) v59 = 26; v58 = (char *)operator new(v59); v118 = v58; v116 = v59 | 1; v117 = v57; } else { LOBYTE(v116) = 2 * v41; v58 = (char *)&v116 + 1; if ( !v41 ) { LABEL_101: v58[v57] = 0; v108 = sub_1007FE900(); if ( (v116 & 1) != 0 ) { v60 = (char *)v118; v61 = v117; v101 = v117; if ( v117 ) { LABEL_103: v62 = v61; v63 = v60; do { if ( *v63 == 32 ) goto LABEL_107; ++v63; --v62; } while ( v62 ); v63 = &v60[v61]; LABEL_107: v64 = v63 - v60; if ( v63 == &v60[v61] ) v64 = -1; LABEL_112: v65 = 0; while ( 2 ) { if ( (v116 & 1) != 0 ) { v67 = v117; if ( v117 < v65 ) LABEL_177: sub_100056810(); v68 = (char *)v118; } else { v67 = (unsigned __int8)v116 >> 1; v68 = (char *)&v116 + 1; if ( v65 > v67 ) goto LABEL_177; } v69 = v67 - v65; if ( v69 >= v64 - v65 ) v69 = v64 - v65; if ( v69 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v110 = v65; if ( v69 >= 0x17 ) { v73 = (v69 | 7) + 1; if ( (v69 | 7) == 0x17 ) v73 = 26; v70 = (char *)operator new(v73); __p = v70; *(_QWORD *)&__s = v73 | 1; *((_QWORD *)&__s + 1) = v69; v9 = v119; } else { LOBYTE(__s) = 2 * v69; v70 = (char *)&__s + 1; if ( !v69 ) { BYTE1(__s) = 0; v71 = __s; if ( (__s & 1) == 0 ) { LABEL_125: v65 = v110; if ( v71 || v110 != v101 ) { v72 = (char *)&__s + 1; goto LABEL_135; } LABEL_145: v79 = -1; if ( v64 != -1 ) { if ( (v116 & 1) != 0 ) { v80 = (char *)v118; v81 = v117; v65 = v64 + 1; if ( v117 <= v64 + 1 ) goto LABEL_146; } else { v81 = (unsigned __int8)v116 >> 1; v80 = (char *)&v116 + 1; v65 = v64 + 1; if ( v81 <= v64 + 1 ) goto LABEL_146; } v82 = &v80[v65]; v83 = v81 + ~v64; while ( *v82 != 32 ) { ++v82; if ( !--v83 ) { v82 = &v80[v81]; break; } } v79 = v82 - v80; if ( v82 == &v80[v81] ) v79 = -1; } LABEL_146: if ( (__s & 1) != 0 ) operator delete(__p); v66 = v64 == -1; v64 = v79; if ( v66 ) { if ( (v116 & 1) != 0 ) operator delete(v118); for ( i = 0; i < (unsigned int)sub_1007FEF90((__int64)v108); ++i ) { v85 = sub_1007FEFE0((__int64)v108, i); cocos2d::CCString::intValue(v85); if ( (_BYTE)v123 ) { v86 = sub_10088E820("%s_%03d.png", v101); v87 = 1; } else { v88 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v89 = sub_10088E820("%s_%03d.png", v101); v90 = (const char *)cocos2d::CCString::getCString(v89); v86 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v88, v90); v87 = 2; } *(_DWORD *)(v86 + 28) = v87; sub_1007FEBF0((__int64)v111, v86); } if ( (v105[0] & 1) != 0 ) operator delete(v107); goto LABEL_171; } continue; } LABEL_132: v65 = v110; if ( !*((_QWORD *)&__s + 1) && v110 == v101 ) goto LABEL_145; v72 = (const char *)__p; LABEL_135: v74 = strlen(v72); if ( v74 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v75 = v74; if ( v74 >= 0x17 ) { v77 = (v74 | 7) + 1; if ( (v74 | 7) == 0x17 ) v77 = 26; v76 = (char *)operator new(v77); v122 = v76; v121[0] = v77 | 1; v121[1] = v75; v9 = v119; } else { LOBYTE(v121[0]) = 2 * v74; v76 = (char *)v121 + 1; if ( !v74 ) { LABEL_143: v76[v75] = 0; v78 = sub_10088E600(v121); sub_1007FEBF0((__int64)v108, v78); v65 = v110; if ( (v121[0] & 1) != 0 ) operator delete(v122); goto LABEL_145; } } memmove(v76, v72, v75); goto LABEL_143; } } break; } memmove(v70, &v68[v110], v69); v70[v69] = 0; v71 = __s; if ( (__s & 1) == 0 ) goto LABEL_125; goto LABEL_132; } } else { v61 = (unsigned __int8)v116 >> 1; v60 = (char *)&v116 + 1; v101 = v61; if ( (unsigned __int8)v116 >> 1 ) goto LABEL_103; } v64 = -1; goto LABEL_112; } } memmove(v58, v40, v57); goto LABEL_101; } LOBYTE(__s) = 12; strcpy((char *)&__s + 1, "frames"); v47 = cocos2d::CCDictionary::objectForKey(v17, (char *)&__s); v48 = cocos2d::CCString::intValue(v47); if ( (__s & 1) != 0 ) operator delete(__p); if ( v48 > 0 ) { if ( (_BYTE)v123 ) { v49 = -v48; v50 = 1; do { v51 = sub_10088E820("%s_%03d.png", v101); *(_DWORD *)(v51 + 28) = 1; sub_1007FEBF0((__int64)v111, v51); v52 = v49 + v50++ + 1; } while ( v52 != 1 ); } else { v91 = -v48; v92 = 1; do { v93 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v94 = sub_10088E820("%s_%03d.png", v101); v95 = (const char *)cocos2d::CCString::getCString(v94); v96 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v93, v95); *(_DWORD *)(v96 + 28) = 2; sub_1007FEBF0((__int64)v111, v96); v97 = v91 + v92++ + 1; } while ( v97 != 1 ); } } LABEL_171: *(_QWORD *)&a2 = LODWORD(v112); v98 = cocos2d::CCAnimation::createWithSpriteFrames((__int64)v111, v112); v99 = sub_10088E820("%s_%s", v101); v100 = (const char *)cocos2d::CCString::getCString(v99); cocos2d::CCAnimationCache::addAnimation(v103, (__int64)v98, v100); LABEL_172: if ( (*(_BYTE *)&v113.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v113.__r_.__value_.__l.__data_); if ( (__dst[0] & 1) != 0 ) operator delete(v115); v10 = v104 + 1; result = sub_1007FEF90(v9); if ( v104 + 1 >= (unsigned int)result ) return result; } v16 = (v13 | 7) + 1; if ( (v13 | 7) == 0x17 ) v16 = 26; v15 = (char *)operator new(v16); v115 = v15; __dst[0] = v16 + 1; __dst[1] = v14; LABEL_23: memmove(v15, CString, v14); goto LABEL_24; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source