{"type": "func", "start": 6442503632, "end": 6442503807, "name": "cocos2d::extension::CCControlSwitch::create", "pseudocode": "// \n// cocos2d::extension::CCControlSwitch::create from 0x18000cdd0 to 0x18000ce7f (175 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x180049da4\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\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 *)operator new(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 0x18000cdd0 to 0x18000ce7f (175 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x180049da4\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, 0x18000cdd0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x18000cdd5\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x18000cdda\nmov     [rsp+arg_18], rdi                                              ; +0xf, 0x18000cddf\npush    r14                                                            ; +0x14, 0x18000cde4\nsub     rsp, 50h                                                       ; +0x16, 0x18000cde6\nmov     rdi, r9                                                        ; +0x1a, 0x18000cdea\nmov     rsi, r8                                                        ; +0x1d, 0x18000cded\nmov     rbp, rdx                                                       ; +0x20, 0x18000cdf0\nmov     r14, rcx                                                       ; +0x23, 0x18000cdf3\nmov     ecx, 1E8h; Size                                                ; +0x26, 0x18000cdf6\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x2b, 0x18000cdfb\nmov     [rsp+58h+var_18], rax                                          ; +0x30, 0x18000ce00\nmov     rcx, rax; this                                                 ; +0x35, 0x18000ce05\ncall    ??0CCControlSwitch@extension@cocos2d@@QEAA@XZ; cocos2d::extension::CCControlSwitch::CCControlSwitch(void) ; +0x38, 0x18000ce08\nmov     rbx, rax                                                       ; +0x3d, 0x18000ce0d\ntest    rax, rax                                                       ; +0x40, 0x18000ce10\njz      short loc_18000CE61                                            ; +0x43, 0x18000ce13\nmov     rax, [rsp+58h+arg_28]                                          ; +0x45, 0x18000ce15\nmov     [rsp+58h+var_28], rax; struct cocos2d::CCLabelTTF *            ; +0x4d, 0x18000ce1d\nmov     rcx, [rsp+58h+arg_20]                                          ; +0x52, 0x18000ce22\nmov     [rsp+58h+var_30], rcx; struct cocos2d::CCLabelTTF *            ; +0x5a, 0x18000ce2a\nmov     [rsp+58h+var_38], rdi; struct cocos2d::CCSprite *              ; +0x5f, 0x18000ce2f\nmov     r9, rsi; struct cocos2d::CCSprite *                            ; +0x64, 0x18000ce34\nmov     r8, rbp; struct cocos2d::CCSprite *                            ; +0x67, 0x18000ce37\nmov     rdx, r14; struct cocos2d::CCSprite *                           ; +0x6a, 0x18000ce3a\nmov     rcx, rbx; this                                                 ; +0x6d, 0x18000ce3d\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, 0x18000ce40\nmov     rcx, rbx                                                       ; +0x75, 0x18000ce45\ntest    al, al                                                         ; +0x78, 0x18000ce48\njz      short loc_18000CE54                                            ; +0x7a, 0x18000ce4a\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x7c, 0x18000ce4c\njmp     short loc_18000CE61                                            ; +0x82, 0x18000ce52\nmov     rax, [rbx]                                                     ; +0x84, 0x18000ce54\nmov     edx, 1                                                         ; +0x87, 0x18000ce57\ncall    qword ptr [rax+8]                                              ; +0x8c, 0x18000ce5c\nxor     ebx, ebx                                                       ; +0x8f, 0x18000ce5f\nmov     rax, rbx                                                       ; +0x91, 0x18000ce61\nmov     rbx, [rsp+58h+arg_0]                                           ; +0x94, 0x18000ce64\nmov     rbp, [rsp+58h+arg_8]                                           ; +0x99, 0x18000ce69\nmov     rsi, [rsp+58h+arg_10]                                          ; +0x9e, 0x18000ce6e\nmov     rdi, [rsp+58h+arg_18]                                          ; +0xa3, 0x18000ce73\nadd     rsp, 50h                                                       ; +0xa8, 0x18000ce78\npop     r14                                                            ; +0xac, 0x18000ce7c\nretn                                                                   ; +0xae, 0x18000ce7e", "xrefs": ["<???> @ 0x18002fdf8", "<???> @ 0x180049da4"], "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"}