{"type": "func", "start": 4298442800, "end": 4298442951, "name": "CCAnimatedSprite::cleanupSprite", "pseudocode": "// \n// CCAnimatedSprite::cleanupSprite from 0x100350830 to 0x1003508c7 (151 bytes)\n// \n// 0 xrefs:\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\nvoid __fastcall CCAnimatedSprite::cleanupSprite(CCAnimatedSprite *a1)\n{\n  CCPartAnimSprite *m_paSprite; // rdi\n  cocos2d::CCSprite *m_fbfSprite; // rdi\n  SpriteAnimationManager *m_animationManager; // rdi\n  cocos2d::CCSprite *v5; // rdi\n  CCPartAnimSprite *v6; // rdi\n  SpriteAnimationManager **p_m_animationManager; // rbx\n\n  m_paSprite = a1->m_paSprite;\n  if ( m_paSprite )\n    ((void (__fastcall *)(CCPartAnimSprite *))m_paSprite->cleanup)(m_paSprite);\n  m_fbfSprite = a1->m_fbfSprite;\n  if ( m_fbfSprite )\n    ((void (__fastcall *)(cocos2d::CCSprite *))m_fbfSprite->cleanup)(m_fbfSprite);\n  m_animationManager = a1->m_animationManager;\n  if ( m_animationManager )\n    SpriteAnimationManager::doCleanup(m_animationManager);\n  v5 = a1->m_fbfSprite;\n  if ( v5 )\n    ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v5->removeFromParentAndCleanup)(v5, 1);\n  v6 = a1->m_paSprite;\n  p_m_animationManager = &a1->m_animationManager;\n  if ( v6 )\n    ((void (__fastcall *)(CCPartAnimSprite *, __int64))v6->removeFromParentAndCleanup)(v6, 1);\n  *((_OWORD *)p_m_animationManager + 1) = 0;\n  *(_OWORD *)p_m_animationManager = 0;\n  *((_DWORD *)p_m_animationManager + 8) = 0;\n}", "assembly": "; \n; CCAnimatedSprite::cleanupSprite from 0x100350830 to 0x1003508c7 (151 bytes)\n; \n; 0 xrefs:\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, 0x100350830\nmov     rbp, rsp                                                       ; +0x1, 0x100350831\npush    rbx                                                            ; +0x4, 0x100350834\npush    rax                                                            ; +0x5, 0x100350835\nmov     rbx, rdi                                                       ; +0x6, 0x100350836\nmov     rdi, [rdi+2A0h]                                                ; +0x9, 0x100350839\ntest    rdi, rdi                                                       ; +0x10, 0x100350840\njz      short loc_10035084E                                            ; +0x13, 0x100350843\nmov     rax, [rdi]                                                     ; +0x15, 0x100350845\ncall    qword ptr [rax+2D0h]                                           ; +0x18, 0x100350848\nmov     rdi, [rbx+298h]                                                ; +0x1e, 0x10035084e\ntest    rdi, rdi                                                       ; +0x25, 0x100350855\njz      short loc_100350863                                            ; +0x28, 0x100350858\nmov     rax, [rdi]                                                     ; +0x2a, 0x10035085a\ncall    qword ptr [rax+2D0h]                                           ; +0x2d, 0x10035085d\nmov     rdi, [rbx+288h]                                                ; +0x33, 0x100350863\ntest    rdi, rdi                                                       ; +0x3a, 0x10035086a\njz      short loc_100350874                                            ; +0x3d, 0x10035086d\ncall    SpriteAnimationManager__doCleanup                              ; +0x3f, 0x10035086f\nmov     rdi, [rbx+298h]                                                ; +0x44, 0x100350874\ntest    rdi, rdi                                                       ; +0x4b, 0x10035087b\njz      short loc_10035088E                                            ; +0x4e, 0x10035087e\nmov     rax, [rdi]                                                     ; +0x50, 0x100350880\nmov     esi, 1                                                         ; +0x53, 0x100350883\ncall    qword ptr [rax+200h]                                           ; +0x58, 0x100350888\nmov     rdi, [rbx+2A0h]                                                ; +0x5e, 0x10035088e\nadd     rbx, 288h                                                      ; +0x65, 0x100350895\ntest    rdi, rdi                                                       ; +0x6c, 0x10035089c\njz      short loc_1003508AF                                            ; +0x6f, 0x10035089f\nmov     rax, [rdi]                                                     ; +0x71, 0x1003508a1\nmov     esi, 1                                                         ; +0x74, 0x1003508a4\ncall    qword ptr [rax+200h]                                           ; +0x79, 0x1003508a9\nxorps   xmm0, xmm0                                                     ; +0x7f, 0x1003508af\nmovups  xmmword ptr [rbx+10h], xmm0                                    ; +0x82, 0x1003508b2\nmovups  xmmword ptr [rbx], xmm0                                        ; +0x86, 0x1003508b6\nmov     dword ptr [rbx+20h], 0                                         ; +0x89, 0x1003508b9\nadd     rsp, 8                                                         ; +0x90, 0x1003508c0\npop     rbx                                                            ; +0x94, 0x1003508c4\npop     rbp                                                            ; +0x95, 0x1003508c5\nretn                                                                   ; +0x96, 0x1003508c6", "xrefs": [], "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"}