{"type": "func", "start": 6442780016, "end": 6442780283, "name": "cocos2d::CCLayer::onEnter", "pseudocode": "// \n// cocos2d::CCLayer::onEnter from 0x180050570 to 0x18005067b (267 bytes)\n// \n// 8 xrefs:\n// > <???> @ 0x1800ed198\n// > <???> @ 0x1800ed658\n// > <???> @ 0x1800edb90\n// > <???> @ 0x1800ee0f8\n// > <???> @ 0x1800ee6d0\n// > <???> @ 0x1800f6fa0\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b1fd4\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 __fastcall cocos2d::CCLayer::onEnter(cocos2d::CCLayer *this)\n{\n  struct cocos2d::CCDirector *v2; // rsi\n  struct cocos2d::CCAccelerometerDelegate *v3; // rbx\n  cocos2d::CCAccelerometer *v4; // rax\n  struct cocos2d::CCKeypadDelegate *v5; // rbx\n  cocos2d::CCKeypadDispatcher *v6; // rax\n  cocos2d::CCKeyboardDelegate *v7; // rbx\n  cocos2d::CCKeyboardDispatcher *v8; // rax\n  struct cocos2d::CCMouseDelegate *v9; // rbx\n  cocos2d::CCMouseDispatcher *v10; // rax\n\n  v2 = cocos2d::CCDirector::sharedDirector();\n  if ( this->m_bTouchEnabled )\n    ((void (__fastcall *)(cocos2d::CCLayer *))this->registerWithTouchDispatcher)(this);\n  cocos2d::CCNode::onEnter(this);\n  if ( this->m_bAccelerometerEnabled )\n  {\n    v3 = &this->cocos2d::CCAccelerometerDelegate;\n    if ( !this )\n      v3 = nullptr;\n    v4 = (cocos2d::CCAccelerometer *)((__int64 (__fastcall *)(struct cocos2d::CCDirector *))v2->getAccelerometer)(v2);\n    cocos2d::CCAccelerometer::setDelegate(v4, v3);\n  }\n  if ( this->m_bKeypadEnabled )\n  {\n    v5 = &this->cocos2d::CCKeypadDelegate;\n    if ( !this )\n      v5 = nullptr;\n    v6 = (cocos2d::CCKeypadDispatcher *)((__int64 (__fastcall *)(struct cocos2d::CCDirector *))v2->getKeypadDispatcher)(v2);\n    cocos2d::CCKeypadDispatcher::addDelegate(v6, v5);\n  }\n  if ( this->m_bKeyboardEnabled )\n  {\n    v7 = &this->cocos2d::CCKeyboardDelegate;\n    if ( !this )\n      v7 = nullptr;\n    v8 = (cocos2d::CCKeyboardDispatcher *)((__int64 (__fastcall *)(struct cocos2d::CCDirector *))v2->getKeyboardDispatcher)(v2);\n    cocos2d::CCKeyboardDispatcher::addDelegate(v8, (cocos2d::CCObject_vtbl *)v7);\n  }\n  if ( this->m_bMouseEnabled )\n  {\n    v9 = &this->cocos2d::CCMouseDelegate;\n    if ( !this )\n      v9 = nullptr;\n    v10 = (cocos2d::CCMouseDispatcher *)((__int64 (__fastcall *)(struct cocos2d::CCDirector *))v2->getMouseDispatcher)(v2);\n    cocos2d::CCMouseDispatcher::addDelegate(v10, v9);\n  }\n}", "assembly": "; \n; cocos2d::CCLayer::onEnter from 0x180050570 to 0x18005067b (267 bytes)\n; \n; 8 xrefs:\n; > <???> @ 0x1800ed198\n; > <???> @ 0x1800ed658\n; > <???> @ 0x1800edb90\n; > <???> @ 0x1800ee0f8\n; > <???> @ 0x1800ee6d0\n; > <???> @ 0x1800f6fa0\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b1fd4\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_8], rbp                                               ; +0x0, 0x180050570\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x180050575\npush    rdi                                                            ; +0xa, 0x18005057a\nsub     rsp, 20h                                                       ; +0xb, 0x18005057b\nmov     rdi, rcx                                                       ; +0xf, 0x18005057f\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x12, 0x180050582\ncmp     byte ptr [rdi+168h], 0                                         ; +0x17, 0x180050587\nmov     rsi, rax                                                       ; +0x1e, 0x18005058e\njz      short loc_18005059F                                            ; +0x21, 0x180050591\nmov     rdx, [rdi]                                                     ; +0x23, 0x180050593\nmov     rcx, rdi                                                       ; +0x26, 0x180050596\ncall    qword ptr [rdx+368h]                                           ; +0x29, 0x180050599\nmov     rcx, rdi; this                                                 ; +0x2f, 0x18005059f\nmov     [rsp+28h+arg_0], rbx                                           ; +0x32, 0x1800505a2\ncall    ?onEnter@CCNode@cocos2d@@UEAAXXZ; cocos2d::CCNode::onEnter(void) ; +0x37, 0x1800505a7\nxor     ebp, ebp                                                       ; +0x3c, 0x1800505ac\ncmp     [rdi+169h], bpl                                                ; +0x3e, 0x1800505ae\njz      short loc_1800505DC                                            ; +0x45, 0x1800505b5\nmov     rax, [rsi]                                                     ; +0x47, 0x1800505b7\nlea     rbx, [rdi+148h]                                                ; +0x4a, 0x1800505ba\ntest    rdi, rdi                                                       ; +0x51, 0x1800505c1\nmov     rcx, rsi                                                       ; +0x54, 0x1800505c4\ncmovz   rbx, rbp                                                       ; +0x57, 0x1800505c7\ncall    qword ptr [rax+0D0h]                                           ; +0x5b, 0x1800505cb\nmov     rcx, rax; this                                                 ; +0x61, 0x1800505d1\nmov     rdx, rbx; struct cocos2d::CCAccelerometerDelegate *            ; +0x64, 0x1800505d4\ncall    ?setDelegate@CCAccelerometer@cocos2d@@QEAAXPEAVCCAccelerometerDelegate@2@@Z; cocos2d::CCAccelerometer::setDelegate(cocos2d::CCAccelerometerDelegate *) ; +0x67, 0x1800505d7\ncmp     [rdi+16Ah], bpl                                                ; +0x6c, 0x1800505dc\njz      short loc_18005060A                                            ; +0x73, 0x1800505e3\nmov     rax, [rsi]                                                     ; +0x75, 0x1800505e5\nlea     rbx, [rdi+150h]                                                ; +0x78, 0x1800505e8\ntest    rdi, rdi                                                       ; +0x7f, 0x1800505ef\nmov     rcx, rsi                                                       ; +0x82, 0x1800505f2\ncmovz   rbx, rbp                                                       ; +0x85, 0x1800505f5\ncall    qword ptr [rax+0A0h]                                           ; +0x89, 0x1800505f9\nmov     rcx, rax; this                                                 ; +0x8f, 0x1800505ff\nmov     rdx, rbx; struct cocos2d::CCKeypadDelegate *                   ; +0x92, 0x180050602\ncall    ?addDelegate@CCKeypadDispatcher@cocos2d@@QEAAXPEAVCCKeypadDelegate@2@@Z; cocos2d::CCKeypadDispatcher::addDelegate(cocos2d::CCKeypadDelegate *) ; +0x95, 0x180050605\ncmp     [rdi+16Bh], bpl                                                ; +0x9a, 0x18005060a\njz      short loc_180050638                                            ; +0xa1, 0x180050611\nmov     rax, [rsi]                                                     ; +0xa3, 0x180050613\nlea     rbx, [rdi+158h]                                                ; +0xa6, 0x180050616\ntest    rdi, rdi                                                       ; +0xad, 0x18005061d\nmov     rcx, rsi                                                       ; +0xb0, 0x180050620\ncmovz   rbx, rbp                                                       ; +0xb3, 0x180050623\ncall    qword ptr [rax+0B0h]                                           ; +0xb7, 0x180050627\nmov     rcx, rax; this                                                 ; +0xbd, 0x18005062d\nmov     rdx, rbx; struct cocos2d::CCKeyboardDelegate *                 ; +0xc0, 0x180050630\ncall    ?addDelegate@CCKeyboardDispatcher@cocos2d@@QEAAXPEAVCCKeyboardDelegate@2@@Z; cocos2d::CCKeyboardDispatcher::addDelegate(cocos2d::CCKeyboardDelegate *) ; +0xc3, 0x180050633\ncmp     [rdi+16Ch], bpl                                                ; +0xc8, 0x180050638\njz      short loc_180050666                                            ; +0xcf, 0x18005063f\nmov     rax, [rsi]                                                     ; +0xd1, 0x180050641\nlea     rbx, [rdi+160h]                                                ; +0xd4, 0x180050644\ntest    rdi, rdi                                                       ; +0xdb, 0x18005064b\nmov     rcx, rsi                                                       ; +0xde, 0x18005064e\ncmovz   rbx, rbp                                                       ; +0xe1, 0x180050651\ncall    qword ptr [rax+0C0h]                                           ; +0xe5, 0x180050655\nmov     rcx, rax; this                                                 ; +0xeb, 0x18005065b\nmov     rdx, rbx; struct cocos2d::CCMouseDelegate *                    ; +0xee, 0x18005065e\ncall    ?addDelegate@CCMouseDispatcher@cocos2d@@QEAAXPEAVCCMouseDelegate@2@@Z; cocos2d::CCMouseDispatcher::addDelegate(cocos2d::CCMouseDelegate *) ; +0xf1, 0x180050661\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xf6, 0x180050666\nmov     rbp, [rsp+28h+arg_8]                                           ; +0xfb, 0x18005066b\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x100, 0x180050670\nadd     rsp, 20h                                                       ; +0x105, 0x180050675\npop     rdi                                                            ; +0x109, 0x180050679\nretn                                                                   ; +0x10a, 0x18005067a", "xrefs": ["<???> @ 0x1800ed198", "<???> @ 0x1800ed658", "<???> @ 0x1800edb90", "<???> @ 0x1800ee0f8", "<???> @ 0x1800ee6d0", "<???> @ 0x1800f6fa0", "<???> @ 0x1801438a8", "<???> @ 0x1801b1fd4"], "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"}