{"type": "func", "start": 6442469088, "end": 6442469374, "name": "cocos2d::extension::CCControl::removeTargetWithActionForControlEvents", "pseudocode": "// \n// cocos2d::extension::CCControl::removeTargetWithActionForControlEvents from 0x1800046e0 to 0x1800047fe (286 bytes)\n// \n// 12 xrefs:\n// > <???> @ 0x180023b30\n// > <???> @ 0x180024130\n// > <???> @ 0x1800246a0\n// > <???> @ 0x180024da8\n// > <???> @ 0x180025358\n// > <???> @ 0x180025940\n// > <???> @ 0x180025ef0\n// > <???> @ 0x1800264c0\n// > <???> @ 0x180026ae8\n// > <???> @ 0x180027f78\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x180049414\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 cocos2d::extension::CCControl::removeTargetWithActionForControlEvents(\n        __int64 a1,\n        __int64 a2,\n        __int64 a3,\n        unsigned int a4)\n{\n  int v4; // r14d\n  __int64 result; // rax\n  __int64 v9; // r12\n  struct cocos2d::CCObject *v10; // rsi\n  unsigned int *v11; // rbx\n  __int64 v12; // rax\n  struct cocos2d::CCObject **v13; // rbx\n  struct cocos2d::CCObject **v14; // r15\n  struct cocos2d::CCObject *v15; // rdx\n  bool v16; // al\n\n  v4 = 1;\n  result = a4;\n  v9 = 9;\n  do\n  {\n    if ( (v4 & (unsigned int)result) == 0 )\n      goto LABEL_22;\n    v10 = cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(a1 + 448), v4);\n    if ( !v10 )\n    {\n      v10 = cocos2d::CCArray::createWithCapacity(1u);\n      cocos2d::CCDictionary::setObject(*(cocos2d::CCDictionary **)(a1 + 448), v10, (unsigned int)v4);\n    }\n    if ( a2 || a3 )\n    {\n      if ( !v10 )\n        goto LABEL_21;\n      v11 = *((unsigned int **)v10 + 7);\n      v12 = *v11;\n      if ( !(_DWORD)v12 )\n        goto LABEL_21;\n      v13 = *((struct cocos2d::CCObject ***)v11 + 2);\n      v14 = &v13[v12 - 1];\n      if ( v13 > v14 )\n        goto LABEL_21;\n      while ( 1 )\n      {\n        v15 = *v13;\n        if ( !*v13 )\n          goto LABEL_21;\n        v16 = 1;\n        if ( a2 )\n          v16 = a2 == *((_QWORD *)v15 + 8);\n        if ( a3 )\n          break;\n        if ( v16 )\n          goto LABEL_19;\nLABEL_20:\n        if ( ++v13 > v14 )\n          goto LABEL_21;\n      }\n      if ( !v16 || a3 != *((_QWORD *)v15 + 7) )\n        goto LABEL_20;\nLABEL_19:\n      cocos2d::CCArray::removeObject(v10, v15, 1);\n      goto LABEL_20;\n    }\n    cocos2d::CCArray::removeAllObjects(v10);\nLABEL_21:\n    result = a4;\nLABEL_22:\n    v4 = __ROL4__(v4, 1);\n    --v9;\n  }\n  while ( v9 );\n  return result;\n}", "assembly": "; \n; cocos2d::extension::CCControl::removeTargetWithActionForControlEvents from 0x1800046e0 to 0x1800047fe (286 bytes)\n; \n; 12 xrefs:\n; > <???> @ 0x180023b30\n; > <???> @ 0x180024130\n; > <???> @ 0x1800246a0\n; > <???> @ 0x180024da8\n; > <???> @ 0x180025358\n; > <???> @ 0x180025940\n; > <???> @ 0x180025ef0\n; > <???> @ 0x1800264c0\n; > <???> @ 0x180026ae8\n; > <???> @ 0x180027f78\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x180049414\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, 0x1800046e0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x1800046e5\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x1800046ea\nmov     [rsp+arg_18], r9d                                              ; +0xf, 0x1800046ef\npush    rdi                                                            ; +0x14, 0x1800046f4\npush    r12                                                            ; +0x15, 0x1800046f5\npush    r13                                                            ; +0x17, 0x1800046f7\npush    r14                                                            ; +0x19, 0x1800046f9\npush    r15                                                            ; +0x1b, 0x1800046fb\nsub     rsp, 20h                                                       ; +0x1d, 0x1800046fd\nmov     r14d, 1                                                        ; +0x21, 0x180004701\nmov     eax, r9d                                                       ; +0x27, 0x180004707\nmov     rdi, r8                                                        ; +0x2a, 0x18000470a\nmov     rbp, rdx                                                       ; +0x2d, 0x18000470d\nmov     r13, rcx                                                       ; +0x30, 0x180004710\nlea     r12d, [r14+8]                                                  ; +0x33, 0x180004713\ntest    eax, r14d                                                      ; +0x37, 0x180004717\njz      loc_1800047D4                                                  ; +0x3a, 0x18000471a\nmov     rcx, [r13+1C0h]                                                ; +0x40, 0x180004720\nmovsxd  rdx, r14d                                                      ; +0x47, 0x180004727\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::objectForKey(__int64) ; +0x4a, 0x18000472a\nmov     rsi, rax                                                       ; +0x50, 0x180004730\ntest    rax, rax                                                       ; +0x53, 0x180004733\njnz     short loc_180004757                                            ; +0x56, 0x180004736\nlea     ecx, [rax+1]                                                   ; +0x58, 0x180004738\ncall    cs:?createWithCapacity@CCArray@cocos2d@@SAPEAV12@I@Z; cocos2d::CCArray::createWithCapacity(uint) ; +0x5b, 0x18000473b\nmov     rcx, [r13+1C0h]                                                ; +0x61, 0x180004741\nmov     rdx, rax                                                       ; +0x68, 0x180004748\nmov     r8d, r14d                                                      ; +0x6b, 0x18000474b\nmov     rsi, rax                                                       ; +0x6e, 0x18000474e\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,__int64) ; +0x71, 0x180004751\ntest    rbp, rbp                                                       ; +0x77, 0x180004757\njnz     short loc_18000476C                                            ; +0x7a, 0x18000475a\ntest    rdi, rdi                                                       ; +0x7c, 0x18000475c\njnz     short loc_18000476C                                            ; +0x7f, 0x18000475f\nmov     rcx, rsi                                                       ; +0x81, 0x180004761\ncall    cs:?removeAllObjects@CCArray@cocos2d@@QEAAXXZ; cocos2d::CCArray::removeAllObjects(void) ; +0x84, 0x180004764\njmp     short loc_1800047D0                                            ; +0x8a, 0x18000476a\ntest    rsi, rsi                                                       ; +0x8c, 0x18000476c\njz      short loc_1800047D0                                            ; +0x8f, 0x18000476f\nmov     rbx, [rsi+38h]                                                 ; +0x91, 0x180004771\nmov     eax, [rbx]                                                     ; +0x95, 0x180004775\ntest    eax, eax                                                       ; +0x97, 0x180004777\njz      short loc_1800047D0                                            ; +0x99, 0x180004779\nmov     rbx, [rbx+10h]                                                 ; +0x9b, 0x18000477b\nlea     r15, [rax-1]                                                   ; +0x9f, 0x18000477f\nlea     r15, [rbx+r15*8]                                               ; +0xa3, 0x180004783\ncmp     rbx, r15                                                       ; +0xa7, 0x180004787\nja      short loc_1800047D0                                            ; +0xaa, 0x18000478a\nnop     dword ptr [rax+00h]                                            ; +0xac, 0x18000478c\nmov     rdx, [rbx]                                                     ; +0xb0, 0x180004790\ntest    rdx, rdx                                                       ; +0xb3, 0x180004793\njz      short loc_1800047D0                                            ; +0xb6, 0x180004796\nmov     al, 1                                                          ; +0xb8, 0x180004798\ntest    rbp, rbp                                                       ; +0xba, 0x18000479a\njz      short loc_1800047A6                                            ; +0xbd, 0x18000479d\ncmp     rbp, [rdx+40h]                                                 ; +0xbf, 0x18000479f\nsetz    al                                                             ; +0xc3, 0x1800047a3\ntest    rdi, rdi                                                       ; +0xc6, 0x1800047a6\njz      short loc_1800047B7                                            ; +0xc9, 0x1800047a9\ntest    al, al                                                         ; +0xcb, 0x1800047ab\njz      short loc_1800047C7                                            ; +0xcd, 0x1800047ad\ncmp     rdi, [rdx+38h]                                                 ; +0xcf, 0x1800047af\njnz     short loc_1800047C7                                            ; +0xd3, 0x1800047b3\njmp     short loc_1800047BB                                            ; +0xd5, 0x1800047b5\ntest    al, al                                                         ; +0xd7, 0x1800047b7\njz      short loc_1800047C7                                            ; +0xd9, 0x1800047b9\nmov     r8b, 1                                                         ; +0xdb, 0x1800047bb\nmov     rcx, rsi                                                       ; +0xde, 0x1800047be\ncall    cs:?removeObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@_N@Z; cocos2d::CCArray::removeObject(cocos2d::CCObject *,bool) ; +0xe1, 0x1800047c1\nadd     rbx, 8                                                         ; +0xe7, 0x1800047c7\ncmp     rbx, r15                                                       ; +0xeb, 0x1800047cb\njbe     short loc_180004790                                            ; +0xee, 0x1800047ce\nmov     eax, [rsp+48h+arg_18]                                          ; +0xf0, 0x1800047d0\nrol     r14d, 1                                                        ; +0xf4, 0x1800047d4\nsub     r12, 1                                                         ; +0xf7, 0x1800047d7\njnz     loc_180004717                                                  ; +0xfb, 0x1800047db\nmov     rbx, [rsp+48h+arg_0]                                           ; +0x101, 0x1800047e1\nmov     rbp, [rsp+48h+arg_8]                                           ; +0x106, 0x1800047e6\nmov     rsi, [rsp+48h+arg_10]                                          ; +0x10b, 0x1800047eb\nadd     rsp, 20h                                                       ; +0x110, 0x1800047f0\npop     r15                                                            ; +0x114, 0x1800047f4\npop     r14                                                            ; +0x116, 0x1800047f6\npop     r13                                                            ; +0x118, 0x1800047f8\npop     r12                                                            ; +0x11a, 0x1800047fa\npop     rdi                                                            ; +0x11c, 0x1800047fc\nretn                                                                   ; +0x11d, 0x1800047fd", "xrefs": ["<???> @ 0x180023b30", "<???> @ 0x180024130", "<???> @ 0x1800246a0", "<???> @ 0x180024da8", "<???> @ 0x180025358", "<???> @ 0x180025940", "<???> @ 0x180025ef0", "<???> @ 0x1800264c0", "<???> @ 0x180026ae8", "<???> @ 0x180027f78", "<???> @ 0x18002fdf8", "<???> @ 0x180049414"], "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"}