{"type": "func", "start": 6442554416, "end": 6442554560, "name": "sub_180019430", "pseudocode": "// \n// sub_180019430 from 0x180019430 to 0x1800194c0 (144 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x18002b698\n// > <???> @ 0x18004cb78\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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 12:15:42 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nstruct cocos2d::CCObject *__fastcall sub_180019430(struct cocos2d::CCObject *Block, __int64 a2)\n{\n  char v2; // di\n  __int64 v4; // rax\n  cocos2d::CCScheduler *v5; // rax\n  void *v6; // rcx\n  void *v7; // rcx\n\n  v2 = a2;\n  *(_QWORD *)Block = &cocos2d::extension::WsThreadHelper::`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  pthread_mutex_destroy((char *)Block + 72);\n  pthread_mutex_destroy((char *)Block + 80);\n  v6 = *((void **)Block + 7);\n  if ( v6 )\n    sub_1800194C0(v6);\n  v7 = *((void **)Block + 8);\n  if ( v7 )\n    sub_1800194C0(v7);\n  cocos2d::CCObject::~CCObject(Block);\n  if ( (v2 & 1) != 0 )\n    j_j_free(Block);\n  return Block;\n}", "assembly": "; \n; sub_180019430 from 0x180019430 to 0x1800194c0 (144 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x18002b698\n; > <???> @ 0x18004cb78\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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 12:15:42 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x180019430\npush    rdi                                                            ; +0x5, 0x180019435\nsub     rsp, 20h                                                       ; +0x6, 0x180019436\nmov     edi, edx                                                       ; +0xa, 0x18001943a\nmov     rbx, rcx                                                       ; +0xc, 0x18001943c\nlea     rax, ??_7WsThreadHelper@extension@cocos2d@@6B@; const cocos2d::extension::WsThreadHelper::`vftable' ; +0xf, 0x18001943f\nmov     [rcx], rax                                                     ; +0x16, 0x180019446\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x19, 0x180019449\nmov     r8, [rax]                                                      ; +0x1f, 0x18001944f\nmov     rcx, rax                                                       ; +0x22, 0x180019452\ncall    qword ptr [r8+70h]                                             ; +0x25, 0x180019455\nmov     rcx, rax                                                       ; +0x29, 0x180019459\nmov     rdx, rbx                                                       ; +0x2c, 0x18001945c\ncall    cs:?unscheduleAllForTarget@CCScheduler@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCScheduler::unscheduleAllForTarget(cocos2d::CCObject *) ; +0x2f, 0x18001945f\nlea     rcx, [rbx+48h]                                                 ; +0x35, 0x180019465\ncall    cs:pthread_mutex_destroy                                       ; +0x39, 0x180019469\nlea     rcx, [rbx+50h]                                                 ; +0x3f, 0x18001946f\ncall    cs:pthread_mutex_destroy                                       ; +0x43, 0x180019473\nmov     rcx, [rbx+38h]; Block                                          ; +0x49, 0x180019479\ntest    rcx, rcx                                                       ; +0x4d, 0x18001947d\njz      short loc_180019487                                            ; +0x50, 0x180019480\ncall    sub_1800194C0                                                  ; +0x52, 0x180019482\nmov     rcx, [rbx+40h]; Block                                          ; +0x57, 0x180019487\ntest    rcx, rcx                                                       ; +0x5b, 0x18001948b\njz      short loc_180019495                                            ; +0x5e, 0x18001948e\ncall    sub_1800194C0                                                  ; +0x60, 0x180019490\nmov     rcx, rbx                                                       ; +0x65, 0x180019495\ncall    cs:__imp_??1CCObject@cocos2d@@UEAA@XZ; cocos2d::CCObject::~CCObject(void) ; +0x68, 0x180019498\nnop                                                                    ; +0x6e, 0x18001949e\ntest    dil, 1                                                         ; +0x6f, 0x18001949f\njz      short loc_1800194B2                                            ; +0x73, 0x1800194a3\nmov     edx, 78h ; 'x'                                                 ; +0x75, 0x1800194a5\nmov     rcx, rbx; Block                                                ; +0x7a, 0x1800194aa\ncall    j_j_free                                                       ; +0x7d, 0x1800194ad\nmov     rax, rbx                                                       ; +0x82, 0x1800194b2\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x85, 0x1800194b5\nadd     rsp, 20h                                                       ; +0x8a, 0x1800194ba\npop     rdi                                                            ; +0x8e, 0x1800194be\nretn                                                                   ; +0x8f, 0x1800194bf", "xrefs": ["<???> @ 0x18002b698", "<???> @ 0x18004cb78"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}