{"type": "func", "start": 6442557888, "end": 6442558015, "name": "cocos2d::extension::WebSocket::close", "pseudocode": "// \n// cocos2d::extension::WebSocket::close from 0x18001a1c0 to 0x18001a23f (127 bytes)\n// \n// 3 xrefs:\n// > cocos2d::extension::WebSocket::~WebSocket @ 0x1800197f1\n// > <???> @ 0x180032408\n// > <???> @ 0x18004cc44\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:43 +0000\n// \n\nvoid __fastcall cocos2d::extension::WebSocket::close(struct cocos2d::CCObject **this, __int64 a2)\n{\n  __int64 v3; // rax\n  struct cocos2d::CCObject *v4; // rbx\n  cocos2d::CCScheduler *v5; // rax\n  int v6; // eax\n  __int64 v7; // rax\n  __int128 v8; // [rsp+20h] [rbp-18h] BYREF\n  __int64 v9; // [rsp+40h] [rbp+8h] BYREF\n\n  v3 = cocos2d::CCDirector::sharedDirector(this, a2);\n  v4 = *(this + 11);\n  v5 = (cocos2d::CCScheduler *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 112LL))(v3);\n  cocos2d::CCScheduler::unscheduleAllForTarget(v5, v4);\n  v6 = *((_DWORD *)this + 2);\n  if ( v6 != 2 && v6 != 3 )\n  {\n    v7 = (__int64)*(this + 11);\n    *((_DWORD *)this + 2) = 3;\n    v9 = 0;\n    v8 = *(_OWORD *)(v7 + 88);\n    pthread_join(&v8, &v9);\n    (*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject **))(*(_QWORD *)*(this + 14) + 24LL))(*(this + 14), this);\n  }\n}", "assembly": "; \n; cocos2d::extension::WebSocket::close from 0x18001a1c0 to 0x18001a23f (127 bytes)\n; \n; 3 xrefs:\n; > cocos2d::extension::WebSocket::~WebSocket @ 0x1800197f1\n; > <???> @ 0x180032408\n; > <???> @ 0x18004cc44\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:43 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x18001a1c0\npush    rdi                                                            ; +0x5, 0x18001a1c5\nsub     rsp, 30h                                                       ; +0x6, 0x18001a1c6\nmov     rdi, rcx                                                       ; +0xa, 0x18001a1ca\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xd, 0x18001a1cd\nmov     rbx, [rdi+58h]                                                 ; +0x13, 0x18001a1d3\nmov     rcx, rax                                                       ; +0x17, 0x18001a1d7\nmov     r8, [rax]                                                      ; +0x1a, 0x18001a1da\ncall    qword ptr [r8+70h]                                             ; +0x1d, 0x18001a1dd\nmov     rcx, rax                                                       ; +0x21, 0x18001a1e1\nmov     rdx, rbx                                                       ; +0x24, 0x18001a1e4\ncall    cs:?unscheduleAllForTarget@CCScheduler@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCScheduler::unscheduleAllForTarget(cocos2d::CCObject *) ; +0x27, 0x18001a1e7\nmov     eax, [rdi+8]                                                   ; +0x2d, 0x18001a1ed\ncmp     eax, 2                                                         ; +0x30, 0x18001a1f0\njz      short loc_18001A234                                            ; +0x33, 0x18001a1f3\ncmp     eax, 3                                                         ; +0x35, 0x18001a1f5\njz      short loc_18001A234                                            ; +0x38, 0x18001a1f8\nmov     rax, [rdi+58h]                                                 ; +0x3a, 0x18001a1fa\nlea     rdx, [rsp+38h+arg_0]                                           ; +0x3e, 0x18001a1fe\nmov     dword ptr [rdi+8], 3                                           ; +0x43, 0x18001a203\nlea     rcx, [rsp+38h+var_18]                                          ; +0x4a, 0x18001a20a\nmov     [rsp+38h+arg_0], 0                                             ; +0x4f, 0x18001a20f\nmovups  xmm0, xmmword ptr [rax+58h]                                    ; +0x58, 0x18001a218\nmovaps  [rsp+38h+var_18], xmm0                                         ; +0x5c, 0x18001a21c\ncall    cs:pthread_join                                                ; +0x61, 0x18001a221\nmov     rcx, [rdi+70h]                                                 ; +0x67, 0x18001a227\nmov     rdx, rdi                                                       ; +0x6b, 0x18001a22b\nmov     rax, [rcx]                                                     ; +0x6e, 0x18001a22e\ncall    qword ptr [rax+18h]                                            ; +0x71, 0x18001a231\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x74, 0x18001a234\nadd     rsp, 30h                                                       ; +0x79, 0x18001a239\npop     rdi                                                            ; +0x7d, 0x18001a23d\nretn                                                                   ; +0x7e, 0x18001a23e", "xrefs": ["cocos2d::extension::WebSocket::~WebSocket @ 0x1800197f1", "<???> @ 0x180032408", "<???> @ 0x18004cc44"], "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"}