{"type": "func", "start": 4297676240, "end": 4297676370, "name": "-[CCEventDispatcher addKeyboardDelegate:priority:]", "pseudocode": "// \n// -[CCEventDispatcher addKeyboardDelegate:priority:] from 0x1002955d0 to 0x100295652 (130 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x100999da8\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\nvoid __cdecl -[CCEventDispatcher addKeyboardDelegate:priority:](\n        CCEventDispatcher *self,\n        SEL a2,\n        id a3,\n        signed __int64 a4)\n{\n  _BOOL8 v6; // r12\n  __int64 v7; // r12\n  char v8; // al\n\n  v6 = (unsigned __int8)objc_opt_respondsToSelector(a3, \"ccKeyUp:\") != 0;\n  v7 = v6 + 2LL * ((unsigned __int8)objc_opt_respondsToSelector(a3, \"ccKeyDown:\") != 0);\n  v8 = objc_opt_respondsToSelector(a3, \"ccFlagsChanged:\");\n  -[CCEventDispatcher addDelegate:priority:flags:list:](\n    self,\n    \"addDelegate:priority:flags:list:\",\n    a3,\n    a4,\n    v7 + 4LL * (v8 != 0),\n    &self->keyboardDelegates_);\n}", "assembly": "; \n; -[CCEventDispatcher addKeyboardDelegate:priority:] from 0x1002955d0 to 0x100295652 (130 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x100999da8\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\npush    rbp                                                            ; +0x0, 0x1002955d0\nmov     rbp, rsp                                                       ; +0x1, 0x1002955d1\npush    r15                                                            ; +0x4, 0x1002955d4\npush    r14                                                            ; +0x6, 0x1002955d6\npush    r12                                                            ; +0x8, 0x1002955d8\npush    rbx                                                            ; +0xa, 0x1002955da\nmov     rbx, rcx                                                       ; +0xb, 0x1002955db\nmov     r14, rdx                                                       ; +0xe, 0x1002955de\nmov     r15, rdi                                                       ; +0x11, 0x1002955e1\nmov     rsi, cs:selRef_ccKeyUp_                                        ; +0x14, 0x1002955e4\nmov     rdi, rdx                                                       ; +0x1b, 0x1002955eb\ncall    _objc_opt_respondsToSelector                                   ; +0x1e, 0x1002955ee\nxor     r12d, r12d                                                     ; +0x23, 0x1002955f3\ntest    al, al                                                         ; +0x26, 0x1002955f6\nsetnz   r12b                                                           ; +0x28, 0x1002955f8\nmov     rsi, cs:selRef_ccKeyDown_                                      ; +0x2c, 0x1002955fc\nmov     rdi, r14                                                       ; +0x33, 0x100295603\ncall    _objc_opt_respondsToSelector                                   ; +0x36, 0x100295606\nxor     ecx, ecx                                                       ; +0x3b, 0x10029560b\ntest    al, al                                                         ; +0x3d, 0x10029560d\nsetnz   cl                                                             ; +0x3f, 0x10029560f\nlea     r12, [r12+rcx*2]                                               ; +0x42, 0x100295612\nmov     rsi, cs:selRef_ccFlagsChanged_                                 ; +0x46, 0x100295616\nmov     rdi, r14                                                       ; +0x4d, 0x10029561d\ncall    _objc_opt_respondsToSelector                                   ; +0x50, 0x100295620\nxor     ecx, ecx                                                       ; +0x55, 0x100295625\ntest    al, al                                                         ; +0x57, 0x100295627\nsetnz   cl                                                             ; +0x59, 0x100295629\nlea     r8, [r12+rcx*4]                                                ; +0x5c, 0x10029562c\nlea     r9, [r15+10h]                                                  ; +0x60, 0x100295630\nmov     rsi, cs:selRef_addDelegate_priority_flags_list_                ; +0x64, 0x100295634\nmov     rdi, r15                                                       ; +0x6b, 0x10029563b\nmov     rdx, r14                                                       ; +0x6e, 0x10029563e\nmov     rcx, rbx                                                       ; +0x71, 0x100295641\npop     rbx                                                            ; +0x74, 0x100295644\npop     r12                                                            ; +0x75, 0x100295645\npop     r14                                                            ; +0x77, 0x100295647\npop     r15                                                            ; +0x79, 0x100295649\npop     rbp                                                            ; +0x7b, 0x10029564b\njmp     cs:_objc_msgSend_ptr; -[CCEventDispatcher addDelegate:priority:flags:list:] ... ; +0x7c, 0x10029564c", "xrefs": ["<???> @ 0x100999da8"], "is_objc": true, "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"}