{"type": "func", "start": 6442502720, "end": 6442502889, "name": "cocos2d::extension::CCControlSwitch::setOn", "pseudocode": "// \n// cocos2d::extension::CCControlSwitch::setOn from 0x18000ca40 to 0x18000cae9 (169 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x18003053c\n// > <???> @ 0x18003054c\n// > <???> @ 0x180032408\n// > <???> @ 0x18004bc84\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 12:15:38 +0000\n// \n\nvoid __fastcall cocos2d::extension::CCControlSwitch::setOn(\n        cocos2d::extension::CCControlSwitch *this,\n        unsigned __int8 a2,\n        char a3)\n{\n  __int64 v4; // rax\n  float *v5; // rcx\n  cocos2d::CCNode *v6; // rbx\n  struct cocos2d::CCAction *v7; // rax\n  float v8; // xmm1_4\n  float v9; // xmm0_4\n\n  v4 = a2 ^ 1LL;\n  *((_BYTE *)this + 485) = a2;\n  v5 = *((float **)this + 59);\n  if ( a3 )\n  {\n    v6 = (cocos2d::CCNode *)v5;\n    v7 = cocos2d::CCActionTween::create(0.2, \"sliderXPosition\", v5[152], v5[v4 + 153]);\n    cocos2d::CCNode::runAction(v6, v7);\n  }\n  else\n  {\n    v8 = v5[v4 + 153];\n    v9 = v5[154];\n    if ( v9 < v8 )\n      v9 = fminf(v5[153], v8);\n    v5[152] = v9;\n    sub_18000C1C0((__int64)v5);\n  }\n  (*(void (__fastcall **)(cocos2d::extension::CCControlSwitch *, __int64))(*(_QWORD *)this + 1088LL))(this, 256);\n}", "assembly": "; \n; cocos2d::extension::CCControlSwitch::setOn from 0x18000ca40 to 0x18000cae9 (169 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x18003053c\n; > <???> @ 0x18003054c\n; > <???> @ 0x180032408\n; > <???> @ 0x18004bc84\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 12:15:38 +0000\n; \npush    rdi                                                            ; +0x0, 0x18000ca40\nsub     rsp, 20h                                                       ; +0x2, 0x18000ca42\nmovzx   eax, dl                                                        ; +0x6, 0x18000ca46\nmov     rdi, rcx                                                       ; +0x9, 0x18000ca49\nxor     rax, 1                                                         ; +0xc, 0x18000ca4c\nmov     [rcx+1E5h], dl                                                 ; +0x10, 0x18000ca50\nmov     rcx, [rcx+1D8h]                                                ; +0x16, 0x18000ca56\ntest    r8b, r8b                                                       ; +0x1d, 0x18000ca5d\njz      short loc_18000CAA3                                            ; +0x20, 0x18000ca60\nmovss   xmm2, dword ptr [rcx+260h]                                     ; +0x22, 0x18000ca62\nlea     rdx, aSliderxpositio; \"sliderXPosition\"                        ; +0x2a, 0x18000ca6a\nmovss   xmm0, cs:dword_18002BBD0                                       ; +0x31, 0x18000ca71\nmov     [rsp+28h+arg_0], rbx                                           ; +0x39, 0x18000ca79\nmov     rbx, rcx                                                       ; +0x3e, 0x18000ca7e\nmovss   xmm3, dword ptr [rcx+rax*4+264h]                               ; +0x41, 0x18000ca81\ncall    cs:?create@CCActionTween@cocos2d@@SAPEAV12@MPEBDMM@Z; cocos2d::CCActionTween::create(float,char const *,float,float) ; +0x4a, 0x18000ca8a\nmov     rdx, rax                                                       ; +0x50, 0x18000ca90\nmov     rcx, rbx                                                       ; +0x53, 0x18000ca93\ncall    cs:?runAction@CCNode@cocos2d@@QEAAPEAVCCAction@2@PEAV32@@Z; cocos2d::CCNode::runAction(cocos2d::CCAction *) ; +0x56, 0x18000ca96\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x5c, 0x18000ca9c\njmp     short loc_18000CAD2                                            ; +0x61, 0x18000caa1\nmovss   xmm1, dword ptr [rcx+rax*4+264h]                               ; +0x63, 0x18000caa3\nmovss   xmm0, dword ptr [rcx+268h]                                     ; +0x6c, 0x18000caac\ncomiss  xmm0, xmm1                                                     ; +0x74, 0x18000cab4\njnb     short loc_18000CAC5                                            ; +0x77, 0x18000cab7\nmovss   xmm0, dword ptr [rcx+264h]                                     ; +0x79, 0x18000cab9\nminss   xmm0, xmm1                                                     ; +0x81, 0x18000cac1\nmovss   dword ptr [rcx+260h], xmm0                                     ; +0x85, 0x18000cac5\ncall    sub_18000C1C0                                                  ; +0x8d, 0x18000cacd\nmov     rax, [rdi]                                                     ; +0x92, 0x18000cad2\nmov     edx, 100h                                                      ; +0x95, 0x18000cad5\nmov     rcx, rdi                                                       ; +0x9a, 0x18000cada\nadd     rsp, 20h                                                       ; +0x9d, 0x18000cadd\npop     rdi                                                            ; +0xa1, 0x18000cae1\njmp     qword ptr [rax+440h]                                           ; +0xa2, 0x18000cae2", "xrefs": ["<???> @ 0x18003053c", "<???> @ 0x18003054c", "<???> @ 0x180032408", "<???> @ 0x18004bc84"], "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"}