{"type": "func", "start": 6442555264, "end": 6442555420, "name": "sub_180019780", "pseudocode": "// \n// sub_180019780 from 0x180019780 to 0x18001981c (156 bytes)\n// \n// 3 xrefs:\n// > cocos2d::extension::WebSocket::send @ 0x18001a3ff\n// > cocos2d::extension::WebSocket::send @ 0x18001a4ab\n// > <???> @ 0x18004ac5c\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__int64 __fastcall sub_180019780(__int64 a1, __int64 a2)\n{\n  __int64 v4; // rsi\n  __int64 *v5; // rbx\n  __int64 v6; // rdi\n  _QWORD *v7; // rax\n  _QWORD *v8; // rdx\n\n  v4 = a1 + 80;\n  pthread_mutex_lock(a1 + 80);\n  v5 = *(__int64 **)(a1 + 64);\n  v6 = *v5;\n  if ( v5[1] == 0xAAAAAAAAAAAAAAALL )\n    std::_Xlength_error(\"list too long\");\n  v7 = operator new(0x18u);\n  v7[2] = a2;\n  ++v5[1];\n  v8 = *(_QWORD **)(v6 + 8);\n  *v7 = v6;\n  v7[1] = v8;\n  *(_QWORD *)(v6 + 8) = v7;\n  *v8 = v7;\n  return pthread_mutex_unlock(v4);\n}", "assembly": "; \n; sub_180019780 from 0x180019780 to 0x18001981c (156 bytes)\n; \n; 3 xrefs:\n; > cocos2d::extension::WebSocket::send @ 0x18001a3ff\n; > cocos2d::extension::WebSocket::send @ 0x18001a4ab\n; > <???> @ 0x18004ac5c\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, 0x180019780\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x180019785\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x18001978a\npush    rdi                                                            ; +0xf, 0x18001978f\nsub     rsp, 30h                                                       ; +0x10, 0x180019790\nmov     rbp, rdx                                                       ; +0x14, 0x180019794\nmov     rbx, rcx                                                       ; +0x17, 0x180019797\nlea     rsi, [rcx+50h]                                                 ; +0x1a, 0x18001979a\nmov     rcx, rsi                                                       ; +0x1e, 0x18001979e\ncall    cs:pthread_mutex_lock                                          ; +0x21, 0x1800197a1\nmov     rbx, [rbx+40h]                                                 ; +0x27, 0x1800197a7\nmov     rdi, [rbx]                                                     ; +0x2b, 0x1800197ab\nmov     rax, 0AAAAAAAAAAAAAAAh                                         ; +0x2e, 0x1800197ae\ncmp     [rbx+8], rax                                                   ; +0x38, 0x1800197b8\njnz     short loc_1800197CC                                            ; +0x3c, 0x1800197bc\nlea     rcx, aListTooLong; \"list too long\"                             ; +0x3e, 0x1800197be\ncall    cs:?_Xlength_error@std@@YAXPEBD@Z; std::_Xlength_error(char const *) ; +0x45, 0x1800197c5\nalign 4                                                                ; +0x4b, 0x1800197cb\nmov     [rsp+38h+var_18], rbx                                          ; +0x4c, 0x1800197cc\nmov     [rsp+38h+var_10], 0                                            ; +0x51, 0x1800197d1\nmov     ecx, 18h; Size                                                 ; +0x5a, 0x1800197da\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x5f, 0x1800197df\nmov     [rax+10h], rbp                                                 ; +0x64, 0x1800197e4\ninc     qword ptr [rbx+8]                                              ; +0x68, 0x1800197e8\nmov     rdx, [rdi+8]                                                   ; +0x6c, 0x1800197ec\nmov     [rax], rdi                                                     ; +0x70, 0x1800197f0\nmov     [rax+8], rdx                                                   ; +0x73, 0x1800197f3\nmov     [rdi+8], rax                                                   ; +0x77, 0x1800197f7\nmov     [rdx], rax                                                     ; +0x7b, 0x1800197fb\nmov     rcx, rsi                                                       ; +0x7e, 0x1800197fe\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x81, 0x180019801\nmov     rbp, [rsp+38h+arg_8]                                           ; +0x86, 0x180019806\nmov     rsi, [rsp+38h+arg_10]                                          ; +0x8b, 0x18001980b\nadd     rsp, 30h                                                       ; +0x90, 0x180019810\npop     rdi                                                            ; +0x94, 0x180019814\njmp     cs:pthread_mutex_unlock                                        ; +0x95, 0x180019815", "xrefs": ["cocos2d::extension::WebSocket::send @ 0x18001a3ff", "cocos2d::extension::WebSocket::send @ 0x18001a4ab", "<???> @ 0x18004ac5c"], "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"}