{"type": "func", "start": 6442555104, "end": 6442555260, "name": "sub_1800196E0", "pseudocode": "// \n// sub_1800196E0 from 0x1800196e0 to 0x18001977c (156 bytes)\n// \n// 2 xrefs:\n// > cocos2d::extension::WebSocket::onSocketCallback @ 0x18001aada\n// > <???> @ 0x18004ac50\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_1800196E0(__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 + 72;\n  pthread_mutex_lock(a1 + 72);\n  v5 = *(__int64 **)(a1 + 56);\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_1800196E0 from 0x1800196e0 to 0x18001977c (156 bytes)\n; \n; 2 xrefs:\n; > cocos2d::extension::WebSocket::onSocketCallback @ 0x18001aada\n; > <???> @ 0x18004ac50\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, 0x1800196e0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x1800196e5\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x1800196ea\npush    rdi                                                            ; +0xf, 0x1800196ef\nsub     rsp, 30h                                                       ; +0x10, 0x1800196f0\nmov     rbp, rdx                                                       ; +0x14, 0x1800196f4\nmov     rbx, rcx                                                       ; +0x17, 0x1800196f7\nlea     rsi, [rcx+48h]                                                 ; +0x1a, 0x1800196fa\nmov     rcx, rsi                                                       ; +0x1e, 0x1800196fe\ncall    cs:pthread_mutex_lock                                          ; +0x21, 0x180019701\nmov     rbx, [rbx+38h]                                                 ; +0x27, 0x180019707\nmov     rdi, [rbx]                                                     ; +0x2b, 0x18001970b\nmov     rax, 0AAAAAAAAAAAAAAAh                                         ; +0x2e, 0x18001970e\ncmp     [rbx+8], rax                                                   ; +0x38, 0x180019718\njnz     short loc_18001972C                                            ; +0x3c, 0x18001971c\nlea     rcx, aListTooLong; \"list too long\"                             ; +0x3e, 0x18001971e\ncall    cs:?_Xlength_error@std@@YAXPEBD@Z; std::_Xlength_error(char const *) ; +0x45, 0x180019725\nalign 4                                                                ; +0x4b, 0x18001972b\nmov     [rsp+38h+var_18], rbx                                          ; +0x4c, 0x18001972c\nmov     [rsp+38h+var_10], 0                                            ; +0x51, 0x180019731\nmov     ecx, 18h; Size                                                 ; +0x5a, 0x18001973a\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x5f, 0x18001973f\nmov     [rax+10h], rbp                                                 ; +0x64, 0x180019744\ninc     qword ptr [rbx+8]                                              ; +0x68, 0x180019748\nmov     rdx, [rdi+8]                                                   ; +0x6c, 0x18001974c\nmov     [rax], rdi                                                     ; +0x70, 0x180019750\nmov     [rax+8], rdx                                                   ; +0x73, 0x180019753\nmov     [rdi+8], rax                                                   ; +0x77, 0x180019757\nmov     [rdx], rax                                                     ; +0x7b, 0x18001975b\nmov     rcx, rsi                                                       ; +0x7e, 0x18001975e\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x81, 0x180019761\nmov     rbp, [rsp+38h+arg_8]                                           ; +0x86, 0x180019766\nmov     rsi, [rsp+38h+arg_10]                                          ; +0x8b, 0x18001976b\nadd     rsp, 30h                                                       ; +0x90, 0x180019770\npop     rdi                                                            ; +0x94, 0x180019774\njmp     cs:pthread_mutex_unlock                                        ; +0x95, 0x180019775", "xrefs": ["cocos2d::extension::WebSocket::onSocketCallback @ 0x18001aada", "<???> @ 0x18004ac50"], "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"}