{"type": "func", "start": 6442470320, "end": 6442470554, "name": "cocos2d::extension::CCControl::addHandleOfControlEvent", "pseudocode": "// \n// cocos2d::extension::CCControl::addHandleOfControlEvent from 0x180004bb0 to 0x180004c9a (234 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x1800494c8\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// Hidden C++ exception states: #wind=1\nvoid __fastcall cocos2d::extension::CCControl::addHandleOfControlEvent(\n        cocos2d::extension::CCControl *this,\n        int a2,\n        int a3)\n{\n  char *v5; // rdi\n  __int64 v6; // rsi\n  __int64 v7; // rax\n  __int64 v8; // rcx\n  _DWORD *v9; // rax\n  __int128 v10; // [rsp+20h] [rbp-48h] BYREF\n  __int128 v11; // [rsp+30h] [rbp-38h]\n\n  v5 = (char *)this + 456;\n  v6 = *((_QWORD *)this + 57);\n  v7 = *(_QWORD *)(v6 + 8);\n  *(_QWORD *)&v11 = v7;\n  DWORD2(v11) = 0;\n  v8 = v6;\n  while ( !*(_BYTE *)(v7 + 25) )\n  {\n    *(_QWORD *)&v11 = v7;\n    if ( *(_DWORD *)(v7 + 28) >= a3 )\n    {\n      DWORD2(v11) = 1;\n      v8 = v7;\n      v7 = *(_QWORD *)v7;\n    }\n    else\n    {\n      DWORD2(v11) = 0;\n      v7 = *(_QWORD *)(v7 + 16);\n    }\n  }\n  if ( *(_BYTE *)(v8 + 25) || a3 < *(_DWORD *)(v8 + 28) )\n  {\n    if ( *((_QWORD *)v5 + 1) == 0x666666666666666LL )\n      sub_1800054D0();\n    v9 = operator new(0x28u);\n    v9[7] = a3;\n    v9[8] = 0;\n    *(_QWORD *)v9 = v6;\n    *((_QWORD *)v9 + 1) = v6;\n    *((_QWORD *)v9 + 2) = v6;\n    *((_WORD *)v9 + 12) = 0;\n    v10 = v11;\n    v8 = sub_180004DA0(v5, &v10, v9);\n  }\n  *(_DWORD *)(v8 + 32) = a2;\n}", "assembly": "; \n; cocos2d::extension::CCControl::addHandleOfControlEvent from 0x180004bb0 to 0x180004c9a (234 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x1800494c8\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, 0x180004bb0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x180004bb5\npush    rsi                                                            ; +0xa, 0x180004bba\npush    rdi                                                            ; +0xb, 0x180004bbb\npush    r14                                                            ; +0xc, 0x180004bbc\nsub     rsp, 50h                                                       ; +0xe, 0x180004bbe\nmov     ebx, r8d                                                       ; +0x12, 0x180004bc2\nmov     ebp, edx                                                       ; +0x15, 0x180004bc5\nlea     rdi, [rcx+1C8h]                                                ; +0x17, 0x180004bc7\nmov     rsi, [rdi]                                                     ; +0x1e, 0x180004bce\nmov     rax, [rsi+8]                                                   ; +0x21, 0x180004bd1\nmov     qword ptr [rsp+68h+var_38], rax                                ; +0x25, 0x180004bd5\nxor     r14d, r14d                                                     ; +0x2a, 0x180004bda\nmov     dword ptr [rsp+68h+var_38+8], r14d                             ; +0x2d, 0x180004bdd\nmov     rcx, rsi                                                       ; +0x32, 0x180004be2\ncmp     [rax+19h], r14b                                                ; +0x35, 0x180004be5\njnz     short loc_180004C19                                            ; +0x39, 0x180004be9\nnop     dword ptr [rax+rax+00h]                                        ; +0x3b, 0x180004beb\nmov     qword ptr [rsp+68h+var_38], rax                                ; +0x40, 0x180004bf0\ncmp     [rax+1Ch], ebx                                                 ; +0x45, 0x180004bf5\njge     short loc_180004C05                                            ; +0x48, 0x180004bf8\nmov     dword ptr [rsp+68h+var_38+8], r14d                             ; +0x4a, 0x180004bfa\nmov     rax, [rax+10h]                                                 ; +0x4f, 0x180004bff\njmp     short loc_180004C13                                            ; +0x53, 0x180004c03\nmov     dword ptr [rsp+68h+var_38+8], 1                                ; +0x55, 0x180004c05\nmov     rcx, rax                                                       ; +0x5d, 0x180004c0d\nmov     rax, [rax]                                                     ; +0x60, 0x180004c10\ncmp     [rax+19h], r14b                                                ; +0x63, 0x180004c13\njz      short loc_180004BF0                                            ; +0x67, 0x180004c17\ncmp     [rcx+19h], r14b                                                ; +0x69, 0x180004c19\njnz     short loc_180004C24                                            ; +0x6d, 0x180004c1d\ncmp     ebx, [rcx+1Ch]                                                 ; +0x6f, 0x180004c1f\njge     short loc_180004C7E                                            ; +0x72, 0x180004c22\nmov     rax, 666666666666666h                                          ; +0x74, 0x180004c24\ncmp     [rdi+8], rax                                                   ; +0x7e, 0x180004c2e\njz      short loc_180004C94                                            ; +0x82, 0x180004c32\nmov     qword ptr [rsp+68h+var_48], rdi                                ; +0x84, 0x180004c34\nmov     qword ptr [rsp+68h+var_48+8], r14                              ; +0x89, 0x180004c39\nmov     ecx, 28h ; '('; Size                                           ; +0x8e, 0x180004c3e\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x93, 0x180004c43\nnop                                                                    ; +0x98, 0x180004c48\nmov     [rax+1Ch], ebx                                                 ; +0x99, 0x180004c49\nmov     [rax+20h], r14d                                                ; +0x9c, 0x180004c4c\nmov     [rax], rsi                                                     ; +0xa0, 0x180004c50\nmov     [rax+8], rsi                                                   ; +0xa3, 0x180004c53\nmov     [rax+10h], rsi                                                 ; +0xa7, 0x180004c57\nmov     word ptr [rax+18h], 0                                          ; +0xab, 0x180004c5b\nmovups  xmm0, [rsp+68h+var_38]                                         ; +0xb1, 0x180004c61\nmovaps  [rsp+68h+var_48], xmm0                                         ; +0xb6, 0x180004c66\nmov     r8, rax                                                        ; +0xbb, 0x180004c6b\nlea     rdx, [rsp+68h+var_48]                                          ; +0xbe, 0x180004c6e\nmov     rcx, rdi                                                       ; +0xc3, 0x180004c73\ncall    sub_180004DA0                                                  ; +0xc6, 0x180004c76\nmov     rcx, rax                                                       ; +0xcb, 0x180004c7b\nmov     [rcx+20h], ebp                                                 ; +0xce, 0x180004c7e\nmov     rbx, [rsp+68h+arg_0]                                           ; +0xd1, 0x180004c81\nmov     rbp, [rsp+68h+arg_8]                                           ; +0xd6, 0x180004c86\nadd     rsp, 50h                                                       ; +0xdb, 0x180004c8b\npop     r14                                                            ; +0xdf, 0x180004c8f\npop     rdi                                                            ; +0xe1, 0x180004c91\npop     rsi                                                            ; +0xe2, 0x180004c92\nretn                                                                   ; +0xe3, 0x180004c93\ncall    sub_1800054D0                                                  ; +0xe4, 0x180004c94\ndb 0CCh                                                                ; +0xe9, 0x180004c99", "xrefs": ["<???> @ 0x18002fdf8", "<???> @ 0x1800494c8"], "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"}