{"type": "func", "start": 4300652752, "end": 4300653146, "name": "CCAnimateFrameCache::addSpriteFramesWithFile", "pseudocode": "// \n// CCAnimateFrameCache::addSpriteFramesWithFile from 0x10056c0d0 to 0x10056c25a (394 bytes)\n// \n// 2 xrefs:\n// > CCPartAnimSprite::initWithAnimDesc @ 0x100373be3\n// > LoadingLayer::loadAssets @ 0x1003a35a3\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\ncocos2d::CCDictionary *__fastcall CCAnimateFrameCache::addSpriteFramesWithFile(CCAnimateFrameCache *a1, const char *a2)\n{\n  double v2; // xmm0_8\n  CCAnimateFrameCache *v3; // r14\n  cocos2d::CCDictionary *m_animateDescriptions; // r15\n  size_t v5; // rax\n  size_t v6; // r12\n  char *v7; // r13\n  cocos2d::CCDictionary *v8; // r14\n  size_t v9; // r15\n  __int64 v10; // r15\n  __int64 v11; // r14\n  size_t v12; // rax\n  size_t v13; // r15\n  char *v14; // r12\n  cocos2d::CCDictionary *v15; // r15\n  cocos2d::CCDictionary *result; // rax\n  size_t v17; // r13\n  cocos2d::CCDictionary *v18; // rbx\n  size_t __dst; // [rsp+10h] [rbp-40h] BYREF\n  size_t v20; // [rsp+18h] [rbp-38h]\n  void *__p; // [rsp+20h] [rbp-30h]\n\n  v3 = a1;\n  m_animateDescriptions = a1->m_animateDescriptions;\n  v5 = strlen(a2);\n  if ( v5 >= 0xFFFFFFFFFFFFFFF8LL )\n    goto LABEL_24;\n  v6 = v5;\n  if ( v5 >= 0x17 )\n  {\n    v8 = a1->m_animateDescriptions;\n    v9 = 26;\n    if ( (v5 | 7) != 0x17 )\n      v9 = (v5 | 7) + 1;\n    v7 = (char *)operator new(v9);\n    __p = v7;\n    __dst = v9 + 1;\n    m_animateDescriptions = v8;\n    v3 = a1;\n    v20 = v6;\n    goto LABEL_8;\n  }\n  LOBYTE(__dst) = 2 * v5;\n  v7 = (char *)&__dst + 1;\n  if ( v5 )\nLABEL_8:\n    memcpy(v7, a2, v6);\n  v7[v6] = 0;\n  v10 = cocos2d::CCDictionary::objectForKey_1((__int64)m_animateDescriptions, (char *)&__dst);\n  if ( (__dst & 1) != 0 )\n    operator delete(__p);\n  if ( !v10 )\n  {\n    v15 = cocos2d::CCDictionary::createWithContentsOfFile(a2);\n    CCAnimateFrameCache::addDict(v3, v15, a2);\n    return v15;\n  }\n  v11 = (__int64)v3->m_animateDescriptions;\n  v12 = strlen(a2);\n  if ( v12 >= 0xFFFFFFFFFFFFFFF8LL )\nLABEL_24:\n    sub_100006BF0(v2);\n  v13 = v12;\n  if ( v12 >= 0x17 )\n  {\n    v17 = 26;\n    if ( (v12 | 7) != 0x17 )\n      v17 = (v12 | 7) + 1;\n    v14 = (char *)operator new(v17);\n    __p = v14;\n    __dst = v17 + 1;\n    v20 = v13;\n    goto LABEL_20;\n  }\n  LOBYTE(__dst) = 2 * v12;\n  v14 = (char *)&__dst + 1;\n  if ( v12 )\nLABEL_20:\n    memcpy(v14, a2, v13);\n  v14[v13] = 0;\n  result = (cocos2d::CCDictionary *)cocos2d::CCDictionary::objectForKey_1(v11, (char *)&__dst);\n  if ( (__dst & 1) != 0 )\n  {\n    v18 = result;\n    operator delete(__p);\n    return v18;\n  }\n  return result;\n}", "assembly": "; \n; CCAnimateFrameCache::addSpriteFramesWithFile from 0x10056c0d0 to 0x10056c25a (394 bytes)\n; \n; 2 xrefs:\n; > CCPartAnimSprite::initWithAnimDesc @ 0x100373be3\n; > LoadingLayer::loadAssets @ 0x1003a35a3\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\npush    rbp                                                            ; +0x0, 0x10056c0d0\nmov     rbp, rsp                                                       ; +0x1, 0x10056c0d1\npush    r15                                                            ; +0x4, 0x10056c0d4\npush    r14                                                            ; +0x6, 0x10056c0d6\npush    r13                                                            ; +0x8, 0x10056c0d8\npush    r12                                                            ; +0xa, 0x10056c0da\npush    rbx                                                            ; +0xc, 0x10056c0dc\nsub     rsp, 28h                                                       ; +0xd, 0x10056c0dd\nmov     rbx, rsi                                                       ; +0x11, 0x10056c0e1\nmov     r14, rdi                                                       ; +0x14, 0x10056c0e4\nmov     r15, [rdi+48h]                                                 ; +0x17, 0x10056c0e7\nmov     rdi, rsi; __s                                                  ; +0x1b, 0x10056c0eb\ncall    _strlen                                                        ; +0x1e, 0x10056c0ee\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x23, 0x10056c0f3\njnb     loc_10056C255                                                  ; +0x27, 0x10056c0f7\nmov     r12, rax                                                       ; +0x2d, 0x10056c0fd\ncmp     rax, 17h                                                       ; +0x30, 0x10056c100\njnb     short loc_10056C118                                            ; +0x34, 0x10056c104\nlea     eax, [r12+r12]                                                 ; +0x36, 0x10056c106\nmov     byte ptr [rbp+__dst], al                                       ; +0x3a, 0x10056c10a\nlea     r13, [rbp+__dst+1]                                             ; +0x3d, 0x10056c10d\ntest    r12, r12                                                       ; +0x41, 0x10056c111\njnz     short loc_10056C159                                            ; +0x44, 0x10056c114\njmp     short loc_10056C167                                            ; +0x46, 0x10056c116\nmov     rax, r12                                                       ; +0x48, 0x10056c118\nor      rax, 7                                                         ; +0x4b, 0x10056c11b\nlea     rcx, [rax+1]                                                   ; +0x4f, 0x10056c11f\ncmp     rax, 17h                                                       ; +0x53, 0x10056c123\nmov     [rbp+var_48], r14                                              ; +0x57, 0x10056c127\nmov     r14, r15                                                       ; +0x5b, 0x10056c12b\nmov     r15d, 1Ah                                                      ; +0x5e, 0x10056c12e\ncmovnz  r15, rcx                                                       ; +0x64, 0x10056c134\nmov     rdi, r15; __sz                                                 ; +0x68, 0x10056c138\ncall    __Znwm; operator new(ulong)                                    ; +0x6b, 0x10056c13b\nmov     r13, rax                                                       ; +0x70, 0x10056c140\nmov     [rbp+__p], rax                                                 ; +0x73, 0x10056c143\ninc     r15                                                            ; +0x77, 0x10056c147\nmov     [rbp+__dst], r15                                               ; +0x7a, 0x10056c14a\nmov     r15, r14                                                       ; +0x7e, 0x10056c14e\nmov     r14, [rbp+var_48]                                              ; +0x81, 0x10056c151\nmov     [rbp+var_38], r12                                              ; +0x85, 0x10056c155\nmov     rdi, r13; __dst                                                ; +0x89, 0x10056c159\nmov     rsi, rbx; __src                                                ; +0x8c, 0x10056c15c\nmov     rdx, r12; __n                                                  ; +0x8f, 0x10056c15f\ncall    _memcpy                                                        ; +0x92, 0x10056c162\nmov     byte ptr [r13+r12+0], 0                                        ; +0x97, 0x10056c167\nlea     rsi, [rbp+__dst]                                               ; +0x9d, 0x10056c16d\nmov     rdi, r15                                                       ; +0xa1, 0x10056c171\ncall    cocos2d__CCDictionary__objectForKey_1                          ; +0xa4, 0x10056c174\nmov     r15, rax                                                       ; +0xa9, 0x10056c179\ntest    byte ptr [rbp+__dst], 1                                        ; +0xac, 0x10056c17c\njz      short loc_10056C18B                                            ; +0xb0, 0x10056c180\nmov     rdi, [rbp+__p]; __p                                            ; +0xb2, 0x10056c182\ncall    __ZdlPv; operator delete(void *)                               ; +0xb6, 0x10056c186\ntest    r15, r15                                                       ; +0xbb, 0x10056c18b\njz      short loc_10056C1C1                                            ; +0xbe, 0x10056c18e\nmov     r14, [r14+48h]                                                 ; +0xc0, 0x10056c190\nmov     rdi, rbx; __s                                                  ; +0xc4, 0x10056c194\ncall    _strlen                                                        ; +0xc7, 0x10056c197\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xcc, 0x10056c19c\njnb     loc_10056C255                                                  ; +0xd0, 0x10056c1a0\nmov     r15, rax                                                       ; +0xd6, 0x10056c1a6\ncmp     rax, 17h                                                       ; +0xd9, 0x10056c1a9\njnb     short loc_10056C1DF                                            ; +0xdd, 0x10056c1ad\nlea     eax, [r15+r15]                                                 ; +0xdf, 0x10056c1af\nmov     byte ptr [rbp+__dst], al                                       ; +0xe3, 0x10056c1b3\nlea     r12, [rbp+__dst+1]                                             ; +0xe6, 0x10056c1b6\ntest    r15, r15                                                       ; +0xea, 0x10056c1ba\njnz     short loc_10056C212                                            ; +0xed, 0x10056c1bd\njmp     short loc_10056C220                                            ; +0xef, 0x10056c1bf\nmov     rdi, rbx                                                       ; +0xf1, 0x10056c1c1\ncall    cocos2d__CCDictionary__createWithContentsOfFile                ; +0xf4, 0x10056c1c4\nmov     r15, rax                                                       ; +0xf9, 0x10056c1c9\nmov     rdi, r14                                                       ; +0xfc, 0x10056c1cc\nmov     rsi, rax                                                       ; +0xff, 0x10056c1cf\nmov     rdx, rbx                                                       ; +0x102, 0x10056c1d2\ncall    CCAnimateFrameCache__addDict                                   ; +0x105, 0x10056c1d5\nmov     rax, r15                                                       ; +0x10a, 0x10056c1da\njmp     short loc_10056C246                                            ; +0x10d, 0x10056c1dd\nmov     rax, r15                                                       ; +0x10f, 0x10056c1df\nor      rax, 7                                                         ; +0x112, 0x10056c1e2\nlea     rcx, [rax+1]                                                   ; +0x116, 0x10056c1e6\ncmp     rax, 17h                                                       ; +0x11a, 0x10056c1ea\nmov     r13d, 1Ah                                                      ; +0x11e, 0x10056c1ee\ncmovnz  r13, rcx                                                       ; +0x124, 0x10056c1f4\nmov     rdi, r13; __sz                                                 ; +0x128, 0x10056c1f8\ncall    __Znwm; operator new(ulong)                                    ; +0x12b, 0x10056c1fb\nmov     r12, rax                                                       ; +0x130, 0x10056c200\nmov     [rbp+__p], rax                                                 ; +0x133, 0x10056c203\ninc     r13                                                            ; +0x137, 0x10056c207\nmov     [rbp+__dst], r13                                               ; +0x13a, 0x10056c20a\nmov     [rbp+var_38], r15                                              ; +0x13e, 0x10056c20e\nmov     rdi, r12; __dst                                                ; +0x142, 0x10056c212\nmov     rsi, rbx; __src                                                ; +0x145, 0x10056c215\nmov     rdx, r15; __n                                                  ; +0x148, 0x10056c218\ncall    _memcpy                                                        ; +0x14b, 0x10056c21b\nmov     byte ptr [r12+r15], 0                                          ; +0x150, 0x10056c220\nlea     rsi, [rbp+__dst]                                               ; +0x155, 0x10056c225\nmov     rdi, r14                                                       ; +0x159, 0x10056c229\ncall    cocos2d__CCDictionary__objectForKey_1                          ; +0x15c, 0x10056c22c\ntest    byte ptr [rbp+__dst], 1                                        ; +0x161, 0x10056c231\njz      short loc_10056C246                                            ; +0x165, 0x10056c235\nmov     rdi, [rbp+__p]; __p                                            ; +0x167, 0x10056c237\nmov     rbx, rax                                                       ; +0x16b, 0x10056c23b\ncall    __ZdlPv; operator delete(void *)                               ; +0x16e, 0x10056c23e\nmov     rax, rbx                                                       ; +0x173, 0x10056c243\nadd     rsp, 28h                                                       ; +0x176, 0x10056c246\npop     rbx                                                            ; +0x17a, 0x10056c24a\npop     r12                                                            ; +0x17b, 0x10056c24b\npop     r13                                                            ; +0x17d, 0x10056c24d\npop     r14                                                            ; +0x17f, 0x10056c24f\npop     r15                                                            ; +0x181, 0x10056c251\npop     rbp                                                            ; +0x183, 0x10056c253\nretn                                                                   ; +0x184, 0x10056c254\ncall    sub_100006BF0                                                  ; +0x185, 0x10056c255", "xrefs": ["CCPartAnimSprite::initWithAnimDesc @ 0x100373be3", "LoadingLayer::loadAssets @ 0x1003a35a3"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}