{"type": "func", "start": 4300655312, "end": 4300655504, "name": "CCAnimateFrameCache::spriteFrameByName", "pseudocode": "// \n// CCAnimateFrameCache::spriteFrameByName from 0x10056cad0 to 0x10056cb90 (192 bytes)\n// \n// 2 xrefs:\n// > CCPartAnimSprite::setDisplayFrame @ 0x100374e89\n// > CCPartAnimSprite::tweenToFrame @ 0x1003750a6\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::CCArray *__fastcall CCAnimateFrameCache::spriteFrameByName(CCAnimateFrameCache *a1, const char *a2)\n{\n  double v2; // xmm0_8\n  cocos2d::CCDictionary *m_animateFrames; // rbx\n  size_t v4; // rax\n  size_t v5; // r15\n  char *v6; // r12\n  size_t v7; // r13\n  cocos2d::CCArray *result; // rax\n  cocos2d::CCArray *v9; // rbx\n  _QWORD __dst[2]; // [rsp+0h] [rbp-40h] BYREF\n  void *__p; // [rsp+10h] [rbp-30h]\n\n  m_animateFrames = a1->m_animateFrames;\n  v4 = strlen(a2);\n  if ( v4 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100006BF0(v2);\n  v5 = v4;\n  if ( v4 >= 0x17 )\n  {\n    v7 = 26;\n    if ( (v4 | 7) != 0x17 )\n      v7 = (v4 | 7) + 1;\n    v6 = (char *)operator new(v7);\n    __p = v6;\n    __dst[0] = v7 + 1;\n    __dst[1] = v5;\n    goto LABEL_8;\n  }\n  LOBYTE(__dst[0]) = 2 * v4;\n  v6 = (char *)__dst + 1;\n  if ( v4 )\nLABEL_8:\n    memcpy(v6, a2, v5);\n  v6[v5] = 0;\n  result = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey_1((__int64)m_animateFrames, (char *)__dst);\n  if ( (__dst[0] & 1) != 0 )\n  {\n    v9 = result;\n    operator delete(__p);\n    return v9;\n  }\n  return result;\n}", "assembly": "; \n; CCAnimateFrameCache::spriteFrameByName from 0x10056cad0 to 0x10056cb90 (192 bytes)\n; \n; 2 xrefs:\n; > CCPartAnimSprite::setDisplayFrame @ 0x100374e89\n; > CCPartAnimSprite::tweenToFrame @ 0x1003750a6\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, 0x10056cad0\nmov     rbp, rsp                                                       ; +0x1, 0x10056cad1\npush    r15                                                            ; +0x4, 0x10056cad4\npush    r14                                                            ; +0x6, 0x10056cad6\npush    r13                                                            ; +0x8, 0x10056cad8\npush    r12                                                            ; +0xa, 0x10056cada\npush    rbx                                                            ; +0xc, 0x10056cadc\nsub     rsp, 18h                                                       ; +0xd, 0x10056cadd\nmov     r14, rsi                                                       ; +0x11, 0x10056cae1\nmov     rbx, [rdi+38h]                                                 ; +0x14, 0x10056cae4\nmov     rdi, rsi; __s                                                  ; +0x18, 0x10056cae8\ncall    _strlen                                                        ; +0x1b, 0x10056caeb\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x20, 0x10056caf0\njnb     loc_10056CB8B                                                  ; +0x24, 0x10056caf4\nmov     r15, rax                                                       ; +0x2a, 0x10056cafa\ncmp     rax, 17h                                                       ; +0x2d, 0x10056cafd\njnb     short loc_10056CB15                                            ; +0x31, 0x10056cb01\nlea     eax, [r15+r15]                                                 ; +0x33, 0x10056cb03\nmov     byte ptr [rbp+__dst], al                                       ; +0x37, 0x10056cb07\nlea     r12, [rbp+__dst+1]                                             ; +0x3a, 0x10056cb0a\ntest    r15, r15                                                       ; +0x3e, 0x10056cb0e\njnz     short loc_10056CB48                                            ; +0x41, 0x10056cb11\njmp     short loc_10056CB56                                            ; +0x43, 0x10056cb13\nmov     rax, r15                                                       ; +0x45, 0x10056cb15\nor      rax, 7                                                         ; +0x48, 0x10056cb18\nlea     rcx, [rax+1]                                                   ; +0x4c, 0x10056cb1c\ncmp     rax, 17h                                                       ; +0x50, 0x10056cb20\nmov     r13d, 1Ah                                                      ; +0x54, 0x10056cb24\ncmovnz  r13, rcx                                                       ; +0x5a, 0x10056cb2a\nmov     rdi, r13; __sz                                                 ; +0x5e, 0x10056cb2e\ncall    __Znwm; operator new(ulong)                                    ; +0x61, 0x10056cb31\nmov     r12, rax                                                       ; +0x66, 0x10056cb36\nmov     [rbp+__p], rax                                                 ; +0x69, 0x10056cb39\ninc     r13                                                            ; +0x6d, 0x10056cb3d\nmov     [rbp+__dst], r13                                               ; +0x70, 0x10056cb40\nmov     [rbp+var_38], r15                                              ; +0x74, 0x10056cb44\nmov     rdi, r12; __dst                                                ; +0x78, 0x10056cb48\nmov     rsi, r14; __src                                                ; +0x7b, 0x10056cb4b\nmov     rdx, r15; __n                                                  ; +0x7e, 0x10056cb4e\ncall    _memcpy                                                        ; +0x81, 0x10056cb51\nmov     byte ptr [r12+r15], 0                                          ; +0x86, 0x10056cb56\nlea     rsi, [rbp+__dst]                                               ; +0x8b, 0x10056cb5b\nmov     rdi, rbx                                                       ; +0x8f, 0x10056cb5f\ncall    cocos2d__CCDictionary__objectForKey_1                          ; +0x92, 0x10056cb62\ntest    byte ptr [rbp+__dst], 1                                        ; +0x97, 0x10056cb67\njz      short loc_10056CB7C                                            ; +0x9b, 0x10056cb6b\nmov     rdi, [rbp+__p]; __p                                            ; +0x9d, 0x10056cb6d\nmov     rbx, rax                                                       ; +0xa1, 0x10056cb71\ncall    __ZdlPv; operator delete(void *)                               ; +0xa4, 0x10056cb74\nmov     rax, rbx                                                       ; +0xa9, 0x10056cb79\nadd     rsp, 18h                                                       ; +0xac, 0x10056cb7c\npop     rbx                                                            ; +0xb0, 0x10056cb80\npop     r12                                                            ; +0xb1, 0x10056cb81\npop     r13                                                            ; +0xb3, 0x10056cb83\npop     r14                                                            ; +0xb5, 0x10056cb85\npop     r15                                                            ; +0xb7, 0x10056cb87\npop     rbp                                                            ; +0xb9, 0x10056cb89\nretn                                                                   ; +0xba, 0x10056cb8a\ncall    sub_100006BF0                                                  ; +0xbb, 0x10056cb8b", "xrefs": ["CCPartAnimSprite::setDisplayFrame @ 0x100374e89", "CCPartAnimSprite::tweenToFrame @ 0x1003750a6"], "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"}