{"type": "func", "start": 6442554656, "end": 6442554760, "name": "sub_180019520", "pseudocode": "// \n// sub_180019520 from 0x180019520 to 0x180019588 (104 bytes)\n// \n// 3 xrefs:\n// > cocos2d::extension::WebSocket::init @ 0x18001a0e2\n// > cocos2d::extension::WebSocket::init @ 0x18001a185\n// > <???> @ 0x18004ac08\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_180019520(__int64 a1, unsigned int a2, __int64 a3, __int64 a4, __int64 a5)\n{\n  __int64 context; // rax\n  __int64 result; // rax\n\n  context = lws_get_context();\n  result = lws_context_user(context);\n  if ( result )\n    return cocos2d::extension::WebSocket::onSocketCallback(result, a1, a2, a3, a4, a5);\n  return result;\n}", "assembly": "; \n; sub_180019520 from 0x180019520 to 0x180019588 (104 bytes)\n; \n; 3 xrefs:\n; > cocos2d::extension::WebSocket::init @ 0x18001a0e2\n; > cocos2d::extension::WebSocket::init @ 0x18001a185\n; > <???> @ 0x18004ac08\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, 0x180019520\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x180019525\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x18001952a\npush    rdi                                                            ; +0xf, 0x18001952f\nsub     rsp, 30h                                                       ; +0x10, 0x180019530\nmov     rdi, r9                                                        ; +0x14, 0x180019534\nmov     rsi, r8                                                        ; +0x17, 0x180019537\nmov     ebp, edx                                                       ; +0x1a, 0x18001953a\nmov     rbx, rcx                                                       ; +0x1c, 0x18001953c\ncall    cs:lws_get_context                                             ; +0x1f, 0x18001953f\nmov     rcx, rax                                                       ; +0x25, 0x180019545\ncall    cs:lws_context_user                                            ; +0x28, 0x180019548\ntest    rax, rax                                                       ; +0x2e, 0x18001954e\njz      short loc_180019573                                            ; +0x31, 0x180019551\nmov     r10, [rsp+38h+arg_20]                                          ; +0x33, 0x180019553\nmov     r9, rsi                                                        ; +0x38, 0x180019558\nmov     [rsp+38h+var_10], r10                                          ; +0x3b, 0x18001955b\nmov     r8d, ebp                                                       ; +0x40, 0x180019560\nmov     rdx, rbx                                                       ; +0x43, 0x180019563\nmov     [rsp+38h+var_18], rdi                                          ; +0x46, 0x180019566\nmov     rcx, rax                                                       ; +0x4b, 0x18001956b\ncall    ?onSocketCallback@WebSocket@extension@cocos2d@@AEAAHPEAUlws@@W4lws_callback_reasons@@PEAX2_K@Z; cocos2d::extension::WebSocket::onSocketCallback(lws *,lws_callback_reasons,void *,void *,unsigned __int64) ; +0x4e, 0x18001956e\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x53, 0x180019573\nmov     rbp, [rsp+38h+arg_8]                                           ; +0x58, 0x180019578\nmov     rsi, [rsp+38h+arg_10]                                          ; +0x5d, 0x18001957d\nadd     rsp, 30h                                                       ; +0x62, 0x180019582\npop     rdi                                                            ; +0x66, 0x180019586\nretn                                                                   ; +0x67, 0x180019587", "xrefs": ["cocos2d::extension::WebSocket::init @ 0x18001a0e2", "cocos2d::extension::WebSocket::init @ 0x18001a185", "<???> @ 0x18004ac08"], "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"}