{"type": "func", "start": 6442560320, "end": 6442560481, "name": "cocos2d::extension::WebSocket::onUIThreadReceiveMessage", "pseudocode": "// \n// cocos2d::extension::WebSocket::onUIThreadReceiveMessage from 0x18001ab40 to 0x18001abe1 (161 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x180029048\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x18004ad40\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::onUIThreadReceiveMessage(\n        cocos2d::extension::WebSocket *this,\n        struct cocos2d::extension::WsMessage *a2)\n{\n  __int64 v4; // rcx\n  void **v5; // rbx\n  int v6; // [rsp+38h] [rbp+10h] BYREF\n\n  switch ( *(_DWORD *)a2 )\n  {\n    case 2:\n      (*(void (__fastcall **)(_QWORD, cocos2d::extension::WebSocket *, _QWORD))(**((_QWORD **)this + 14) + 8LL))(\n        *((_QWORD *)this + 14),\n        this,\n        (unsigned int)(*(_DWORD *)a2 - 2));\n      break;\n    case 3:\n      v5 = *((void ***)a2 + 1);\n      (*(void (__fastcall **)(_QWORD, cocos2d::extension::WebSocket *, void **))(**((_QWORD **)this + 14) + 16LL))(\n        *((_QWORD *)this + 14),\n        this,\n        v5);\n      if ( *v5 )\n      {\n        j_j_free(*v5);\n        *v5 = nullptr;\n      }\n      j_j_free(v5);\n      break;\n    case 4:\n      v4 = *((_QWORD *)this + 14);\n      v6 = 1;\n      (*(void (__fastcall **)(__int64, cocos2d::extension::WebSocket *, int *))(*(_QWORD *)v4 + 32LL))(v4, this, &v6);\n      break;\n    case 5:\n      (*(void (__fastcall **)(_QWORD, cocos2d::extension::WebSocket *))(**((_QWORD **)this + 14) + 24LL))(\n        *((_QWORD *)this + 14),\n        this);\n      break;\n  }\n}", "assembly": "; \n; cocos2d::extension::WebSocket::onUIThreadReceiveMessage from 0x18001ab40 to 0x18001abe1 (161 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x180029048\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x18004ad40\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, 0x18001ab40\nsub     rsp, 20h                                                       ; +0x2, 0x18001ab42\nmov     rbx, rdx                                                       ; +0x6, 0x18001ab46\nmov     rdx, rcx                                                       ; +0x9, 0x18001ab49\nmov     r8d, [rbx]                                                     ; +0xc, 0x18001ab4c\nsub     r8d, 2                                                         ; +0xf, 0x18001ab4f\njz      short loc_18001ABCB                                            ; +0x13, 0x18001ab53\nsub     r8d, 1                                                         ; +0x15, 0x18001ab55\njz      short loc_18001AB94                                            ; +0x19, 0x18001ab59\nsub     r8d, 1                                                         ; +0x1b, 0x18001ab5b\njz      short loc_18001AB77                                            ; +0x1f, 0x18001ab5f\ncmp     r8d, 1                                                         ; +0x21, 0x18001ab61\njnz     short loc_18001ABDB                                            ; +0x25, 0x18001ab65\nmov     rcx, [rcx+70h]                                                 ; +0x27, 0x18001ab67\nmov     rax, [rcx]                                                     ; +0x2b, 0x18001ab6b\nadd     rsp, 20h                                                       ; +0x2e, 0x18001ab6e\npop     rbx                                                            ; +0x32, 0x18001ab72\njmp     qword ptr [rax+18h]                                            ; +0x33, 0x18001ab73\nmov     rcx, [rcx+70h]                                                 ; +0x37, 0x18001ab77\nlea     r8, [rsp+28h+arg_8]                                            ; +0x3b, 0x18001ab7b\nmov     [rsp+28h+arg_8], 1                                             ; +0x40, 0x18001ab80\nmov     rax, [rcx]                                                     ; +0x48, 0x18001ab88\ncall    qword ptr [rax+20h]                                            ; +0x4b, 0x18001ab8b\nadd     rsp, 20h                                                       ; +0x4e, 0x18001ab8e\npop     rbx                                                            ; +0x52, 0x18001ab92\nretn                                                                   ; +0x53, 0x18001ab93\nmov     rcx, [rcx+70h]                                                 ; +0x54, 0x18001ab94\nmov     rbx, [rbx+8]                                                   ; +0x58, 0x18001ab98\nmov     r8, rbx                                                        ; +0x5c, 0x18001ab9c\nmov     rax, [rcx]                                                     ; +0x5f, 0x18001ab9f\ncall    qword ptr [rax+10h]                                            ; +0x62, 0x18001aba2\nmov     rcx, [rbx]; Block                                              ; +0x65, 0x18001aba5\ntest    rcx, rcx                                                       ; +0x68, 0x18001aba8\njz      short loc_18001ABB9                                            ; +0x6b, 0x18001abab\ncall    j_j_free                                                       ; +0x6d, 0x18001abad\nmov     qword ptr [rbx], 0                                             ; +0x72, 0x18001abb2\nmov     edx, 10h                                                       ; +0x79, 0x18001abb9\nmov     rcx, rbx; Block                                                ; +0x7e, 0x18001abbe\nadd     rsp, 20h                                                       ; +0x81, 0x18001abc1\npop     rbx                                                            ; +0x85, 0x18001abc5\njmp     j_j_free                                                       ; +0x86, 0x18001abc6\nmov     rcx, [rcx+70h]                                                 ; +0x8b, 0x18001abcb\nmov     rax, [rcx]                                                     ; +0x8f, 0x18001abcf\nadd     rsp, 20h                                                       ; +0x92, 0x18001abd2\npop     rbx                                                            ; +0x96, 0x18001abd6\njmp     qword ptr [rax+8]                                              ; +0x97, 0x18001abd7\nadd     rsp, 20h                                                       ; +0x9b, 0x18001abdb\npop     rbx                                                            ; +0x9f, 0x18001abdf\nretn                                                                   ; +0xa0, 0x18001abe0", "xrefs": ["<???> @ 0x180029048", "<???> @ 0x18002fdf8", "<???> @ 0x18004ad40"], "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"}