{"type": "func", "start": 3962236, "end": 3962422, "name": "CCPartAnimSprite::setDisplayFrame", "pseudocode": "// \n// CCPartAnimSprite::setDisplayFrame from 0x3c757c to 0x3c7636 (186 bytes)\n// \n// 0 xrefs:\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:46:35 +0000\n// \n\ncocos2d::CCSpriteFrame *__fastcall CCPartAnimSprite::setDisplayFrame(\n        cocos2d::CCSpriteFrame *this,\n        cocos2d::CCSpriteFrame *a2)\n{\n  cocos2d::CCSpriteFrame *v2; // r6\n  CCAnimateFrameCache *v4; // r0\n  CCAnimateFrameCache *v5; // r5\n  const char *CString; // r0\n  _DWORD *v7; // r2\n  cocos2d::CCSpriteFrame *v8; // r7\n  int v9; // r3\n  int *v10; // r5\n  int v11; // r4\n  int v12; // r7\n  cocos2d::CCSpriteFrame **v13; // r5\n  cocos2d::CCSpriteFrame **v14; // r4\n  cocos2d::CCSpriteFrame *v15; // t1\n  int v16; // r3\n  SpriteDescription *v17; // r1\n  int v18; // r3\n  _DWORD *v19; // r2\n  cocos2d::CCSpriteFrame **v20; // r5\n  cocos2d::CCSpriteFrame **v21; // r4\n  cocos2d::CCSpriteFrame *v22; // t1\n\n  v2 = this;\n  if ( a2 )\n  {\n    this = *((cocos2d::CCSpriteFrame **)this + 128);\n    if ( a2 != this )\n    {\n      if ( this )\n        cocos2d::CCObject::release(this);\n      *((_DWORD *)v2 + 128) = a2;\n      v4 = (CCAnimateFrameCache *)cocos2d::CCObject::retain(a2);\n      v5 = (CCAnimateFrameCache *)CCAnimateFrameCache::sharedSpriteFrameCache(v4);\n      CString = (const char *)cocos2d::CCString::getCString(a2);\n      this = (cocos2d::CCSpriteFrame *)CCAnimateFrameCache::spriteFrameByName(v5, CString);\n      v8 = this;\n      if ( this )\n      {\n        v9 = *((_DWORD *)v2 + 132);\n        if ( v9 )\n        {\n          v7 = *(_DWORD **)(v9 + 52);\n          if ( *v7 )\n          {\n            v13 = (cocos2d::CCSpriteFrame **)v7[3];\n            v14 = &v13[*v7] + 0x3FFFFFFF;\n            while ( v13 <= v14 )\n            {\n              v15 = *v13++;\n              this = v15;\n              if ( !v15 )\n                break;\n              this = (cocos2d::CCSpriteFrame *)CCSpritePart::markAsNotBeingUsed((int)this);\n            }\n          }\n        }\n        v10 = *((int **)v8 + 13);\n        v11 = 0;\n        v12 = *v10;\n        while ( v11 < v12 )\n        {\n          v16 = v10[3];\n          v17 = *(SpriteDescription **)(v16 + 4 * v11++);\n          this = (cocos2d::CCSpriteFrame *)CCPartAnimSprite::transformSprite((cocos2d::CCArray **)v2, v17, (int)v7, v16);\n        }\n        v18 = *((_DWORD *)v2 + 132);\n        if ( v18 )\n        {\n          v19 = *(_DWORD **)(v18 + 52);\n          if ( *v19 )\n          {\n            v20 = (cocos2d::CCSpriteFrame **)v19[3];\n            v21 = &v20[*v19] + 0x3FFFFFFF;\n            while ( v20 <= v21 )\n            {\n              v22 = *v20++;\n              this = v22;\n              if ( !v22 )\n                break;\n              this = (cocos2d::CCSpriteFrame *)CCSpritePart::hideInactive(this);\n            }\n          }\n        }\n      }\n      *((_BYTE *)v2 + 516) = 1;\n    }\n  }\n  return this;\n}", "assembly": "; \n; CCPartAnimSprite::setDisplayFrame from 0x3c757c to 0x3c7636 (186 bytes)\n; \n; 0 xrefs:\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:46:35 +0000\n; \nPUSH            {R3-R7,LR}                                             ; +0x0, 0x3c757c\nMOV             R6, R0                                                 ; +0x2, 0x3c757e\nMOV             R4, R1                                                 ; +0x4, 0x3c7580\nCMP             R1, #0                                                 ; +0x6, 0x3c7582\nBEQ             locret_3C7634                                          ; +0x8, 0x3c7584\nLDR.W           R0, [R0,#0x200]; this                                  ; +0xa, 0x3c7586\nCMP             R1, R0                                                 ; +0xe, 0x3c758a\nBEQ             locret_3C7634                                          ; +0x10, 0x3c758c\nCBZ             R0, loc_3C7594                                         ; +0x12, 0x3c758e\nBL              _ZN7cocos2d8CCObject7releaseEv; cocos2d::CCObject::release(void) ; +0x14, 0x3c7590\nMOV             R0, R4; this                                           ; +0x18, 0x3c7594\nSTR.W           R4, [R6,#0x200]                                        ; +0x1a, 0x3c7596\nBL              _ZN7cocos2d8CCObject6retainEv; cocos2d::CCObject::retain(void) ; +0x1e, 0x3c759a\nBL              _ZN19CCAnimateFrameCache22sharedSpriteFrameCacheEv; CCAnimateFrameCache::sharedSpriteFrameCache(void) ; +0x22, 0x3c759e\nMOV             R5, R0                                                 ; +0x26, 0x3c75a2\nMOV             R0, R4; this                                           ; +0x28, 0x3c75a4\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x2a, 0x3c75a6\nMOV             R1, R0; char *                                         ; +0x2e, 0x3c75aa\nMOV             R0, R5; this                                           ; +0x30, 0x3c75ac\nBL              _ZN19CCAnimateFrameCache17spriteFrameByNameEPKc; CCAnimateFrameCache::spriteFrameByName(char const*) ; +0x32, 0x3c75ae\nMOV             R7, R0                                                 ; +0x36, 0x3c75b2\nCBNZ            R0, loc_3C75BE                                         ; +0x38, 0x3c75b4\nMOVS            R3, #1                                                 ; +0x3a, 0x3c75b6\nSTRB.W          R3, [R6,#0x204]                                        ; +0x3c, 0x3c75b8\nPOP             {R3-R7,PC}                                             ; +0x40, 0x3c75bc\nLDR.W           R3, [R6,#0x210]                                        ; +0x42, 0x3c75be\nCBNZ            R3, loc_3C75CC                                         ; +0x46, 0x3c75c2\nLDR             R5, [R7,#0x34]                                         ; +0x48, 0x3c75c4\nMOVS            R4, #0                                                 ; +0x4a, 0x3c75c6\nLDR             R7, [R5]                                               ; +0x4c, 0x3c75c8\nB               loc_3C75F2                                             ; +0x4e, 0x3c75ca\nLDR             R2, [R3,#0x34]                                         ; +0x50, 0x3c75cc\nLDR             R3, [R2]                                               ; +0x52, 0x3c75ce\nCMP             R3, #0                                                 ; +0x54, 0x3c75d0\nBEQ             loc_3C75C4                                             ; +0x56, 0x3c75d2\nADD.W           R3, R3, #0x40000000                                    ; +0x58, 0x3c75d4\nLDR             R5, [R2,#0xC]                                          ; +0x5c, 0x3c75d8\nSUBS            R3, #1                                                 ; +0x5e, 0x3c75da\nADD.W           R4, R5, R3,LSL#2                                       ; +0x60, 0x3c75dc\nCMP             R5, R4                                                 ; +0x64, 0x3c75e0\nBHI             loc_3C75C4                                             ; +0x66, 0x3c75e2\nLDR.W           R0, [R5],#4; this                                      ; +0x68, 0x3c75e4\nCMP             R0, #0                                                 ; +0x6c, 0x3c75e8\nBEQ             loc_3C75C4                                             ; +0x6e, 0x3c75ea\nBL              _ZN12CCSpritePart18markAsNotBeingUsedEv; CCSpritePart::markAsNotBeingUsed(void) ; +0x70, 0x3c75ec\nB               loc_3C75E0                                             ; +0x74, 0x3c75f0\nCMP             R4, R7                                                 ; +0x76, 0x3c75f2\nBGE             loc_3C7606                                             ; +0x78, 0x3c75f4\nLDR             R3, [R5,#0xC]                                          ; +0x7a, 0x3c75f6\nMOV             R0, R6; this                                           ; +0x7c, 0x3c75f8\nLDR.W           R1, [R3,R4,LSL#2]; SpriteDescription *                 ; +0x7e, 0x3c75fa\nADDS            R4, #1                                                 ; +0x82, 0x3c75fe\nBL              _ZN16CCPartAnimSprite15transformSpriteEP17SpriteDescription; CCPartAnimSprite::transformSprite(SpriteDescription *) ; +0x84, 0x3c7600\nB               loc_3C75F2                                             ; +0x88, 0x3c7604\nLDR.W           R3, [R6,#0x210]                                        ; +0x8a, 0x3c7606\nCMP             R3, #0                                                 ; +0x8e, 0x3c760a\nBEQ             loc_3C75B6                                             ; +0x90, 0x3c760c\nLDR             R2, [R3,#0x34]                                         ; +0x92, 0x3c760e\nLDR             R3, [R2]                                               ; +0x94, 0x3c7610\nCMP             R3, #0                                                 ; +0x96, 0x3c7612\nBEQ             loc_3C75B6                                             ; +0x98, 0x3c7614\nADD.W           R3, R3, #0x40000000                                    ; +0x9a, 0x3c7616\nLDR             R5, [R2,#0xC]                                          ; +0x9e, 0x3c761a\nSUBS            R3, #1                                                 ; +0xa0, 0x3c761c\nADD.W           R4, R5, R3,LSL#2                                       ; +0xa2, 0x3c761e\nCMP             R5, R4                                                 ; +0xa6, 0x3c7622\nBHI             loc_3C75B6                                             ; +0xa8, 0x3c7624\nLDR.W           R0, [R5],#4; this                                      ; +0xaa, 0x3c7626\nCMP             R0, #0                                                 ; +0xae, 0x3c762a\nBEQ             loc_3C75B6                                             ; +0xb0, 0x3c762c\nBL              _ZN12CCSpritePart12hideInactiveEv; CCSpritePart::hideInactive(void) ; +0xb2, 0x3c762e\nB               loc_3C7622                                             ; +0xb6, 0x3c7632\nPOP             {R3-R7,PC}                                             ; +0xb8, 0x3c7634", "xrefs": [], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}