{"type": "func", "start": 6442834880, "end": 6442835131, "name": "cocos2d::CCMenuItemToggle::setSelectedIndex", "pseudocode": "// \n// cocos2d::CCMenuItemToggle::setSelectedIndex from 0x18005dbc0 to 0x18005dcbb (251 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x1800ff4a8\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bd21c\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::setSelectedIndex(cocos2d::CCMenuItemToggle *this, int a2)\n{\n  __int64 v4; // rax\n  __int64 v5; // rax\n  struct cocos2d::CCString *v6; // rdi\n  _DWORD *v7; // rax\n  __int64 v8; // rbx\n  float *v9; // rax\n  float v10; // [rsp+30h] [rbp+8h] BYREF\n  float v11; // [rsp+34h] [rbp+Ch]\n  float v12; // [rsp+40h] [rbp+18h] BYREF\n\n  if ( a2 != *((_DWORD *)this + 94) && (unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 48)) )\n  {\n    v4 = *(_QWORD *)this;\n    *((_DWORD *)this + 94) = a2;\n    v5 = (*(__int64 (__fastcall **)(cocos2d::CCMenuItemToggle *, __int64))(v4 + 472))(this, 3233828865LL);\n    if ( v5 )\n      (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v5 + 520LL))(v5, 0);\n    v6 = cocos2d::CCArray::stringAtIndex(*((cocos2d::CCArray **)this + 48), *((_DWORD *)this + 94));\n    (*(void (__fastcall **)(cocos2d::CCMenuItemToggle *, struct cocos2d::CCString *, _QWORD, __int64))(*(_QWORD *)this + 448LL))(\n      this,\n      v6,\n      0,\n      3233828865LL);\n    v7 = (_DWORD *)(*(__int64 (__fastcall **)(struct cocos2d::CCString *))(*(_QWORD *)v6 + 320LL))(v6);\n    cocos2d::cc_timeval::operator=(&v10, v7);\n    (*(void (__fastcall **)(cocos2d::CCMenuItemToggle *, float *))(*(_QWORD *)this + 312LL))(this, &v10);\n    v8 = *(_QWORD *)v6;\n    v9 = kmVec2Fill(&v12, v10 * 0.5, v11 * 0.5);\n    (*(void (__fastcall **)(struct cocos2d::CCString *, float *))(v8 + 184))(v6, v9);\n  }\n}", "assembly": "; \n; cocos2d::CCMenuItemToggle::setSelectedIndex from 0x18005dbc0 to 0x18005dcbb (251 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x1800ff4a8\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bd21c\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, 0x18005dbc0\npush    rdi                                                            ; +0x5, 0x18005dbc5\nsub     rsp, 20h                                                       ; +0x6, 0x18005dbc6\nmov     edi, edx                                                       ; +0xa, 0x18005dbca\nmov     rbx, rcx                                                       ; +0xc, 0x18005dbcc\ncmp     edx, [rcx+178h]                                                ; +0xf, 0x18005dbcf\njz      loc_18005DCB0                                                  ; +0x15, 0x18005dbd5\nmov     rcx, [rcx+180h]; this                                          ; +0x1b, 0x18005dbdb\ncall    ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x22, 0x18005dbe2\ntest    eax, eax                                                       ; +0x27, 0x18005dbe7\njz      loc_18005DCB0                                                  ; +0x29, 0x18005dbe9\nmov     rax, [rbx]                                                     ; +0x2f, 0x18005dbef\nmov     edx, 0C0C05001h                                                ; +0x32, 0x18005dbf2\nmov     rcx, rbx                                                       ; +0x37, 0x18005dbf7\nmov     [rbx+178h], edi                                                ; +0x3a, 0x18005dbfa\ncall    qword ptr [rax+1D8h]                                           ; +0x40, 0x18005dc00\ntest    rax, rax                                                       ; +0x46, 0x18005dc06\njz      short loc_18005DC1D                                            ; +0x49, 0x18005dc09\nmov     rcx, [rax]                                                     ; +0x4b, 0x18005dc0b\nxor     edx, edx                                                       ; +0x4e, 0x18005dc0e\nmov     r8, [rcx+208h]                                                 ; +0x50, 0x18005dc10\nmov     rcx, rax                                                       ; +0x57, 0x18005dc17\ncall    r8                                                             ; +0x5a, 0x18005dc1a\nmov     edx, [rbx+178h]; unsigned int                                  ; +0x5d, 0x18005dc1d\nmov     rcx, [rbx+180h]; this                                          ; +0x63, 0x18005dc23\ncall    ?stringAtIndex@CCArray@cocos2d@@QEAAPEAVCCString@2@I@Z; cocos2d::CCArray::stringAtIndex(uint) ; +0x6a, 0x18005dc2a\nmov     rcx, [rbx]                                                     ; +0x6f, 0x18005dc2f\nmov     r9d, 0C0C05001h                                                ; +0x72, 0x18005dc32\nxor     r8d, r8d                                                       ; +0x78, 0x18005dc38\nmov     rdx, rax                                                       ; +0x7b, 0x18005dc3b\nmov     rdi, rax                                                       ; +0x7e, 0x18005dc3e\nmov     r10, [rcx+1C0h]                                                ; +0x81, 0x18005dc41\nmov     rcx, rbx                                                       ; +0x88, 0x18005dc48\ncall    r10                                                            ; +0x8b, 0x18005dc4b\nmov     rcx, [rdi]                                                     ; +0x8e, 0x18005dc4e\nmov     rdx, [rcx+140h]                                                ; +0x91, 0x18005dc51\nmov     rcx, rdi                                                       ; +0x98, 0x18005dc58\ncall    rdx                                                            ; +0x9b, 0x18005dc5b\nmov     rdx, rax                                                       ; +0x9d, 0x18005dc5d\nlea     rcx, [rsp+28h+arg_0]                                           ; +0xa0, 0x18005dc60\ncall    ??4cc_timeval@cocos2d@@QEAAAEAU01@$$QEAU01@@Z; cocos2d::cc_timeval::operator=(cocos2d::cc_timeval &&) ; +0xa5, 0x18005dc65\nmov     rax, [rbx]                                                     ; +0xaa, 0x18005dc6a\nlea     rdx, [rsp+28h+arg_0]                                           ; +0xad, 0x18005dc6d\nmov     rcx, rbx                                                       ; +0xb2, 0x18005dc72\ncall    qword ptr [rax+138h]                                           ; +0xb5, 0x18005dc75\nmovss   xmm2, [rsp+28h+arg_4]                                          ; +0xbb, 0x18005dc7b\nlea     rcx, [rsp+28h+arg_10]                                          ; +0xc1, 0x18005dc81\nmovss   xmm1, [rsp+28h+arg_0]                                          ; +0xc6, 0x18005dc86\nmulss   xmm2, cs:dword_1800EC358                                       ; +0xcc, 0x18005dc8c\nmov     rbx, [rdi]                                                     ; +0xd4, 0x18005dc94\nmulss   xmm1, cs:dword_1800EC358                                       ; +0xd7, 0x18005dc97\ncall    kmVec2Fill                                                     ; +0xdf, 0x18005dc9f\nmov     rdx, rax                                                       ; +0xe4, 0x18005dca4\nmov     rcx, rdi                                                       ; +0xe7, 0x18005dca7\ncall    qword ptr [rbx+0B8h]                                           ; +0xea, 0x18005dcaa\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xf0, 0x18005dcb0\nadd     rsp, 20h                                                       ; +0xf5, 0x18005dcb5\npop     rdi                                                            ; +0xf9, 0x18005dcb9\nretn                                                                   ; +0xfa, 0x18005dcba", "xrefs": ["<???> @ 0x1800ff4a8", "<???> @ 0x18014cf68", "<???> @ 0x1801bd21c"], "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"}