{"type": "func", "start": 6442501904, "end": 6442502431, "name": "cocos2d::extension::CCControlSwitch::initWithMaskSprite", "pseudocode": "// \n// cocos2d::extension::CCControlSwitch::initWithMaskSprite from 0x18000c710 to 0x18000c91f (527 bytes)\n// \n// 5 xrefs:\n// > cocos2d::extension::CCControlSwitch::initWithMaskSprite @ 0x18000c64a\n// > cocos2d::extension::CCControlSwitch::create @ 0x18000c6c8\n// > cocos2d::extension::CCControlSwitch::create @ 0x18000c990\n// > <???> @ 0x180032408\n// > <???> @ 0x18004bc60\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\n// Hidden C++ exception states: #wind=1\nchar __fastcall cocos2d::extension::CCControlSwitch::initWithMaskSprite(\n        cocos2d::extension::CCControlSwitch *this,\n        struct cocos2d::CCSprite *a2,\n        struct cocos2d::CCSprite *a3,\n        struct cocos2d::CCSprite *a4,\n        struct cocos2d::CCSprite *a5,\n        struct cocos2d::CCLabelTTF *a6,\n        struct cocos2d::CCLabelTTF *a7)\n{\n  __int64 v11; // rdx\n  __int64 v12; // rdi\n  __int64 *v13; // rcx\n  __int64 v14; // rdi\n  float v15; // xmm6_4\n  float *v16; // rax\n  __int64 v17; // rbx\n  __int64 v18; // rax\n  __int64 v19; // rbx\n  __int64 v20; // rax\n  __int64 v21; // rbx\n  __int64 v22; // rax\n  _QWORD v24[2]; // [rsp+40h] [rbp-48h] BYREF\n\n  if ( !cocos2d::extension::CCControl::init(this) )\n    return 0;\n  LOBYTE(v11) = 1;\n  (*(void (__fastcall **)(cocos2d::extension::CCControlSwitch *, __int64))(*(_QWORD *)this + 920LL))(this, v11);\n  *((_BYTE *)this + 485) = 1;\n  v12 = sub_18001F040(0x2A8u);\n  v24[0] = v12;\n  cocos2d::CCSprite::CCSprite((cocos2d::CCSprite *)v12);\n  cocos2d::CCActionTweenDelegate::CCActionTweenDelegate((cocos2d::CCActionTweenDelegate *)(v12 + 600));\n  *(_QWORD *)v12 = &cocos2d::extension::CCControlSwitchSprite::`vftable';\n  *(_QWORD *)(v12 + 320) = &cocos2d::extension::CCControlSwitchSprite::`vftable';\n  *(_QWORD *)(v12 + 344) = &cocos2d::extension::CCControlSwitchSprite::`vftable';\n  *(_QWORD *)(v12 + 600) = &cocos2d::extension::CCControlSwitchSprite::`vftable';\n  *(_QWORD *)(v12 + 608) = 0;\n  *(_DWORD *)(v12 + 616) = 0;\n  *(_QWORD *)(v12 + 624) = 0;\n  *(_QWORD *)(v12 + 632) = 0;\n  *(_QWORD *)(v12 + 640) = 0;\n  *(_QWORD *)(v12 + 648) = 0;\n  *(_QWORD *)(v12 + 656) = 0;\n  *(_QWORD *)(v12 + 664) = 0;\n  *(_QWORD *)(v12 + 672) = 0;\n  *((_QWORD *)this + 59) = v12;\n  sub_18000BC20((__int64 *)v12, (__int64)a2, a3, a4, a5, a6, a7);\n  v13 = *((__int64 **)this + 59);\n  v14 = *v13;\n  v15 = *(float *)((*(__int64 (__fastcall **)(__int64 *))(*v13 + 320))(v13) + 4) * 0.5;\n  v16 = (float *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 59) + 320LL))(*((_QWORD *)this + 59));\n  v17 = *((_QWORD *)this + 59);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v24, *v16 * 0.5, v15);\n  (*(void (__fastcall **)(__int64, __int64))(v14 + 184))(v17, v18);\n  (*(void (__fastcall **)(cocos2d::extension::CCControlSwitch *, _QWORD))(*(_QWORD *)this + 464LL))(\n    this,\n    *((_QWORD *)this + 59));\n  (*(void (__fastcall **)(cocos2d::extension::CCControlSwitch *, _QWORD))(*(_QWORD *)this + 432LL))(this, 0);\n  v19 = *(_QWORD *)this;\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v24, 0.5, 0.5);\n  (*(void (__fastcall **)(cocos2d::extension::CCControlSwitch *, __int64))(v19 + 288))(this, v20);\n  v21 = *(_QWORD *)this;\n  v22 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 59) + 320LL))(*((_QWORD *)this + 59));\n  (*(void (__fastcall **)(cocos2d::extension::CCControlSwitch *, __int64))(v21 + 312))(this, v22);\n  return 1;\n}", "assembly": "; \n; cocos2d::extension::CCControlSwitch::initWithMaskSprite from 0x18000c710 to 0x18000c91f (527 bytes)\n; \n; 5 xrefs:\n; > cocos2d::extension::CCControlSwitch::initWithMaskSprite @ 0x18000c64a\n; > cocos2d::extension::CCControlSwitch::create @ 0x18000c6c8\n; > cocos2d::extension::CCControlSwitch::create @ 0x18000c990\n; > <???> @ 0x180032408\n; > <???> @ 0x18004bc60\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; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x18000c710\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x18000c715\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x18000c71a\npush    rdi                                                            ; +0xf, 0x18000c71f\npush    r14                                                            ; +0x10, 0x18000c720\npush    r15                                                            ; +0x12, 0x18000c722\nsub     rsp, 70h                                                       ; +0x14, 0x18000c724\nmovaps  [rsp+88h+var_28], xmm6                                         ; +0x18, 0x18000c728\nmovaps  [rsp+88h+var_38], xmm7                                         ; +0x1d, 0x18000c72d\nmov     rbp, r9                                                        ; +0x22, 0x18000c732\nmov     r14, r8                                                        ; +0x25, 0x18000c735\nmov     r15, rdx                                                       ; +0x28, 0x18000c738\nmov     rsi, rcx                                                       ; +0x2b, 0x18000c73b\ncall    ?init@CCControl@extension@cocos2d@@UEAA_NXZ; cocos2d::extension::CCControl::init(void) ; +0x2e, 0x18000c73e\ntest    al, al                                                         ; +0x33, 0x18000c743\njz      loc_18000C8F9                                                  ; +0x35, 0x18000c745\nmov     rax, [rsi]                                                     ; +0x3b, 0x18000c74b\nmov     dl, 1                                                          ; +0x3e, 0x18000c74e\nmov     rcx, rsi                                                       ; +0x40, 0x18000c750\ncall    qword ptr [rax+398h]                                           ; +0x43, 0x18000c753\nmov     byte ptr [rsi+1E5h], 1                                         ; +0x49, 0x18000c759\nmov     ecx, 2A8h; Size                                                ; +0x50, 0x18000c760\ncall    sub_18001F040                                                  ; +0x55, 0x18000c765\nmov     rdi, rax                                                       ; +0x5a, 0x18000c76a\nmov     [rsp+88h+var_48], rax                                          ; +0x5d, 0x18000c76d\nmov     rcx, rax                                                       ; +0x62, 0x18000c772\ncall    cs:??0CCSprite@cocos2d@@QEAA@XZ; cocos2d::CCSprite::CCSprite(void) ; +0x65, 0x18000c775\nlea     rcx, [rdi+258h]                                                ; +0x6b, 0x18000c77b\ncall    cs:??0CCActionTweenDelegate@cocos2d@@QEAA@XZ; cocos2d::CCActionTweenDelegate::CCActionTweenDelegate(void) ; +0x72, 0x18000c782\nlea     rax, ??_7CCControlSwitchSprite@extension@cocos2d@@6B@; const cocos2d::extension::CCControlSwitchSprite::`vftable' ; +0x78, 0x18000c788\nmov     [rdi], rax                                                     ; +0x7f, 0x18000c78f\nlea     rax, ??_7CCControlSwitchSprite@extension@cocos2d@@6B@_0; const cocos2d::extension::CCControlSwitchSprite::`vftable' ; +0x82, 0x18000c792\nmov     [rdi+140h], rax                                                ; +0x89, 0x18000c799\nlea     rax, ??_7CCControlSwitchSprite@extension@cocos2d@@6B@_1; const cocos2d::extension::CCControlSwitchSprite::`vftable' ; +0x90, 0x18000c7a0\nmov     [rdi+158h], rax                                                ; +0x97, 0x18000c7a7\nlea     rax, ??_7CCControlSwitchSprite@extension@cocos2d@@6B@_2; const cocos2d::extension::CCControlSwitchSprite::`vftable' ; +0x9e, 0x18000c7ae\nmov     [rdi+258h], rax                                                ; +0xa5, 0x18000c7b5\nxor     eax, eax                                                       ; +0xac, 0x18000c7bc\nmov     [rdi+260h], rax                                                ; +0xae, 0x18000c7be\nmov     [rdi+268h], eax                                                ; +0xb5, 0x18000c7c5\nmov     [rdi+270h], rax                                                ; +0xbb, 0x18000c7cb\nmov     [rdi+278h], rax                                                ; +0xc2, 0x18000c7d2\nmov     [rdi+280h], rax                                                ; +0xc9, 0x18000c7d9\nmov     [rdi+288h], rax                                                ; +0xd0, 0x18000c7e0\nmov     [rdi+290h], rax                                                ; +0xd7, 0x18000c7e7\nmov     [rdi+298h], rax                                                ; +0xde, 0x18000c7ee\nmov     [rdi+2A0h], rax                                                ; +0xe5, 0x18000c7f5\nmov     [rsi+1D8h], rdi                                                ; +0xec, 0x18000c7fc\nmov     rax, [rsp+88h+arg_30]                                          ; +0xf3, 0x18000c803\nmov     [rsp+88h+var_58], rax                                          ; +0xfb, 0x18000c80b\nmov     rax, [rsp+88h+arg_28]                                          ; +0x100, 0x18000c810\nmov     [rsp+88h+var_60], rax                                          ; +0x108, 0x18000c818\nmov     rax, [rsp+88h+arg_20]                                          ; +0x10d, 0x18000c81d\nmov     [rsp+88h+var_68], rax                                          ; +0x115, 0x18000c825\nmov     r9, rbp                                                        ; +0x11a, 0x18000c82a\nmov     r8, r14                                                        ; +0x11d, 0x18000c82d\nmov     rdx, r15                                                       ; +0x120, 0x18000c830\nmov     rcx, rdi                                                       ; +0x123, 0x18000c833\ncall    sub_18000BC20                                                  ; +0x126, 0x18000c836\nmov     rcx, [rsi+1D8h]                                                ; +0x12b, 0x18000c83b\nmov     rdi, [rcx]                                                     ; +0x132, 0x18000c842\ncall    qword ptr [rdi+140h]                                           ; +0x135, 0x18000c845\nmovss   xmm6, dword ptr [rax+4]                                        ; +0x13b, 0x18000c84b\nmovss   xmm7, cs:dword_18002BBD8                                       ; +0x140, 0x18000c850\nmulss   xmm6, xmm7                                                     ; +0x148, 0x18000c858\nmov     rcx, [rsi+1D8h]                                                ; +0x14c, 0x18000c85c\nmov     rax, [rcx]                                                     ; +0x153, 0x18000c863\ncall    qword ptr [rax+140h]                                           ; +0x156, 0x18000c866\nmov     rbx, [rsi+1D8h]                                                ; +0x15c, 0x18000c86c\nmovss   xmm1, dword ptr [rax]                                          ; +0x163, 0x18000c873\nmulss   xmm1, xmm7                                                     ; +0x167, 0x18000c877\nmovaps  xmm2, xmm6                                                     ; +0x16b, 0x18000c87b\nlea     rcx, [rsp+88h+var_48]                                          ; +0x16e, 0x18000c87e\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x173, 0x18000c883\nmov     rdx, rax                                                       ; +0x179, 0x18000c889\nmov     rcx, rbx                                                       ; +0x17c, 0x18000c88c\ncall    qword ptr [rdi+0B8h]                                           ; +0x17f, 0x18000c88f\nmov     rax, [rsi]                                                     ; +0x185, 0x18000c895\nmov     rdx, [rsi+1D8h]                                                ; +0x188, 0x18000c898\nmov     rcx, rsi                                                       ; +0x18f, 0x18000c89f\ncall    qword ptr [rax+1D0h]                                           ; +0x192, 0x18000c8a2\nmov     rax, [rsi]                                                     ; +0x198, 0x18000c8a8\nxor     edx, edx                                                       ; +0x19b, 0x18000c8ab\nmov     rcx, rsi                                                       ; +0x19d, 0x18000c8ad\ncall    qword ptr [rax+1B0h]                                           ; +0x1a0, 0x18000c8b0\nmov     rbx, [rsi]                                                     ; +0x1a6, 0x18000c8b6\nmovaps  xmm2, xmm7                                                     ; +0x1a9, 0x18000c8b9\nmovaps  xmm1, xmm7                                                     ; +0x1ac, 0x18000c8bc\nlea     rcx, [rsp+88h+var_48]                                          ; +0x1af, 0x18000c8bf\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x1b4, 0x18000c8c4\nmov     rdx, rax                                                       ; +0x1ba, 0x18000c8ca\nmov     rcx, rsi                                                       ; +0x1bd, 0x18000c8cd\ncall    qword ptr [rbx+120h]                                           ; +0x1c0, 0x18000c8d0\nmov     rbx, [rsi]                                                     ; +0x1c6, 0x18000c8d6\nmov     rcx, [rsi+1D8h]                                                ; +0x1c9, 0x18000c8d9\nmov     rax, [rcx]                                                     ; +0x1d0, 0x18000c8e0\ncall    qword ptr [rax+140h]                                           ; +0x1d3, 0x18000c8e3\nmov     rdx, rax                                                       ; +0x1d9, 0x18000c8e9\nmov     rcx, rsi                                                       ; +0x1dc, 0x18000c8ec\ncall    qword ptr [rbx+138h]                                           ; +0x1df, 0x18000c8ef\nmov     al, 1                                                          ; +0x1e5, 0x18000c8f5\njmp     short loc_18000C8FB                                            ; +0x1e7, 0x18000c8f7\nxor     al, al                                                         ; +0x1e9, 0x18000c8f9\nlea     r11, [rsp+88h+var_18]                                          ; +0x1eb, 0x18000c8fb\nmov     rbx, [r11+20h]                                                 ; +0x1f0, 0x18000c900\nmov     rbp, [r11+28h]                                                 ; +0x1f4, 0x18000c904\nmov     rsi, [r11+30h]                                                 ; +0x1f8, 0x18000c908\nmovaps  xmm6, [rsp+88h+var_28]                                         ; +0x1fc, 0x18000c90c\nmovaps  xmm7, [rsp+88h+var_38]                                         ; +0x201, 0x18000c911\nmov     rsp, r11                                                       ; +0x206, 0x18000c916\npop     r15                                                            ; +0x209, 0x18000c919\npop     r14                                                            ; +0x20b, 0x18000c91b\npop     rdi                                                            ; +0x20d, 0x18000c91d\nretn                                                                   ; +0x20e, 0x18000c91e", "xrefs": ["cocos2d::extension::CCControlSwitch::initWithMaskSprite @ 0x18000c64a", "cocos2d::extension::CCControlSwitch::create @ 0x18000c6c8", "cocos2d::extension::CCControlSwitch::create @ 0x18000c990", "<???> @ 0x180032408", "<???> @ 0x18004bc60"], "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"}