{"type": "func", "start": 6442461856, "end": 6442462052, "name": "sub_180002AA0", "pseudocode": "// \n// sub_180002AA0 from 0x180002aa0 to 0x180002b64 (196 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x180023410\n// > <???> @ 0x180049180\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// Hidden C++ exception states: #wind=1\nstruct cocos2d::CCObject *__fastcall sub_180002AA0(struct cocos2d::CCObject *Block, __int64 a2)\n{\n  char v2; // bp\n  __int64 v4; // rax\n  cocos2d::CCScheduler *v5; // rax\n  void **v6; // rsi\n  _QWORD **v7; // rcx\n  _QWORD *v8; // rcx\n  _QWORD *v9; // rbx\n\n  v2 = a2;\n  *(_QWORD *)Block = &cocos2d::extension::AssetsManager::Helper::`vftable';\n  v4 = cocos2d::CCDirector::sharedDirector(Block, a2);\n  v5 = (cocos2d::CCScheduler *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 112LL))(v4);\n  cocos2d::CCScheduler::unscheduleAllForTarget(v5, Block);\n  v6 = *((void ***)Block + 7);\n  if ( v6 )\n  {\n    v7 = (_QWORD **)*v6;\n    **((_QWORD **)*v6 + 1) = 0;\n    v8 = *v7;\n    if ( v8 )\n    {\n      do\n      {\n        v9 = (_QWORD *)*v8;\n        j_j_free(v8);\n        v8 = v9;\n      }\n      while ( v9 );\n    }\n    j_j_free(*v6);\n    j_j_free(v6);\n  }\n  cocos2d::CCObject::~CCObject(Block);\n  if ( (v2 & 1) != 0 )\n    j_j_free(Block);\n  return Block;\n}", "assembly": "; \n; sub_180002AA0 from 0x180002aa0 to 0x180002b64 (196 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x180023410\n; > <???> @ 0x180049180\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\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x180002aa0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x180002aa5\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x180002aaa\npush    rdi                                                            ; +0xf, 0x180002aaf\nsub     rsp, 20h                                                       ; +0x10, 0x180002ab0\nmov     ebp, edx                                                       ; +0x14, 0x180002ab4\nmov     rdi, rcx                                                       ; +0x16, 0x180002ab6\nlea     rax, ??_7Helper@AssetsManager@extension@cocos2d@@6B@; const cocos2d::extension::AssetsManager::Helper::`vftable' ; +0x19, 0x180002ab9\nmov     [rcx], rax                                                     ; +0x20, 0x180002ac0\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x23, 0x180002ac3\nmov     r8, [rax]                                                      ; +0x29, 0x180002ac9\nmov     rcx, rax                                                       ; +0x2c, 0x180002acc\ncall    qword ptr [r8+70h]                                             ; +0x2f, 0x180002acf\nmov     rcx, rax                                                       ; +0x33, 0x180002ad3\nmov     rdx, rdi                                                       ; +0x36, 0x180002ad6\ncall    cs:?unscheduleAllForTarget@CCScheduler@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCScheduler::unscheduleAllForTarget(cocos2d::CCObject *) ; +0x39, 0x180002ad9\nmov     rsi, [rdi+38h]                                                 ; +0x3f, 0x180002adf\ntest    rsi, rsi                                                       ; +0x43, 0x180002ae3\njz      short loc_180002B2F                                            ; +0x46, 0x180002ae6\nmov     rcx, [rsi]                                                     ; +0x48, 0x180002ae8\nmov     rax, [rcx+8]                                                   ; +0x4b, 0x180002aeb\nmov     qword ptr [rax], 0                                             ; +0x4f, 0x180002aef\nmov     rcx, [rcx]; Block                                              ; +0x56, 0x180002af6\ntest    rcx, rcx                                                       ; +0x59, 0x180002af9\njz      short loc_180002B15                                            ; +0x5c, 0x180002afc\nxchg    ax, ax                                                         ; +0x5e, 0x180002afe\nmov     rbx, [rcx]                                                     ; +0x60, 0x180002b00\nmov     edx, 18h                                                       ; +0x63, 0x180002b03\ncall    j_j_free                                                       ; +0x68, 0x180002b08\nmov     rcx, rbx                                                       ; +0x6d, 0x180002b0d\ntest    rbx, rbx                                                       ; +0x70, 0x180002b10\njnz     short loc_180002B00                                            ; +0x73, 0x180002b13\nmov     edx, 18h                                                       ; +0x75, 0x180002b15\nmov     rcx, [rsi]; Block                                              ; +0x7a, 0x180002b1a\ncall    j_j_free                                                       ; +0x7d, 0x180002b1d\nmov     edx, 10h                                                       ; +0x82, 0x180002b22\nmov     rcx, rsi; Block                                                ; +0x87, 0x180002b27\ncall    j_j_free                                                       ; +0x8a, 0x180002b2a\nmov     rcx, rdi                                                       ; +0x8f, 0x180002b2f\ncall    cs:__imp_??1CCObject@cocos2d@@UEAA@XZ; cocos2d::CCObject::~CCObject(void) ; +0x92, 0x180002b32\nnop                                                                    ; +0x98, 0x180002b38\ntest    bpl, 1                                                         ; +0x99, 0x180002b39\njz      short loc_180002B4C                                            ; +0x9d, 0x180002b3d\nmov     edx, 48h ; 'H'                                                 ; +0x9f, 0x180002b3f\nmov     rcx, rdi; Block                                                ; +0xa4, 0x180002b44\ncall    j_j_free                                                       ; +0xa7, 0x180002b47\nmov     rax, rdi                                                       ; +0xac, 0x180002b4c\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xaf, 0x180002b4f\nmov     rbp, [rsp+28h+arg_8]                                           ; +0xb4, 0x180002b54\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xb9, 0x180002b59\nadd     rsp, 20h                                                       ; +0xbe, 0x180002b5e\npop     rdi                                                            ; +0xc2, 0x180002b62\nretn                                                                   ; +0xc3, 0x180002b63", "xrefs": ["<???> @ 0x180023410", "<???> @ 0x180049180"], "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"}