{"type": "func", "start": 6442467664, "end": 6442467957, "name": "cocos2d::extension::CCControl::removeTargetWithActionForControlEvents", "pseudocode": "// \n// cocos2d::extension::CCControl::removeTargetWithActionForControlEvents from 0x180004150 to 0x180004275 (293 bytes)\n// \n// 12 xrefs:\n// > <???> @ 0x180026058\n// > <???> @ 0x180026678\n// > <???> @ 0x180026bf8\n// > <???> @ 0x180027330\n// > <???> @ 0x180027900\n// > <???> @ 0x180027f08\n// > <???> @ 0x1800284d8\n// > <???> @ 0x180028ac8\n// > <???> @ 0x180029110\n// > <???> @ 0x18002a5f0\n// > <???> @ 0x180032408\n// > <???> @ 0x18004b360\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 12:15:35 +0000\n// \n\n__int64 __fastcall cocos2d::extension::CCControl::removeTargetWithActionForControlEvents(\n        __int64 a1,\n        __int64 a2,\n        __int64 a3,\n        unsigned int a4)\n{\n  __int64 result; // rax\n  int v8; // r14d\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  result = a4;\n  v8 = 1;\n  v9 = 9;\n  do\n  {\n    if ( (v8 & (unsigned int)result) == 0 )\n      goto LABEL_22;\n    v10 = cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(a1 + 448), v8);\n    if ( !v10 )\n    {\n      v10 = cocos2d::CCArray::createWithCapacity(1u);\n      cocos2d::CCDictionary::setObject(*(cocos2d::CCDictionary **)(a1 + 448), v10, (unsigned int)v8);\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    v8 = __ROL4__(v8, 1);\n    --v9;\n  }\n  while ( v9 );\n  return result;\n}", "assembly": "; \n; cocos2d::extension::CCControl::removeTargetWithActionForControlEvents from 0x180004150 to 0x180004275 (293 bytes)\n; \n; 12 xrefs:\n; > <???> @ 0x180026058\n; > <???> @ 0x180026678\n; > <???> @ 0x180026bf8\n; > <???> @ 0x180027330\n; > <???> @ 0x180027900\n; > <???> @ 0x180027f08\n; > <???> @ 0x1800284d8\n; > <???> @ 0x180028ac8\n; > <???> @ 0x180029110\n; > <???> @ 0x18002a5f0\n; > <???> @ 0x180032408\n; > <???> @ 0x18004b360\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 12:15:35 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x180004150\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x180004155\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x18000415a\nmov     [rsp+arg_18], r9d                                              ; +0xf, 0x18000415f\npush    rdi                                                            ; +0x14, 0x180004164\npush    r12                                                            ; +0x15, 0x180004165\npush    r13                                                            ; +0x17, 0x180004167\npush    r14                                                            ; +0x19, 0x180004169\npush    r15                                                            ; +0x1b, 0x18000416b\nsub     rsp, 20h                                                       ; +0x1d, 0x18000416d\nmov     eax, r9d                                                       ; +0x21, 0x180004171\nmov     rdi, r8                                                        ; +0x24, 0x180004174\nmov     rbp, rdx                                                       ; +0x27, 0x180004177\nmov     r13, rcx                                                       ; +0x2a, 0x18000417a\nmov     r14d, 1                                                        ; +0x2d, 0x18000417d\nmov     r12d, 9                                                        ; +0x33, 0x180004183\nnop     dword ptr [rax+00000000h]                                      ; +0x39, 0x180004189\ntest    eax, r14d                                                      ; +0x40, 0x180004190\njz      loc_18000424B                                                  ; +0x43, 0x180004193\nmov     rcx, [r13+1C0h]                                                ; +0x49, 0x180004199\nmovsxd  rdx, r14d                                                      ; +0x50, 0x1800041a0\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::objectForKey(__int64) ; +0x53, 0x1800041a3\nmov     rsi, rax                                                       ; +0x59, 0x1800041a9\ntest    rax, rax                                                       ; +0x5c, 0x1800041ac\njnz     short loc_1800041D2                                            ; +0x5f, 0x1800041af\nmov     ecx, 1                                                         ; +0x61, 0x1800041b1\ncall    cs:?createWithCapacity@CCArray@cocos2d@@SAPEAV12@I@Z; cocos2d::CCArray::createWithCapacity(uint) ; +0x66, 0x1800041b6\nmov     rcx, [r13+1C0h]                                                ; +0x6c, 0x1800041bc\nmov     rdx, rax                                                       ; +0x73, 0x1800041c3\nmov     r8d, r14d                                                      ; +0x76, 0x1800041c6\nmov     rsi, rax                                                       ; +0x79, 0x1800041c9\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,__int64) ; +0x7c, 0x1800041cc\ntest    rbp, rbp                                                       ; +0x82, 0x1800041d2\njnz     short loc_1800041E7                                            ; +0x85, 0x1800041d5\ntest    rdi, rdi                                                       ; +0x87, 0x1800041d7\njnz     short loc_1800041E7                                            ; +0x8a, 0x1800041da\nmov     rcx, rsi                                                       ; +0x8c, 0x1800041dc\ncall    cs:?removeAllObjects@CCArray@cocos2d@@QEAAXXZ; cocos2d::CCArray::removeAllObjects(void) ; +0x8f, 0x1800041df\njmp     short loc_180004247                                            ; +0x95, 0x1800041e5\ntest    rsi, rsi                                                       ; +0x97, 0x1800041e7\njz      short loc_180004247                                            ; +0x9a, 0x1800041ea\nmov     rbx, [rsi+38h]                                                 ; +0x9c, 0x1800041ec\nmov     eax, [rbx]                                                     ; +0xa0, 0x1800041f0\ntest    eax, eax                                                       ; +0xa2, 0x1800041f2\njz      short loc_180004247                                            ; +0xa4, 0x1800041f4\nmov     rbx, [rbx+10h]                                                 ; +0xa6, 0x1800041f6\nlea     r15, [rax-1]                                                   ; +0xaa, 0x1800041fa\nlea     r15, [rbx+r15*8]                                               ; +0xae, 0x1800041fe\ncmp     rbx, r15                                                       ; +0xb2, 0x180004202\nja      short loc_180004247                                            ; +0xb5, 0x180004205\nmov     rdx, [rbx]                                                     ; +0xb7, 0x180004207\ntest    rdx, rdx                                                       ; +0xba, 0x18000420a\njz      short loc_180004247                                            ; +0xbd, 0x18000420d\nmov     al, 1                                                          ; +0xbf, 0x18000420f\ntest    rbp, rbp                                                       ; +0xc1, 0x180004211\njz      short loc_18000421D                                            ; +0xc4, 0x180004214\ncmp     rbp, [rdx+40h]                                                 ; +0xc6, 0x180004216\nsetz    al                                                             ; +0xca, 0x18000421a\ntest    rdi, rdi                                                       ; +0xcd, 0x18000421d\njz      short loc_18000422E                                            ; +0xd0, 0x180004220\ntest    al, al                                                         ; +0xd2, 0x180004222\njz      short loc_18000423E                                            ; +0xd4, 0x180004224\ncmp     rdi, [rdx+38h]                                                 ; +0xd6, 0x180004226\njnz     short loc_18000423E                                            ; +0xda, 0x18000422a\njmp     short loc_180004232                                            ; +0xdc, 0x18000422c\ntest    al, al                                                         ; +0xde, 0x18000422e\njz      short loc_18000423E                                            ; +0xe0, 0x180004230\nmov     r8b, 1                                                         ; +0xe2, 0x180004232\nmov     rcx, rsi                                                       ; +0xe5, 0x180004235\ncall    cs:?removeObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@_N@Z; cocos2d::CCArray::removeObject(cocos2d::CCObject *,bool) ; +0xe8, 0x180004238\nadd     rbx, 8                                                         ; +0xee, 0x18000423e\ncmp     rbx, r15                                                       ; +0xf2, 0x180004242\njbe     short loc_180004207                                            ; +0xf5, 0x180004245\nmov     eax, [rsp+48h+arg_18]                                          ; +0xf7, 0x180004247\nrol     r14d, 1                                                        ; +0xfb, 0x18000424b\nsub     r12, 1                                                         ; +0xfe, 0x18000424e\njnz     loc_180004190                                                  ; +0x102, 0x180004252\nmov     rbx, [rsp+48h+arg_0]                                           ; +0x108, 0x180004258\nmov     rbp, [rsp+48h+arg_8]                                           ; +0x10d, 0x18000425d\nmov     rsi, [rsp+48h+arg_10]                                          ; +0x112, 0x180004262\nadd     rsp, 20h                                                       ; +0x117, 0x180004267\npop     r15                                                            ; +0x11b, 0x18000426b\npop     r14                                                            ; +0x11d, 0x18000426d\npop     r13                                                            ; +0x11f, 0x18000426f\npop     r12                                                            ; +0x121, 0x180004271\npop     rdi                                                            ; +0x123, 0x180004273\nretn                                                                   ; +0x124, 0x180004274", "xrefs": ["<???> @ 0x180026058", "<???> @ 0x180026678", "<???> @ 0x180026bf8", "<???> @ 0x180027330", "<???> @ 0x180027900", "<???> @ 0x180027f08", "<???> @ 0x1800284d8", "<???> @ 0x180028ac8", "<???> @ 0x180029110", "<???> @ 0x18002a5f0", "<???> @ 0x180032408", "<???> @ 0x18004b360"], "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"}