{"type": "func", "start": 6442502432, "end": 6442502607, "name": "cocos2d::extension::CCControlSwitch::create", "pseudocode": "// \n// cocos2d::extension::CCControlSwitch::create from 0x18000c920 to 0x18000c9cf (175 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x180032408\n// > <???> @ 0x18004bc6c\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        struct cocos2d::CCLabelTTF *a5,\n        struct cocos2d::CCLabelTTF *a6)\n{\n  cocos2d::extension::CCControlSwitch *v10; // rbx\n  cocos2d::extension::CCControlSwitch *v12; // [rsp+40h] [rbp-18h]\n\n  v12 = (cocos2d::extension::CCControlSwitch *)sub_18001F040(0x1E8u);\n  v10 = cocos2d::extension::CCControlSwitch::CCControlSwitch(v12);\n  if ( v10 )\n  {\n    if ( cocos2d::extension::CCControlSwitch::initWithMaskSprite(v10, a1, a2, a3, a4, a5, a6) )\n    {\n      cocos2d::CCObject::autorelease(v10);\n    }\n    else\n    {\n      (*(void (__fastcall **)(cocos2d::extension::CCControlSwitch *, __int64))(*(_QWORD *)v10 + 8LL))(v10, 1);\n      return nullptr;\n    }\n  }\n  return v10;\n}", "assembly": "; \n; cocos2d::extension::CCControlSwitch::create from 0x18000c920 to 0x18000c9cf (175 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x180032408\n; > <???> @ 0x18004bc6c\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, 0x18000c920\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x18000c925\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x18000c92a\nmov     [rsp+arg_18], rdi                                              ; +0xf, 0x18000c92f\npush    r14                                                            ; +0x14, 0x18000c934\nsub     rsp, 50h                                                       ; +0x16, 0x18000c936\nmov     rdi, r9                                                        ; +0x1a, 0x18000c93a\nmov     rsi, r8                                                        ; +0x1d, 0x18000c93d\nmov     rbp, rdx                                                       ; +0x20, 0x18000c940\nmov     r14, rcx                                                       ; +0x23, 0x18000c943\nmov     ecx, 1E8h; Size                                                ; +0x26, 0x18000c946\ncall    sub_18001F040                                                  ; +0x2b, 0x18000c94b\nmov     [rsp+58h+var_18], rax                                          ; +0x30, 0x18000c950\nmov     rcx, rax; this                                                 ; +0x35, 0x18000c955\ncall    ??0CCControlSwitch@extension@cocos2d@@QEAA@XZ; cocos2d::extension::CCControlSwitch::CCControlSwitch(void) ; +0x38, 0x18000c958\nmov     rbx, rax                                                       ; +0x3d, 0x18000c95d\ntest    rax, rax                                                       ; +0x40, 0x18000c960\njz      short loc_18000C9B1                                            ; +0x43, 0x18000c963\nmov     rax, [rsp+58h+arg_28]                                          ; +0x45, 0x18000c965\nmov     [rsp+58h+var_28], rax; struct cocos2d::CCLabelTTF *            ; +0x4d, 0x18000c96d\nmov     rcx, [rsp+58h+arg_20]                                          ; +0x52, 0x18000c972\nmov     [rsp+58h+var_30], rcx; struct cocos2d::CCLabelTTF *            ; +0x5a, 0x18000c97a\nmov     [rsp+58h+var_38], rdi; struct cocos2d::CCSprite *              ; +0x5f, 0x18000c97f\nmov     r9, rsi; struct cocos2d::CCSprite *                            ; +0x64, 0x18000c984\nmov     r8, rbp; struct cocos2d::CCSprite *                            ; +0x67, 0x18000c987\nmov     rdx, r14; struct cocos2d::CCSprite *                           ; +0x6a, 0x18000c98a\nmov     rcx, rbx; this                                                 ; +0x6d, 0x18000c98d\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 *) ; +0x70, 0x18000c990\nmov     rcx, rbx                                                       ; +0x75, 0x18000c995\ntest    al, al                                                         ; +0x78, 0x18000c998\njz      short loc_18000C9A4                                            ; +0x7a, 0x18000c99a\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x7c, 0x18000c99c\njmp     short loc_18000C9B1                                            ; +0x82, 0x18000c9a2\nmov     rax, [rbx]                                                     ; +0x84, 0x18000c9a4\nmov     edx, 1                                                         ; +0x87, 0x18000c9a7\ncall    qword ptr [rax+8]                                              ; +0x8c, 0x18000c9ac\nxor     ebx, ebx                                                       ; +0x8f, 0x18000c9af\nmov     rax, rbx                                                       ; +0x91, 0x18000c9b1\nmov     rbx, [rsp+58h+arg_0]                                           ; +0x94, 0x18000c9b4\nmov     rbp, [rsp+58h+arg_8]                                           ; +0x99, 0x18000c9b9\nmov     rsi, [rsp+58h+arg_10]                                          ; +0x9e, 0x18000c9be\nmov     rdi, [rsp+58h+arg_18]                                          ; +0xa3, 0x18000c9c3\nadd     rsp, 50h                                                       ; +0xa8, 0x18000c9c8\npop     r14                                                            ; +0xac, 0x18000c9cc\nretn                                                                   ; +0xae, 0x18000c9ce", "xrefs": ["<???> @ 0x180032408", "<???> @ 0x18004bc6c"], "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"}