{"type": "func", "start": 6442501728, "end": 6442501895, "name": "cocos2d::extension::CCControlSwitch::create", "pseudocode": "// \n// cocos2d::extension::CCControlSwitch::create from 0x18000c660 to 0x18000c707 (167 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x180032408\n// > <???> @ 0x18004bc54\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\nstruct cocos2d::extension::CCControlSwitch *__fastcall cocos2d::extension::CCControlSwitch::create(\n        struct cocos2d::CCSprite *a1,\n        struct cocos2d::CCSprite *a2,\n        struct cocos2d::CCSprite *a3,\n        struct cocos2d::CCSprite *a4)\n{\n  cocos2d::extension::CCControlSwitch *v8; // rax\n  cocos2d::CCObject *v9; // rbx\n  cocos2d::extension::CCControlSwitch *v11; // [rsp+40h] [rbp-18h]\n\n  v11 = (cocos2d::extension::CCControlSwitch *)sub_18001F040(0x1E8u);\n  v8 = cocos2d::extension::CCControlSwitch::CCControlSwitch(v11);\n  v9 = v8;\n  if ( v8 )\n  {\n    if ( cocos2d::extension::CCControlSwitch::initWithMaskSprite(v8, a1, a2, a3, a4, nullptr, nullptr) )\n    {\n      cocos2d::CCObject::autorelease(v9);\n    }\n    else\n    {\n      (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v9 + 8LL))(v9, 1);\n      return nullptr;\n    }\n  }\n  return v9;\n}", "assembly": "; \n; cocos2d::extension::CCControlSwitch::create from 0x18000c660 to 0x18000c707 (167 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x180032408\n; > <???> @ 0x18004bc54\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, 0x18000c660\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x18000c665\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x18000c66a\nmov     [rsp+arg_18], rdi                                              ; +0xf, 0x18000c66f\npush    r14                                                            ; +0x14, 0x18000c674\nsub     rsp, 50h                                                       ; +0x16, 0x18000c676\nmov     rdi, r9                                                        ; +0x1a, 0x18000c67a\nmov     rsi, r8                                                        ; +0x1d, 0x18000c67d\nmov     rbp, rdx                                                       ; +0x20, 0x18000c680\nmov     r14, rcx                                                       ; +0x23, 0x18000c683\nmov     ecx, 1E8h; Size                                                ; +0x26, 0x18000c686\ncall    sub_18001F040                                                  ; +0x2b, 0x18000c68b\nmov     [rsp+58h+var_18], rax                                          ; +0x30, 0x18000c690\nmov     rcx, rax; this                                                 ; +0x35, 0x18000c695\ncall    ??0CCControlSwitch@extension@cocos2d@@QEAA@XZ; cocos2d::extension::CCControlSwitch::CCControlSwitch(void) ; +0x38, 0x18000c698\nmov     rbx, rax                                                       ; +0x3d, 0x18000c69d\ntest    rax, rax                                                       ; +0x40, 0x18000c6a0\njz      short loc_18000C6E9                                            ; +0x43, 0x18000c6a3\nmov     [rsp+58h+var_28], 0; struct cocos2d::CCLabelTTF *              ; +0x45, 0x18000c6a5\nmov     [rsp+58h+var_30], 0; struct cocos2d::CCLabelTTF *              ; +0x4e, 0x18000c6ae\nmov     [rsp+58h+var_38], rdi; struct cocos2d::CCSprite *              ; +0x57, 0x18000c6b7\nmov     r9, rsi; struct cocos2d::CCSprite *                            ; +0x5c, 0x18000c6bc\nmov     r8, rbp; struct cocos2d::CCSprite *                            ; +0x5f, 0x18000c6bf\nmov     rdx, r14; struct cocos2d::CCSprite *                           ; +0x62, 0x18000c6c2\nmov     rcx, rax; this                                                 ; +0x65, 0x18000c6c5\ncall    ?initWithMaskSprite@CCControlSwitch@extension@cocos2d@@QEAA_NPEAVCCSprite@3@000PEAVCCLabelTTF@3@1@Z; cocos2d::extension::CCControlSwitch::initWithMaskSprite(cocos2d::CCSprite *,cocos2d::CCSprite *,cocos2d::CCSprite *,cocos2d::CCSprite *,cocos2d::CCLabelTTF *,cocos2d::CCLabelTTF *) ; +0x68, 0x18000c6c8\nmov     rcx, rbx                                                       ; +0x6d, 0x18000c6cd\ntest    al, al                                                         ; +0x70, 0x18000c6d0\njz      short loc_18000C6DC                                            ; +0x72, 0x18000c6d2\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x74, 0x18000c6d4\njmp     short loc_18000C6E9                                            ; +0x7a, 0x18000c6da\nmov     rax, [rbx]                                                     ; +0x7c, 0x18000c6dc\nmov     edx, 1                                                         ; +0x7f, 0x18000c6df\ncall    qword ptr [rax+8]                                              ; +0x84, 0x18000c6e4\nxor     ebx, ebx                                                       ; +0x87, 0x18000c6e7\nmov     rax, rbx                                                       ; +0x89, 0x18000c6e9\nmov     rbx, [rsp+58h+arg_0]                                           ; +0x8c, 0x18000c6ec\nmov     rbp, [rsp+58h+arg_8]                                           ; +0x91, 0x18000c6f1\nmov     rsi, [rsp+58h+arg_10]                                          ; +0x96, 0x18000c6f6\nmov     rdi, [rsp+58h+arg_18]                                          ; +0x9b, 0x18000c6fb\nadd     rsp, 50h                                                       ; +0xa0, 0x18000c700\npop     r14                                                            ; +0xa4, 0x18000c704\nretn                                                                   ; +0xa6, 0x18000c706", "xrefs": ["<???> @ 0x180032408", "<???> @ 0x18004bc54"], "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"}