{"type": "func", "start": 6442558672, "end": 6442558790, "name": "cocos2d::extension::WebSocket::close", "pseudocode": "// \n// cocos2d::extension::WebSocket::close from 0x18001a4d0 to 0x18001a546 (118 bytes)\n// \n// 3 xrefs:\n// > cocos2d::extension::WebSocket::~WebSocket @ 0x180019951\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x18004ace0\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::extension::WebSocket::close(struct cocos2d::CCObject **this, __int64 a2)\n{\n  __int64 v3; // rax\n  cocos2d::CCScheduler *v4; // rax\n  __int64 v5; // rax\n  __int128 v6; // [rsp+20h] [rbp-18h] BYREF\n  __int64 v7; // [rsp+40h] [rbp+8h] BYREF\n\n  v3 = cocos2d::CCDirector::sharedDirector(this, a2);\n  v4 = (cocos2d::CCScheduler *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 112LL))(v3);\n  cocos2d::CCScheduler::unscheduleAllForTarget(v4, *(this + 11));\n  if ( (unsigned int)(*((_DWORD *)this + 2) - 2) > 1 )\n  {\n    v5 = (__int64)*(this + 11);\n    *((_DWORD *)this + 2) = 3;\n    v7 = 0;\n    v6 = *(_OWORD *)(v5 + 88);\n    pthread_join(&v6, &v7);\n    (*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject **))(*(_QWORD *)*(this + 14) + 24LL))(*(this + 14), this);\n  }\n}", "assembly": "; \n; cocos2d::extension::WebSocket::close from 0x18001a4d0 to 0x18001a546 (118 bytes)\n; \n; 3 xrefs:\n; > cocos2d::extension::WebSocket::~WebSocket @ 0x180019951\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x18004ace0\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, 0x18001a4d0\nsub     rsp, 30h                                                       ; +0x2, 0x18001a4d2\nmov     rbx, rcx                                                       ; +0x6, 0x18001a4d6\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x9, 0x18001a4d9\nmov     rcx, rax                                                       ; +0xf, 0x18001a4df\nmov     rdx, [rax]                                                     ; +0x12, 0x18001a4e2\ncall    qword ptr [rdx+70h]                                            ; +0x15, 0x18001a4e5\nmov     rdx, [rbx+58h]                                                 ; +0x18, 0x18001a4e8\nmov     rcx, rax                                                       ; +0x1c, 0x18001a4ec\ncall    cs:?unscheduleAllForTarget@CCScheduler@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCScheduler::unscheduleAllForTarget(cocos2d::CCObject *) ; +0x1f, 0x18001a4ef\nmov     eax, [rbx+8]                                                   ; +0x25, 0x18001a4f5\nsub     eax, 2                                                         ; +0x28, 0x18001a4f8\ncmp     eax, 1                                                         ; +0x2b, 0x18001a4fb\njbe     short loc_18001A540                                            ; +0x2e, 0x18001a4fe\nmov     rax, [rbx+58h]                                                 ; +0x30, 0x18001a500\nlea     rdx, [rsp+38h+arg_0]                                           ; +0x34, 0x18001a504\nmov     dword ptr [rbx+8], 3                                           ; +0x39, 0x18001a509\nlea     rcx, [rsp+38h+var_18]                                          ; +0x40, 0x18001a510\nmov     [rsp+38h+arg_0], 0                                             ; +0x45, 0x18001a515\nmovups  xmm0, xmmword ptr [rax+58h]                                    ; +0x4e, 0x18001a51e\nmovaps  [rsp+38h+var_18], xmm0                                         ; +0x52, 0x18001a522\ncall    cs:pthread_join                                                ; +0x57, 0x18001a527\nmov     rcx, [rbx+70h]                                                 ; +0x5d, 0x18001a52d\nmov     rdx, rbx                                                       ; +0x61, 0x18001a531\nmov     rax, [rcx]                                                     ; +0x64, 0x18001a534\nadd     rsp, 30h                                                       ; +0x67, 0x18001a537\npop     rbx                                                            ; +0x6b, 0x18001a53b\njmp     qword ptr [rax+18h]                                            ; +0x6c, 0x18001a53c\nadd     rsp, 30h                                                       ; +0x70, 0x18001a540\npop     rbx                                                            ; +0x74, 0x18001a544\nretn                                                                   ; +0x75, 0x18001a545", "xrefs": ["cocos2d::extension::WebSocket::~WebSocket @ 0x180019951", "<???> @ 0x18002fdf8", "<???> @ 0x18004ace0"], "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"}