{"type": "func", "start": 6443205984, "end": 6443206149, "name": "cocos2d::CCIMEDispatcher::addDelegate", "pseudocode": "// \n// cocos2d::CCIMEDispatcher::addDelegate from 0x1800b8560 to 0x1800b8605 (165 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCIMEDelegate::CCIMEDelegate @ 0x1800b832e\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c2c10\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 11:22:22 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nvoid __fastcall cocos2d::CCIMEDispatcher::addDelegate(__int64 ****this, struct cocos2d::CCIMEDelegate *a2)\n{\n  __int64 ***v3; // rdi\n  __int64 **v4; // rcx\n  __int64 **v5; // rsi\n  __int64 **v6; // rax\n  __int64 *v7; // rax\n  __int64 *v8; // rcx\n\n  if ( a2 )\n  {\n    v3 = *this;\n    if ( *this )\n    {\n      v4 = *v3;\n      v5 = (__int64 **)**v3;\n      v6 = v5;\n      if ( v5 == *v3 )\n        goto LABEL_8;\n      while ( a2 != (struct cocos2d::CCIMEDelegate *)v6[2] )\n      {\n        v6 = (__int64 **)*v6;\n        if ( v6 == v4 )\n          goto LABEL_8;\n      }\n      if ( v4 == v6 )\n      {\nLABEL_8:\n        if ( v3[1] == (__int64 **)0xAAAAAAAAAAAAAAALL )\n          std::_Xlength_error(\"list too long\");\n        v7 = (__int64 *)sub_1800E4AC0(0x18u);\n        v7[2] = (__int64)a2;\n        v3[1] = (__int64 **)((char *)v3[1] + 1);\n        v8 = v5[1];\n        *v7 = (__int64)v5;\n        v7[1] = (__int64)v8;\n        v5[1] = v7;\n        *v8 = (__int64)v7;\n      }\n    }\n  }\n}", "assembly": "; \n; cocos2d::CCIMEDispatcher::addDelegate from 0x1800b8560 to 0x1800b8605 (165 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCIMEDelegate::CCIMEDelegate @ 0x1800b832e\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c2c10\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 11:22:22 +0000\n; \ntest    rdx, rdx                                                       ; +0x0, 0x1800b8560\njz      locret_1800B85F7                                               ; +0x3, 0x1800b8563\nmov     [rsp+arg_0], rbx                                               ; +0x9, 0x1800b8569\nmov     [rsp+arg_8], rsi                                               ; +0xe, 0x1800b856e\npush    rdi                                                            ; +0x13, 0x1800b8573\nsub     rsp, 30h                                                       ; +0x14, 0x1800b8574\nmov     rbx, rdx                                                       ; +0x18, 0x1800b8578\nmov     rdi, [rcx]                                                     ; +0x1b, 0x1800b857b\ntest    rdi, rdi                                                       ; +0x1e, 0x1800b857e\njz      short loc_1800B85E8                                            ; +0x21, 0x1800b8581\nmov     rcx, [rdi]                                                     ; +0x23, 0x1800b8583\nmov     rsi, [rcx]                                                     ; +0x26, 0x1800b8586\nmov     rax, rsi                                                       ; +0x29, 0x1800b8589\ncmp     rsi, rcx                                                       ; +0x2c, 0x1800b858c\njz      short loc_1800B85A6                                            ; +0x2f, 0x1800b858f\ncmp     rbx, [rax+10h]                                                 ; +0x31, 0x1800b8591\njz      short loc_1800B85A1                                            ; +0x35, 0x1800b8595\nmov     rax, [rax]                                                     ; +0x37, 0x1800b8597\ncmp     rax, rcx                                                       ; +0x3a, 0x1800b859a\njnz     short loc_1800B8591                                            ; +0x3d, 0x1800b859d\njmp     short loc_1800B85A6                                            ; +0x3f, 0x1800b859f\ncmp     rcx, rax                                                       ; +0x41, 0x1800b85a1\njnz     short loc_1800B85E8                                            ; +0x44, 0x1800b85a4\nmov     rax, 0AAAAAAAAAAAAAAAh                                         ; +0x46, 0x1800b85a6\ncmp     [rdi+8], rax                                                   ; +0x50, 0x1800b85b0\njz      short loc_1800B85F8                                            ; +0x54, 0x1800b85b4\nmov     [rsp+38h+var_18], rdi                                          ; +0x56, 0x1800b85b6\nmov     [rsp+38h+var_10], 0                                            ; +0x5b, 0x1800b85bb\nmov     ecx, 18h; Size                                                 ; +0x64, 0x1800b85c4\ncall    sub_1800E4AC0                                                  ; +0x69, 0x1800b85c9\nmov     [rax+10h], rbx                                                 ; +0x6e, 0x1800b85ce\ninc     qword ptr [rdi+8]                                              ; +0x72, 0x1800b85d2\nmov     rcx, [rsi+8]                                                   ; +0x76, 0x1800b85d6\nmov     [rax], rsi                                                     ; +0x7a, 0x1800b85da\nmov     [rax+8], rcx                                                   ; +0x7d, 0x1800b85dd\nmov     [rsi+8], rax                                                   ; +0x81, 0x1800b85e1\nmov     [rcx], rax                                                     ; +0x85, 0x1800b85e5\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x88, 0x1800b85e8\nmov     rsi, [rsp+38h+arg_8]                                           ; +0x8d, 0x1800b85ed\nadd     rsp, 30h                                                       ; +0x92, 0x1800b85f2\npop     rdi                                                            ; +0x96, 0x1800b85f6\nretn                                                                   ; +0x97, 0x1800b85f7\nlea     rcx, aListTooLong; \"list too long\"                             ; +0x98, 0x1800b85f8\ncall    ?_Xlength_error@std@@YAXPEBD@Z; std::_Xlength_error(char const *) ; +0x9f, 0x1800b85ff\ndb 0CCh                                                                ; +0xa4, 0x1800b8604", "xrefs": ["cocos2d::CCIMEDelegate::CCIMEDelegate @ 0x1800b832e", "<???> @ 0x18014cf68", "<???> @ 0x1801c2c10"], "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"}