{"type": "func", "start": 6442481136, "end": 6442481233, "name": "cocos2d::CCPoolManager::finalize", "pseudocode": "// \n// cocos2d::CCPoolManager::finalize from 0x1800075f0 to 0x180007651 (97 bytes)\n// \n// 6 xrefs:\n// > cocos2d::CCPoolManager::~CCPoolManager @ 0x1800073f9\n// > cocos2d::CCPoolManager::purgePoolManager @ 0x180007705\n// > <???> @ 0x1801317a8\n// > <???> @ 0x1801317b8\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801ada74\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 cocos2d::CCPoolManager::finalize(cocos2d::CCPoolManager *this)\n{\n  cocos2d::ccArray *data; // rbx\n  __int64 num; // rax\n  cocos2d::CCAutoreleasePool **arr; // rbx\n  cocos2d::CCAutoreleasePool **i; // rdi\n\n  if ( (unsigned int)cocos2d::CCArray::count(this->m_pReleasePoolStack) )\n  {\n    if ( this->m_pReleasePoolStack )\n    {\n      data = this->m_pReleasePoolStack->data;\n      num = data->num;\n      if ( (_DWORD)num )\n      {\n        arr = (cocos2d::CCAutoreleasePool **)data->arr;\n        for ( i = &arr[num - 1]; arr <= i; ++arr )\n        {\n          if ( !*arr )\n            break;\n          cocos2d::CCAutoreleasePool::clear(*arr);\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; cocos2d::CCPoolManager::finalize from 0x1800075f0 to 0x180007651 (97 bytes)\n; \n; 6 xrefs:\n; > cocos2d::CCPoolManager::~CCPoolManager @ 0x1800073f9\n; > cocos2d::CCPoolManager::purgePoolManager @ 0x180007705\n; > <???> @ 0x1801317a8\n; > <???> @ 0x1801317b8\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801ada74\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    rbx                                                            ; +0x0, 0x1800075f0\nsub     rsp, 20h                                                       ; +0x2, 0x1800075f2\nmov     rbx, rcx                                                       ; +0x6, 0x1800075f6\nmov     rcx, [rcx]; this                                               ; +0x9, 0x1800075f9\ncall    ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xc, 0x1800075fc\ntest    eax, eax                                                       ; +0x11, 0x180007601\njz      short loc_18000764B                                            ; +0x13, 0x180007603\nmov     rax, [rbx]                                                     ; +0x15, 0x180007605\ntest    rax, rax                                                       ; +0x18, 0x180007608\njz      short loc_18000764B                                            ; +0x1b, 0x18000760b\nmov     rbx, [rax+38h]                                                 ; +0x1d, 0x18000760d\nmov     eax, [rbx]                                                     ; +0x21, 0x180007611\ntest    eax, eax                                                       ; +0x23, 0x180007613\njz      short loc_18000764B                                            ; +0x25, 0x180007615\nmov     rbx, [rbx+10h]                                                 ; +0x27, 0x180007617\nmov     [rsp+28h+arg_0], rdi                                           ; +0x2b, 0x18000761b\nlea     rdi, [rax-1]                                                   ; +0x30, 0x180007620\nlea     rdi, [rbx+rdi*8]                                               ; +0x34, 0x180007624\ncmp     rbx, rdi                                                       ; +0x38, 0x180007628\nja      short loc_180007646                                            ; +0x3b, 0x18000762b\nnop     dword ptr [rax]                                                ; +0x3d, 0x18000762d\nmov     rcx, [rbx]; this                                               ; +0x40, 0x180007630\ntest    rcx, rcx                                                       ; +0x43, 0x180007633\njz      short loc_180007646                                            ; +0x46, 0x180007636\ncall    ?clear@CCAutoreleasePool@cocos2d@@QEAAXXZ; cocos2d::CCAutoreleasePool::clear(void) ; +0x48, 0x180007638\nadd     rbx, 8                                                         ; +0x4d, 0x18000763d\ncmp     rbx, rdi                                                       ; +0x51, 0x180007641\njbe     short loc_180007630                                            ; +0x54, 0x180007644\nmov     rdi, [rsp+28h+arg_0]                                           ; +0x56, 0x180007646\nadd     rsp, 20h                                                       ; +0x5b, 0x18000764b\npop     rbx                                                            ; +0x5f, 0x18000764f\nretn                                                                   ; +0x60, 0x180007650", "xrefs": ["cocos2d::CCPoolManager::~CCPoolManager @ 0x1800073f9", "cocos2d::CCPoolManager::purgePoolManager @ 0x180007705", "<???> @ 0x1801317a8", "<???> @ 0x1801317b8", "<???> @ 0x1801438a8", "<???> @ 0x1801ada74"], "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"}