{"type": "func", "start": 6442467488, "end": 6442467663, "name": "cocos2d::extension::CCControl::addTargetWithActionForControlEvent", "pseudocode": "// \n// cocos2d::extension::CCControl::addTargetWithActionForControlEvent from 0x1800040a0 to 0x18000414f (175 bytes)\n// \n// 3 xrefs:\n// > cocos2d::extension::CCControl::addTargetWithActionForControlEvents @ 0x180004070\n// > <???> @ 0x180032408\n// > <???> @ 0x18004b354\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// Hidden C++ exception states: #wind=1\nvoid __fastcall cocos2d::extension::CCControl::addTargetWithActionForControlEvent(\n        __int64 a1,\n        __int64 a2,\n        __int64 a3,\n        unsigned int a4)\n{\n  __int64 v8; // rsi\n  struct cocos2d::CCObject *v9; // rbx\n\n  v8 = sub_18001F040(0x50u);\n  cocos2d::CCObject::CCObject((cocos2d::CCObject *)v8);\n  *(_QWORD *)v8 = &cocos2d::extension::CCInvocation::`vftable';\n  *(_QWORD *)(v8 + 64) = a2;\n  *(_QWORD *)(v8 + 56) = a3;\n  *(_DWORD *)(v8 + 72) = a4;\n  cocos2d::CCObject::autorelease((cocos2d::CCObject *)v8);\n  v9 = cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(a1 + 448), (int)a4);\n  if ( !v9 )\n  {\n    v9 = cocos2d::CCArray::createWithCapacity(1u);\n    cocos2d::CCDictionary::setObject(*(cocos2d::CCDictionary **)(a1 + 448), v9, a4);\n  }\n  cocos2d::CCArray::addObject(v9, (struct cocos2d::CCObject *)v8);\n}", "assembly": "; \n; cocos2d::extension::CCControl::addTargetWithActionForControlEvent from 0x1800040a0 to 0x18000414f (175 bytes)\n; \n; 3 xrefs:\n; > cocos2d::extension::CCControl::addTargetWithActionForControlEvents @ 0x180004070\n; > <???> @ 0x180032408\n; > <???> @ 0x18004b354\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_8], rbx                                               ; +0x0, 0x1800040a0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1800040a5\npush    rsi                                                            ; +0xa, 0x1800040aa\npush    rdi                                                            ; +0xb, 0x1800040ab\npush    r14                                                            ; +0xc, 0x1800040ac\nsub     rsp, 20h                                                       ; +0xe, 0x1800040ae\nmov     ebp, r9d                                                       ; +0x12, 0x1800040b2\nmov     rdi, r8                                                        ; +0x15, 0x1800040b5\nmov     rbx, rdx                                                       ; +0x18, 0x1800040b8\nmov     r14, rcx                                                       ; +0x1b, 0x1800040bb\nmov     ecx, 50h ; 'P'; Size                                           ; +0x1e, 0x1800040be\ncall    sub_18001F040                                                  ; +0x23, 0x1800040c3\nmov     rsi, rax                                                       ; +0x28, 0x1800040c8\nmov     [rsp+38h+arg_0], rax                                           ; +0x2b, 0x1800040cb\nmov     rcx, rax                                                       ; +0x30, 0x1800040d0\ncall    cs:??0CCObject@cocos2d@@QEAA@XZ; cocos2d::CCObject::CCObject(void) ; +0x33, 0x1800040d3\nlea     rax, ??_7CCInvocation@extension@cocos2d@@6B@; const cocos2d::extension::CCInvocation::`vftable' ; +0x39, 0x1800040d9\nmov     [rsi], rax                                                     ; +0x40, 0x1800040e0\nmov     [rsi+40h], rbx                                                 ; +0x43, 0x1800040e3\nmov     [rsi+38h], rdi                                                 ; +0x47, 0x1800040e7\nmov     [rsi+48h], ebp                                                 ; +0x4b, 0x1800040eb\nmov     rcx, rsi                                                       ; +0x4e, 0x1800040ee\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x51, 0x1800040f1\nmovsxd  rdx, ebp                                                       ; +0x57, 0x1800040f7\nmov     rcx, [r14+1C0h]                                                ; +0x5a, 0x1800040fa\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::objectForKey(__int64) ; +0x61, 0x180004101\nmov     rbx, rax                                                       ; +0x67, 0x180004107\ntest    rax, rax                                                       ; +0x6a, 0x18000410a\njnz     short loc_180004130                                            ; +0x6d, 0x18000410d\nmov     ecx, 1                                                         ; +0x6f, 0x18000410f\ncall    cs:?createWithCapacity@CCArray@cocos2d@@SAPEAV12@I@Z; cocos2d::CCArray::createWithCapacity(uint) ; +0x74, 0x180004114\nmov     rbx, rax                                                       ; +0x7a, 0x18000411a\nmov     r8d, ebp                                                       ; +0x7d, 0x18000411d\nmov     rdx, rax                                                       ; +0x80, 0x180004120\nmov     rcx, [r14+1C0h]                                                ; +0x83, 0x180004123\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,__int64) ; +0x8a, 0x18000412a\nmov     rdx, rsi                                                       ; +0x90, 0x180004130\nmov     rcx, rbx                                                       ; +0x93, 0x180004133\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x96, 0x180004136\nmov     rbp, [rsp+38h+arg_10]                                          ; +0x9b, 0x18000413b\nadd     rsp, 20h                                                       ; +0xa0, 0x180004140\npop     r14                                                            ; +0xa4, 0x180004144\npop     rdi                                                            ; +0xa6, 0x180004146\npop     rsi                                                            ; +0xa7, 0x180004147\njmp     cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0xa8, 0x180004148", "xrefs": ["cocos2d::extension::CCControl::addTargetWithActionForControlEvents @ 0x180004070", "<???> @ 0x180032408", "<???> @ 0x18004b354"], "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"}