{"type": "func", "start": 4295334800, "end": 4295335011, "name": "CCMenuItemToggler::selectedTouch", "pseudocode": "// \n// CCMenuItemToggler::selectedTouch from 0x100059b90 to 0x100059c63 (211 bytes)\n// \n// 1 xrefs:\n// > CCMenuItemToggler::init @ 0x1000598c1\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 CCMenuItemToggler::selectedTouch(CCMenuItemToggler *a1, cocos2d::CCObject *a2)\n{\n  __int64 v3; // rdi\n  __int64 v4; // rax\n  __int64 v5; // [rsp-28h] [rbp-28h] BYREF\n  float v6[8]; // [rsp-20h] [rbp-20h] BYREF\n\n  if ( !a1->m_notClickable )\n  {\n    a1->m_toggled = 0;\n    ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))a1->m_offButton->setVisible)(a1->m_offButton, 1);\n    ((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_onButton->setVisible)(a1->m_onButton, 0);\n    v3 = *((_QWORD *)&a1->m_offButton + a1->m_toggled);\n    v4 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 312LL))(v3);\n    sub_10028CFC0(v6, v4);\n    ((void (__fastcall *)(CCMenuItemToggler *, float *))a1->setContentSize)(a1, v6);\n    sub_10028CBE0(&v5, v6[0] * 0.5, 0.5 * v6[1]);\n    ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64 *))a1->m_offButton->setPosition)(a1->m_offButton, &v5);\n    ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64 *))a1->m_onButton->setPosition)(a1->m_onButton, &v5);\n  }\n}", "assembly": "; \n; CCMenuItemToggler::selectedTouch from 0x100059b90 to 0x100059c63 (211 bytes)\n; \n; 1 xrefs:\n; > CCMenuItemToggler::init @ 0x1000598c1\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\ncmp     byte ptr [rdi+189h], 0                                         ; +0x0, 0x100059b90\njnz     locret_100059C62                                               ; +0x7, 0x100059b97\npush    rbp                                                            ; +0xd, 0x100059b9d\nmov     rbp, rsp                                                       ; +0xe, 0x100059b9e\npush    r14                                                            ; +0x11, 0x100059ba1\npush    rbx                                                            ; +0x13, 0x100059ba3\nsub     rsp, 10h                                                       ; +0x14, 0x100059ba4\nmov     byte ptr [rdi+188h], 0                                         ; +0x18, 0x100059ba8\nmov     rax, [rdi+178h]                                                ; +0x1f, 0x100059baf\nmov     rcx, [rax]                                                     ; +0x26, 0x100059bb6\nmov     rbx, rdi                                                       ; +0x29, 0x100059bb9\nmov     rdi, rax                                                       ; +0x2c, 0x100059bbc\nmov     esi, 1                                                         ; +0x2f, 0x100059bbf\ncall    qword ptr [rcx+148h]                                           ; +0x34, 0x100059bc4\nmov     rdi, [rbx+180h]                                                ; +0x3a, 0x100059bca\nmov     rax, [rdi]                                                     ; +0x41, 0x100059bd1\nxor     esi, esi                                                       ; +0x44, 0x100059bd4\ncall    qword ptr [rax+148h]                                           ; +0x46, 0x100059bd6\nmovzx   eax, byte ptr [rbx+188h]                                       ; +0x4c, 0x100059bdc\nmov     rdi, [rbx+rax*8+178h]                                          ; +0x53, 0x100059be3\nmov     rax, [rdi]                                                     ; +0x5b, 0x100059beb\ncall    qword ptr [rax+138h]                                           ; +0x5e, 0x100059bee\nlea     r14, [rbp-18h]                                                 ; +0x64, 0x100059bf4\nmov     rdi, r14                                                       ; +0x68, 0x100059bf8\nmov     rsi, rax                                                       ; +0x6b, 0x100059bfb\ncall    sub_10028CFC0                                                  ; +0x6e, 0x100059bfe\nmov     rax, [rbx]                                                     ; +0x73, 0x100059c03\nmov     rdi, rbx                                                       ; +0x76, 0x100059c06\nmov     rsi, r14                                                       ; +0x79, 0x100059c09\ncall    qword ptr [rax+130h]                                           ; +0x7c, 0x100059c0c\nmovss   xmm1, cs:dword_100814FA8                                       ; +0x82, 0x100059c12\nmovss   xmm0, dword ptr [rbp-18h]                                      ; +0x8a, 0x100059c1a\nmulss   xmm0, xmm1                                                     ; +0x8f, 0x100059c1f\nmulss   xmm1, dword ptr [rbp-14h]                                      ; +0x93, 0x100059c23\nlea     r14, [rbp-20h]                                                 ; +0x98, 0x100059c28\nmov     rdi, r14                                                       ; +0x9c, 0x100059c2c\ncall    sub_10028CBE0                                                  ; +0x9f, 0x100059c2f\nmov     rdi, [rbx+178h]                                                ; +0xa4, 0x100059c34\nmov     rax, [rdi]                                                     ; +0xab, 0x100059c3b\nmov     rsi, r14                                                       ; +0xae, 0x100059c3e\ncall    qword ptr [rax+0B8h]                                           ; +0xb1, 0x100059c41\nmov     rdi, [rbx+180h]                                                ; +0xb7, 0x100059c47\nmov     rax, [rdi]                                                     ; +0xbe, 0x100059c4e\nmov     rsi, r14                                                       ; +0xc1, 0x100059c51\ncall    qword ptr [rax+0B8h]                                           ; +0xc4, 0x100059c54\nadd     rsp, 10h                                                       ; +0xca, 0x100059c5a\npop     rbx                                                            ; +0xce, 0x100059c5e\npop     r14                                                            ; +0xcf, 0x100059c5f\npop     rbp                                                            ; +0xd1, 0x100059c61\nretn                                                                   ; +0xd2, 0x100059c62", "xrefs": ["CCMenuItemToggler::init @ 0x1000598c1"], "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"}