{"type": "func", "start": 6442831344, "end": 6442831546, "name": "cocos2d::CCMenuItemToggle::initWithItem", "pseudocode": "// \n// cocos2d::CCMenuItemToggle::initWithItem from 0x18005cdf0 to 0x18005ceba (202 bytes)\n// \n// 4 xrefs:\n// > cocos2d::CCMenuItemToggle::create @ 0x18005cb06\n// > cocos2d::CCMenuItemToggle::create @ 0x18005cb5e\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bd018\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\nchar __fastcall cocos2d::CCMenuItemToggle::initWithItem(\n        cocos2d::CCMenuItemToggle *this,\n        struct cocos2d::CCMenuItem *a2)\n{\n  __int64 v3; // rbx\n  float *v5; // rax\n  __int64 v6; // rbx\n  struct cocos2d::CCArray *v7; // rax\n  __int64 v8; // rax\n  __int64 v9; // rdx\n  __int64 v10; // rdx\n  float v12; // [rsp+30h] [rbp+8h] BYREF\n\n  v3 = *(_QWORD *)this;\n  v5 = kmVec2Fill(&v12, 0.5, 0.5);\n  (*(void (__fastcall **)(cocos2d::CCMenuItemToggle *, float *))(v3 + 288))(this, v5);\n  v6 = *(_QWORD *)this;\n  *((_QWORD *)this + 44) = 0;\n  *((_QWORD *)this + 45) = 0;\n  *((_WORD *)this + 172) = 256;\n  v7 = cocos2d::CCArray::create();\n  (*(void (__fastcall **)(cocos2d::CCMenuItemToggle *, struct cocos2d::CCArray *))(v6 + 976))(this, v7);\n  if ( a2 )\n    cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 48), a2);\n  v8 = *(_QWORD *)this;\n  *((_DWORD *)this + 94) = -1;\n  (*(void (__fastcall **)(cocos2d::CCMenuItemToggle *, _QWORD))(v8 + 960))(this, 0);\n  LOBYTE(v9) = 1;\n  (*(void (__fastcall **)(char *, __int64))(*((_QWORD *)this + 40) + 72LL))((char *)this + 320, v9);\n  LOBYTE(v10) = 1;\n  (*(void (__fastcall **)(char *, __int64))(*((_QWORD *)this + 40) + 96LL))((char *)this + 320, v10);\n  return 1;\n}", "assembly": "; \n; cocos2d::CCMenuItemToggle::initWithItem from 0x18005cdf0 to 0x18005ceba (202 bytes)\n; \n; 4 xrefs:\n; > cocos2d::CCMenuItemToggle::create @ 0x18005cb06\n; > cocos2d::CCMenuItemToggle::create @ 0x18005cb5e\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bd018\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; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x18005cdf0\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x18005cdf5\npush    rdi                                                            ; +0xa, 0x18005cdfa\nsub     rsp, 20h                                                       ; +0xb, 0x18005cdfb\nmovss   xmm1, cs:dword_1800EC358                                       ; +0xf, 0x18005cdff\nmov     rdi, rcx                                                       ; +0x17, 0x18005ce07\nmov     rbx, [rcx]                                                     ; +0x1a, 0x18005ce0a\nmovaps  xmm2, xmm1                                                     ; +0x1d, 0x18005ce0d\nlea     rcx, [rsp+28h+arg_0]                                           ; +0x20, 0x18005ce10\nmov     rsi, rdx                                                       ; +0x25, 0x18005ce15\ncall    kmVec2Fill                                                     ; +0x28, 0x18005ce18\nmov     rdx, rax                                                       ; +0x2d, 0x18005ce1d\nmov     rcx, rdi                                                       ; +0x30, 0x18005ce20\ncall    qword ptr [rbx+120h]                                           ; +0x33, 0x18005ce23\nmov     rbx, [rdi]                                                     ; +0x39, 0x18005ce29\nxor     eax, eax                                                       ; +0x3c, 0x18005ce2c\nmov     [rdi+160h], rax                                                ; +0x3e, 0x18005ce2e\nmov     [rdi+168h], rax                                                ; +0x45, 0x18005ce35\nmov     word ptr [rdi+158h], 100h                                      ; +0x4c, 0x18005ce3c\ncall    ?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x55, 0x18005ce45\nmov     rdx, rax                                                       ; +0x5a, 0x18005ce4a\nmov     rcx, rdi                                                       ; +0x5d, 0x18005ce4d\ncall    qword ptr [rbx+3D0h]                                           ; +0x60, 0x18005ce50\ntest    rsi, rsi                                                       ; +0x66, 0x18005ce56\njz      short loc_18005CE6A                                            ; +0x69, 0x18005ce59\nmov     rcx, [rdi+180h]; this                                          ; +0x6b, 0x18005ce5b\nmov     rdx, rsi; struct cocos2d::CCObject *                           ; +0x72, 0x18005ce62\ncall    ?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x75, 0x18005ce65\nmov     rax, [rdi]                                                     ; +0x7a, 0x18005ce6a\nxor     edx, edx                                                       ; +0x7d, 0x18005ce6d\nmov     rcx, rdi                                                       ; +0x7f, 0x18005ce6f\nmov     dword ptr [rdi+178h], 0FFFFFFFFh                               ; +0x82, 0x18005ce72\ncall    qword ptr [rax+3C0h]                                           ; +0x8c, 0x18005ce7c\nmov     rax, [rdi+140h]                                                ; +0x92, 0x18005ce82\nlea     rcx, [rdi+140h]                                                ; +0x99, 0x18005ce89\nmov     dl, 1                                                          ; +0xa0, 0x18005ce90\ncall    qword ptr [rax+48h]                                            ; +0xa2, 0x18005ce92\nmov     rax, [rdi+140h]                                                ; +0xa5, 0x18005ce95\nlea     rcx, [rdi+140h]                                                ; +0xac, 0x18005ce9c\nmov     dl, 1                                                          ; +0xb3, 0x18005cea3\ncall    qword ptr [rax+60h]                                            ; +0xb5, 0x18005cea5\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xb8, 0x18005cea8\nmov     al, 1                                                          ; +0xbd, 0x18005cead\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xbf, 0x18005ceaf\nadd     rsp, 20h                                                       ; +0xc4, 0x18005ceb4\npop     rdi                                                            ; +0xc8, 0x18005ceb8\nretn                                                                   ; +0xc9, 0x18005ceb9", "xrefs": ["cocos2d::CCMenuItemToggle::create @ 0x18005cb06", "cocos2d::CCMenuItemToggle::create @ 0x18005cb5e", "<???> @ 0x18014cf68", "<???> @ 0x1801bd018"], "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"}