{"type": "func", "start": 6442828304, "end": 6442828449, "name": "cocos2d::CCMenuItemToggle::activate", "pseudocode": "// \n// cocos2d::CCMenuItemToggle::activate from 0x18005c210 to 0x18005c2a1 (145 bytes)\n// \n// 5 xrefs:\n// > <???> @ 0x1800ff460\n// > <???> @ 0x1801422a8\n// > <???> @ 0x1801422b8\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bcf04\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 11:21:49 +0000\n// \n\nvoid __fastcall cocos2d::CCMenuItemToggle::activate(cocos2d::CCMenuItemToggle *this)\n{\n  int v2; // ebx\n  unsigned int v3; // eax\n  __int64 v4; // rcx\n  void (__fastcall *v5)(__int64, cocos2d::CCMenuItemToggle *); // rax\n  struct cocos2d::CCScriptEngineManager *v6; // rax\n\n  if ( *((_BYTE *)this + 345) )\n  {\n    v2 = *((_DWORD *)this + 94);\n    v3 = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 48));\n    (*(void (__fastcall **)(cocos2d::CCMenuItemToggle *, _QWORD))(*(_QWORD *)this + 960LL))(this, (v2 + 1) % v3);\n  }\n  if ( *((_BYTE *)this + 345) )\n  {\n    v4 = *((_QWORD *)this + 44);\n    if ( v4 )\n    {\n      v5 = *((void (__fastcall **)(__int64, cocos2d::CCMenuItemToggle *))this + 45);\n      if ( v5 )\n        v5(v4, this);\n    }\n    if ( *((_DWORD *)this + 75) )\n    {\n      v6 = cocos2d::CCScriptEngineManager::sharedManager();\n      (*(void (__fastcall **)(_QWORD, cocos2d::CCMenuItemToggle *))(**(_QWORD **)v6 + 72LL))(*(_QWORD *)v6, this);\n    }\n  }\n}", "assembly": "; \n; cocos2d::CCMenuItemToggle::activate from 0x18005c210 to 0x18005c2a1 (145 bytes)\n; \n; 5 xrefs:\n; > <???> @ 0x1800ff460\n; > <???> @ 0x1801422a8\n; > <???> @ 0x1801422b8\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bcf04\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 11:21:49 +0000\n; \npush    rdi                                                            ; +0x0, 0x18005c210\nsub     rsp, 20h                                                       ; +0x2, 0x18005c212\ncmp     byte ptr [rcx+159h], 0                                         ; +0x6, 0x18005c216\nmov     rdi, rcx                                                       ; +0xd, 0x18005c21d\njz      short loc_18005C255                                            ; +0x10, 0x18005c220\nmov     [rsp+28h+arg_0], rbx                                           ; +0x12, 0x18005c222\nmov     ebx, [rcx+178h]                                                ; +0x17, 0x18005c227\nmov     rcx, [rcx+180h]; this                                          ; +0x1d, 0x18005c22d\ncall    ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x24, 0x18005c234\nmov     r8d, eax                                                       ; +0x29, 0x18005c239\nxor     edx, edx                                                       ; +0x2c, 0x18005c23c\nlea     eax, [rbx+1]                                                   ; +0x2e, 0x18005c23e\nmov     rcx, rdi                                                       ; +0x31, 0x18005c241\ndiv     r8d                                                            ; +0x34, 0x18005c244\nmov     rax, [rdi]                                                     ; +0x37, 0x18005c247\ncall    qword ptr [rax+3C0h]                                           ; +0x3a, 0x18005c24a\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x40, 0x18005c250\ncmp     byte ptr [rdi+159h], 0                                         ; +0x45, 0x18005c255\njz      short loc_18005C29B                                            ; +0x4c, 0x18005c25c\nmov     rcx, [rdi+160h]                                                ; +0x4e, 0x18005c25e\ntest    rcx, rcx                                                       ; +0x55, 0x18005c265\njz      short loc_18005C27B                                            ; +0x58, 0x18005c268\nmov     rax, [rdi+168h]                                                ; +0x5a, 0x18005c26a\ntest    rax, rax                                                       ; +0x61, 0x18005c271\njz      short loc_18005C27B                                            ; +0x64, 0x18005c274\nmov     rdx, rdi                                                       ; +0x66, 0x18005c276\ncall    rax                                                            ; +0x69, 0x18005c279\ncmp     dword ptr [rdi+12Ch], 0                                        ; +0x6b, 0x18005c27b\njz      short loc_18005C29B                                            ; +0x72, 0x18005c282\ncall    ?sharedManager@CCScriptEngineManager@cocos2d@@SAPEAV12@XZ; cocos2d::CCScriptEngineManager::sharedManager(void) ; +0x74, 0x18005c284\nmov     rdx, rdi                                                       ; +0x79, 0x18005c289\nmov     rcx, [rax]                                                     ; +0x7c, 0x18005c28c\nmov     rax, [rcx]                                                     ; +0x7f, 0x18005c28f\nadd     rsp, 20h                                                       ; +0x82, 0x18005c292\npop     rdi                                                            ; +0x86, 0x18005c296\njmp     qword ptr [rax+48h]                                            ; +0x87, 0x18005c297\nadd     rsp, 20h                                                       ; +0x8b, 0x18005c29b\npop     rdi                                                            ; +0x8f, 0x18005c29f\nretn                                                                   ; +0x90, 0x18005c2a0", "xrefs": ["<???> @ 0x1800ff460", "<???> @ 0x1801422a8", "<???> @ 0x1801422b8", "<???> @ 0x18014cf68", "<???> @ 0x1801bcf04"], "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"}