{"type": "func", "start": 5734168, "end": 5734440, "name": "CCSpritePart::updateDisplayFrame", "pseudocode": "// \n// CCSpritePart::updateDisplayFrame from 0x577f18 to 0x578028 (272 bytes)\n// \n// 2 xrefs:\n// > CCPartAnimSprite::changeTextureOfID @ 0x5780b0\n// > <???> @ 0xb4de0\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\n__int64 __fastcall CCSpritePart::updateDisplayFrame(__int64 a1, const char **a2)\n{\n  char *v4; // x0\n  void (__fastcall *v5)(__int64, cocos2d::CCSpriteFrame *); // x20\n  cocos2d::CCSpriteFrameCache *v6; // x0\n  cocos2d::CCSpriteFrame *v7; // x0\n  unsigned int *v9; // x2\n  int v10; // w1\n  _DWORD *v11; // [xsp+40h] [xbp+40h] BYREF\n\n  sub_D18D28(&v11, a2);\n  CCSpritePart::frameChanged(a1, (const void **)&v11);\n  v4 = (char *)(v11 - 6);\n  if ( v11 - 6 != (_DWORD *)&qword_124B6B0 )\n  {\n    if ( &pthread_create )\n    {\n      v9 = v11 - 2;\n      do\n        v10 = __ldaxr(v9);\n      while ( __stlxr(v10 - 1, v9) );\n    }\n    else\n    {\n      v10 = *(v11 - 2);\n      *(v11 - 2) = v10 - 1;\n    }\n    if ( v10 <= 0 )\n      operator delete(v4);\n  }\n  v5 = *(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)a1 + 1144LL);\n  v6 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();\n  v7 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v6, *a2);\n  v5(a1, v7);\n  return _stack_chk_guard;\n}", "assembly": "; \n; CCSpritePart::updateDisplayFrame from 0x577f18 to 0x578028 (272 bytes)\n; \n; 2 xrefs:\n; > CCPartAnimSprite::changeTextureOfID @ 0x5780b0\n; > <???> @ 0xb4de0\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\nSTP             X29, X30, [SP,#var_50]!                                ; +0x0, 0x577f18\nMOV             X29, SP                                                ; +0x4, 0x577f1c\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0x8, 0x577f20\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x577f24\nADD             X20, X29, #0x50+var_10                                 ; +0x10, 0x577f28\nSTP             X21, X22, [SP,#0x50+var_30]                            ; +0x14, 0x577f2c\nMOV             X21, X0                                                ; +0x18, 0x577f30\nMOV             X0, X20                                                ; +0x1c, 0x577f34\nLDR             X2, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x577f38\nMOV             X22, X1                                                ; +0x24, 0x577f3c\nLDR             X2, [X2]                                               ; +0x28, 0x577f40\nSTR             X2, [X29,#0x50+var_8]                                  ; +0x2c, 0x577f44\nBL              sub_D18D28                                             ; +0x30, 0x577f48\nMOV             X0, X21                                                ; +0x34, 0x577f4c\nMOV             X1, X20                                                ; +0x38, 0x577f50\nBL              _ZN12CCSpritePart12frameChangedESs; CCSpritePart::frameChanged(std::string) ; +0x3c, 0x577f54\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x40, 0x577f58\nLDR             X2, [X29,#0x50+var_10]                                 ; +0x44, 0x577f5c\nSUB             X0, X2, #0x18; p                                       ; +0x48, 0x577f60\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x4c, 0x577f64\nCMP             X0, X1                                                 ; +0x50, 0x577f68\nB.NE            loc_577FB4                                             ; +0x54, 0x577f6c\nLDR             X0, [X21]; this                                        ; +0x58, 0x577f70\nLDR             X20, [X0,#0x478]                                       ; +0x5c, 0x577f74\nBL              _ZN7cocos2d18CCSpriteFrameCache22sharedSpriteFrameCacheEv; cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(void) ; +0x60, 0x577f78\nLDR             X1, [X22]; char *                                      ; +0x64, 0x577f7c\nBL              _ZN7cocos2d18CCSpriteFrameCache17spriteFrameByNameEPKc; cocos2d::CCSpriteFrameCache::spriteFrameByName(char const*) ; +0x68, 0x577f80\nMOV             X1, X0                                                 ; +0x6c, 0x577f84\nMOV             X0, X21                                                ; +0x70, 0x577f88\nBLR             X20                                                    ; +0x74, 0x577f8c\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x78, 0x577f90\nLDR             X1, [X29,#0x50+var_8]                                  ; +0x7c, 0x577f94\nLDR             X0, [X19]                                              ; +0x80, 0x577f98\nCMP             X1, X0                                                 ; +0x84, 0x577f9c\nB.NE            loc_577FF8                                             ; +0x88, 0x577fa0\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0x8c, 0x577fa4\nLDP             X21, X22, [SP,#0x50+var_30]                            ; +0x90, 0x577fa8\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0x94, 0x577fac\nRET                                                                    ; +0x98, 0x577fb0\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0x9c, 0x577fb4\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0xa0, 0x577fb8\nCBZ             X1, loc_577FE8                                         ; +0xa4, 0x577fbc\nSUB             X2, X2, #8                                             ; +0xa8, 0x577fc0\nLDAXR           W1, [X2]                                               ; +0xac, 0x577fc4\nSUB             W3, W1, #1                                             ; +0xb0, 0x577fc8\nSTLXR           W4, W3, [X2]                                           ; +0xb4, 0x577fcc\nCBNZ            W4, loc_577FC4                                         ; +0xb8, 0x577fd0\nCMP             W1, WZR                                                ; +0xbc, 0x577fd4\nB.GT            loc_577F70                                             ; +0xc0, 0x577fd8\nADD             X1, X29, #0x50+var_18                                  ; +0xc4, 0x577fdc\nBL              j__ZdlPv; operator delete(void *)                      ; +0xc8, 0x577fe0\nB               loc_577F70                                             ; +0xcc, 0x577fe4\nLDUR            W1, [X2,#-8]                                           ; +0xd0, 0x577fe8\nSUB             W3, W1, #1                                             ; +0xd4, 0x577fec\nSTUR            W3, [X2,#-8]                                           ; +0xd8, 0x577ff0\nB               loc_577FD4                                             ; +0xdc, 0x577ff4\nBL              .__stack_chk_fail                                      ; +0xe0, 0x577ff8\nADRP            X1, #off_122EFE8@PAGE                                  ; +0xe4, 0x577ffc\nMOV             X19, X0                                                ; +0xe8, 0x578000\nLDR             X0, [X29,#0x50+var_10]                                 ; +0xec, 0x578004\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0xf0, 0x578008\nSUB             X0, X0, #0x18                                          ; +0xf4, 0x57800c\nCMP             X0, X1                                                 ; +0xf8, 0x578010\nB.EQ            loc_578020                                             ; +0xfc, 0x578014\nADD             X1, X29, #0x50+var_18                                  ; +0x100, 0x578018\nBL              sub_4DB080                                             ; +0x104, 0x57801c\nMOV             X0, X19                                                ; +0x108, 0x578020\nBL              _Unwind_Resume                                         ; +0x10c, 0x578024", "xrefs": ["CCPartAnimSprite::changeTextureOfID @ 0x5780b0", "<???> @ 0xb4de0"], "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"}