{"type": "func", "start": 6442503104, "end": 6442503628, "name": "cocos2d::extension::CCControlSwitch::initWithMaskSprite", "pseudocode": "// \n// cocos2d::extension::CCControlSwitch::initWithMaskSprite from 0x18000cbc0 to 0x18000cdcc (524 bytes)\n// \n// 5 xrefs:\n// > cocos2d::extension::CCControlSwitch::initWithMaskSprite @ 0x18000cafa\n// > cocos2d::extension::CCControlSwitch::create @ 0x18000cb78\n// > cocos2d::extension::CCControlSwitch::create @ 0x18000ce40\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x180049d98\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\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  char *v12; // rdi\n  __int64 *v13; // rcx\n  __int64 v14; // rbx\n  float v15; // xmm6_4\n  float *v16; // rax\n  __int64 v17; // rax\n  __int64 v18; // rbx\n  __int64 v19; // rax\n  __int64 v20; // rbx\n  __int64 v21; // rax\n  _QWORD v23[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 + 904LL))(this, v11);\n  *((_BYTE *)this + 485) = 1;\n  v12 = (char *)operator new(0x2A8u);\n  v23[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 + 40) = &cocos2d::extension::CCControlSwitchSprite::`vftable';\n  *((_QWORD *)v12 + 43) = &cocos2d::extension::CCControlSwitchSprite::`vftable';\n  *((_QWORD *)v12 + 75) = &cocos2d::extension::CCControlSwitchSprite::`vftable';\n  *((_QWORD *)v12 + 76) = 0;\n  *((_DWORD *)v12 + 154) = 0;\n  *((_QWORD *)v12 + 78) = 0;\n  *((_QWORD *)v12 + 79) = 0;\n  *((_QWORD *)v12 + 80) = 0;\n  *((_QWORD *)v12 + 81) = 0;\n  *((_QWORD *)v12 + 82) = 0;\n  *((_QWORD *)v12 + 83) = 0;\n  *((_QWORD *)v12 + 84) = 0;\n  *((_QWORD *)this + 59) = v12;\n  sub_18000C110((__int64 *)v12, (__int64)a2, a3, a4, a5, a6, a7);\n  v13 = *((__int64 **)this + 59);\n  v14 = *v13;\n  v15 = *(float *)((*(__int64 (__fastcall **)(__int64 *))(*v13 + 304))(v13) + 4);\n  v16 = (float *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 59) + 304LL))(*((_QWORD *)this + 59));\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, *v16 * 0.5, v15 * 0.5);\n  (*(void (__fastcall **)(_QWORD, __int64))(v14 + 184))(*((_QWORD *)this + 59), v17);\n  (*(void (__fastcall **)(cocos2d::extension::CCControlSwitch *, _QWORD))(*(_QWORD *)this + 448LL))(\n    this,\n    *((_QWORD *)this + 59));\n  (*(void (__fastcall **)(cocos2d::extension::CCControlSwitch *, _QWORD))(*(_QWORD *)this + 416LL))(this, 0);\n  v18 = *(_QWORD *)this;\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, 0.5, 0.5);\n  (*(void (__fastcall **)(cocos2d::extension::CCControlSwitch *, __int64))(v18 + 272))(this, v19);\n  v20 = *(_QWORD *)this;\n  v21 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 59) + 304LL))(*((_QWORD *)this + 59));\n  (*(void (__fastcall **)(cocos2d::extension::CCControlSwitch *, __int64))(v20 + 296))(this, v21);\n  return 1;\n}", "assembly": "; \n; cocos2d::extension::CCControlSwitch::initWithMaskSprite from 0x18000cbc0 to 0x18000cdcc (524 bytes)\n; \n; 5 xrefs:\n; > cocos2d::extension::CCControlSwitch::initWithMaskSprite @ 0x18000cafa\n; > cocos2d::extension::CCControlSwitch::create @ 0x18000cb78\n; > cocos2d::extension::CCControlSwitch::create @ 0x18000ce40\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x180049d98\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\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x18000cbc0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x18000cbc5\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x18000cbca\npush    rdi                                                            ; +0xf, 0x18000cbcf\npush    r14                                                            ; +0x10, 0x18000cbd0\npush    r15                                                            ; +0x12, 0x18000cbd2\nsub     rsp, 70h                                                       ; +0x14, 0x18000cbd4\nmovaps  [rsp+88h+var_28], xmm6                                         ; +0x18, 0x18000cbd8\nmovaps  [rsp+88h+var_38], xmm7                                         ; +0x1d, 0x18000cbdd\nmov     rbp, r9                                                        ; +0x22, 0x18000cbe2\nmov     r14, r8                                                        ; +0x25, 0x18000cbe5\nmov     r15, rdx                                                       ; +0x28, 0x18000cbe8\nmov     rsi, rcx                                                       ; +0x2b, 0x18000cbeb\ncall    ?init@CCControl@extension@cocos2d@@UEAA_NXZ; cocos2d::extension::CCControl::init(void) ; +0x2e, 0x18000cbee\ntest    al, al                                                         ; +0x33, 0x18000cbf3\njz      loc_18000CDA6                                                  ; +0x35, 0x18000cbf5\nmov     rax, [rsi]                                                     ; +0x3b, 0x18000cbfb\nmov     dl, 1                                                          ; +0x3e, 0x18000cbfe\nmov     rcx, rsi                                                       ; +0x40, 0x18000cc00\ncall    qword ptr [rax+388h]                                           ; +0x43, 0x18000cc03\nmov     byte ptr [rsi+1E5h], 1                                         ; +0x49, 0x18000cc09\nmov     ecx, 2A8h; Size                                                ; +0x50, 0x18000cc10\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x55, 0x18000cc15\nmov     rdi, rax                                                       ; +0x5a, 0x18000cc1a\nmov     [rsp+88h+var_48], rax                                          ; +0x5d, 0x18000cc1d\nmov     rcx, rax                                                       ; +0x62, 0x18000cc22\ncall    cs:??0CCSprite@cocos2d@@QEAA@XZ; cocos2d::CCSprite::CCSprite(void) ; +0x65, 0x18000cc25\nlea     rcx, [rdi+258h]                                                ; +0x6b, 0x18000cc2b\ncall    cs:??0CCActionTweenDelegate@cocos2d@@QEAA@XZ; cocos2d::CCActionTweenDelegate::CCActionTweenDelegate(void) ; +0x72, 0x18000cc32\nlea     rax, ??_7CCControlSwitchSprite@extension@cocos2d@@6B@; const cocos2d::extension::CCControlSwitchSprite::`vftable' ; +0x78, 0x18000cc38\nmov     [rdi], rax                                                     ; +0x7f, 0x18000cc3f\nlea     rax, ??_7CCControlSwitchSprite@extension@cocos2d@@6B@_0; const cocos2d::extension::CCControlSwitchSprite::`vftable' ; +0x82, 0x18000cc42\nmov     [rdi+140h], rax                                                ; +0x89, 0x18000cc49\nlea     rax, ??_7CCControlSwitchSprite@extension@cocos2d@@6B@_1; const cocos2d::extension::CCControlSwitchSprite::`vftable' ; +0x90, 0x18000cc50\nmov     [rdi+158h], rax                                                ; +0x97, 0x18000cc57\nlea     rax, ??_7CCControlSwitchSprite@extension@cocos2d@@6B@_2; const cocos2d::extension::CCControlSwitchSprite::`vftable' ; +0x9e, 0x18000cc5e\nmov     [rdi+258h], rax                                                ; +0xa5, 0x18000cc65\nxor     eax, eax                                                       ; +0xac, 0x18000cc6c\nmov     [rdi+260h], rax                                                ; +0xae, 0x18000cc6e\nmov     [rdi+268h], eax                                                ; +0xb5, 0x18000cc75\nmov     [rdi+270h], rax                                                ; +0xbb, 0x18000cc7b\nmov     [rdi+278h], rax                                                ; +0xc2, 0x18000cc82\nmov     [rdi+280h], rax                                                ; +0xc9, 0x18000cc89\nmov     [rdi+288h], rax                                                ; +0xd0, 0x18000cc90\nmov     [rdi+290h], rax                                                ; +0xd7, 0x18000cc97\nmov     [rdi+298h], rax                                                ; +0xde, 0x18000cc9e\nmov     [rdi+2A0h], rax                                                ; +0xe5, 0x18000cca5\nmov     [rsi+1D8h], rdi                                                ; +0xec, 0x18000ccac\nmov     rax, [rsp+88h+arg_30]                                          ; +0xf3, 0x18000ccb3\nmov     [rsp+88h+var_58], rax                                          ; +0xfb, 0x18000ccbb\nmov     rax, [rsp+88h+arg_28]                                          ; +0x100, 0x18000ccc0\nmov     [rsp+88h+var_60], rax                                          ; +0x108, 0x18000ccc8\nmov     rax, [rsp+88h+arg_20]                                          ; +0x10d, 0x18000cccd\nmov     [rsp+88h+var_68], rax                                          ; +0x115, 0x18000ccd5\nmov     r9, rbp                                                        ; +0x11a, 0x18000ccda\nmov     r8, r14                                                        ; +0x11d, 0x18000ccdd\nmov     rdx, r15                                                       ; +0x120, 0x18000cce0\nmov     rcx, rdi                                                       ; +0x123, 0x18000cce3\ncall    sub_18000C110                                                  ; +0x126, 0x18000cce6\nmov     rcx, [rsi+1D8h]                                                ; +0x12b, 0x18000cceb\nmov     rbx, [rcx]                                                     ; +0x132, 0x18000ccf2\ncall    qword ptr [rbx+130h]                                           ; +0x135, 0x18000ccf5\nmovss   xmm6, dword ptr [rax+4]                                        ; +0x13b, 0x18000ccfb\nmov     rcx, [rsi+1D8h]                                                ; +0x140, 0x18000cd00\nmov     rax, [rcx]                                                     ; +0x147, 0x18000cd07\ncall    qword ptr [rax+130h]                                           ; +0x14a, 0x18000cd0a\nmovss   xmm7, cs:dword_180029510                                       ; +0x150, 0x18000cd10\nmulss   xmm6, xmm7                                                     ; +0x158, 0x18000cd18\nmovss   xmm1, dword ptr [rax]                                          ; +0x15c, 0x18000cd1c\nmulss   xmm1, xmm7                                                     ; +0x160, 0x18000cd20\nmovaps  xmm2, xmm6                                                     ; +0x164, 0x18000cd24\nlea     rcx, [rsp+88h+var_48]                                          ; +0x167, 0x18000cd27\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x16c, 0x18000cd2c\nmov     rdx, rax                                                       ; +0x172, 0x18000cd32\nmov     rcx, [rsi+1D8h]                                                ; +0x175, 0x18000cd35\ncall    qword ptr [rbx+0B8h]                                           ; +0x17c, 0x18000cd3c\nmov     rax, [rsi]                                                     ; +0x182, 0x18000cd42\nmov     rdx, [rsi+1D8h]                                                ; +0x185, 0x18000cd45\nmov     rcx, rsi                                                       ; +0x18c, 0x18000cd4c\ncall    qword ptr [rax+1C0h]                                           ; +0x18f, 0x18000cd4f\nmov     rax, [rsi]                                                     ; +0x195, 0x18000cd55\nxor     edx, edx                                                       ; +0x198, 0x18000cd58\nmov     rcx, rsi                                                       ; +0x19a, 0x18000cd5a\ncall    qword ptr [rax+1A0h]                                           ; +0x19d, 0x18000cd5d\nmov     rbx, [rsi]                                                     ; +0x1a3, 0x18000cd63\nmovaps  xmm2, xmm7                                                     ; +0x1a6, 0x18000cd66\nmovaps  xmm1, xmm7                                                     ; +0x1a9, 0x18000cd69\nlea     rcx, [rsp+88h+var_48]                                          ; +0x1ac, 0x18000cd6c\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x1b1, 0x18000cd71\nmov     rdx, rax                                                       ; +0x1b7, 0x18000cd77\nmov     rcx, rsi                                                       ; +0x1ba, 0x18000cd7a\ncall    qword ptr [rbx+110h]                                           ; +0x1bd, 0x18000cd7d\nmov     rbx, [rsi]                                                     ; +0x1c3, 0x18000cd83\nmov     rcx, [rsi+1D8h]                                                ; +0x1c6, 0x18000cd86\nmov     rax, [rcx]                                                     ; +0x1cd, 0x18000cd8d\ncall    qword ptr [rax+130h]                                           ; +0x1d0, 0x18000cd90\nmov     rdx, rax                                                       ; +0x1d6, 0x18000cd96\nmov     rcx, rsi                                                       ; +0x1d9, 0x18000cd99\ncall    qword ptr [rbx+128h]                                           ; +0x1dc, 0x18000cd9c\nmov     al, 1                                                          ; +0x1e2, 0x18000cda2\njmp     short loc_18000CDA8                                            ; +0x1e4, 0x18000cda4\nxor     al, al                                                         ; +0x1e6, 0x18000cda6\nlea     r11, [rsp+88h+var_18]                                          ; +0x1e8, 0x18000cda8\nmov     rbx, [r11+20h]                                                 ; +0x1ed, 0x18000cdad\nmov     rbp, [r11+28h]                                                 ; +0x1f1, 0x18000cdb1\nmov     rsi, [r11+30h]                                                 ; +0x1f5, 0x18000cdb5\nmovaps  xmm6, [rsp+88h+var_28]                                         ; +0x1f9, 0x18000cdb9\nmovaps  xmm7, [rsp+88h+var_38]                                         ; +0x1fe, 0x18000cdbe\nmov     rsp, r11                                                       ; +0x203, 0x18000cdc3\npop     r15                                                            ; +0x206, 0x18000cdc6\npop     r14                                                            ; +0x208, 0x18000cdc8\npop     rdi                                                            ; +0x20a, 0x18000cdca\nretn                                                                   ; +0x20b, 0x18000cdcb", "xrefs": ["cocos2d::extension::CCControlSwitch::initWithMaskSprite @ 0x18000cafa", "cocos2d::extension::CCControlSwitch::create @ 0x18000cb78", "cocos2d::extension::CCControlSwitch::create @ 0x18000ce40", "<???> @ 0x18002fdf8", "<???> @ 0x180049d98"], "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"}